WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress - Version 2.5.3

Version Description

Download this release

Release Info

Developer tareq1988
Plugin Icon 128x128 WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress
Version 2.5.3
Comparing to
See all releases

Code changes from version 2.5.2 to 2.5.3

Files changed (111) hide show
  1. admin/add-ons.php +0 -0
  2. admin/form-builder/assets/js/components/builder-stage/index.js +37 -6
  3. admin/form-builder/assets/js/components/builder-stage/template.php +1 -1
  4. admin/form-builder/assets/js/components/field-option-data/index.js +1 -1
  5. admin/form-builder/assets/js/components/field-option-data/template.php +2 -2
  6. admin/form-builder/assets/js/components/form-checkbox_field/template.php +2 -2
  7. admin/form-builder/assets/js/components/form-radio_field/template.php +2 -2
  8. admin/form-builder/assets/js/components/merge-tags/index.js +55 -0
  9. admin/form-builder/assets/js/components/merge-tags/template.php +45 -0
  10. admin/form-builder/assets/js/mixins/global.js +1 -1
  11. admin/form-builder/assets/less/form-builder.less +78 -0
  12. admin/form-builder/class-wpuf-admin-form-builder.php +24 -6
  13. admin/form-handler.php +2 -4
  14. admin/form-template.php +0 -1
  15. admin/form.php +5 -5
  16. admin/subscription.php +4 -4
  17. admin/template.php +0 -3
  18. admin/tools.php +0 -0
  19. assets/css/admin.css +0 -0
  20. assets/css/chosen/chosen-sprite.png +0 -0
  21. assets/css/chosen/chosen-sprite@2x.png +0 -0
  22. assets/css/chosen/chosen.css +0 -0
  23. assets/css/frontend-forms.css +48 -55
  24. assets/css/frontend-forms.less +52 -43
  25. assets/css/images/ui-bg_diagonals-small_75_cccccc_40x40.png +0 -0
  26. assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  27. assets/css/images/ui-bg_flat_0_ffffff_40x100.png +0 -0
  28. assets/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  29. assets/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  30. assets/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  31. assets/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  32. assets/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  33. assets/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  34. assets/css/images/ui-icons_222222_256x240.png +0 -0
  35. assets/css/images/ui-icons_2e83ff_256x240.png +0 -0
  36. assets/css/images/ui-icons_454545_256x240.png +0 -0
  37. assets/css/images/ui-icons_888888_256x240.png +0 -0
  38. assets/css/images/ui-icons_cd0a0a_256x240.png +0 -0
  39. assets/css/jquery-ui-1.9.1.custom.css +0 -0
  40. assets/css/jquery.smallipop.css +0 -0
  41. assets/css/wpuf-form-builder.css +64 -0
  42. assets/css/wpuf.css +0 -0
  43. assets/images/add.png +0 -0
  44. assets/images/arrow-move.png +0 -0
  45. assets/images/arrows.png +0 -0
  46. assets/images/cross.png +0 -0
  47. assets/images/del.png +0 -0
  48. assets/images/delete.png +0 -0
  49. assets/images/edit.png +0 -0
  50. assets/images/help.png +0 -0
  51. assets/images/no-image.png +0 -0
  52. assets/images/paypal.png +0 -0
  53. assets/images/remove.png +0 -0
  54. assets/images/tick.png +0 -0
  55. assets/images/wpspin_light.gif +0 -0
  56. assets/js/chosen.jquery.js +0 -0
  57. assets/js/conditional-logic.js +0 -139
  58. assets/js/conditional.js +0 -0
  59. assets/js/formbuilder.js +3 -3
  60. assets/js/formbuilder.min.js +0 -0
  61. assets/js/frontend-form.js +46 -24
  62. assets/js/frontend-form.min.js +1 -1
  63. assets/js/jquery-ui-timepicker-addon.js +0 -0
  64. assets/js/jquery.smallipop-0.4.0.min.js +0 -0
  65. assets/js/jquery.validate.min.js +0 -0
  66. assets/js/subscriptions.js +2 -2
  67. assets/js/upload.js +2 -0
  68. assets/js/upload.min.js +1 -1
  69. assets/js/wpuf-form-builder-components.js +93 -7
  70. assets/js/wpuf-form-builder-mixins.js +1 -1
  71. assets/vendor/sweetalert/sweetalert-dev.js +0 -1253
  72. assets/vendor/sweetalert/sweetalert.css +0 -935
  73. assets/vendor/sweetalert/sweetalert.min.js +0 -1
  74. assets/vendor/sweetalert2/LICENSE +22 -0
  75. assets/vendor/sweetalert2/README.md +282 -0
  76. assets/vendor/sweetalert2/dist/sweetalert2.common.js +1635 -0
  77. assets/vendor/sweetalert2/dist/sweetalert2.css +716 -0
  78. assets/vendor/sweetalert2/dist/sweetalert2.js +1641 -0
  79. assets/vendor/sweetalert2/dist/sweetalert2.min.css +1 -0
  80. assets/vendor/sweetalert2/dist/sweetalert2.min.js +1 -0
  81. assets/vendor/sweetalert2/package.json +178 -0
  82. assets/vendor/sweetalert2/src/colors.scss +23 -0
  83. assets/vendor/sweetalert2/src/sweetalert2.js +1167 -0
  84. assets/vendor/sweetalert2/src/sweetalert2.scss +786 -0
  85. assets/vendor/sweetalert2/src/utils/classes.js +52 -0
  86. assets/vendor/sweetalert2/src/utils/dom.js +332 -0
  87. assets/vendor/sweetalert2/src/utils/params.js +49 -0
  88. assets/vendor/sweetalert2/src/utils/utils.js +31 -0
  89. assets/vendor/vue/vue.js +0 -0
  90. assets/vendor/vue/vue.min.js +0 -0
  91. assets/vendor/vuex/vuex.js +0 -0
  92. assets/vendor/vuex/vuex.min.js +0 -0
  93. class/frontend-dashboard.php +0 -0
  94. class/frontend-form-post.php +1 -3
  95. class/render-form.php +68 -25
  96. class/upgrades.php +0 -0
  97. class/upload.php +0 -0
  98. includes/free/edit-user.php +1 -2
  99. includes/free/loader.php +0 -4
  100. languages/readme.txt +0 -0
  101. languages/wpuf-fa_IR.mo +0 -0
  102. languages/wpuf-fa_IR.po +0 -0
  103. languages/wpuf.pot +139 -147
  104. lib/class.settings-api.php +0 -0
  105. lib/recaptchalib.php +0 -0
  106. readme.txt +75 -18
  107. templates/logged-in.php +0 -0
  108. templates/login-form.php +0 -0
  109. templates/lost-pass-form.php +0 -0
  110. templates/reset-pass-form.php +0 -0
  111. wpuf.php +4 -5
admin/add-ons.php CHANGED
File without changes
admin/form-builder/assets/js/components/builder-stage/index.js CHANGED
@@ -108,16 +108,47 @@ Vue.component('builder-stage', {
108
 
109
  delete_field: function(index) {
110
  var self = this;
111
-
112
- self.warn({
113
- text: self.i18n.delete_field_warn_msg,
 
 
 
 
 
114
  confirmButtonText: self.i18n.yes_delete_it,
115
  cancelButtonText: self.i18n.no_cancel_it,
116
- }, function (is_confirm) {
117
- if (is_confirm) {
118
- self.$store.commit('delete_form_field_element', index);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  }
120
  });
 
 
 
 
 
 
 
 
 
 
121
  },
122
 
123
  delete_hidden_field: function (field_id) {
108
 
109
  delete_field: function(index) {
110
  var self = this;
111
+
112
+ swal({
113
+ title: 'Are you sure?',
114
+ text: "You won't be able to revert this!",
115
+ type: 'warning',
116
+ showCancelButton: true,
117
+ confirmButtonColor: '#3085d6',
118
+ cancelButtonColor: '#d33',
119
  confirmButtonText: self.i18n.yes_delete_it,
120
  cancelButtonText: self.i18n.no_cancel_it,
121
+ confirmButtonClass: 'btn btn-success',
122
+ cancelButtonClass: 'btn btn-danger',
123
+ buttonsStyling: false
124
+ }).then(function () {
125
+ self.$store.commit('delete_form_field_element', index);
126
+ swal(
127
+ 'Deleted!',
128
+ 'Your file has been deleted.',
129
+ 'success'
130
+ );
131
+ }, function (dismiss) {
132
+ // dismiss can be 'cancel', 'overlay',
133
+ // 'close', and 'timer'
134
+ if (dismiss === 'cancel') {
135
+ swal(
136
+ 'Cancelled',
137
+ 'Your field is safe :)',
138
+ 'error'
139
+ );
140
  }
141
  });
142
+
143
+ // self.warn({
144
+ // text: self.i18n.delete_field_warn_msg,
145
+ // confirmButtonText: self.i18n.yes_delete_it,
146
+ // cancelButtonText: self.i18n.no_cancel_it,
147
+ // }, function (is_confirm) {
148
+ // if (is_confirm) {
149
+ // self.$store.commit('delete_form_field_element', index);
150
+ // }
151
+ // });
152
  },
153
 
154
  delete_hidden_field: function (field_id) {
admin/form-builder/assets/js/components/builder-stage/template.php CHANGED
@@ -31,7 +31,7 @@
31
  </label>
32
  </div>
33
 
34
- <div v-if="is_template_available(field) && !is_failed_to_validate(field.template)" class="control-buttons">
35
  <p>
36
  <i class="fa fa-arrows move"></i>
37
  <i class="fa fa-pencil" @click="open_field_settings(field.id)"></i>
31
  </label>
32
  </div>
33
 
34
+ <div v-if="!is_failed_to_validate(field.template)" class="control-buttons">
35
  <p>
36
  <i class="fa fa-arrows move"></i>
37
  <i class="fa fa-pencil" @click="open_field_settings(field.id)"></i>
admin/form-builder/assets/js/components/field-option-data/index.js CHANGED
@@ -91,7 +91,7 @@ Vue.component('field-option-data', {
91
  },
92
 
93
  set_option_label: function (index, label) {
94
- this.options[index].value = label.toLocaleLowerCase().replace(' ', '_');
95
  }
96
  },
97
 
91
  },
92
 
93
  set_option_label: function (index, label) {
94
+ this.options[index].value = label.toLocaleLowerCase().replace( /\s/g, '_' );
95
  }
96
  },
97
 
admin/form-builder/assets/js/components/field-option-data/template.php CHANGED
@@ -30,13 +30,13 @@
30
  <input
31
  v-if="option_field.is_multiple"
32
  type="checkbox"
33
- :value="option.label"
34
  v-model="selected"
35
  >
36
  <input
37
  v-else
38
  type="radio"
39
- :value="option.label"
40
  v-model="selected"
41
  class="option-chooser-radio"
42
  >
30
  <input
31
  v-if="option_field.is_multiple"
32
  type="checkbox"
33
+ :value="option.value"
34
  v-model="selected"
35
  >
36
  <input
37
  v-else
38
  type="radio"
39
+ :value="option.value"
40
  v-model="selected"
41
  class="option-chooser-radio"
42
  >
admin/form-builder/assets/js/components/form-checkbox_field/template.php CHANGED
@@ -4,8 +4,8 @@
4
  <label>
5
  <input
6
  type="checkbox"
7
- :value="label"
8
- :checked="is_selected(label)"
9
  :class="class_names('checkbox_btns')"
10
  > {{ label }}
11
  </label>
4
  <label>
5
  <input
6
  type="checkbox"
7
+ :value="val"
8
+ :checked="is_selected(val)"
9
  :class="class_names('checkbox_btns')"
10
  > {{ label }}
11
  </label>
admin/form-builder/assets/js/components/form-radio_field/template.php CHANGED
@@ -4,8 +4,8 @@
4
  <label>
5
  <input
6
  type="radio"
7
- :value="label"
8
- :checked="is_selected(label)"
9
  :class="class_names('radio_btns')"
10
  > {{ label }}
11
  </label>
4
  <label>
5
  <input
6
  type="radio"
7
+ :value="val"
8
+ :checked="is_selected(val)"
9
  :class="class_names('radio_btns')"
10
  > {{ label }}
11
  </label>
admin/form-builder/assets/js/components/merge-tags/index.js ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Vue.component('wpuf-merge-tags', {
2
+ template: '#tmpl-wpuf-merge-tags',
3
+ props: {
4
+ field: String,
5
+ filter: {
6
+ type: String,
7
+ default: null
8
+ }
9
+ },
10
+
11
+ data: function() {
12
+ return {
13
+ showing: false,
14
+ type: null,
15
+ };
16
+ },
17
+
18
+ mounted: function() {
19
+
20
+ // hide if clicked outside
21
+ $('body').on('click', function(event) {
22
+ if ( !$(event.target).closest('.wpuf-merge-tag-wrap').length) {
23
+ $(".wpuf-merge-tags").hide();
24
+ }
25
+ });
26
+ },
27
+
28
+ computed: {
29
+ form_fields: function () {
30
+ var template = this.filter,
31
+ fields = this.$store.state.form_fields;
32
+
33
+ if (template !== null) {
34
+ return fields.filter(function(item) {
35
+ return item.template === template;
36
+ });
37
+ }
38
+
39
+ // remove the action/hidden fields
40
+ return fields.filter(function(item) {
41
+ return !_.contains( [ 'action_hook', 'custom_hidden_field'], item.template );
42
+ });
43
+ },
44
+ },
45
+
46
+ methods: {
47
+ toggleFields: function(event) {
48
+ $(event.target).parent().siblings('.wpuf-merge-tags').toggle('fast');
49
+ },
50
+
51
+ insertField: function(type, field) {
52
+ this.$emit('insert', type, field, this.field);
53
+ }
54
+ }
55
+ });
admin/form-builder/assets/js/components/merge-tags/template.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wpuf-merge-tag-wrap">
2
+ <a href="#" v-on:click.prevent="toggleFields($event)" class="merge-tag-link" title="<?php echo esc_attr( 'Click to toggle merge tags', 'wpuf' ); ?>"><span class="dashicons dashicons-editor-code"></span></a>
3
+
4
+ <!-- <pre>{{ form_fields.length }}</pre> -->
5
+
6
+ <div class="wpuf-merge-tags">
7
+ <div class="merge-tag-section">
8
+ <div class="merge-tag-head"><?php _e( 'Form Fields', 'wpuf' ); ?></div>
9
+
10
+ <ul>
11
+ <template v-if="form_fields.length">
12
+ <li v-for="field in form_fields">
13
+ <a href="#" v-on:click.prevent="insertField('field', field.name);">{{ field.label }}</a>
14
+ </li>
15
+ </template>
16
+ <li v-else><?php _e( 'No fields available', 'wpuf' ); ?></li>
17
+ </ul>
18
+ </div><!-- .merge-tag-section -->
19
+
20
+ <?php
21
+ if ( function_exists( 'wpuf_cf_get_merge_tags' ) ) {
22
+
23
+ $merge_tags = wpuf_cf_get_merge_tags();
24
+
25
+ foreach ($merge_tags as $section_key => $section) {
26
+ ?>
27
+
28
+ <div class="merge-tag-section">
29
+ <div class="merge-tag-head"><?php echo $section['title'] ?></div>
30
+
31
+ <ul>
32
+ <?php foreach ($section['tags'] as $key => $value) { ?>
33
+ <li>
34
+ <a href="#" v-on:click.prevent="insertField('<?php echo $key; ?>');"><?php echo $value; ?></a>
35
+ </li>
36
+ <?php } ?>
37
+ </ul>
38
+ </div><!-- .merge-tag-section -->
39
+
40
+ <?php
41
+ }
42
+ }
43
+ ?>
44
+ </div><!-- .merge-tags -->
45
+ </div>
admin/form-builder/assets/js/mixins/global.js CHANGED
@@ -55,7 +55,7 @@ Vue.mixin({
55
  isSingleInstance: function(field_name) {
56
  var singleInstance = ['post_title', 'post_content', 'post_excerpt', 'featured_image',
57
  'user_login', 'first_name', 'last_name', 'nickname', 'user_email', 'user_url',
58
- 'user_bio', 'password', 'user_avatar'];
59
 
60
  if ( $.inArray(field_name, singleInstance) >= 0 ) {
61
  return true;
55
  isSingleInstance: function(field_name) {
56
  var singleInstance = ['post_title', 'post_content', 'post_excerpt', 'featured_image',
57
  'user_login', 'first_name', 'last_name', 'nickname', 'user_email', 'user_url',
58
+ 'user_bio', 'password', 'user_avatar', 'taxonomy'];
59
 
60
  if ( $.inArray(field_name, singleInstance) >= 0 ) {
61
  return true;
admin/form-builder/assets/less/form-builder.less CHANGED
@@ -137,6 +137,41 @@
137
  min-width: 100px;
138
  }
139
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
 
141
  // CSS3 loader animation
142
  // --------------------------------------------------
@@ -945,3 +980,46 @@ ul.wpuf-form li .wpuf-password-field:after {
945
  content: "";
946
  display: table;
947
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  min-width: 100px;
138
  }
139
  }
140
+ .swal2-modal {
141
+ .swal2-buttonswrapper {
142
+ button {
143
+ display: inline-block;
144
+ padding: 6px 12px;
145
+ margin-bottom: 0;
146
+ font-size: 14px;
147
+ font-weight: 400;
148
+ line-height: 1.42857143;
149
+ text-align: center;
150
+ white-space: nowrap;
151
+ vertical-align: middle;
152
+ -ms-touch-action: manipulation;
153
+ touch-action: manipulation;
154
+ cursor: pointer;
155
+ -webkit-user-select: none;
156
+ -moz-user-select: none;
157
+ -ms-user-select: none;
158
+ user-select: none;
159
+ background-image: none;
160
+ border: 1px solid transparent;
161
+ border-radius: 4px;
162
+ }
163
+ .swal2-confirm {
164
+ color: #fff;
165
+ background-color: #337ab7;
166
+ border-color: #2e6da4;
167
+ }
168
+ .swal2-cancel {
169
+ color: #fff;
170
+ background-color: #d9534f;
171
+ border-color: #d43f3a;
172
+ }
173
+ }
174
+ }
175
 
176
  // CSS3 loader animation
177
  // --------------------------------------------------
980
  content: "";
981
  display: table;
982
  }
983
+
984
+ // Merge Tags
985
+ // --------------------------------------------------
986
+ .wpuf-merge-tag-wrap {
987
+
988
+ .merge-tag-link {
989
+ position: absolute;
990
+ right: 5px;
991
+ top: 30px;
992
+ color: #999;
993
+ text-decoration: none;
994
+
995
+ &:hover {
996
+ color: #555;
997
+ }
998
+ }
999
+
1000
+ .wpuf-merge-tags {
1001
+ max-height: 110px;
1002
+ overflow: hidden;
1003
+ overflow-y: scroll;
1004
+ border: 1px solid #e5e5e5;
1005
+ box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.04);
1006
+ display: none;
1007
+ position: absolute;
1008
+ right: 0px;
1009
+ top: 60px;
1010
+ background: #fff;
1011
+ z-index: 1000;
1012
+ min-height: 150px;
1013
+
1014
+ .merge-tag-head {
1015
+ font-weight: bold;
1016
+ background: #f0f0f0;
1017
+ padding: 3px 10px;
1018
+ }
1019
+
1020
+ .merge-tag-section ul {
1021
+ margin: 0;
1022
+ padding: 5px 10px;
1023
+ }
1024
+ }
1025
+ }
admin/form-builder/class-wpuf-admin-form-builder.php CHANGED
@@ -42,6 +42,7 @@ class WPUF_Admin_Form_Builder {
42
  add_action( 'in_admin_header', array( $this, 'remove_admin_notices' ) );
43
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
44
  add_action( 'admin_print_scripts', array( $this, 'admin_print_scripts' ) );
 
45
  add_action( 'admin_footer', array( $this, 'admin_footer' ) );
46
  add_action( 'wpuf-admin-form-builder', array( $this, 'include_form_builder' ) );
47
  }
@@ -61,6 +62,7 @@ class WPUF_Admin_Form_Builder {
61
  remove_all_actions( 'network_admin_notices' );
62
  remove_all_actions( 'user_admin_notices' );
63
  remove_all_actions( 'admin_notices' );
 
64
  }
65
 
66
  /**
@@ -78,13 +80,13 @@ class WPUF_Admin_Form_Builder {
78
  */
79
  wp_enqueue_style( 'wpuf-css', WPUF_ASSET_URI . '/css/frontend-forms.css' );
80
  wp_enqueue_style( 'wpuf-font-awesome', WPUF_ASSET_URI . '/vendor/font-awesome/css/font-awesome.min.css', array(), WPUF_VERSION );
81
- wp_enqueue_style( 'wpuf-sweetalert', WPUF_ASSET_URI . '/vendor/sweetalert/sweetalert.css', array(), WPUF_VERSION );
82
  wp_enqueue_style( 'wpuf-selectize', WPUF_ASSET_URI . '/vendor/selectize/css/selectize.default.css', array(), WPUF_VERSION );
83
  wp_enqueue_style( 'wpuf-toastr', WPUF_ASSET_URI . '/vendor/toastr/toastr.min.css', array(), WPUF_VERSION );
84
  wp_enqueue_style( 'wpuf-tooltip', WPUF_ASSET_URI . '/vendor/tooltip/tooltip.css', array(), WPUF_VERSION );
85
 
86
  $form_builder_css_deps = apply_filters( 'wpuf-form-builder-css-deps', array(
87
- 'wpuf-css', 'wpuf-font-awesome', 'wpuf-sweetalert', 'wpuf-selectize', 'wpuf-toastr', 'wpuf-tooltip'
88
  ) );
89
 
90
  wp_enqueue_style( 'wpuf-form-builder', WPUF_ASSET_URI . '/css/wpuf-form-builder.css', $form_builder_css_deps, WPUF_VERSION );
@@ -98,7 +100,7 @@ class WPUF_Admin_Form_Builder {
98
 
99
  wp_enqueue_script( 'wpuf-vue', WPUF_ASSET_URI . '/vendor/vue/vue' . $prefix . '.js', array(), WPUF_VERSION, true );
100
  wp_enqueue_script( 'wpuf-vuex', WPUF_ASSET_URI . '/vendor/vuex/vuex' . $prefix . '.js', array( 'wpuf-vue' ), WPUF_VERSION, true );
101
- wp_enqueue_script( 'wpuf-sweetalert', WPUF_ASSET_URI . '/vendor/sweetalert/sweetalert-dev.js', array(), WPUF_VERSION, true );
102
  wp_enqueue_script( 'wpuf-jquery-scrollTo', WPUF_ASSET_URI . '/vendor/jquery.scrollTo/jquery.scrollTo' . $prefix . '.js', array( 'jquery' ), WPUF_VERSION, true );
103
  wp_enqueue_script( 'wpuf-selectize', WPUF_ASSET_URI . '/vendor/selectize/js/standalone/selectize' . $prefix . '.js', array( 'jquery' ), WPUF_VERSION, true );
104
  wp_enqueue_script( 'wpuf-toastr', WPUF_ASSET_URI . '/vendor/toastr/toastr' . $prefix . '.js', array(), WPUF_VERSION, true );
@@ -107,7 +109,7 @@ class WPUF_Admin_Form_Builder {
107
 
108
  $form_builder_js_deps = apply_filters( 'wpuf-form-builder-js-deps', array(
109
  'jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'underscore',
110
- 'wpuf-vue', 'wpuf-vuex', 'wpuf-sweetalert', 'wpuf-jquery-scrollTo',
111
  'wpuf-selectize', 'wpuf-toastr', 'wpuf-clipboard', 'wpuf-tooltip'
112
  ) );
113
 
@@ -220,6 +222,24 @@ class WPUF_Admin_Form_Builder {
220
  do_action( 'wpuf-form-builder-add-js-templates' );
221
  }
222
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
223
  /**
224
  * Embed a Vue.js component template
225
  *
@@ -295,8 +315,6 @@ class WPUF_Admin_Form_Builder {
295
  'custom_hidden_field', 'image_upload'
296
  ) );
297
 
298
- // var_dump( $fields ); exit;
299
-
300
  return array(
301
  array(
302
  'title' => __( 'Custom Fields', 'wpuf' ),
42
  add_action( 'in_admin_header', array( $this, 'remove_admin_notices' ) );
43
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
44
  add_action( 'admin_print_scripts', array( $this, 'admin_print_scripts' ) );
45
+ add_action( 'admin_footer', array( $this, 'custom_dequeue' ) );
46
  add_action( 'admin_footer', array( $this, 'admin_footer' ) );
47
  add_action( 'wpuf-admin-form-builder', array( $this, 'include_form_builder' ) );
48
  }
62
  remove_all_actions( 'network_admin_notices' );
63
  remove_all_actions( 'user_admin_notices' );
64
  remove_all_actions( 'admin_notices' );
65
+ remove_all_actions( 'all_admin_notices' );
66
  }
67
 
68
  /**
80
  */
81
  wp_enqueue_style( 'wpuf-css', WPUF_ASSET_URI . '/css/frontend-forms.css' );
82
  wp_enqueue_style( 'wpuf-font-awesome', WPUF_ASSET_URI . '/vendor/font-awesome/css/font-awesome.min.css', array(), WPUF_VERSION );
83
+ wp_enqueue_style( 'wpuf-sweetalert2', WPUF_ASSET_URI . '/vendor/sweetalert2/dist/sweetalert2.css', array(), WPUF_VERSION );
84
  wp_enqueue_style( 'wpuf-selectize', WPUF_ASSET_URI . '/vendor/selectize/css/selectize.default.css', array(), WPUF_VERSION );
85
  wp_enqueue_style( 'wpuf-toastr', WPUF_ASSET_URI . '/vendor/toastr/toastr.min.css', array(), WPUF_VERSION );
86
  wp_enqueue_style( 'wpuf-tooltip', WPUF_ASSET_URI . '/vendor/tooltip/tooltip.css', array(), WPUF_VERSION );
87
 
88
  $form_builder_css_deps = apply_filters( 'wpuf-form-builder-css-deps', array(
89
+ 'wpuf-css', 'wpuf-font-awesome', 'wpuf-sweetalert2', 'wpuf-selectize', 'wpuf-toastr', 'wpuf-tooltip'
90
  ) );
91
 
92
  wp_enqueue_style( 'wpuf-form-builder', WPUF_ASSET_URI . '/css/wpuf-form-builder.css', $form_builder_css_deps, WPUF_VERSION );
100
 
101
  wp_enqueue_script( 'wpuf-vue', WPUF_ASSET_URI . '/vendor/vue/vue' . $prefix . '.js', array(), WPUF_VERSION, true );
102
  wp_enqueue_script( 'wpuf-vuex', WPUF_ASSET_URI . '/vendor/vuex/vuex' . $prefix . '.js', array( 'wpuf-vue' ), WPUF_VERSION, true );
103
+ wp_enqueue_script( 'wpuf-sweetalert2', WPUF_ASSET_URI . '/vendor/sweetalert2/dist/sweetalert2.js', array(), WPUF_VERSION, true );
104
  wp_enqueue_script( 'wpuf-jquery-scrollTo', WPUF_ASSET_URI . '/vendor/jquery.scrollTo/jquery.scrollTo' . $prefix . '.js', array( 'jquery' ), WPUF_VERSION, true );
105
  wp_enqueue_script( 'wpuf-selectize', WPUF_ASSET_URI . '/vendor/selectize/js/standalone/selectize' . $prefix . '.js', array( 'jquery' ), WPUF_VERSION, true );
106
  wp_enqueue_script( 'wpuf-toastr', WPUF_ASSET_URI . '/vendor/toastr/toastr' . $prefix . '.js', array(), WPUF_VERSION, true );
109
 
110
  $form_builder_js_deps = apply_filters( 'wpuf-form-builder-js-deps', array(
111
  'jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'underscore',
112
+ 'wpuf-vue', 'wpuf-vuex', 'wpuf-sweetalert2', 'wpuf-jquery-scrollTo',
113
  'wpuf-selectize', 'wpuf-toastr', 'wpuf-clipboard', 'wpuf-tooltip'
114
  ) );
115
 
222
  do_action( 'wpuf-form-builder-add-js-templates' );
223
  }
224
 
225
+
226
+ /**
227
+ * Dequeue style and script to avoid conflict with Imagify Image Optimizer plugin
228
+ *
229
+ * @since 2.5
230
+ *
231
+ * @param string $template
232
+ * @param string $file_path
233
+ *
234
+ * @return void
235
+ */
236
+ public static function custom_dequeue() {
237
+ wp_dequeue_style( 'imagify-css-sweetalert' );
238
+ wp_deregister_style( 'imagify-css-sweetalert' );
239
+ wp_dequeue_script( 'imagify-js-sweetalert' );
240
+ wp_deregister_script( 'imagify-js-sweetalert' );
241
+ }
242
+
243
  /**
244
  * Embed a Vue.js component template
245
  *
315
  'custom_hidden_field', 'image_upload'
316
  ) );
317
 
 
 
318
  return array(
319
  array(
320
  'title' => __( 'Custom Fields', 'wpuf' ),
admin/form-handler.php CHANGED
@@ -2,11 +2,9 @@
2
  class WPUF_Admin_Form_Handler {
3
 
4
  public function __construct() {
5
- $user_frontend = sanitize_title( __( 'User Frontend', 'wpuf' ) );
6
-
7
  // post forms list table
8
- add_action( "load-{$user_frontend}_page_wpuf-post-forms", array( $this, 'post_forms_actions' ) );
9
- add_action( "load-{$user_frontend}_page_wpuf-profile-forms", array( $this, 'profile_forms_actions' ) );
10
  add_action( 'admin_notices', array( $this, 'admin_notices' ) );
11
  add_action( 'removable_query_args', array( $this, 'removable_query_args' ) );
12
  }
2
  class WPUF_Admin_Form_Handler {
3
 
4
  public function __construct() {
 
 
5
  // post forms list table
6
+ add_action( "load-user-frontend_page_wpuf-post-forms", array( $this, 'post_forms_actions' ) );
7
+ add_action( "load-user-frontend_page_wpuf-profile-forms", array( $this, 'profile_forms_actions' ) );
8
  add_action( 'admin_notices', array( $this, 'admin_notices' ) );
9
  add_action( 'removable_query_args', array( $this, 'removable_query_args' ) );
10
  }
admin/form-template.php CHANGED
@@ -115,7 +115,6 @@ class WPUF_Admin_Form_Template {
115
  return;
116
  }
117
 
118
- // var_dump( $template_object ); die();
119
  $current_user = get_current_user_id();
120
 
121
  $form_post_data = array(
115
  return;
116
  }
117
 
 
118
  $current_user = get_current_user_id();
119
 
120
  $form_post_data = array(
admin/form.php CHANGED
@@ -34,9 +34,7 @@ class WPUF_Admin_Form {
34
  */
35
  public function __construct() {
36
  add_action( 'init', array($this, 'register_post_type') );
37
-
38
- $user_frontend = sanitize_title( __( 'User Frontend', 'wpuf' ) );
39
- add_action( "load-{$user_frontend}_page_wpuf-post-forms", array( $this, 'post_forms_builder_init' ) );
40
  }
41
 
42
  /**
@@ -230,6 +228,8 @@ class WPUF_Admin_Form {
230
  <a href="#wpuf-metabox-settings-update" class="nav-tab"><?php _e( 'Edit Settings', 'wpuf' ); ?></a>
231
  <a href="#wpuf-metabox-post_expiration" class="nav-tab"><?php _e( 'Post Expiration', 'wpuf' ); ?></a>
232
 
 
 
233
  <?php
234
  }
235
 
@@ -351,9 +351,9 @@ class WPUF_Admin_Form {
351
  * @return array
352
  */
353
  public function js_dependencies( $deps ) {
354
- array_push( $deps, 'wpuf-form-builder-wpuf-forms' );
355
 
356
- return $deps;
357
  }
358
 
359
  /**
34
  */
35
  public function __construct() {
36
  add_action( 'init', array($this, 'register_post_type') );
37
+ add_action( "load-user-frontend_page_wpuf-post-forms", array( $this, 'post_forms_builder_init' ) );
 
 
38
  }
39
 
40
  /**
228
  <a href="#wpuf-metabox-settings-update" class="nav-tab"><?php _e( 'Edit Settings', 'wpuf' ); ?></a>
229
  <a href="#wpuf-metabox-post_expiration" class="nav-tab"><?php _e( 'Post Expiration', 'wpuf' ); ?></a>
230
 
231
+ <?php do_action( 'wpuf_post_form_tab' ); ?>
232
+
233
  <?php
234
  }
235
 
351
  * @return array
352
  */
353
  public function js_dependencies( $deps ) {
354
+ $deps[] = 'wpuf-form-builder-wpuf-forms';
355
 
356
+ return apply_filters( 'wpuf-form-builder-wpuf-forms-js-deps', $deps );
357
  }
358
 
359
  /**
admin/subscription.php CHANGED
@@ -330,7 +330,7 @@ class WPUF_Admin_Subscription {
330
  <input type="checkbox" id="wpuf-enable_post_expiration" name="post_expiration_settings[enable_post_expiration]" value="on" <?php echo $is_post_exp_selected;?> />
331
  </td>
332
  </tr>
333
- <tr class="wpuf-metabox-post_expiration wpuf_expiration_field">
334
  <?php
335
  $timeType_array = array(
336
  'year' => 100,
@@ -361,7 +361,7 @@ class WPUF_Admin_Subscription {
361
  </td>
362
 
363
  </tr>
364
- <tr class="wpuf_expiration_field">
365
  <th>
366
  Post Status :
367
  </th>
@@ -380,7 +380,7 @@ class WPUF_Admin_Subscription {
380
  <p class="description"><?php echo _('Status of post after post expiration time is over ');?></p>
381
  </td>
382
  </tr>
383
- <tr class="wpuf_expiration_field">
384
  <th>
385
  Send Mail :
386
  </th>
@@ -389,7 +389,7 @@ class WPUF_Admin_Subscription {
389
  Send Mail to Author After Exceeding Post Expiration Time
390
  </td>
391
  </tr>
392
- <tr class="wpuf_expiration_field">
393
  <th>Post Expiration Message</th>
394
  <td>
395
  <textarea name="post_expiration_settings[post_expiration_message]" id="wpuf-post_expiration_message" cols="50" rows="5"><?php echo $post_expiration_message;?></textarea>
330
  <input type="checkbox" id="wpuf-enable_post_expiration" name="post_expiration_settings[enable_post_expiration]" value="on" <?php echo $is_post_exp_selected;?> />
331
  </td>
332
  </tr>
333
+ <tr class="wpuf-metabox-post_expiration wpuf_subscription_expiration_field">
334
  <?php
335
  $timeType_array = array(
336
  'year' => 100,
361
  </td>
362
 
363
  </tr>
364
+ <tr class="wpuf_subscription_expiration_field">
365
  <th>
366
  Post Status :
367
  </th>
380
  <p class="description"><?php echo _('Status of post after post expiration time is over ');?></p>
381
  </td>
382
  </tr>
383
+ <tr class="wpuf_subscription_expiration_field">
384
  <th>
385
  Send Mail :
386
  </th>
389
  Send Mail to Author After Exceeding Post Expiration Time
390
  </td>
391
  </tr>
392
+ <tr class="wpuf_subscription_expiration_field">
393
  <th>Post Expiration Message</th>
394
  <td>
395
  <textarea name="post_expiration_settings[post_expiration_message]" id="wpuf-post_expiration_message" cols="50" rows="5"><?php echo $post_expiration_message;?></textarea>
admin/template.php CHANGED
@@ -62,9 +62,6 @@ class WPUF_Admin_Template {
62
  if ( $custom_field && $values ) {
63
  $field_name_value = $values['name'];
64
  }
65
-
66
- // var_dump($values);
67
- // var_dump($required, $label_value, $help_value);
68
  ?>
69
  <div class="wpuf-form-rows required-field">
70
  <label><?php _e( 'Required', 'wpuf' ); ?></label>
62
  if ( $custom_field && $values ) {
63
  $field_name_value = $values['name'];
64
  }
 
 
 
65
  ?>
66
  <div class="wpuf-form-rows required-field">
67
  <label><?php _e( 'Required', 'wpuf' ); ?></label>
admin/tools.php CHANGED
File without changes
assets/css/admin.css CHANGED
File without changes
assets/css/chosen/chosen-sprite.png CHANGED
File without changes
assets/css/chosen/chosen-sprite@2x.png CHANGED
File without changes
assets/css/chosen/chosen.css CHANGED
File without changes
assets/css/frontend-forms.css CHANGED
@@ -8,27 +8,18 @@
8
  display: none;
9
  }
10
  .wpuf-button {
11
- background: #f3f3f3;
12
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#f4f4f4));
13
- background-image: -webkit-linear-gradient(top, #fefefe, #f4f4f4);
14
- background-image: -moz-linear-gradient(top, #fefefe, #f4f4f4);
15
- background-image: -o-linear-gradient(top, #fefefe, #f4f4f4);
16
- background-image: linear-gradient(to bottom, #fefefe, #f4f4f4);
17
- border-color: #bbb;
18
- color: #333;
19
- text-shadow: 0 1px 0 #fff;
20
  }
21
  .wpuf-button:hover,
22
  .wpuf-button:focus {
23
- background: #f3f3f3;
24
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f3f3f3));
25
- background-image: -webkit-linear-gradient(top, #fff, #f3f3f3);
26
- background-image: -moz-linear-gradient(top, #fff, #f3f3f3);
27
- background-image: -ms-linear-gradient(top, #fff, #f3f3f3);
28
- background-image: -o-linear-gradient(top, #fff, #f3f3f3);
29
- background-image: linear-gradient(to bottom, #fff, #f3f3f3);
30
  border-color: #999;
31
- color: #222;
32
  }
33
  .wpuf-success {
34
  background-color: #dff0d8;
@@ -145,6 +136,7 @@ ul.wpuf-form li .wpuf-fields select {
145
  -moz-border-radius: 3px;
146
  border-radius: 3px;
147
  min-width: 150px;
 
148
  }
149
  ul.wpuf-form li .wpuf-fields select[multiple] {
150
  height: auto;
@@ -154,6 +146,11 @@ ul.wpuf-form li .wpuf-fields .wpuf-checkbox-inline {
154
  display: inline-block;
155
  margin-right: 10px;
156
  }
 
 
 
 
 
157
  ul.wpuf-form li .wpuf-fields a.file-selector {
158
  display: inline;
159
  padding: 5px 12px;
@@ -163,35 +160,19 @@ ul.wpuf-form li .wpuf-fields a.file-selector {
163
  -webkit-border-radius: 3px;
164
  -moz-border-radius: 3px;
165
  border-radius: 3px;
166
- background-color: #21759b;
167
- background-image: -webkit-gradient(linear, left top, left bottom, from(#2a95c5), to(#21759b));
168
- background-image: -webkit-linear-gradient(top, #2a95c5, #21759b);
169
- background-image: -moz-linear-gradient(top, #2a95c5, #21759b);
170
- background-image: -ms-linear-gradient(top, #2a95c5, #21759b);
171
- background-image: -o-linear-gradient(top, #2a95c5, #21759b);
172
- background-image: linear-gradient(to bottom, #2a95c5, #21759b);
173
- border-color: #21759b;
174
- border-bottom-color: #1e6a8d;
175
- -webkit-box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.5);
176
- box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.5);
177
  color: #fff;
178
  text-decoration: none;
179
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
180
  }
181
  ul.wpuf-form li .wpuf-fields a.file-selector:hover,
182
  ul.wpuf-form li .wpuf-fields a.file-selector:focus {
183
- background-color: #278ab7;
184
- background-image: -webkit-gradient(linear, left top, left bottom, from(#2e9fd2), to(#21759b));
185
- background-image: -webkit-linear-gradient(top, #2e9fd2, #21759b);
186
- background-image: -moz-linear-gradient(top, #2e9fd2, #21759b);
187
- background-image: -ms-linear-gradient(top, #2e9fd2, #21759b);
188
- background-image: -o-linear-gradient(top, #2e9fd2, #21759b);
189
- background-image: linear-gradient(to bottom, #2e9fd2, #21759b);
190
- border-color: #1b607f;
191
- -webkit-box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.6);
192
- box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.6);
193
  color: #fff;
194
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
195
  }
196
  ul.wpuf-form li .wpuf-fields .google-map img {
197
  max-width: none !important;
@@ -414,6 +395,11 @@ ul.wpuf-form li .wpuf-fields table.wpuf-repeatable-field .wpuf-repeater-buttons
414
  height: 15px;
415
  margin: 2px 4px 0 0;
416
  }
 
 
 
 
 
417
  ul.wpuf-form li .wpuf-address-field {
418
  width: 100%;
419
  margin-bottom: 10px;
@@ -423,6 +409,20 @@ ul.wpuf-form li .wpuf-address-field:after {
423
  content: "";
424
  display: table;
425
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  ul.wpuf-form li .wpuf-section-wrap {
427
  border-bottom: 1px solid #ccc;
428
  margin: 15px 0;
@@ -454,9 +454,6 @@ ul.wpuf-form.form-label-hidden li .wpuf-fields {
454
  float: none;
455
  width: 100%;
456
  }
457
- ul.wpuf-form .wpuf-submit .wpuf-label {
458
- display: none !important;
459
- }
460
  ul.wpuf-form .wpuf-submit input[type=submit] {
461
  font-size: 16px;
462
  padding: 5px 15px;
@@ -464,20 +461,13 @@ ul.wpuf-form .wpuf-submit input[type=submit] {
464
  -webkit-border-radius: 3px;
465
  -moz-border-radius: 3px;
466
  border-radius: 3px;
467
- background-color: #21759b;
468
- background-image: -webkit-gradient(linear, left top, left bottom, from(#2a95c5), to(#21759b));
469
- background-image: -webkit-linear-gradient(top, #2a95c5, #21759b);
470
- background-image: -moz-linear-gradient(top, #2a95c5, #21759b);
471
- background-image: -ms-linear-gradient(top, #2a95c5, #21759b);
472
- background-image: -o-linear-gradient(top, #2a95c5, #21759b);
473
- background-image: linear-gradient(to bottom, #2a95c5, #21759b);
474
- border-color: #21759b;
475
- border-bottom-color: #1e6a8d;
476
- -webkit-box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.5);
477
- box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.5);
478
  color: #fff;
479
  text-decoration: none;
480
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
481
  }
482
  ul.wpuf-form .wpuf-submit .button-primary-disabled {
483
  color: #94cde7 !important;
@@ -498,6 +488,9 @@ ul.wpuf-form .wpuf-submit .wpuf-errors {
498
  border-radius: 3px;
499
  font-size: 13px;
500
  }
 
 
 
501
  #wpuf-login-form label {
502
  display: block;
503
  }
8
  display: none;
9
  }
10
  .wpuf-button {
11
+ color: #555;
12
+ border-color: #cccccc;
13
+ background: #f7f7f7;
14
+ -webkit-box-shadow: 0 1px 0 #cccccc;
15
+ box-shadow: 0 1px 0 #cccccc;
16
+ vertical-align: top;
 
 
 
17
  }
18
  .wpuf-button:hover,
19
  .wpuf-button:focus {
20
+ background: #fafafa;
 
 
 
 
 
 
21
  border-color: #999;
22
+ color: #23282d;
23
  }
24
  .wpuf-success {
25
  background-color: #dff0d8;
136
  -moz-border-radius: 3px;
137
  border-radius: 3px;
138
  min-width: 150px;
139
+ max-width: 100%;
140
  }
141
  ul.wpuf-form li .wpuf-fields select[multiple] {
142
  height: auto;
146
  display: inline-block;
147
  margin-right: 10px;
148
  }
149
+ ul.wpuf-form li .wpuf-fields .wpuf-radio-block,
150
+ ul.wpuf-form li .wpuf-fields .wpuf-checkbox-block {
151
+ display: block;
152
+ margin-bottom: 6px;
153
+ }
154
  ul.wpuf-form li .wpuf-fields a.file-selector {
155
  display: inline;
156
  padding: 5px 12px;
160
  -webkit-border-radius: 3px;
161
  -moz-border-radius: 3px;
162
  border-radius: 3px;
163
+ background: #0085ba;
164
+ border-color: #0073aa #006799 #006799;
165
+ -webkit-box-shadow: 0 1px 0 #006799;
166
+ box-shadow: 0 1px 0 #006799;
 
 
 
 
 
 
 
167
  color: #fff;
168
  text-decoration: none;
169
+ text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
170
  }
171
  ul.wpuf-form li .wpuf-fields a.file-selector:hover,
172
  ul.wpuf-form li .wpuf-fields a.file-selector:focus {
173
+ background: #008ec2;
174
+ border-color: #006799;
 
 
 
 
 
 
 
 
175
  color: #fff;
 
176
  }
177
  ul.wpuf-form li .wpuf-fields .google-map img {
178
  max-width: none !important;
395
  height: 15px;
396
  margin: 2px 4px 0 0;
397
  }
398
+ ul.wpuf-form li label.wpuf-form-sub-label {
399
+ font-size: 12px;
400
+ display: inline-block;
401
+ padding-top: 5px;
402
+ }
403
  ul.wpuf-form li .wpuf-address-field {
404
  width: 100%;
405
  margin-bottom: 10px;
409
  content: "";
410
  display: table;
411
  }
412
+ ul.wpuf-form li .wpuf-address-field.city_name,
413
+ ul.wpuf-form li .wpuf-address-field.state,
414
+ ul.wpuf-form li .wpuf-address-field.zip,
415
+ ul.wpuf-form li .wpuf-address-field.country_select {
416
+ float: left;
417
+ width: 47%;
418
+ }
419
+ ul.wpuf-form li .wpuf-address-field.city_name,
420
+ ul.wpuf-form li .wpuf-address-field.zip {
421
+ margin-right: 4%;
422
+ }
423
+ ul.wpuf-form li .wpuf-address-field.zip {
424
+ clear: both;
425
+ }
426
  ul.wpuf-form li .wpuf-section-wrap {
427
  border-bottom: 1px solid #ccc;
428
  margin: 15px 0;
454
  float: none;
455
  width: 100%;
456
  }
 
 
 
457
  ul.wpuf-form .wpuf-submit input[type=submit] {
458
  font-size: 16px;
459
  padding: 5px 15px;
461
  -webkit-border-radius: 3px;
462
  -moz-border-radius: 3px;
463
  border-radius: 3px;
464
+ background: #0085ba;
465
+ border-color: #0073aa #006799 #006799;
466
+ -webkit-box-shadow: 0 1px 0 #006799;
467
+ box-shadow: 0 1px 0 #006799;
 
 
 
 
 
 
 
468
  color: #fff;
469
  text-decoration: none;
470
+ text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
471
  }
472
  ul.wpuf-form .wpuf-submit .button-primary-disabled {
473
  color: #94cde7 !important;
488
  border-radius: 3px;
489
  font-size: 13px;
490
  }
491
+ ul.wpuf-form:not(.form-label-left) .wpuf-submit .wpuf-label {
492
+ display: none !important;
493
+ }
494
  #wpuf-login-form label {
495
  display: block;
496
  }
assets/css/frontend-forms.less CHANGED
@@ -16,35 +16,22 @@
16
  }
17
 
18
  .core-button() {
19
- background-color: #21759b;
20
- background-image: -webkit-gradient(linear, left top, left bottom, from(#2a95c5), to(#21759b));
21
- background-image: -webkit-linear-gradient(top, #2a95c5, #21759b);
22
- background-image: -moz-linear-gradient(top, #2a95c5, #21759b);
23
- background-image: -ms-linear-gradient(top, #2a95c5, #21759b);
24
- background-image: -o-linear-gradient(top, #2a95c5, #21759b);
25
- background-image: linear-gradient(to bottom, #2a95c5, #21759b);
26
- border-color: #21759b;
27
- border-bottom-color: #1e6a8d;
28
- -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
29
- box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
30
  color: #fff;
31
  text-decoration: none;
32
- text-shadow: 0 1px 0 rgba(0,0,0,0.1);
 
 
 
33
  }
34
 
35
  .core-button-hover() {
36
- background-color: #278ab7;
37
- background-image: -webkit-gradient(linear, left top, left bottom, from(#2e9fd2), to(#21759b));
38
- background-image: -webkit-linear-gradient(top, #2e9fd2, #21759b);
39
- background-image: -moz-linear-gradient(top, #2e9fd2, #21759b);
40
- background-image: -ms-linear-gradient(top, #2e9fd2, #21759b);
41
- background-image: -o-linear-gradient(top, #2e9fd2, #21759b);
42
- background-image: linear-gradient(to bottom, #2e9fd2, #21759b);
43
- border-color: #1b607f;
44
- -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
45
- box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
46
  color: #fff;
47
- text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
48
  }
49
 
50
  .wpuf-loading {
@@ -59,26 +46,17 @@
59
  }
60
 
61
  .wpuf-button {
62
- background: #f3f3f3;
63
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#f4f4f4));
64
- background-image: -webkit-linear-gradient(top, #fefefe, #f4f4f4);
65
- background-image: -moz-linear-gradient(top, #fefefe, #f4f4f4);
66
- background-image: -o-linear-gradient(top, #fefefe, #f4f4f4);
67
- background-image: linear-gradient(to bottom, #fefefe, #f4f4f4);
68
- border-color: #bbb;
69
- color: #333;
70
- text-shadow: 0 1px 0 #fff;
71
 
72
  &:hover, &:focus {
73
- background: #f3f3f3;
74
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f3f3f3));
75
- background-image: -webkit-linear-gradient(top, #fff, #f3f3f3);
76
- background-image: -moz-linear-gradient(top, #fff, #f3f3f3);
77
- background-image: -ms-linear-gradient(top, #fff, #f3f3f3);
78
- background-image: -o-linear-gradient(top, #fff, #f3f3f3);
79
- background-image: linear-gradient(to bottom, #fff, #f3f3f3);
80
  border-color: #999;
81
- color: #222;
82
  }
83
  }
84
 
@@ -197,6 +175,7 @@ ul.wpuf-form {
197
  height: 2em;
198
  .border-radius(3px);
199
  min-width: 150px;
 
200
  }
201
 
202
  select[multiple] {
@@ -209,6 +188,12 @@ ul.wpuf-form {
209
  margin-right: 10px;
210
  }
211
 
 
 
 
 
 
 
212
  a.file-selector {
213
  display: inline;
214
  text-decoration: none;
@@ -475,10 +460,33 @@ ul.wpuf-form {
475
  }
476
  }
477
 
 
 
 
 
 
 
478
  .wpuf-address-field {
479
  .clearfix();
480
  width: 100%;
481
  margin-bottom: 10px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
482
  }
483
 
484
  .wpuf-section-wrap {
@@ -528,9 +536,6 @@ ul.wpuf-form {
528
  }
529
 
530
  .wpuf-submit {
531
- .wpuf-label {
532
- display: none !important;
533
- }
534
 
535
  input[type=submit] {
536
  font-size: 16px;
@@ -559,6 +564,10 @@ ul.wpuf-form {
559
  font-size: 13px;
560
  }
561
  }
 
 
 
 
562
  }
563
 
564
  #wpuf-login-form {
16
  }
17
 
18
  .core-button() {
19
+ background: #0085ba;
20
+ border-color: #0073aa #006799 #006799;
21
+ -webkit-box-shadow: 0 1px 0 #006799;
22
+ box-shadow: 0 1px 0 #006799;
 
 
 
 
 
 
 
23
  color: #fff;
24
  text-decoration: none;
25
+ text-shadow: 0 -1px 1px #006799,
26
+ 1px 0 1px #006799,
27
+ 0 1px 1px #006799,
28
+ -1px 0 1px #006799;
29
  }
30
 
31
  .core-button-hover() {
32
+ background: #008ec2;
33
+ border-color: #006799;
 
 
 
 
 
 
 
 
34
  color: #fff;
 
35
  }
36
 
37
  .wpuf-loading {
46
  }
47
 
48
  .wpuf-button {
49
+ color: #555;
50
+ border-color: #cccccc;
51
+ background: #f7f7f7;
52
+ -webkit-box-shadow: 0 1px 0 #cccccc;
53
+ box-shadow: 0 1px 0 #cccccc;
54
+ vertical-align: top;
 
 
 
55
 
56
  &:hover, &:focus {
57
+ background: #fafafa;
 
 
 
 
 
 
58
  border-color: #999;
59
+ color: #23282d;
60
  }
61
  }
62
 
175
  height: 2em;
176
  .border-radius(3px);
177
  min-width: 150px;
178
+ max-width: 100%;
179
  }
180
 
181
  select[multiple] {
188
  margin-right: 10px;
189
  }
190
 
191
+ .wpuf-radio-block,
192
+ .wpuf-checkbox-block{
193
+ display: block;
194
+ margin-bottom: 6px;
195
+ }
196
+
197
  a.file-selector {
198
  display: inline;
199
  text-decoration: none;
460
  }
461
  }
462
 
463
+ label.wpuf-form-sub-label {
464
+ font-size: 12px;
465
+ display: inline-block;
466
+ padding-top: 5px;
467
+ }
468
+
469
  .wpuf-address-field {
470
  .clearfix();
471
  width: 100%;
472
  margin-bottom: 10px;
473
+
474
+ &.city_name,
475
+ &.state,
476
+ &.zip,
477
+ &.country_select {
478
+ float: left;
479
+ width: 47%;
480
+ }
481
+
482
+ &.city_name,
483
+ &.zip {
484
+ margin-right: 4%;
485
+ }
486
+
487
+ &.zip {
488
+ clear: both;
489
+ }
490
  }
491
 
492
  .wpuf-section-wrap {
536
  }
537
 
538
  .wpuf-submit {
 
 
 
539
 
540
  input[type=submit] {
541
  font-size: 16px;
564
  font-size: 13px;
565
  }
566
  }
567
+
568
+ &:not(.form-label-left) .wpuf-submit .wpuf-label {
569
+ display: none !important;
570
+ }
571
  }
572
 
573
  #wpuf-login-form {
assets/css/images/ui-bg_diagonals-small_75_cccccc_40x40.png CHANGED
File without changes
assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png CHANGED
File without changes
assets/css/images/ui-bg_flat_0_ffffff_40x100.png CHANGED
File without changes
assets/css/images/ui-bg_flat_75_ffffff_40x100.png CHANGED
File without changes
assets/css/images/ui-bg_glass_55_fbf9ee_1x400.png CHANGED
File without changes
assets/css/images/ui-bg_glass_65_ffffff_1x400.png CHANGED
File without changes
assets/css/images/ui-bg_glass_75_dadada_1x400.png CHANGED
File without changes
assets/css/images/ui-bg_glass_75_e6e6e6_1x400.png CHANGED
File without changes
assets/css/images/ui-bg_glass_95_fef1ec_1x400.png CHANGED
File without changes
assets/css/images/ui-icons_222222_256x240.png CHANGED
File without changes
assets/css/images/ui-icons_2e83ff_256x240.png CHANGED
File without changes
assets/css/images/ui-icons_454545_256x240.png CHANGED
File without changes
assets/css/images/ui-icons_888888_256x240.png CHANGED
File without changes
assets/css/images/ui-icons_cd0a0a_256x240.png CHANGED
File without changes
assets/css/jquery-ui-1.9.1.custom.css CHANGED
File without changes
assets/css/jquery.smallipop.css CHANGED
File without changes
assets/css/wpuf-form-builder.css CHANGED
@@ -97,6 +97,37 @@
97
  padding: 10px 20px;
98
  min-width: 100px;
99
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  .loader,
101
  .loader:after {
102
  border-radius: 50%;
@@ -723,3 +754,36 @@ ul.wpuf-form li .wpuf-password-field:after {
723
  content: "";
724
  display: table;
725
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  padding: 10px 20px;
98
  min-width: 100px;
99
  }
100
+ .swal2-modal .swal2-buttonswrapper button {
101
+ display: inline-block;
102
+ padding: 6px 12px;
103
+ margin-bottom: 0;
104
+ font-size: 14px;
105
+ font-weight: 400;
106
+ line-height: 1.42857143;
107
+ text-align: center;
108
+ white-space: nowrap;
109
+ vertical-align: middle;
110
+ -ms-touch-action: manipulation;
111
+ touch-action: manipulation;
112
+ cursor: pointer;
113
+ -webkit-user-select: none;
114
+ -moz-user-select: none;
115
+ -ms-user-select: none;
116
+ user-select: none;
117
+ background-image: none;
118
+ border: 1px solid transparent;
119
+ border-radius: 4px;
120
+ }
121
+ .swal2-modal .swal2-buttonswrapper .swal2-confirm {
122
+ color: #fff;
123
+ background-color: #337ab7;
124
+ border-color: #2e6da4;
125
+ }
126
+ .swal2-modal .swal2-buttonswrapper .swal2-cancel {
127
+ color: #fff;
128
+ background-color: #d9534f;
129
+ border-color: #d43f3a;
130
+ }
131
  .loader,
132
  .loader:after {
133
  border-radius: 50%;
754
  content: "";
755
  display: table;
756
  }
757
+ .wpuf-merge-tag-wrap .merge-tag-link {
758
+ position: absolute;
759
+ right: 5px;
760
+ top: 30px;
761
+ color: #999;
762
+ text-decoration: none;
763
+ }
764
+ .wpuf-merge-tag-wrap .merge-tag-link:hover {
765
+ color: #555;
766
+ }
767
+ .wpuf-merge-tag-wrap .wpuf-merge-tags {
768
+ max-height: 110px;
769
+ overflow: hidden;
770
+ overflow-y: scroll;
771
+ border: 1px solid #e5e5e5;
772
+ box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.04);
773
+ display: none;
774
+ position: absolute;
775
+ right: 0px;
776
+ top: 60px;
777
+ background: #fff;
778
+ z-index: 1000;
779
+ min-height: 150px;
780
+ }
781
+ .wpuf-merge-tag-wrap .wpuf-merge-tags .merge-tag-head {
782
+ font-weight: bold;
783
+ background: #f0f0f0;
784
+ padding: 3px 10px;
785
+ }
786
+ .wpuf-merge-tag-wrap .wpuf-merge-tags .merge-tag-section ul {
787
+ margin: 0;
788
+ padding: 5px 10px;
789
+ }
assets/css/wpuf.css CHANGED
File without changes
assets/images/add.png CHANGED
File without changes
assets/images/arrow-move.png CHANGED
File without changes
assets/images/arrows.png CHANGED
File without changes
assets/images/cross.png CHANGED
File without changes
assets/images/del.png CHANGED
File without changes
assets/images/delete.png CHANGED
File without changes
assets/images/edit.png CHANGED
File without changes
assets/images/help.png CHANGED
File without changes
assets/images/no-image.png CHANGED
File without changes
assets/images/paypal.png CHANGED
File without changes
assets/images/remove.png CHANGED
File without changes
assets/images/tick.png CHANGED
File without changes
assets/images/wpspin_light.gif CHANGED
File without changes
assets/js/chosen.jquery.js CHANGED
File without changes
assets/js/conditional-logic.js DELETED
@@ -1,139 +0,0 @@
1
- (function($) {
2
-
3
- var conditional_logic = {
4
-
5
- init: function() {
6
-
7
- var _this = this;
8
- _this.change();
9
-
10
- // events
11
- $(document).on( 'change', '.wpuf-fields input, .wpuf-fields textarea, .wpuf-fields select', function(){
12
- _this.change();
13
- });
14
- },
15
-
16
- change: function() {
17
-
18
- var cond_field_val = [],
19
- all = [],
20
- prefix = 'wpuf_';
21
-
22
- if ( typeof wpuf_conditional_items === 'undefined' ) {
23
- return;
24
- }
25
-
26
- $.each( wpuf_conditional_items, function( k, item ) {
27
-
28
- $.each( item.cond_field, function( key, value ) {
29
-
30
- var form_id = '_'+item.form_id,
31
- selector = '.'+prefix+value+form_id,
32
- value = item.cond_option[key],
33
- operator = ( item.cond_operator[key] == '=' ) ? true : false,
34
- select = $('select'+selector),
35
- checkbox = $('input[type=checkbox][value="'+value+'"]'+selector ),
36
- radio = $('input[type=radio][value="'+value+'"]'+selector),
37
- select = $('select'+selector+'>option[value="'+value+'"]');
38
-
39
-
40
- if ( select.length ) {
41
-
42
- var select_selectd_status = select.is(':selected') ? true : false;
43
-
44
- if ( operator && select_selectd_status ) {
45
- all[key] = true;
46
-
47
- } else if ( operator === false && select_selectd_status === false ) {
48
- all[key] = true;
49
-
50
- } else {
51
- all[key] = false;
52
- }
53
- }
54
-
55
- if ( radio.length ) {
56
-
57
- var radio_checked_status = radio.is(':checked') ? true : false;
58
-
59
- if ( operator && radio_checked_status ) {
60
-
61
- all[key] = true;
62
-
63
- } else if ( operator === false && radio_checked_status === false ) {
64
-
65
- all[key] = true;
66
-
67
- } else {
68
- all[key] = false;
69
- }
70
- }
71
-
72
- if ( checkbox.length ) {
73
-
74
- var checkbox_checked_status = checkbox.is(':checked') ? true : false;
75
-
76
- if( operator && checkbox_checked_status ) {
77
- all[key] = true;
78
-
79
- } else if ( operator === false && checkbox_checked_status === false ) {
80
- all[key] = true;
81
-
82
- } else {
83
- all[key] = false;
84
- }
85
- }
86
- });
87
-
88
- if ( item.cond_logic == 'any') {
89
-
90
- var check = all.indexOf( true );
91
-
92
- if ( check != '-1') {
93
-
94
- if ( item.type == 'address' ) {
95
- $( 'li.wpuf-el.' + item.name ).show();
96
- } else {
97
- $( '.' + prefix + item.name + '_' + item.form_id).closest('li').show();
98
- }
99
-
100
- } else {
101
-
102
- if ( item.type == 'address' ) {
103
- $( 'li.wpuf-el.' + item.name ).hide();
104
- } else {
105
- $( '.' + prefix + item.name + '_' + item.form_id).closest('li').hide();
106
- }
107
-
108
- }
109
-
110
- } else {
111
-
112
- var check = all.indexOf( false );
113
-
114
- if ( check == '-1') {
115
-
116
- if ( item.type == 'address' ) {
117
- $( 'li.wpuf-el.' + item.name ).show();
118
- } else {
119
- $( '.' + prefix + item.name + '_' + item.form_id).closest('li').show();
120
- }
121
-
122
- } else {
123
-
124
- if ( item.type == 'address' ) {
125
- $( 'li.wpuf-el.' + item.name ).hide();
126
- } else {
127
- $( '.' + prefix+item.name + '_' + item.form_id).closest('li').hide();
128
- }
129
- }
130
-
131
- }
132
-
133
- all.length = 0;
134
- });
135
- }
136
- }
137
-
138
- conditional_logic.init();
139
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/conditional.js CHANGED
File without changes
assets/js/formbuilder.js CHANGED
@@ -110,10 +110,10 @@
110
  $('#wpuf-form-editor').on('click', '.wpuf-value-handelar', this.showValueField);
111
 
112
  //on change enable expiration check status
113
- this.changeExpirationFieldVisibility(':checkbox#wpuf-enable_post_expiration')
114
- $('.wpuf-metabox-post_expiration').on('change',':checkbox#wpuf-enable_post_expiration',this.changeExpirationFieldVisibility);
115
  //on change expiration type drop down
116
- //$('.wpuf-metabox-post_expiration').on('change','select#wpuf-expiration_time_type',this.setTimeExpiration);
117
 
118
  this_obj.changeMultistepVisibility( $('.wpuf_enable_multistep_section :input[type="checkbox"]') );
119
  $('.wpuf_enable_multistep_section :input[type="checkbox"]').click(function(){
110
  $('#wpuf-form-editor').on('click', '.wpuf-value-handelar', this.showValueField);
111
 
112
  //on change enable expiration check status
113
+ // this.changeExpirationFieldVisibility(':checkbox#wpuf-enable_post_expiration')
114
+ // $('.wpuf-metabox-post_expiration').on('change',':checkbox#wpuf-enable_post_expiration',this.changeExpirationFieldVisibility);
115
  //on change expiration type drop down
116
+ // $('.wpuf-metabox-post_expiration').on('change','select#wpuf-expiration_time_type',this.setTimeExpiration);
117
 
118
  this_obj.changeMultistepVisibility( $('.wpuf_enable_multistep_section :input[type="checkbox"]') );
119
  $('.wpuf_enable_multistep_section :input[type="checkbox"]').click(function(){
assets/js/formbuilder.min.js CHANGED
File without changes
assets/js/frontend-form.js CHANGED
@@ -13,9 +13,6 @@
13
 
14
  window.WP_User_Frontend = {
15
 
16
- pass_val : '',
17
- retype_pass_val : '',
18
-
19
  init: function() {
20
 
21
  //enable multistep
@@ -30,7 +27,16 @@
30
 
31
  $('.wpuf-form-add').on('submit', this.formSubmit);
32
  $('form#post').on('submit', this.adminPostSubmit);
33
- $( '.wpuf-form').on('keyup', '#pass1', this.check_pass_strength );
 
 
 
 
 
 
 
 
 
34
 
35
  this.ajaxCategory();
36
  // image insert
@@ -158,6 +164,8 @@
158
  },
159
 
160
  change_fieldset: function(step_number, progressbar_type) {
 
 
161
  $('fieldset.wpuf-multistep-fieldset').removeClass('field-active').eq(step_number).addClass('field-active');
162
 
163
  $('.wpuf-step-wizard li').each(function(){
@@ -183,7 +191,7 @@
183
  }
184
 
185
  // trigger a change event
186
- $('.wpuf-form').trigger('step-change-fieldset');
187
  },
188
 
189
  ajaxCategory: function () {
@@ -276,14 +284,16 @@
276
  post_id = form.find('input[type="hidden"][name="post_id"]').val();
277
 
278
  var rich_texts = [],
279
- temp, val;
280
 
281
  // grab rich texts from tinyMCE
282
  $('.wpuf-rich-validation').each(function (index, item) {
283
- temp = $(item).data('id');
284
- val = $.trim( tinyMCE.get(temp).getContent() );
 
 
285
 
286
- rich_texts.push(temp + '=' + encodeURIComponent( val ) );
287
  });
288
 
289
  // append them to the form var
@@ -408,10 +418,10 @@
408
  validateForm: function( self ) {
409
 
410
  var temp,
411
- temp_val = '',
412
- error = false,
413
  error_items = [];
414
- error_type = '';
415
 
416
  // remove all initial errors if any
417
  WP_User_Frontend.removeErrors(self);
@@ -443,21 +453,21 @@
443
  case 'textarea':
444
  case 'text':
445
 
446
- if ( $(item).hasClass('password') ) {
447
- if ( WP_User_Frontend.pass_val == '' ) {
448
- WP_User_Frontend.pass_val = $(item).val();
449
- } else {
450
- WP_User_Frontend.retype_pass_val = $(item).val();
451
- }
452
- if ( WP_User_Frontend.pass_val != '' && WP_User_Frontend.retype_pass_val != '' && WP_User_Frontend.pass_val != WP_User_Frontend.retype_pass_val ) {
453
- error = true;
454
- error_type = 'mismatch';
455
 
456
- WP_User_Frontend.markError( item, error_type );
457
- break;
458
- }
459
 
 
 
460
  }
 
 
 
 
 
 
461
  val = $.trim( $(item).val() );
462
 
463
  if ( val === '') {
@@ -467,6 +477,18 @@
467
  // make it warn collor
468
  WP_User_Frontend.markError( item, error_type );
469
  }
 
 
 
 
 
 
 
 
 
 
 
 
470
  break;
471
 
472
  case 'select':
13
 
14
  window.WP_User_Frontend = {
15
 
 
 
 
16
  init: function() {
17
 
18
  //enable multistep
27
 
28
  $('.wpuf-form-add').on('submit', this.formSubmit);
29
  $('form#post').on('submit', this.adminPostSubmit);
30
+ // $( '.wpuf-form').on('keyup', '#pass1', this.check_pass_strength );
31
+
32
+ // refresh pluploads on each step change (multistep form)
33
+ $('.wpuf-form').on('step-change-fieldset', function(event, number, step) {
34
+ if ( wpuf_plupload_items.length ) {
35
+ for (var i = wpuf_plupload_items.length - 1; i >= 0; i--) {
36
+ wpuf_plupload_items[i].refresh();
37
+ }
38
+ }
39
+ });
40
 
41
  this.ajaxCategory();
42
  // image insert
164
  },
165
 
166
  change_fieldset: function(step_number, progressbar_type) {
167
+ var current_step = $('fieldset.wpuf-multistep-fieldset').eq(step_number);
168
+
169
  $('fieldset.wpuf-multistep-fieldset').removeClass('field-active').eq(step_number).addClass('field-active');
170
 
171
  $('.wpuf-step-wizard li').each(function(){
191
  }
192
 
193
  // trigger a change event
194
+ $('.wpuf-form').trigger('step-change-fieldset', [ step_number, current_step ]);
195
  },
196
 
197
  ajaxCategory: function () {
284
  post_id = form.find('input[type="hidden"][name="post_id"]').val();
285
 
286
  var rich_texts = [],
287
+ val;
288
 
289
  // grab rich texts from tinyMCE
290
  $('.wpuf-rich-validation').each(function (index, item) {
291
+ var item = $(item);
292
+ var editor_id = item.data('id');
293
+ var item_name = item.data('name');
294
+ var val = $.trim( tinyMCE.get(editor_id).getContent() );
295
 
296
+ rich_texts.push(item_name + '=' + encodeURIComponent( val ) );
297
  });
298
 
299
  // append them to the form var
418
  validateForm: function( self ) {
419
 
420
  var temp,
421
+ temp_val = '',
422
+ error = false,
423
  error_items = [];
424
+ error_type = '';
425
 
426
  // remove all initial errors if any
427
  WP_User_Frontend.removeErrors(self);
453
  case 'textarea':
454
  case 'text':
455
 
456
+ val = $.trim( $(item).val() );
 
 
 
 
 
 
 
 
457
 
458
+ if ( val === '') {
459
+ error = true;
460
+ error_type = 'required';
461
 
462
+ // make it warn collor
463
+ WP_User_Frontend.markError( item, error_type );
464
  }
465
+ break;
466
+
467
+ case 'password':
468
+ case 'confirm_password':
469
+ var hasRepeat = $(item).data('repeat');
470
+
471
  val = $.trim( $(item).val() );
472
 
473
  if ( val === '') {
477
  // make it warn collor
478
  WP_User_Frontend.markError( item, error_type );
479
  }
480
+
481
+ if ( hasRepeat ) {
482
+ var repeatItem = $('[data-type="confirm_password"]').eq(0);;
483
+
484
+ if ( repeatItem.val() != val ) {
485
+ error = true;
486
+ error_type = 'mismatch';
487
+
488
+ WP_User_Frontend.markError( repeatItem, error_type );
489
+ }
490
+ }
491
+
492
  break;
493
 
494
  case 'select':
assets/js/frontend-form.min.js CHANGED
@@ -1 +1 @@
1
- !function(a,b){a.fn.listautowidth=function(){return this.each(function(){var b=a(this).width(),c=b/a(this).children("li").length;a(this).children("li").each(function(){var b=a(this).outerWidth(!0)-a(this).width();a(this).width(c-b)})})},b.WP_User_Frontend={pass_val:"",retype_pass_val:"",init:function(){this.enableMultistep(this),a(".wpuf-form").on("click","img.wpuf-clone-field",this.cloneField),a(".wpuf-form").on("click","img.wpuf-remove-field",this.removeField),a(".wpuf-form").on("click","a.wpuf-delete-avatar",this.deleteAvatar),a(".wpuf-form").on("click","a#wpuf-post-draft",this.draftPost),a(".wpuf-form").on("click","button#wpuf-account-update-profile",this.account_update_profile),a(".wpuf-form-add").on("submit",this.formSubmit),a("form#post").on("submit",this.adminPostSubmit),a(".wpuf-form").on("keyup","#pass1",this.check_pass_strength),this.ajaxCategory(),a(':submit[name="wpuf_cancel_subscription"]').click(function(){if(!confirm("Are you sure you want to cancel your current subscription ?"))return!1})},check_pass_strength:function(){var b=a("#pass1").val();if(a("#pass-strength-result").show(),a("#pass-strength-result").removeClass("short bad good strong"),!b)return a("#pass-strength-result").html("&nbsp;"),void a("#pass-strength-result").hide();if(void 0!==wp.passwordStrength)switch(wp.passwordStrength.meter(b,wp.passwordStrength.userInputBlacklist(),b)){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:a("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n.short)}},enableMultistep:function(b){var c=this,d=0,e=a(':hidden[name="wpuf_multistep_type"]').val();if(null!=e){if(a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-prev-btn").first().remove(),a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-next-btn").last().remove(),a(".wpuf-form fieldset").removeClass("field-active").first().addClass("field-active"),"progressive"==e&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){a("fieldset.wpuf-multistep-fieldset legend").first();a(".wpuf-multistep-progressbar").html('<div class="wpuf-progress-percentage"></div>');var f=a(".wpuf-multistep-progressbar"),g=a(".wpuf-progress-percentage");a(".wpuf-multistep-progressbar").progressbar({change:function(){g.text(f.progressbar("value")+"%")}}),a(".wpuf-multistep-fieldset legend").hide()}else a(".wpuf-form").each(function(){var b=a(this),c=a(".wpuf-multistep-progressbar",b),d="";c.addClass("wizard-steps"),d+='<ul class="wpuf-step-wizard">',a(".wpuf-multistep-fieldset",this).each(function(){d+="<li>"+a.trim(a("legend",this).text())+"</li>",a("legend",this).hide()}),d+="</ul>",c.append(d),a(".wpuf-step-wizard li",c).first().addClass("active-step"),a(".wpuf-step-wizard",c).listautowidth()});this.change_fieldset(d,e),a("fieldset .wpuf-multistep-prev-btn, fieldset .wpuf-multistep-next-btn").click(function(f){if(a(this).hasClass("wpuf-multistep-next-btn")){0!=c.formStepCheck("",a(this).closest("fieldset"))&&b.change_fieldset(++d,e)}else a(this).hasClass("wpuf-multistep-prev-btn")&&b.change_fieldset(--d,e);return!1})}},change_fieldset:function(b,c){a("fieldset.wpuf-multistep-fieldset").removeClass("field-active").eq(b).addClass("field-active"),a(".wpuf-step-wizard li").each(function(){a(this).index()<=b?"step_by_step"==c?a(this).addClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).addClass("passed-wpuf-ms-bar"):"step_by_step"==c?a(this).removeClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).removeClass("passed-wpuf-ms-bar")}),a(".wpuf-step-wizard li").removeClass("wpuf-ms-bar-active active-step completed-step"),a(".passed-wpuf-ms-bar").addClass("completed-step").last().addClass("wpuf-ms-bar-active"),a(".wpuf-ms-bar-active").addClass("active-step");var d=a("fieldset.wpuf-multistep-fieldset").eq(b).find("legend").text();if(d=a.trim(d),"progressive"==c&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){var e=100*(b+1)/a("fieldset.wpuf-multistep-fieldset").length,e=Number(e.toFixed(2));a(".wpuf-multistep-progressbar").progressbar({value:e}),a(".wpuf-progress-percentage").text(d+" ("+e+"%)")}a(".wpuf-form").trigger("step-change-fieldset")},ajaxCategory:function(){var b=".category-wrap";a(b).on("change",".cat-ajax",function(){currentLevel=parseInt(a(this).parent().attr("level")),WP_User_Frontend.getChildCats(a(this),"lvl",currentLevel+1,b,"category")})},getChildCats:function(b,c,d,e,f){cat=a(b).val(),results_div=c+d,f=void 0!==f?f:"category",field_attr=a(b).siblings("span").data("taxonomy"),a.ajax({type:"post",url:wpuf_frontend.ajaxurl,data:{action:"wpuf_get_child_cat",catID:cat,nonce:wpuf_frontend.nonce,field_attr:field_attr},beforeSend:function(){a(b).parent().parent().next(".loading").addClass("wpuf-loading")},complete:function(){a(b).parent().parent().next(".loading").removeClass("wpuf-loading")},success:function(e){a(b).parent().nextAll().each(function(){a(this).remove()}),""!=e&&(a(b).parent().addClass("hasChild").parent().append('<div id="'+c+d+'" level="'+d+'"></div>'),b.parent().parent().find("#"+results_div).html(e).slideDown("fast"))}})},cloneField:function(b){b.preventDefault();var c=a(this).closest("tr"),d=c.clone();d.find("input").val(""),d.find(":checked").attr("checked",""),c.after(d)},removeField:function(){var b=a(this).closest("tr");b.siblings().andSelf().length>1&&b.remove()},adminPostSubmit:function(b){b.preventDefault();var c=a(this);if(WP_User_Frontend.validateForm(c))return!0},draftPost:function(b){b.preventDefault();var c,d,e=a(this),f=a(this).closest("form"),g=f.serialize()+"&action=wpuf_draft_post",h=f.find('input[type="hidden"][name="post_id"]').val(),i=[];a(".wpuf-rich-validation").each(function(b,e){c=a(e).data("id"),d=a.trim(tinyMCE.get(c).getContent()),i.push(c+"="+encodeURIComponent(d))}),g=g+"&"+i.join("&"),e.after(' <span class="wpuf-loading"></span>'),a.post(wpuf_frontend.ajaxurl,g,function(b){if(void 0===h){var c='<input type="hidden" name="post_id" value="'+b.post_id+'">';c+='<input type="hidden" name="post_date" value="'+b.date+'">',c+='<input type="hidden" name="post_author" value="'+b.post_author+'">',c+='<input type="hidden" name="comment_status" value="'+b.comment_status+'">',f.append(c)}e.next("span.wpuf-loading").remove(),e.after('<span class="wpuf-draft-saved">&nbsp; Post Saved</span>'),a(".wpuf-draft-saved").delay(2500).fadeOut("fast",function(){a(this).remove()})})},account_update_profile:function(b){b.preventDefault();var c=a(this).closest("form");a.post(wpuf_frontend.ajaxurl,c.serialize(),function(a){a.success?(c.find(".wpuf-error").hide(),c.find(".wpuf-success").show()):(c.find(".wpuf-success").hide(),c.find(".wpuf-error").show(),c.find(".wpuf-error").text(a.data))})},formStepCheck:function(a,b){var c=b;c.find("input[type=submit]");return form_data=WP_User_Frontend.validateForm(c),0==form_data&&WP_User_Frontend.addErrorNotice(self,"bottom"),form_data},formSubmit:function(c){c.preventDefault();var d=a(this),e=d.find("input[type=submit]");form_data=WP_User_Frontend.validateForm(d),form_data&&(d.find("li.wpuf-submit").append('<span class="wpuf-loading"></span>'),e.attr("disabled","disabled").addClass("button-primary-disabled"),a.post(wpuf_frontend.ajaxurl,form_data,function(c){if(c.success)a("body").trigger("wpuf:postform:success",c),1==c.show_message?(d.before('<div class="wpuf-success">'+c.message+"</div>"),d.slideUp("fast",function(){d.remove()}),a("html, body").animate({scrollTop:a(".wpuf-success").offset().top-100},"fast")):b.location=c.redirect_to;else{if(void 0!==c.type&&"login"===c.type)return void(confirm(c.error)?b.location=c.redirect_to:(e.removeAttr("disabled"),e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()));d.find(".g-recaptcha").length>0&&grecaptcha.reset(),alert(c.error),e.removeAttr("disabled")}e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()}))},validateForm:function(b){var c=!1;if(error_type="",WP_User_Frontend.removeErrors(b),WP_User_Frontend.removeErrorNotice(b),b.find('[data-required="yes"]:visible').each(function(b,d){var e=a(d).data("type");switch(h="",e){case"rich":var f=a(d).data("id");""===(h=a.trim(tinyMCE.get(f).getContent()))&&(c=!0,WP_User_Frontend.markError(d));break;case"textarea":case"text":if(a(d).hasClass("password")&&(""==WP_User_Frontend.pass_val?WP_User_Frontend.pass_val=a(d).val():WP_User_Frontend.retype_pass_val=a(d).val(),""!=WP_User_Frontend.pass_val&&""!=WP_User_Frontend.retype_pass_val&&WP_User_Frontend.pass_val!=WP_User_Frontend.retype_pass_val)){c=!0,error_type="mismatch",WP_User_Frontend.markError(d,error_type);break}""===(h=a.trim(a(d).val()))&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"select":(h=a(d).val())&&"-1"!==h||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"multiselect":null!==(h=a(d).val())&&0!==h.length||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"tax-checkbox":var g=a(d).children().find("input:checked").length;g||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"radio":var g=a(d).find("input:checked").length;g||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"file":var g=a(d).find("ul").children().length;g||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"email":var h=a(d).val();""!==h?WP_User_Frontend.isValidEmail(h)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)):""===h&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"url":var h=a(d).val();""!==h&&(WP_User_Frontend.isValidURL(h)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)))}}),c)return WP_User_Frontend.addErrorNotice(b,"end"),!1;var d=b.serialize(),e=[];return a(".wpuf-rich-validation",b).each(function(b,c){var c=a(c),d=c.data("id"),f=c.data("name"),g=a.trim(tinyMCE.get(d).getContent());e.push(f+"="+encodeURIComponent(g))}),d=d+"&"+e.join("&")},addErrorNotice:function(b,c){"bottom"==c?a(".wpuf-multistep-fieldset:visible").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>"):a(b).find("li.wpuf-submit").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>")},removeErrorNotice:function(b){a(b).find(".wpuf-errors").remove()},markError:function(b,c){var d="";if(a(b).closest("li").addClass("has-error"),c){switch(d=a(b).closest("li").data("label"),c){case"required":d=d+" "+error_str_obj[c];break;case"mismatch":d=d+" "+error_str_obj[c];break;case"validation":d=d+" "+error_str_obj[c]}a(b).siblings(".wpuf-error-msg").remove(),a(b).after('<div class="wpuf-error-msg">'+d+"</div>")}a(b).focus()},removeErrors:function(b){a(b).find(".has-error").removeClass("has-error"),a(".wpuf-error-msg").remove()},isValidEmail:function(a){return new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(a)},isValidURL:function(a){return new RegExp("^(http://www.|https://www.|ftp://www.|www.|http://|https://){1}([0-9A-Za-z]+.)").test(a)},insertImage:function(b,c){if(a("#"+b).length){var d=new plupload.Uploader({runtimes:"html5,html4",browse_button:b,container:"wpuf-insert-image-container",multipart:!0,multipart_params:{action:"wpuf_insert_image",form_id:a("#"+b).data("form_id")},multiple_queues:!1,multi_selection:!1,urlstream_upload:!0,file_data_name:"wpuf_file",max_file_size:"2mb",url:wpuf_frontend_upload.plupload.url,flash_swf_url:wpuf_frontend_upload.flash_swf_url,filters:[{title:"Allowed Files",extensions:"jpg,jpeg,gif,png,bmp"}]});d.bind("Init",function(a,b){}),d.bind("FilesAdded",function(b,c){var d=a("#wpuf-insert-image-container");a.each(c,function(a,b){d.append('<div class="upload-item" id="'+b.id+'"><div class="progress progress-striped active"><div class="bar"></div></div></div>')}),b.refresh(),b.start()}),d.bind("QueueChanged",function(a){d.start()}),d.bind("UploadProgress",function(b,c){var d=a("#"+c.id);a(".bar",d).css({width:c.percent+"%"}),a(".percent",d).html(c.percent+"%")}),d.bind("Error",function(a,b){alert("Error #"+b.code+": "+b.message)}),d.bind("FileUploaded",function(b,d,e){if(a("#"+d.id).remove(),"error"!==e.response){if("undefined"!=typeof tinyMCE)if("function"!=typeof tinyMCE.execInstanceCommand){var f=tinyMCE.get("post_content_"+c);null!==f&&f.insertContent(e.response)}else tinyMCE.execInstanceCommand("post_content_"+c,"mceInsertContent",!1,e.response);var g=a("#post_content_"+c);g.val(g.val()+e.response)}else alert("Something went wrong")}),d.init()}},deleteAvatar:function(b){b.preventDefault(),confirm(a(this).data("confirm"))&&a.post(wpuf_frontend.ajaxurl,{action:"wpuf_delete_avatar",_wpnonce:wpuf_frontend.nonce},function(){a(b.target).parent().remove()})},editorLimit:{bind:function(b,c,d){"no"===d?(a("textarea#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textLimit.call(this,a,b)}),a("input#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textLimit.call(this,a,b)}),a("textarea#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textLimit.call(d,c,b)},100)}),a("input#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textLimit.call(d,c,b)},100)})):setTimeout(function(){tinyMCE.get(c).onKeyDown.add(function(a,c){WP_User_Frontend.editorLimit.tinymce.onKeyDown(a,c,b)}),tinyMCE.get(c).onPaste.add(function(a,c){setTimeout(function(){WP_User_Frontend.editorLimit.tinymce.onPaste(a,c,b)},100)})},1e3)},tinymce:{getStats:function(a){var b=a.getBody(),c=tinymce.trim(b.innerText||b.textContent);return{chars:c.length,words:c.split(/[\w\u2019\'-]+/).length}},onKeyDown:function(b,c,d){var e=WP_User_Frontend.editorLimit.tinymce.getStats(b).words-1;d&&a(".mce-path-item.mce-last",b.container).html("Word Limit : "+e+"/"+d),d&&e>d&&(WP_User_Frontend.editorLimit.blockTyping(c),jQuery(".mce-path-item.mce-last",b.container).html(wpuf_frontend.word_limit))},onPaste:function(a,b,c){var d=a.getContent().split(" ").slice(0,c).join(" ");a.setContent(d),WP_User_Frontend.editorLimit.make_media_embed_code(d,a)}},textLimit:function(b,c){var d=a(this),e=d.val().split(" ");c&&e.length>c?(d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(wpuf_frontend.word_limit),WP_User_Frontend.editorLimit.blockTyping(b)):d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(""),"paste"===b.type&&d.val(e.slice(0,c).join(" "))},blockTyping:function(b){a.inArray(b.keyCode,[46,8,9,27,13,110,190,189])!==-1||65==b.keyCode&&b.ctrlKey===!0||b.keyCode>=35&&b.keyCode<=40||(b.preventDefault(),b.stopPropagation())},make_media_embed_code:function(b,c){a.post(ajaxurl,{action:"make_media_embed_code",content:b},function(a){c.setContent(c.getContent()+c.setContent(a))})}}},a(function(){if(WP_User_Frontend.init(),a("ul.wpuf-payment-gateways").on("click","input[type=radio]",function(b){a(".wpuf-payment-instruction").slideUp(250),a(this).parents("li").find(".wpuf-payment-instruction").slideDown(250)}),a("ul.wpuf-payment-gateways li").find("input[type=radio]").is(":checked")){a("ul.wpuf-payment-gateways li").find("input[type=radio]:checked").parents("li").find(".wpuf-payment-instruction").slideDown(250)}else a("ul.wpuf-payment-gateways li").first().find("input[type=radio]").click()})}(jQuery,window);
1
+ !function(a,b){a.fn.listautowidth=function(){return this.each(function(){var b=a(this).width(),c=b/a(this).children("li").length;a(this).children("li").each(function(){var b=a(this).outerWidth(!0)-a(this).width();a(this).width(c-b)})})},b.WP_User_Frontend={init:function(){this.enableMultistep(this),a(".wpuf-form").on("click","img.wpuf-clone-field",this.cloneField),a(".wpuf-form").on("click","img.wpuf-remove-field",this.removeField),a(".wpuf-form").on("click","a.wpuf-delete-avatar",this.deleteAvatar),a(".wpuf-form").on("click","a#wpuf-post-draft",this.draftPost),a(".wpuf-form").on("click","button#wpuf-account-update-profile",this.account_update_profile),a(".wpuf-form-add").on("submit",this.formSubmit),a("form#post").on("submit",this.adminPostSubmit),a(".wpuf-form").on("step-change-fieldset",function(a,b,c){if(wpuf_plupload_items.length)for(var d=wpuf_plupload_items.length-1;d>=0;d--)wpuf_plupload_items[d].refresh()}),this.ajaxCategory(),a(':submit[name="wpuf_cancel_subscription"]').click(function(){if(!confirm("Are you sure you want to cancel your current subscription ?"))return!1})},check_pass_strength:function(){var b=a("#pass1").val();if(a("#pass-strength-result").show(),a("#pass-strength-result").removeClass("short bad good strong"),!b)return a("#pass-strength-result").html("&nbsp;"),void a("#pass-strength-result").hide();if(void 0!==wp.passwordStrength)switch(wp.passwordStrength.meter(b,wp.passwordStrength.userInputBlacklist(),b)){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:a("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n.short)}},enableMultistep:function(b){var c=this,d=0,e=a(':hidden[name="wpuf_multistep_type"]').val();if(null!=e){if(a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-prev-btn").first().remove(),a("fieldset.wpuf-multistep-fieldset").find(".wpuf-multistep-next-btn").last().remove(),a(".wpuf-form fieldset").removeClass("field-active").first().addClass("field-active"),"progressive"==e&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){a("fieldset.wpuf-multistep-fieldset legend").first();a(".wpuf-multistep-progressbar").html('<div class="wpuf-progress-percentage"></div>');var f=a(".wpuf-multistep-progressbar"),g=a(".wpuf-progress-percentage");a(".wpuf-multistep-progressbar").progressbar({change:function(){g.text(f.progressbar("value")+"%")}}),a(".wpuf-multistep-fieldset legend").hide()}else a(".wpuf-form").each(function(){var b=a(this),c=a(".wpuf-multistep-progressbar",b),d="";c.addClass("wizard-steps"),d+='<ul class="wpuf-step-wizard">',a(".wpuf-multistep-fieldset",this).each(function(){d+="<li>"+a.trim(a("legend",this).text())+"</li>",a("legend",this).hide()}),d+="</ul>",c.append(d),a(".wpuf-step-wizard li",c).first().addClass("active-step"),a(".wpuf-step-wizard",c).listautowidth()});this.change_fieldset(d,e),a("fieldset .wpuf-multistep-prev-btn, fieldset .wpuf-multistep-next-btn").click(function(f){if(a(this).hasClass("wpuf-multistep-next-btn")){0!=c.formStepCheck("",a(this).closest("fieldset"))&&b.change_fieldset(++d,e)}else a(this).hasClass("wpuf-multistep-prev-btn")&&b.change_fieldset(--d,e);return!1})}},change_fieldset:function(b,c){var d=a("fieldset.wpuf-multistep-fieldset").eq(b);a("fieldset.wpuf-multistep-fieldset").removeClass("field-active").eq(b).addClass("field-active"),a(".wpuf-step-wizard li").each(function(){a(this).index()<=b?"step_by_step"==c?a(this).addClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).addClass("passed-wpuf-ms-bar"):"step_by_step"==c?a(this).removeClass("passed-wpuf-ms-bar"):a(".wpuf-ps-bar",this).removeClass("passed-wpuf-ms-bar")}),a(".wpuf-step-wizard li").removeClass("wpuf-ms-bar-active active-step completed-step"),a(".passed-wpuf-ms-bar").addClass("completed-step").last().addClass("wpuf-ms-bar-active"),a(".wpuf-ms-bar-active").addClass("active-step");var e=a("fieldset.wpuf-multistep-fieldset").eq(b).find("legend").text();if(e=a.trim(e),"progressive"==c&&0!=a(".wpuf-form .wpuf-multistep-fieldset").length){var f=100*(b+1)/a("fieldset.wpuf-multistep-fieldset").length,f=Number(f.toFixed(2));a(".wpuf-multistep-progressbar").progressbar({value:f}),a(".wpuf-progress-percentage").text(e+" ("+f+"%)")}a(".wpuf-form").trigger("step-change-fieldset",[b,d])},ajaxCategory:function(){var b=".category-wrap";a(b).on("change",".cat-ajax",function(){currentLevel=parseInt(a(this).parent().attr("level")),WP_User_Frontend.getChildCats(a(this),"lvl",currentLevel+1,b,"category")})},getChildCats:function(b,c,d,e,f){cat=a(b).val(),results_div=c+d,f=void 0!==f?f:"category",field_attr=a(b).siblings("span").data("taxonomy"),a.ajax({type:"post",url:wpuf_frontend.ajaxurl,data:{action:"wpuf_get_child_cat",catID:cat,nonce:wpuf_frontend.nonce,field_attr:field_attr},beforeSend:function(){a(b).parent().parent().next(".loading").addClass("wpuf-loading")},complete:function(){a(b).parent().parent().next(".loading").removeClass("wpuf-loading")},success:function(e){a(b).parent().nextAll().each(function(){a(this).remove()}),""!=e&&(a(b).parent().addClass("hasChild").parent().append('<div id="'+c+d+'" level="'+d+'"></div>'),b.parent().parent().find("#"+results_div).html(e).slideDown("fast"))}})},cloneField:function(b){b.preventDefault();var c=a(this).closest("tr"),d=c.clone();d.find("input").val(""),d.find(":checked").attr("checked",""),c.after(d)},removeField:function(){var b=a(this).closest("tr");b.siblings().andSelf().length>1&&b.remove()},adminPostSubmit:function(b){b.preventDefault();var c=a(this);if(WP_User_Frontend.validateForm(c))return!0},draftPost:function(b){b.preventDefault();var c=a(this),d=a(this).closest("form"),e=d.serialize()+"&action=wpuf_draft_post",f=d.find('input[type="hidden"][name="post_id"]').val(),g=[];a(".wpuf-rich-validation").each(function(b,c){var c=a(c),d=c.data("id"),e=c.data("name"),f=a.trim(tinyMCE.get(d).getContent());g.push(e+"="+encodeURIComponent(f))}),e=e+"&"+g.join("&"),c.after(' <span class="wpuf-loading"></span>'),a.post(wpuf_frontend.ajaxurl,e,function(b){if(void 0===f){var e='<input type="hidden" name="post_id" value="'+b.post_id+'">';e+='<input type="hidden" name="post_date" value="'+b.date+'">',e+='<input type="hidden" name="post_author" value="'+b.post_author+'">',e+='<input type="hidden" name="comment_status" value="'+b.comment_status+'">',d.append(e)}c.next("span.wpuf-loading").remove(),c.after('<span class="wpuf-draft-saved">&nbsp; Post Saved</span>'),a(".wpuf-draft-saved").delay(2500).fadeOut("fast",function(){a(this).remove()})})},account_update_profile:function(b){b.preventDefault();var c=a(this).closest("form");a.post(wpuf_frontend.ajaxurl,c.serialize(),function(a){a.success?(c.find(".wpuf-error").hide(),c.find(".wpuf-success").show()):(c.find(".wpuf-success").hide(),c.find(".wpuf-error").show(),c.find(".wpuf-error").text(a.data))})},formStepCheck:function(a,b){var c=b;c.find("input[type=submit]");return form_data=WP_User_Frontend.validateForm(c),0==form_data&&WP_User_Frontend.addErrorNotice(self,"bottom"),form_data},formSubmit:function(c){c.preventDefault();var d=a(this),e=d.find("input[type=submit]");form_data=WP_User_Frontend.validateForm(d),form_data&&(d.find("li.wpuf-submit").append('<span class="wpuf-loading"></span>'),e.attr("disabled","disabled").addClass("button-primary-disabled"),a.post(wpuf_frontend.ajaxurl,form_data,function(c){if(c.success)a("body").trigger("wpuf:postform:success",c),1==c.show_message?(d.before('<div class="wpuf-success">'+c.message+"</div>"),d.slideUp("fast",function(){d.remove()}),a("html, body").animate({scrollTop:a(".wpuf-success").offset().top-100},"fast")):b.location=c.redirect_to;else{if(void 0!==c.type&&"login"===c.type)return void(confirm(c.error)?b.location=c.redirect_to:(e.removeAttr("disabled"),e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()));d.find(".g-recaptcha").length>0&&grecaptcha.reset(),alert(c.error),e.removeAttr("disabled")}e.removeClass("button-primary-disabled"),d.find("span.wpuf-loading").remove()}))},validateForm:function(b){var c=!1;if(error_type="",WP_User_Frontend.removeErrors(b),WP_User_Frontend.removeErrorNotice(b),b.find('[data-required="yes"]:visible').each(function(b,d){var e=a(d).data("type");switch(j="",e){case"rich":var f=a(d).data("id");""===(j=a.trim(tinyMCE.get(f).getContent()))&&(c=!0,WP_User_Frontend.markError(d));break;case"textarea":case"text":""===(j=a.trim(a(d).val()))&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"password":case"confirm_password":var g=a(d).data("repeat");if(j=a.trim(a(d).val()),""===j&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type)),g){var h=a('[data-type="confirm_password"]').eq(0);h.val()!=j&&(c=!0,error_type="mismatch",WP_User_Frontend.markError(h,error_type))}break;case"select":(j=a(d).val())&&"-1"!==j||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"multiselect":null!==(j=a(d).val())&&0!==j.length||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"tax-checkbox":var i=a(d).children().find("input:checked").length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"radio":var i=a(d).find("input:checked").length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"file":var i=a(d).find("ul").children().length;i||(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"email":var j=a(d).val();""!==j?WP_User_Frontend.isValidEmail(j)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)):""===j&&(c=!0,error_type="required",WP_User_Frontend.markError(d,error_type));break;case"url":var j=a(d).val();""!==j&&(WP_User_Frontend.isValidURL(j)||(c=!0,error_type="validation",WP_User_Frontend.markError(d,error_type)))}}),c)return WP_User_Frontend.addErrorNotice(b,"end"),!1;var d=b.serialize(),e=[];return a(".wpuf-rich-validation",b).each(function(b,c){var c=a(c),d=c.data("id"),f=c.data("name"),g=a.trim(tinyMCE.get(d).getContent());e.push(f+"="+encodeURIComponent(g))}),d=d+"&"+e.join("&")},addErrorNotice:function(b,c){"bottom"==c?a(".wpuf-multistep-fieldset:visible").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>"):a(b).find("li.wpuf-submit").append('<div class="wpuf-errors">'+wpuf_frontend.error_message+"</div>")},removeErrorNotice:function(b){a(b).find(".wpuf-errors").remove()},markError:function(b,c){var d="";if(a(b).closest("li").addClass("has-error"),c){switch(d=a(b).closest("li").data("label"),c){case"required":d=d+" "+error_str_obj[c];break;case"mismatch":d=d+" "+error_str_obj[c];break;case"validation":d=d+" "+error_str_obj[c]}a(b).siblings(".wpuf-error-msg").remove(),a(b).after('<div class="wpuf-error-msg">'+d+"</div>")}a(b).focus()},removeErrors:function(b){a(b).find(".has-error").removeClass("has-error"),a(".wpuf-error-msg").remove()},isValidEmail:function(a){return new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(a)},isValidURL:function(a){return new RegExp("^(http://www.|https://www.|ftp://www.|www.|http://|https://){1}([0-9A-Za-z]+.)").test(a)},insertImage:function(b,c){if(a("#"+b).length){var d=new plupload.Uploader({runtimes:"html5,html4",browse_button:b,container:"wpuf-insert-image-container",multipart:!0,multipart_params:{action:"wpuf_insert_image",form_id:a("#"+b).data("form_id")},multiple_queues:!1,multi_selection:!1,urlstream_upload:!0,file_data_name:"wpuf_file",max_file_size:"2mb",url:wpuf_frontend_upload.plupload.url,flash_swf_url:wpuf_frontend_upload.flash_swf_url,filters:[{title:"Allowed Files",extensions:"jpg,jpeg,gif,png,bmp"}]});d.bind("Init",function(a,b){}),d.bind("FilesAdded",function(b,c){var d=a("#wpuf-insert-image-container");a.each(c,function(a,b){d.append('<div class="upload-item" id="'+b.id+'"><div class="progress progress-striped active"><div class="bar"></div></div></div>')}),b.refresh(),b.start()}),d.bind("QueueChanged",function(a){d.start()}),d.bind("UploadProgress",function(b,c){var d=a("#"+c.id);a(".bar",d).css({width:c.percent+"%"}),a(".percent",d).html(c.percent+"%")}),d.bind("Error",function(a,b){alert("Error #"+b.code+": "+b.message)}),d.bind("FileUploaded",function(b,d,e){if(a("#"+d.id).remove(),"error"!==e.response){if("undefined"!=typeof tinyMCE)if("function"!=typeof tinyMCE.execInstanceCommand){var f=tinyMCE.get("post_content_"+c);null!==f&&f.insertContent(e.response)}else tinyMCE.execInstanceCommand("post_content_"+c,"mceInsertContent",!1,e.response);var g=a("#post_content_"+c);g.val(g.val()+e.response)}else alert("Something went wrong")}),d.init()}},deleteAvatar:function(b){b.preventDefault(),confirm(a(this).data("confirm"))&&a.post(wpuf_frontend.ajaxurl,{action:"wpuf_delete_avatar",_wpnonce:wpuf_frontend.nonce},function(){a(b.target).parent().remove()})},editorLimit:{bind:function(b,c,d){"no"===d?(a("textarea#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textLimit.call(this,a,b)}),a("input#"+c).keydown(function(a){WP_User_Frontend.editorLimit.textLimit.call(this,a,b)}),a("textarea#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textLimit.call(d,c,b)},100)}),a("input#"+c).on("paste",function(c){var d=a(this);setTimeout(function(){WP_User_Frontend.editorLimit.textLimit.call(d,c,b)},100)})):setTimeout(function(){tinyMCE.get(c).onKeyDown.add(function(a,c){WP_User_Frontend.editorLimit.tinymce.onKeyDown(a,c,b)}),tinyMCE.get(c).onPaste.add(function(a,c){setTimeout(function(){WP_User_Frontend.editorLimit.tinymce.onPaste(a,c,b)},100)})},1e3)},tinymce:{getStats:function(a){var b=a.getBody(),c=tinymce.trim(b.innerText||b.textContent);return{chars:c.length,words:c.split(/[\w\u2019\'-]+/).length}},onKeyDown:function(b,c,d){var e=WP_User_Frontend.editorLimit.tinymce.getStats(b).words-1;d&&a(".mce-path-item.mce-last",b.container).html("Word Limit : "+e+"/"+d),d&&e>d&&(WP_User_Frontend.editorLimit.blockTyping(c),jQuery(".mce-path-item.mce-last",b.container).html(wpuf_frontend.word_limit))},onPaste:function(a,b,c){var d=a.getContent().split(" ").slice(0,c).join(" ");a.setContent(d),WP_User_Frontend.editorLimit.make_media_embed_code(d,a)}},textLimit:function(b,c){var d=a(this),e=d.val().split(" ");c&&e.length>c?(d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(wpuf_frontend.word_limit),WP_User_Frontend.editorLimit.blockTyping(b)):d.closest(".wpuf-fields").find("span.wpuf-wordlimit-message").html(""),"paste"===b.type&&d.val(e.slice(0,c).join(" "))},blockTyping:function(b){a.inArray(b.keyCode,[46,8,9,27,13,110,190,189])!==-1||65==b.keyCode&&b.ctrlKey===!0||b.keyCode>=35&&b.keyCode<=40||(b.preventDefault(),b.stopPropagation())},make_media_embed_code:function(b,c){a.post(ajaxurl,{action:"make_media_embed_code",content:b},function(a){c.setContent(c.getContent()+c.setContent(a))})}}},a(function(){if(WP_User_Frontend.init(),a("ul.wpuf-payment-gateways").on("click","input[type=radio]",function(b){a(".wpuf-payment-instruction").slideUp(250),a(this).parents("li").find(".wpuf-payment-instruction").slideDown(250)}),a("ul.wpuf-payment-gateways li").find("input[type=radio]").is(":checked")){a("ul.wpuf-payment-gateways li").find("input[type=radio]:checked").parents("li").find(".wpuf-payment-instruction").slideDown(250)}else a("ul.wpuf-payment-gateways li").first().find("input[type=radio]").click()})}(jQuery,window);
assets/js/jquery-ui-timepicker-addon.js CHANGED
File without changes
assets/js/jquery.smallipop-0.4.0.min.js CHANGED
File without changes
assets/js/jquery.validate.min.js CHANGED
File without changes
assets/js/subscriptions.js CHANGED
@@ -290,9 +290,9 @@
290
  var checkbox_obj = e.target? $(e.target) : $(e);
291
 
292
  if ( checkbox_obj.is(':checked') ) {
293
- $('.wpuf_expiration_field').show();
294
  } else {
295
- $('.wpuf_expiration_field').hide();
296
  }
297
  }
298
 
290
  var checkbox_obj = e.target? $(e.target) : $(e);
291
 
292
  if ( checkbox_obj.is(':checked') ) {
293
+ $('.wpuf_subscription_expiration_field').show();
294
  } else {
295
+ $('.wpuf_subscription_expiration_field').hide();
296
  }
297
  }
298
 
assets/js/upload.js CHANGED
@@ -56,6 +56,8 @@
56
  this.uploader.init();
57
 
58
  $('#' + container).on('click', 'a.attachment-delete', $.proxy(this.removeAttachment, this));
 
 
59
  };
60
 
61
  WPUF_Uploader.prototype = {
56
  this.uploader.init();
57
 
58
  $('#' + container).on('click', 'a.attachment-delete', $.proxy(this.removeAttachment, this));
59
+
60
+ return this.uploader;
61
  };
62
 
63
  WPUF_Uploader.prototype = {
assets/js/upload.min.js CHANGED
@@ -1 +1 @@
1
- !function(a){window.WPUF_Uploader=function(b,c,d,e,f,g){this.removed_files=[],this.container=c,this.browse_button=b,this.max=d||1,this.count=a("#"+c).find(".wpuf-attachment-list > li").length,this.perFileCount=0,a("#"+b).length&&(this.uploader=new plupload.Uploader({runtimes:"html5,html4",browse_button:b,container:c,multipart:!0,multipart_params:{action:"wpuf_file_upload",form_id:a("#"+b).data("form_id")},max_file_count:2,multiple_queues:!1,multi_selection:"wpuf-avatar-pickfiles"!=b&&"wpuf-featured_image-pickfiles"!=b,urlstream_upload:!0,file_data_name:"wpuf_file",max_file_size:g+"kb",url:wpuf_frontend_upload.plupload.url+"&type="+e,flash_swf_url:wpuf_frontend_upload.flash_swf_url,filters:[{title:"Allowed Files",extensions:f}]}),this.uploader.bind("Init",a.proxy(this,"init")),this.uploader.bind("FilesAdded",a.proxy(this,"added")),this.uploader.bind("QueueChanged",a.proxy(this,"upload")),this.uploader.bind("UploadProgress",a.proxy(this,"progress")),this.uploader.bind("Error",a.proxy(this,"error")),this.uploader.bind("FileUploaded",a.proxy(this,"uploaded")),this.uploader.init(),a("#"+c).on("click","a.attachment-delete",a.proxy(this.removeAttachment,this)))},WPUF_Uploader.prototype={init:function(b,c){this.showHide(),a("#"+this.container).prepend('<div class="wpuf-file-warning"></div>')},showHide:function(){if(this.count>=this.max)return this.count,this.max,a("#"+this.container+" .wpuf-file-warning").html(wpuf_frontend_upload.warning),void a("#"+this.container).find(".file-selector").hide();a("#"+this.container+" .wpuf-file-warning").html(""),a("#"+this.container).find(".file-selector").show()},added:function(b,c){var d=a("#"+this.container).find(".wpuf-attachment-upload-filelist");this.showHide(),a.each(c,function(a,b){d.append('<div class="upload-item" id="'+b.id+'"><div class="progress progress-striped active"><div class="bar"></div></div><div class="filename original">'+b.name+" ("+plupload.formatSize(b.size)+") <b></b></div></div>")}),b.refresh(),b.start()},upload:function(a){this.count=a.files.length-this.removed_files.length,this.showHide()},progress:function(b,c){var d=a("#"+c.id);a(".bar",d).css({width:c.percent+"%"}),a(".percent",d).html(c.percent+"%")},error:function(b,c){a("#"+this.container).find("#"+c.file.id).remove();var d="";switch(c.code){case-600:d=wpuf_frontend_upload.plupload.size_error;break;case-601:d=wpuf_frontend_upload.plupload.type_error;break;default:d="Error #"+c.code+": "+c.message}alert(d),this.count-=1,this.showHide(),this.uploader.refresh()},uploaded:function(b,c,d){var e=this;if(a("#"+c.id+" b").html("100%"),a("#"+c.id).remove(),"error"!==d.response){this.perFileCount++;var f=a("#"+this.container).find(".wpuf-attachment-list");if(f.append(d.response),this.perFileCount>this.max){var g=a(".wpuf-image-wrap:last a.attachment-delete",f).data("attach_id");e.removeExtraAttachment(g),a(".wpuf-image-wrap",f).last().remove(),this.perFileCount--}}else alert(d.error),this.count-=1,this.showHide()},removeAttachment:function(b){b.preventDefault();var c=this,d=a(b.currentTarget);if(confirm(wpuf_frontend_upload.confirmMsg)){var e={attach_id:d.data("attach_id"),nonce:wpuf_frontend_upload.nonce,action:"wpuf_file_del"};this.removed_files.push(e),jQuery.post(wpuf_frontend_upload.ajaxurl,e,function(){c.perFileCount--,d.parent().parent().remove(),c.count-=1,c.showHide(),c.uploader.refresh()})}},removeExtraAttachment:function(a){var b=this,c={attach_id:a,nonce:wpuf_frontend_upload.nonce,action:"wpuf_file_del"};this.removed_files.push(c),jQuery.post(wpuf_frontend_upload.ajaxurl,c,function(){b.count-=1,b.showHide(),b.uploader.refresh()})}}}(jQuery);
1
+ !function(a){window.WPUF_Uploader=function(b,c,d,e,f,g){if(this.removed_files=[],this.container=c,this.browse_button=b,this.max=d||1,this.count=a("#"+c).find(".wpuf-attachment-list > li").length,this.perFileCount=0,a("#"+b).length)return this.uploader=new plupload.Uploader({runtimes:"html5,html4",browse_button:b,container:c,multipart:!0,multipart_params:{action:"wpuf_file_upload",form_id:a("#"+b).data("form_id")},max_file_count:2,multiple_queues:!1,multi_selection:"wpuf-avatar-pickfiles"!=b&&"wpuf-featured_image-pickfiles"!=b,urlstream_upload:!0,file_data_name:"wpuf_file",max_file_size:g+"kb",url:wpuf_frontend_upload.plupload.url+"&type="+e,flash_swf_url:wpuf_frontend_upload.flash_swf_url,filters:[{title:"Allowed Files",extensions:f}]}),this.uploader.bind("Init",a.proxy(this,"init")),this.uploader.bind("FilesAdded",a.proxy(this,"added")),this.uploader.bind("QueueChanged",a.proxy(this,"upload")),this.uploader.bind("UploadProgress",a.proxy(this,"progress")),this.uploader.bind("Error",a.proxy(this,"error")),this.uploader.bind("FileUploaded",a.proxy(this,"uploaded")),this.uploader.init(),a("#"+c).on("click","a.attachment-delete",a.proxy(this.removeAttachment,this)),this.uploader},WPUF_Uploader.prototype={init:function(b,c){this.showHide(),a("#"+this.container).prepend('<div class="wpuf-file-warning"></div>')},showHide:function(){if(this.count>=this.max)return this.count,this.max,a("#"+this.container+" .wpuf-file-warning").html(wpuf_frontend_upload.warning),void a("#"+this.container).find(".file-selector").hide();a("#"+this.container+" .wpuf-file-warning").html(""),a("#"+this.container).find(".file-selector").show()},added:function(b,c){var d=a("#"+this.container).find(".wpuf-attachment-upload-filelist");this.showHide(),a.each(c,function(a,b){d.append('<div class="upload-item" id="'+b.id+'"><div class="progress progress-striped active"><div class="bar"></div></div><div class="filename original">'+b.name+" ("+plupload.formatSize(b.size)+") <b></b></div></div>")}),b.refresh(),b.start()},upload:function(a){this.count=a.files.length-this.removed_files.length,this.showHide()},progress:function(b,c){var d=a("#"+c.id);a(".bar",d).css({width:c.percent+"%"}),a(".percent",d).html(c.percent+"%")},error:function(b,c){a("#"+this.container).find("#"+c.file.id).remove();var d="";switch(c.code){case-600:d=wpuf_frontend_upload.plupload.size_error;break;case-601:d=wpuf_frontend_upload.plupload.type_error;break;default:d="Error #"+c.code+": "+c.message}alert(d),this.count-=1,this.showHide(),this.uploader.refresh()},uploaded:function(b,c,d){var e=this;if(a("#"+c.id+" b").html("100%"),a("#"+c.id).remove(),"error"!==d.response){this.perFileCount++;var f=a("#"+this.container).find(".wpuf-attachment-list");if(f.append(d.response),this.perFileCount>this.max){var g=a(".wpuf-image-wrap:last a.attachment-delete",f).data("attach_id");e.removeExtraAttachment(g),a(".wpuf-image-wrap",f).last().remove(),this.perFileCount--}}else alert(d.error),this.count-=1,this.showHide()},removeAttachment:function(b){b.preventDefault();var c=this,d=a(b.currentTarget);if(confirm(wpuf_frontend_upload.confirmMsg)){var e={attach_id:d.data("attach_id"),nonce:wpuf_frontend_upload.nonce,action:"wpuf_file_del"};this.removed_files.push(e),jQuery.post(wpuf_frontend_upload.ajaxurl,e,function(){c.perFileCount--,d.parent().parent().remove(),c.count-=1,c.showHide(),c.uploader.refresh()})}},removeExtraAttachment:function(a){var b=this,c={attach_id:a,nonce:wpuf_frontend_upload.nonce,action:"wpuf_file_del"};this.removed_files.push(c),jQuery.post(wpuf_frontend_upload.ajaxurl,c,function(){b.count-=1,b.showHide(),b.uploader.refresh()})}}}(jQuery);
assets/js/wpuf-form-builder-components.js CHANGED
@@ -111,16 +111,47 @@ Vue.component('builder-stage', {
111
 
112
  delete_field: function(index) {
113
  var self = this;
114
-
115
- self.warn({
116
- text: self.i18n.delete_field_warn_msg,
 
 
 
 
 
117
  confirmButtonText: self.i18n.yes_delete_it,
118
  cancelButtonText: self.i18n.no_cancel_it,
119
- }, function (is_confirm) {
120
- if (is_confirm) {
121
- self.$store.commit('delete_form_field_element', index);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  }
123
  });
 
 
 
 
 
 
 
 
 
 
124
  },
125
 
126
  delete_hidden_field: function (field_id) {
@@ -313,7 +344,7 @@ Vue.component('field-option-data', {
313
  },
314
 
315
  set_option_label: function (index, label) {
316
- this.options[index].value = label.toLocaleLowerCase().replace(' ', '_');
317
  }
318
  },
319
 
@@ -1046,6 +1077,61 @@ Vue.component('help-text', {
1046
  }
1047
  });
1048
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1049
  Vue.component('text-editor', {
1050
  template: '#tmpl-wpuf-text-editor',
1051
 
111
 
112
  delete_field: function(index) {
113
  var self = this;
114
+
115
+ swal({
116
+ title: 'Are you sure?',
117
+ text: "You won't be able to revert this!",
118
+ type: 'warning',
119
+ showCancelButton: true,
120
+ confirmButtonColor: '#3085d6',
121
+ cancelButtonColor: '#d33',
122
  confirmButtonText: self.i18n.yes_delete_it,
123
  cancelButtonText: self.i18n.no_cancel_it,
124
+ confirmButtonClass: 'btn btn-success',
125
+ cancelButtonClass: 'btn btn-danger',
126
+ buttonsStyling: false
127
+ }).then(function () {
128
+ self.$store.commit('delete_form_field_element', index);
129
+ swal(
130
+ 'Deleted!',
131
+ 'Your file has been deleted.',
132
+ 'success'
133
+ );
134
+ }, function (dismiss) {
135
+ // dismiss can be 'cancel', 'overlay',
136
+ // 'close', and 'timer'
137
+ if (dismiss === 'cancel') {
138
+ swal(
139
+ 'Cancelled',
140
+ 'Your field is safe :)',
141
+ 'error'
142
+ );
143
  }
144
  });
145
+
146
+ // self.warn({
147
+ // text: self.i18n.delete_field_warn_msg,
148
+ // confirmButtonText: self.i18n.yes_delete_it,
149
+ // cancelButtonText: self.i18n.no_cancel_it,
150
+ // }, function (is_confirm) {
151
+ // if (is_confirm) {
152
+ // self.$store.commit('delete_form_field_element', index);
153
+ // }
154
+ // });
155
  },
156
 
157
  delete_hidden_field: function (field_id) {
344
  },
345
 
346
  set_option_label: function (index, label) {
347
+ this.options[index].value = label.toLocaleLowerCase().replace( /\s/g, '_' );
348
  }
349
  },
350
 
1077
  }
1078
  });
1079
 
1080
+ Vue.component('wpuf-merge-tags', {
1081
+ template: '#tmpl-wpuf-merge-tags',
1082
+ props: {
1083
+ field: String,
1084
+ filter: {
1085
+ type: String,
1086
+ default: null
1087
+ }
1088
+ },
1089
+
1090
+ data: function() {
1091
+ return {
1092
+ showing: false,
1093
+ type: null,
1094
+ };
1095
+ },
1096
+
1097
+ mounted: function() {
1098
+
1099
+ // hide if clicked outside
1100
+ $('body').on('click', function(event) {
1101
+ if ( !$(event.target).closest('.wpuf-merge-tag-wrap').length) {
1102
+ $(".wpuf-merge-tags").hide();
1103
+ }
1104
+ });
1105
+ },
1106
+
1107
+ computed: {
1108
+ form_fields: function () {
1109
+ var template = this.filter,
1110
+ fields = this.$store.state.form_fields;
1111
+
1112
+ if (template !== null) {
1113
+ return fields.filter(function(item) {
1114
+ return item.template === template;
1115
+ });
1116
+ }
1117
+
1118
+ // remove the action/hidden fields
1119
+ return fields.filter(function(item) {
1120
+ return !_.contains( [ 'action_hook', 'custom_hidden_field'], item.template );
1121
+ });
1122
+ },
1123
+ },
1124
+
1125
+ methods: {
1126
+ toggleFields: function(event) {
1127
+ $(event.target).parent().siblings('.wpuf-merge-tags').toggle('fast');
1128
+ },
1129
+
1130
+ insertField: function(type, field) {
1131
+ this.$emit('insert', type, field, this.field);
1132
+ }
1133
+ }
1134
+ });
1135
  Vue.component('text-editor', {
1136
  template: '#tmpl-wpuf-text-editor',
1137
 
assets/js/wpuf-form-builder-mixins.js CHANGED
@@ -112,7 +112,7 @@ Vue.mixin({
112
  isSingleInstance: function(field_name) {
113
  var singleInstance = ['post_title', 'post_content', 'post_excerpt', 'featured_image',
114
  'user_login', 'first_name', 'last_name', 'nickname', 'user_email', 'user_url',
115
- 'user_bio', 'password', 'user_avatar'];
116
 
117
  if ( $.inArray(field_name, singleInstance) >= 0 ) {
118
  return true;
112
  isSingleInstance: function(field_name) {
113
  var singleInstance = ['post_title', 'post_content', 'post_excerpt', 'featured_image',
114
  'user_login', 'first_name', 'last_name', 'nickname', 'user_email', 'user_url',
115
+ 'user_bio', 'password', 'user_avatar', 'taxonomy'];
116
 
117
  if ( $.inArray(field_name, singleInstance) >= 0 ) {
118
  return true;
assets/vendor/sweetalert/sweetalert-dev.js DELETED
@@ -1,1253 +0,0 @@
1
- ;(function(window, document, undefined) {
2
- "use strict";
3
-
4
- (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
5
- // SweetAlert
6
- // 2014-2015 (c) - Tristan Edwards
7
- // github.com/t4t5/sweetalert
8
-
9
- /*
10
- * jQuery-like functions for manipulating the DOM
11
- */
12
- 'use strict';
13
-
14
- Object.defineProperty(exports, '__esModule', {
15
- value: true
16
- });
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
19
-
20
- var _modulesHandleDom = require('./modules/handle-dom');
21
-
22
- /*
23
- * Handy utilities
24
- */
25
-
26
- var _modulesUtils = require('./modules/utils');
27
-
28
- /*
29
- * Handle sweetAlert's DOM elements
30
- */
31
-
32
- var _modulesHandleSwalDom = require('./modules/handle-swal-dom');
33
-
34
- // Handle button events and keyboard events
35
-
36
- var _modulesHandleClick = require('./modules/handle-click');
37
-
38
- var _modulesHandleKey = require('./modules/handle-key');
39
-
40
- var _modulesHandleKey2 = _interopRequireDefault(_modulesHandleKey);
41
-
42
- // Default values
43
-
44
- var _modulesDefaultParams = require('./modules/default-params');
45
-
46
- var _modulesDefaultParams2 = _interopRequireDefault(_modulesDefaultParams);
47
-
48
- var _modulesSetParams = require('./modules/set-params');
49
-
50
- var _modulesSetParams2 = _interopRequireDefault(_modulesSetParams);
51
-
52
- /*
53
- * Remember state in cases where opening and handling a modal will fiddle with it.
54
- * (We also use window.previousActiveElement as a global variable)
55
- */
56
- var previousWindowKeyDown;
57
- var lastFocusedButton;
58
-
59
- /*
60
- * Global sweetAlert function
61
- * (this is what the user calls)
62
- */
63
- var sweetAlert, swal;
64
-
65
- exports['default'] = sweetAlert = swal = function () {
66
- var customizations = arguments[0];
67
-
68
- (0, _modulesHandleDom.addClass)(document.body, 'stop-scrolling');
69
- (0, _modulesHandleSwalDom.resetInput)();
70
-
71
- /*
72
- * Use argument if defined or default value from params object otherwise.
73
- * Supports the case where a default value is boolean true and should be
74
- * overridden by a corresponding explicit argument which is boolean false.
75
- */
76
- function argumentOrDefault(key) {
77
- var args = customizations;
78
- return args[key] === undefined ? _modulesDefaultParams2['default'][key] : args[key];
79
- }
80
-
81
- if (customizations === undefined) {
82
- (0, _modulesUtils.logStr)('SweetAlert expects at least 1 attribute!');
83
- return false;
84
- }
85
-
86
- var params = (0, _modulesUtils.extend)({}, _modulesDefaultParams2['default']);
87
-
88
- switch (typeof customizations) {
89
-
90
- // Ex: swal("Hello", "Just testing", "info");
91
- case 'string':
92
- params.title = customizations;
93
- params.text = arguments[1] || '';
94
- params.type = arguments[2] || '';
95
- break;
96
-
97
- // Ex: swal({ title:"Hello", text: "Just testing", type: "info" });
98
- case 'object':
99
- if (customizations.title === undefined) {
100
- (0, _modulesUtils.logStr)('Missing "title" argument!');
101
- return false;
102
- }
103
-
104
- params.title = customizations.title;
105
-
106
- for (var customName in _modulesDefaultParams2['default']) {
107
- params[customName] = argumentOrDefault(customName);
108
- }
109
-
110
- // Show "Confirm" instead of "OK" if cancel button is visible
111
- params.confirmButtonText = params.showCancelButton ? 'Confirm' : _modulesDefaultParams2['default'].confirmButtonText;
112
- params.confirmButtonText = argumentOrDefault('confirmButtonText');
113
-
114
- // Callback function when clicking on "OK"/"Cancel"
115
- params.doneFunction = arguments[1] || null;
116
-
117
- break;
118
-
119
- default:
120
- (0, _modulesUtils.logStr)('Unexpected type of argument! Expected "string" or "object", got ' + typeof customizations);
121
- return false;
122
-
123
- }
124
-
125
- (0, _modulesSetParams2['default'])(params);
126
- (0, _modulesHandleSwalDom.fixVerticalPosition)();
127
- (0, _modulesHandleSwalDom.openModal)(arguments[1]);
128
-
129
- // Modal interactions
130
- var modal = (0, _modulesHandleSwalDom.getModal)();
131
-
132
- /*
133
- * Make sure all modal buttons respond to all events
134
- */
135
- var $buttons = modal.querySelectorAll('button');
136
- var buttonEvents = ['onclick', 'onmouseover', 'onmouseout', 'onmousedown', 'onmouseup', 'onfocus'];
137
- var onButtonEvent = function onButtonEvent(e) {
138
- return (0, _modulesHandleClick.handleButton)(e, params, modal);
139
- };
140
-
141
- for (var btnIndex = 0; btnIndex < $buttons.length; btnIndex++) {
142
- for (var evtIndex = 0; evtIndex < buttonEvents.length; evtIndex++) {
143
- var btnEvt = buttonEvents[evtIndex];
144
- $buttons[btnIndex][btnEvt] = onButtonEvent;
145
- }
146
- }
147
-
148
- // Clicking outside the modal dismisses it (if allowed by user)
149
- (0, _modulesHandleSwalDom.getOverlay)().onclick = onButtonEvent;
150
-
151
- previousWindowKeyDown = window.onkeydown;
152
-
153
- var onKeyEvent = function onKeyEvent(e) {
154
- return (0, _modulesHandleKey2['default'])(e, params, modal);
155
- };
156
- window.onkeydown = onKeyEvent;
157
-
158
- window.onfocus = function () {
159
- // When the user has focused away and focused back from the whole window.
160
- setTimeout(function () {
161
- // Put in a timeout to jump out of the event sequence.
162
- // Calling focus() in the event sequence confuses things.
163
- if (lastFocusedButton !== undefined) {
164
- lastFocusedButton.focus();
165
- lastFocusedButton = undefined;
166
- }
167
- }, 0);
168
- };
169
-
170
- // Show alert with enabled buttons always
171
- swal.enableButtons();
172
- };
173
-
174
- /*
175
- * Set default params for each popup
176
- * @param {Object} userParams
177
- */
178
- sweetAlert.setDefaults = swal.setDefaults = function (userParams) {
179
- if (!userParams) {
180
- throw new Error('userParams is required');
181
- }
182
- if (typeof userParams !== 'object') {
183
- throw new Error('userParams has to be a object');
184
- }
185
-
186
- (0, _modulesUtils.extend)(_modulesDefaultParams2['default'], userParams);
187
- };
188
-
189
- /*
190
- * Animation when closing modal
191
- */
192
- sweetAlert.close = swal.close = function () {
193
- var modal = (0, _modulesHandleSwalDom.getModal)();
194
-
195
- (0, _modulesHandleDom.fadeOut)((0, _modulesHandleSwalDom.getOverlay)(), 5);
196
- (0, _modulesHandleDom.fadeOut)(modal, 5);
197
- (0, _modulesHandleDom.removeClass)(modal, 'showSweetAlert');
198
- (0, _modulesHandleDom.addClass)(modal, 'hideSweetAlert');
199
- (0, _modulesHandleDom.removeClass)(modal, 'visible');
200
-
201
- /*
202
- * Reset icon animations
203
- */
204
- var $successIcon = modal.querySelector('.sa-icon.sa-success');
205
- (0, _modulesHandleDom.removeClass)($successIcon, 'animate');
206
- (0, _modulesHandleDom.removeClass)($successIcon.querySelector('.sa-tip'), 'animateSuccessTip');
207
- (0, _modulesHandleDom.removeClass)($successIcon.querySelector('.sa-long'), 'animateSuccessLong');
208
-
209
- var $errorIcon = modal.querySelector('.sa-icon.sa-error');
210
- (0, _modulesHandleDom.removeClass)($errorIcon, 'animateErrorIcon');
211
- (0, _modulesHandleDom.removeClass)($errorIcon.querySelector('.sa-x-mark'), 'animateXMark');
212
-
213
- var $warningIcon = modal.querySelector('.sa-icon.sa-warning');
214
- (0, _modulesHandleDom.removeClass)($warningIcon, 'pulseWarning');
215
- (0, _modulesHandleDom.removeClass)($warningIcon.querySelector('.sa-body'), 'pulseWarningIns');
216
- (0, _modulesHandleDom.removeClass)($warningIcon.querySelector('.sa-dot'), 'pulseWarningIns');
217
-
218
- // Reset custom class (delay so that UI changes aren't visible)
219
- setTimeout(function () {
220
- var customClass = modal.getAttribute('data-custom-class');
221
- (0, _modulesHandleDom.removeClass)(modal, customClass);
222
- }, 300);
223
-
224
- // Make page scrollable again
225
- (0, _modulesHandleDom.removeClass)(document.body, 'stop-scrolling');
226
-
227
- // Reset the page to its previous state
228
- window.onkeydown = previousWindowKeyDown;
229
- if (window.previousActiveElement) {
230
- window.previousActiveElement.focus();
231
- }
232
- lastFocusedButton = undefined;
233
- clearTimeout(modal.timeout);
234
-
235
- return true;
236
- };
237
-
238
- /*
239
- * Validation of the input field is done by user
240
- * If something is wrong => call showInputError with errorMessage
241
- */
242
- sweetAlert.showInputError = swal.showInputError = function (errorMessage) {
243
- var modal = (0, _modulesHandleSwalDom.getModal)();
244
-
245
- var $errorIcon = modal.querySelector('.sa-input-error');
246
- (0, _modulesHandleDom.addClass)($errorIcon, 'show');
247
-
248
- var $errorContainer = modal.querySelector('.sa-error-container');
249
- (0, _modulesHandleDom.addClass)($errorContainer, 'show');
250
-
251
- $errorContainer.querySelector('p').innerHTML = errorMessage;
252
-
253
- setTimeout(function () {
254
- sweetAlert.enableButtons();
255
- }, 1);
256
-
257
- modal.querySelector('input').focus();
258
- };
259
-
260
- /*
261
- * Reset input error DOM elements
262
- */
263
- sweetAlert.resetInputError = swal.resetInputError = function (event) {
264
- // If press enter => ignore
265
- if (event && event.keyCode === 13) {
266
- return false;
267
- }
268
-
269
- var $modal = (0, _modulesHandleSwalDom.getModal)();
270
-
271
- var $errorIcon = $modal.querySelector('.sa-input-error');
272
- (0, _modulesHandleDom.removeClass)($errorIcon, 'show');
273
-
274
- var $errorContainer = $modal.querySelector('.sa-error-container');
275
- (0, _modulesHandleDom.removeClass)($errorContainer, 'show');
276
- };
277
-
278
- /*
279
- * Disable confirm and cancel buttons
280
- */
281
- sweetAlert.disableButtons = swal.disableButtons = function (event) {
282
- var modal = (0, _modulesHandleSwalDom.getModal)();
283
- var $confirmButton = modal.querySelector('button.confirm');
284
- var $cancelButton = modal.querySelector('button.cancel');
285
- $confirmButton.disabled = true;
286
- $cancelButton.disabled = true;
287
- };
288
-
289
- /*
290
- * Enable confirm and cancel buttons
291
- */
292
- sweetAlert.enableButtons = swal.enableButtons = function (event) {
293
- var modal = (0, _modulesHandleSwalDom.getModal)();
294
- var $confirmButton = modal.querySelector('button.confirm');
295
- var $cancelButton = modal.querySelector('button.cancel');
296
- $confirmButton.disabled = false;
297
- $cancelButton.disabled = false;
298
- };
299
-
300
- if (typeof window !== 'undefined') {
301
- // The 'handle-click' module requires
302
- // that 'sweetAlert' was set as global.
303
- window.sweetAlert = window.swal = sweetAlert;
304
- } else {
305
- (0, _modulesUtils.logStr)('SweetAlert is a frontend module!');
306
- }
307
- module.exports = exports['default'];
308
-
309
- },{"./modules/default-params":2,"./modules/handle-click":3,"./modules/handle-dom":4,"./modules/handle-key":5,"./modules/handle-swal-dom":6,"./modules/set-params":8,"./modules/utils":9}],2:[function(require,module,exports){
310
- 'use strict';
311
-
312
- Object.defineProperty(exports, '__esModule', {
313
- value: true
314
- });
315
- var defaultParams = {
316
- title: '',
317
- text: '',
318
- type: null,
319
- allowOutsideClick: false,
320
- showConfirmButton: true,
321
- showCancelButton: false,
322
- closeOnConfirm: true,
323
- closeOnCancel: true,
324
- confirmButtonText: 'OK',
325
- confirmButtonColor: '#8CD4F5',
326
- cancelButtonText: 'Cancel',
327
- imageUrl: null,
328
- imageSize: null,
329
- timer: null,
330
- customClass: '',
331
- html: false,
332
- animation: true,
333
- allowEscapeKey: true,
334
- inputType: 'text',
335
- inputPlaceholder: '',
336
- inputValue: '',
337
- showLoaderOnConfirm: false
338
- };
339
-
340
- exports['default'] = defaultParams;
341
- module.exports = exports['default'];
342
-
343
- },{}],3:[function(require,module,exports){
344
- 'use strict';
345
-
346
- Object.defineProperty(exports, '__esModule', {
347
- value: true
348
- });
349
-
350
- var _utils = require('./utils');
351
-
352
- var _handleSwalDom = require('./handle-swal-dom');
353
-
354
- var _handleDom = require('./handle-dom');
355
-
356
- /*
357
- * User clicked on "Confirm"/"OK" or "Cancel"
358
- */
359
- var handleButton = function handleButton(event, params, modal) {
360
- var e = event || window.event;
361
- var target = e.target || e.srcElement;
362
-
363
- var targetedConfirm = target.className.indexOf('confirm') !== -1;
364
- var targetedOverlay = target.className.indexOf('sweet-overlay') !== -1;
365
- var modalIsVisible = (0, _handleDom.hasClass)(modal, 'visible');
366
- var doneFunctionExists = params.doneFunction && modal.getAttribute('data-has-done-function') === 'true';
367
-
368
- // Since the user can change the background-color of the confirm button programmatically,
369
- // we must calculate what the color should be on hover/active
370
- var normalColor, hoverColor, activeColor;
371
- if (targetedConfirm && params.confirmButtonColor) {
372
- normalColor = params.confirmButtonColor;
373
- hoverColor = (0, _utils.colorLuminance)(normalColor, -0.04);
374
- activeColor = (0, _utils.colorLuminance)(normalColor, -0.14);
375
- }
376
-
377
- function shouldSetConfirmButtonColor(color) {
378
- if (targetedConfirm && params.confirmButtonColor) {
379
- target.style.backgroundColor = color;
380
- }
381
- }
382
-
383
- switch (e.type) {
384
- case 'mouseover':
385
- shouldSetConfirmButtonColor(hoverColor);
386
- break;
387
-
388
- case 'mouseout':
389
- shouldSetConfirmButtonColor(normalColor);
390
- break;
391
-
392
- case 'mousedown':
393
- shouldSetConfirmButtonColor(activeColor);
394
- break;
395
-
396
- case 'mouseup':
397
- shouldSetConfirmButtonColor(hoverColor);
398
- break;
399
-
400
- case 'focus':
401
- var $confirmButton = modal.querySelector('button.confirm');
402
- var $cancelButton = modal.querySelector('button.cancel');
403
-
404
- if (targetedConfirm) {
405
- $cancelButton.style.boxShadow = 'none';
406
- } else {
407
- $confirmButton.style.boxShadow = 'none';
408
- }
409
- break;
410
-
411
- case 'click':
412
- var clickedOnModal = modal === target;
413
- var clickedOnModalChild = (0, _handleDom.isDescendant)(modal, target);
414
-
415
- // Ignore click outside if allowOutsideClick is false
416
- if (!clickedOnModal && !clickedOnModalChild && modalIsVisible && !params.allowOutsideClick) {
417
- break;
418
- }
419
-
420
- if (targetedConfirm && doneFunctionExists && modalIsVisible) {
421
- handleConfirm(modal, params);
422
- } else if (doneFunctionExists && modalIsVisible || targetedOverlay) {
423
- handleCancel(modal, params);
424
- } else if ((0, _handleDom.isDescendant)(modal, target) && target.tagName === 'BUTTON') {
425
- sweetAlert.close();
426
- }
427
- break;
428
- }
429
- };
430
-
431
- /*
432
- * User clicked on "Confirm"/"OK"
433
- */
434
- var handleConfirm = function handleConfirm(modal, params) {
435
- var callbackValue = true;
436
-
437
- if ((0, _handleDom.hasClass)(modal, 'show-input')) {
438
- callbackValue = modal.querySelector('input').value;
439
-
440
- if (!callbackValue) {
441
- callbackValue = '';
442
- }
443
- }
444
-
445
- params.doneFunction(callbackValue);
446
-
447
- if (params.closeOnConfirm) {
448
- sweetAlert.close();
449
- }
450
- // Disable cancel and confirm button if the parameter is true
451
- if (params.showLoaderOnConfirm) {
452
- sweetAlert.disableButtons();
453
- }
454
- };
455
-
456
- /*
457
- * User clicked on "Cancel"
458
- */
459
- var handleCancel = function handleCancel(modal, params) {
460
- // Check if callback function expects a parameter (to track cancel actions)
461
- var functionAsStr = String(params.doneFunction).replace(/\s/g, '');
462
- var functionHandlesCancel = functionAsStr.substring(0, 9) === 'function(' && functionAsStr.substring(9, 10) !== ')';
463
-
464
- if (functionHandlesCancel) {
465
- params.doneFunction(false);
466
- }
467
-
468
- if (params.closeOnCancel) {
469
- sweetAlert.close();
470
- }
471
- };
472
-
473
- exports['default'] = {
474
- handleButton: handleButton,
475
- handleConfirm: handleConfirm,
476
- handleCancel: handleCancel
477
- };
478
- module.exports = exports['default'];
479
-
480
- },{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],4:[function(require,module,exports){
481
- 'use strict';
482
-
483
- Object.defineProperty(exports, '__esModule', {
484
- value: true
485
- });
486
- var hasClass = function hasClass(elem, className) {
487
- return new RegExp(' ' + className + ' ').test(' ' + elem.className + ' ');
488
- };
489
-
490
- var addClass = function addClass(elem, className) {
491
- if (!hasClass(elem, className)) {
492
- elem.className += ' ' + className;
493
- }
494
- };
495
-
496
- var removeClass = function removeClass(elem, className) {
497
- var newClass = ' ' + elem.className.replace(/[\t\r\n]/g, ' ') + ' ';
498
- if (hasClass(elem, className)) {
499
- while (newClass.indexOf(' ' + className + ' ') >= 0) {
500
- newClass = newClass.replace(' ' + className + ' ', ' ');
501
- }
502
- elem.className = newClass.replace(/^\s+|\s+$/g, '');
503
- }
504
- };
505
-
506
- var escapeHtml = function escapeHtml(str) {
507
- var div = document.createElement('div');
508
- div.appendChild(document.createTextNode(str));
509
- return div.innerHTML;
510
- };
511
-
512
- var _show = function _show(elem) {
513
- elem.style.opacity = '';
514
- elem.style.display = 'block';
515
- };
516
-
517
- var show = function show(elems) {
518
- if (elems && !elems.length) {
519
- return _show(elems);
520
- }
521
- for (var i = 0; i < elems.length; ++i) {
522
- _show(elems[i]);
523
- }
524
- };
525
-
526
- var _hide = function _hide(elem) {
527
- elem.style.opacity = '';
528
- elem.style.display = 'none';
529
- };
530
-
531
- var hide = function hide(elems) {
532
- if (elems && !elems.length) {
533
- return _hide(elems);
534
- }
535
- for (var i = 0; i < elems.length; ++i) {
536
- _hide(elems[i]);
537
- }
538
- };
539
-
540
- var isDescendant = function isDescendant(parent, child) {
541
- var node = child.parentNode;
542
- while (node !== null) {
543
- if (node === parent) {
544
- return true;
545
- }
546
- node = node.parentNode;
547
- }
548
- return false;
549
- };
550
-
551
- var getTopMargin = function getTopMargin(elem) {
552
- elem.style.left = '-9999px';
553
- elem.style.display = 'block';
554
-
555
- var height = elem.clientHeight,
556
- padding;
557
- if (typeof getComputedStyle !== "undefined") {
558
- // IE 8
559
- padding = parseInt(getComputedStyle(elem).getPropertyValue('padding-top'), 10);
560
- } else {
561
- padding = parseInt(elem.currentStyle.padding);
562
- }
563
-
564
- elem.style.left = '';
565
- elem.style.display = 'none';
566
- return '-' + parseInt((height + padding) / 2) + 'px';
567
- };
568
-
569
- var fadeIn = function fadeIn(elem, interval) {
570
- if (+elem.style.opacity < 1) {
571
- interval = interval || 16;
572
- elem.style.opacity = 0;
573
- elem.style.display = 'block';
574
- var last = +new Date();
575
- var tick = function tick() {
576
- elem.style.opacity = +elem.style.opacity + (new Date() - last) / 100;
577
- last = +new Date();
578
-
579
- if (+elem.style.opacity < 1) {
580
- setTimeout(tick, interval);
581
- }
582
- };
583
- tick();
584
- }
585
- elem.style.display = 'block'; //fallback IE8
586
- };
587
-
588
- var fadeOut = function fadeOut(elem, interval) {
589
- interval = interval || 16;
590
- elem.style.opacity = 1;
591
- var last = +new Date();
592
- var tick = function tick() {
593
- elem.style.opacity = +elem.style.opacity - (new Date() - last) / 100;
594
- last = +new Date();
595
-
596
- if (+elem.style.opacity > 0) {
597
- setTimeout(tick, interval);
598
- } else {
599
- elem.style.display = 'none';
600
- }
601
- };
602
- tick();
603
- };
604
-
605
- var fireClick = function fireClick(node) {
606
- // Taken from http://www.nonobtrusive.com/2011/11/29/programatically-fire-crossbrowser-click-event-with-javascript/
607
- // Then fixed for today's Chrome browser.
608
- if (typeof MouseEvent === 'function') {
609
- // Up-to-date approach
610
- var mevt = new MouseEvent('click', {
611
- view: window,
612
- bubbles: false,
613
- cancelable: true
614
- });
615
- node.dispatchEvent(mevt);
616
- } else if (document.createEvent) {
617
- // Fallback
618
- var evt = document.createEvent('MouseEvents');
619
- evt.initEvent('click', false, false);
620
- node.dispatchEvent(evt);
621
- } else if (document.createEventObject) {
622
- node.fireEvent('onclick');
623
- } else if (typeof node.onclick === 'function') {
624
- node.onclick();
625
- }
626
- };
627
-
628
- var stopEventPropagation = function stopEventPropagation(e) {
629
- // In particular, make sure the space bar doesn't scroll the main window.
630
- if (typeof e.stopPropagation === 'function') {
631
- e.stopPropagation();
632
- e.preventDefault();
633
- } else if (window.event && window.event.hasOwnProperty('cancelBubble')) {
634
- window.event.cancelBubble = true;
635
- }
636
- };
637
-
638
- exports.hasClass = hasClass;
639
- exports.addClass = addClass;
640
- exports.removeClass = removeClass;
641
- exports.escapeHtml = escapeHtml;
642
- exports._show = _show;
643
- exports.show = show;
644
- exports._hide = _hide;
645
- exports.hide = hide;
646
- exports.isDescendant = isDescendant;
647
- exports.getTopMargin = getTopMargin;
648
- exports.fadeIn = fadeIn;
649
- exports.fadeOut = fadeOut;
650
- exports.fireClick = fireClick;
651
- exports.stopEventPropagation = stopEventPropagation;
652
-
653
- },{}],5:[function(require,module,exports){
654
- 'use strict';
655
-
656
- Object.defineProperty(exports, '__esModule', {
657
- value: true
658
- });
659
-
660
- var _handleDom = require('./handle-dom');
661
-
662
- var _handleSwalDom = require('./handle-swal-dom');
663
-
664
- var handleKeyDown = function handleKeyDown(event, params, modal) {
665
- var e = event || window.event;
666
- var keyCode = e.keyCode || e.which;
667
-
668
- var $okButton = modal.querySelector('button.confirm');
669
- var $cancelButton = modal.querySelector('button.cancel');
670
- var $modalButtons = modal.querySelectorAll('button[tabindex]');
671
-
672
- if ([9, 13, 32, 27].indexOf(keyCode) === -1) {
673
- // Don't do work on keys we don't care about.
674
- return;
675
- }
676
-
677
- var $targetElement = e.target || e.srcElement;
678
-
679
- var btnIndex = -1; // Find the button - note, this is a nodelist, not an array.
680
- for (var i = 0; i < $modalButtons.length; i++) {
681
- if ($targetElement === $modalButtons[i]) {
682
- btnIndex = i;
683
- break;
684
- }
685
- }
686
-
687
- if (keyCode === 9) {
688
- // TAB
689
- if (btnIndex === -1) {
690
- // No button focused. Jump to the confirm button.
691
- $targetElement = $okButton;
692
- } else {
693
- // Cycle to the next button
694
- if (btnIndex === $modalButtons.length - 1) {
695
- $targetElement = $modalButtons[0];
696
- } else {
697
- $targetElement = $modalButtons[btnIndex + 1];
698
- }
699
- }
700
-
701
- (0, _handleDom.stopEventPropagation)(e);
702
- $targetElement.focus();
703
-
704
- if (params.confirmButtonColor) {
705
- (0, _handleSwalDom.setFocusStyle)($targetElement, params.confirmButtonColor);
706
- }
707
- } else {
708
- if (keyCode === 13) {
709
- if ($targetElement.tagName === 'INPUT') {
710
- $targetElement = $okButton;
711
- $okButton.focus();
712
- }
713
-
714
- if (btnIndex === -1) {
715
- // ENTER/SPACE clicked outside of a button.
716
- $targetElement = $okButton;
717
- } else {
718
- // Do nothing - let the browser handle it.
719
- $targetElement = undefined;
720
- }
721
- } else if (keyCode === 27 && params.allowEscapeKey === true) {
722
- $targetElement = $cancelButton;
723
- (0, _handleDom.fireClick)($targetElement, e);
724
- } else {
725
- // Fallback - let the browser handle it.
726
- $targetElement = undefined;
727
- }
728
- }
729
- };
730
-
731
- exports['default'] = handleKeyDown;
732
- module.exports = exports['default'];
733
-
734
- },{"./handle-dom":4,"./handle-swal-dom":6}],6:[function(require,module,exports){
735
- 'use strict';
736
-
737
- Object.defineProperty(exports, '__esModule', {
738
- value: true
739
- });
740
-
741
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
742
-
743
- var _utils = require('./utils');
744
-
745
- var _handleDom = require('./handle-dom');
746
-
747
- var _defaultParams = require('./default-params');
748
-
749
- var _defaultParams2 = _interopRequireDefault(_defaultParams);
750
-
751
- /*
752
- * Add modal + overlay to DOM
753
- */
754
-
755
- var _injectedHtml = require('./injected-html');
756
-
757
- var _injectedHtml2 = _interopRequireDefault(_injectedHtml);
758
-
759
- var modalClass = '.sweet-alert';
760
- var overlayClass = '.sweet-overlay';
761
-
762
- var sweetAlertInitialize = function sweetAlertInitialize() {
763
- var sweetWrap = document.createElement('div');
764
- sweetWrap.innerHTML = _injectedHtml2['default'];
765
-
766
- // Append elements to body
767
- while (sweetWrap.firstChild) {
768
- document.body.appendChild(sweetWrap.firstChild);
769
- }
770
- };
771
-
772
- /*
773
- * Get DOM element of modal
774
- */
775
- var getModal = function getModal() {
776
- var $modal = document.querySelector(modalClass);
777
-
778
- if (!$modal) {
779
- sweetAlertInitialize();
780
- $modal = getModal();
781
- }
782
-
783
- return $modal;
784
- };
785
-
786
- /*
787
- * Get DOM element of input (in modal)
788
- */
789
- var getInput = function getInput() {
790
- var $modal = getModal();
791
- if ($modal) {
792
- return $modal.querySelector('input');
793
- }
794
- };
795
-
796
- /*
797
- * Get DOM element of overlay
798
- */
799
- var getOverlay = function getOverlay() {
800
- return document.querySelector(overlayClass);
801
- };
802
-
803
- /*
804
- * Add box-shadow style to button (depending on its chosen bg-color)
805
- */
806
- var setFocusStyle = function setFocusStyle($button, bgColor) {
807
- var rgbColor = (0, _utils.hexToRgb)(bgColor);
808
- $button.style.boxShadow = '0 0 2px rgba(' + rgbColor + ', 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)';
809
- };
810
-
811
- /*
812
- * Animation when opening modal
813
- */
814
- var openModal = function openModal(callback) {
815
- var $modal = getModal();
816
- (0, _handleDom.fadeIn)(getOverlay(), 10);
817
- (0, _handleDom.show)($modal);
818
- (0, _handleDom.addClass)($modal, 'showSweetAlert');
819
- (0, _handleDom.removeClass)($modal, 'hideSweetAlert');
820
-
821
- window.previousActiveElement = document.activeElement;
822
- var $okButton = $modal.querySelector('button.confirm');
823
- $okButton.focus();
824
-
825
- setTimeout(function () {
826
- (0, _handleDom.addClass)($modal, 'visible');
827
- }, 500);
828
-
829
- var timer = $modal.getAttribute('data-timer');
830
-
831
- if (timer !== 'null' && timer !== '') {
832
- var timerCallback = callback;
833
- $modal.timeout = setTimeout(function () {
834
- var doneFunctionExists = (timerCallback || null) && $modal.getAttribute('data-has-done-function') === 'true';
835
- if (doneFunctionExists) {
836
- timerCallback(null);
837
- } else {
838
- sweetAlert.close();
839
- }
840
- }, timer);
841
- }
842
- };
843
-
844
- /*
845
- * Reset the styling of the input
846
- * (for example if errors have been shown)
847
- */
848
- var resetInput = function resetInput() {
849
- var $modal = getModal();
850
- var $input = getInput();
851
-
852
- (0, _handleDom.removeClass)($modal, 'show-input');
853
- $input.value = _defaultParams2['default'].inputValue;
854
- $input.setAttribute('type', _defaultParams2['default'].inputType);
855
- $input.setAttribute('placeholder', _defaultParams2['default'].inputPlaceholder);
856
-
857
- resetInputError();
858
- };
859
-
860
- var resetInputError = function resetInputError(event) {
861
- // If press enter => ignore
862
- if (event && event.keyCode === 13) {
863
- return false;
864
- }
865
-
866
- var $modal = getModal();
867
-
868
- var $errorIcon = $modal.querySelector('.sa-input-error');
869
- (0, _handleDom.removeClass)($errorIcon, 'show');
870
-
871
- var $errorContainer = $modal.querySelector('.sa-error-container');
872
- (0, _handleDom.removeClass)($errorContainer, 'show');
873
- };
874
-
875
- /*
876
- * Set "margin-top"-property on modal based on its computed height
877
- */
878
- var fixVerticalPosition = function fixVerticalPosition() {
879
- var $modal = getModal();
880
- $modal.style.marginTop = (0, _handleDom.getTopMargin)(getModal());
881
- };
882
-
883
- exports.sweetAlertInitialize = sweetAlertInitialize;
884
- exports.getModal = getModal;
885
- exports.getOverlay = getOverlay;
886
- exports.getInput = getInput;
887
- exports.setFocusStyle = setFocusStyle;
888
- exports.openModal = openModal;
889
- exports.resetInput = resetInput;
890
- exports.resetInputError = resetInputError;
891
- exports.fixVerticalPosition = fixVerticalPosition;
892
-
893
- },{"./default-params":2,"./handle-dom":4,"./injected-html":7,"./utils":9}],7:[function(require,module,exports){
894
- "use strict";
895
-
896
- Object.defineProperty(exports, "__esModule", {
897
- value: true
898
- });
899
- var injectedHTML =
900
-
901
- // Dark overlay
902
- "<div class=\"sweet-overlay\" tabIndex=\"-1\"></div>" +
903
-
904
- // Modal
905
- "<div class=\"sweet-alert\">" +
906
-
907
- // Error icon
908
- "<div class=\"sa-icon sa-error\">\n <span class=\"sa-x-mark\">\n <span class=\"sa-line sa-left\"></span>\n <span class=\"sa-line sa-right\"></span>\n </span>\n </div>" +
909
-
910
- // Warning icon
911
- "<div class=\"sa-icon sa-warning\">\n <span class=\"sa-body\"></span>\n <span class=\"sa-dot\"></span>\n </div>" +
912
-
913
- // Info icon
914
- "<div class=\"sa-icon sa-info\"></div>" +
915
-
916
- // Success icon
917
- "<div class=\"sa-icon sa-success\">\n <span class=\"sa-line sa-tip\"></span>\n <span class=\"sa-line sa-long\"></span>\n\n <div class=\"sa-placeholder\"></div>\n <div class=\"sa-fix\"></div>\n </div>" + "<div class=\"sa-icon sa-custom\"></div>" +
918
-
919
- // Title, text and input
920
- "<h2>Title</h2>\n <p>Text</p>\n <fieldset>\n <input type=\"text\" tabIndex=\"3\" />\n <div class=\"sa-input-error\"></div>\n </fieldset>" +
921
-
922
- // Input errors
923
- "<div class=\"sa-error-container\">\n <div class=\"icon\">!</div>\n <p>Not valid!</p>\n </div>" +
924
-
925
- // Cancel and confirm buttons
926
- "<div class=\"sa-button-container\">\n <button class=\"cancel\" tabIndex=\"2\">Cancel</button>\n <div class=\"sa-confirm-button-container\">\n <button class=\"confirm\" tabIndex=\"1\">OK</button>" +
927
-
928
- // Loading animation
929
- "<div class=\"la-ball-fall\">\n <div></div>\n <div></div>\n <div></div>\n </div>\n </div>\n </div>" +
930
-
931
- // End of modal
932
- "</div>";
933
-
934
- exports["default"] = injectedHTML;
935
- module.exports = exports["default"];
936
-
937
- },{}],8:[function(require,module,exports){
938
- 'use strict';
939
-
940
- Object.defineProperty(exports, '__esModule', {
941
- value: true
942
- });
943
-
944
- var _utils = require('./utils');
945
-
946
- var _handleSwalDom = require('./handle-swal-dom');
947
-
948
- var _handleDom = require('./handle-dom');
949
-
950
- /*
951
- * Set type, text and actions on modal
952
- */
953
- var alertTypes = ['error', 'warning', 'info', 'success', 'input', 'prompt'];
954
-
955
- var setParameters = function setParameters(params) {
956
- var modal = (0, _handleSwalDom.getModal)();
957
-
958
- var $title = modal.querySelector('h2');
959
- var $text = modal.querySelector('p');
960
- var $cancelBtn = modal.querySelector('button.cancel');
961
- var $confirmBtn = modal.querySelector('button.confirm');
962
-
963
- /*
964
- * Title
965
- */
966
- $title.innerHTML = params.html ? params.title : (0, _handleDom.escapeHtml)(params.title).split('\n').join('<br>');
967
-
968
- /*
969
- * Text
970
- */
971
- $text.innerHTML = params.html ? params.text : (0, _handleDom.escapeHtml)(params.text || '').split('\n').join('<br>');
972
- if (params.text) (0, _handleDom.show)($text);
973
-
974
- /*
975
- * Custom class
976
- */
977
- if (params.customClass) {
978
- (0, _handleDom.addClass)(modal, params.customClass);
979
- modal.setAttribute('data-custom-class', params.customClass);
980
- } else {
981
- // Find previously set classes and remove them
982
- var customClass = modal.getAttribute('data-custom-class');
983
- (0, _handleDom.removeClass)(modal, customClass);
984
- modal.setAttribute('data-custom-class', '');
985
- }
986
-
987
- /*
988
- * Icon
989
- */
990
- (0, _handleDom.hide)(modal.querySelectorAll('.sa-icon'));
991
-
992
- if (params.type && !(0, _utils.isIE8)()) {
993
- var _ret = (function () {
994
-
995
- var validType = false;
996
-
997
- for (var i = 0; i < alertTypes.length; i++) {
998
- if (params.type === alertTypes[i]) {
999
- validType = true;
1000
- break;
1001
- }
1002
- }
1003
-
1004
- if (!validType) {
1005
- logStr('Unknown alert type: ' + params.type);
1006
- return {
1007
- v: false
1008
- };
1009
- }
1010
-
1011
- var typesWithIcons = ['success', 'error', 'warning', 'info'];
1012
- var $icon = undefined;
1013
-
1014
- if (typesWithIcons.indexOf(params.type) !== -1) {
1015
- $icon = modal.querySelector('.sa-icon.' + 'sa-' + params.type);
1016
- (0, _handleDom.show)($icon);
1017
- }
1018
-
1019
- var $input = (0, _handleSwalDom.getInput)();
1020
-
1021
- // Animate icon
1022
- switch (params.type) {
1023
-
1024
- case 'success':
1025
- (0, _handleDom.addClass)($icon, 'animate');
1026
- (0, _handleDom.addClass)($icon.querySelector('.sa-tip'), 'animateSuccessTip');
1027
- (0, _handleDom.addClass)($icon.querySelector('.sa-long'), 'animateSuccessLong');
1028
- break;
1029
-
1030
- case 'error':
1031
- (0, _handleDom.addClass)($icon, 'animateErrorIcon');
1032
- (0, _handleDom.addClass)($icon.querySelector('.sa-x-mark'), 'animateXMark');
1033
- break;
1034
-
1035
- case 'warning':
1036
- (0, _handleDom.addClass)($icon, 'pulseWarning');
1037
- (0, _handleDom.addClass)($icon.querySelector('.sa-body'), 'pulseWarningIns');
1038
- (0, _handleDom.addClass)($icon.querySelector('.sa-dot'), 'pulseWarningIns');
1039
- break;
1040
-
1041
- case 'input':
1042
- case 'prompt':
1043
- $input.setAttribute('type', params.inputType);
1044
- $input.value = params.inputValue;
1045
- $input.setAttribute('placeholder', params.inputPlaceholder);
1046
- (0, _handleDom.addClass)(modal, 'show-input');
1047
- setTimeout(function () {
1048
- $input.focus();
1049
- $input.addEventListener('keyup', swal.resetInputError);
1050
- }, 400);
1051
- break;
1052
- }
1053
- })();
1054
-
1055
- if (typeof _ret === 'object') return _ret.v;
1056
- }
1057
-
1058
- /*
1059
- * Custom image
1060
- */
1061
- if (params.imageUrl) {
1062
- var $customIcon = modal.querySelector('.sa-icon.sa-custom');
1063
-
1064
- $customIcon.style.backgroundImage = 'url(' + params.imageUrl + ')';
1065
- (0, _handleDom.show)($customIcon);
1066
-
1067
- var _imgWidth = 80;
1068
- var _imgHeight = 80;
1069
-
1070
- if (params.imageSize) {
1071
- var dimensions = params.imageSize.toString().split('x');
1072
- var imgWidth = dimensions[0];
1073
- var imgHeight = dimensions[1];
1074
-
1075
- if (!imgWidth || !imgHeight) {
1076
- logStr('Parameter imageSize expects value with format WIDTHxHEIGHT, got ' + params.imageSize);
1077
- } else {
1078
- _imgWidth = imgWidth;
1079
- _imgHeight = imgHeight;
1080
- }
1081
- }
1082
-
1083
- $customIcon.setAttribute('style', $customIcon.getAttribute('style') + 'width:' + _imgWidth + 'px; height:' + _imgHeight + 'px');
1084
- }
1085
-
1086
- /*
1087
- * Show cancel button?
1088
- */
1089
- modal.setAttribute('data-has-cancel-button', params.showCancelButton);
1090
- if (params.showCancelButton) {
1091
- $cancelBtn.style.display = 'inline-block';
1092
- } else {
1093
- (0, _handleDom.hide)($cancelBtn);
1094
- }
1095
-
1096
- /*
1097
- * Show confirm button?
1098
- */
1099
- modal.setAttribute('data-has-confirm-button', params.showConfirmButton);
1100
- if (params.showConfirmButton) {
1101
- $confirmBtn.style.display = 'inline-block';
1102
- } else {
1103
- (0, _handleDom.hide)($confirmBtn);
1104
- }
1105
-
1106
- /*
1107
- * Custom text on cancel/confirm buttons
1108
- */
1109
- if (params.cancelButtonText) {
1110
- $cancelBtn.innerHTML = (0, _handleDom.escapeHtml)(params.cancelButtonText);
1111
- }
1112
- if (params.confirmButtonText) {
1113
- $confirmBtn.innerHTML = (0, _handleDom.escapeHtml)(params.confirmButtonText);
1114
- }
1115
-
1116
- /*
1117
- * Custom color on confirm button
1118
- */
1119
- if (params.confirmButtonColor) {
1120
- // Set confirm button to selected background color
1121
- $confirmBtn.style.backgroundColor = params.confirmButtonColor;
1122
-
1123
- // Set the confirm button color to the loading ring
1124
- $confirmBtn.style.borderLeftColor = params.confirmLoadingButtonColor;
1125
- $confirmBtn.style.borderRightColor = params.confirmLoadingButtonColor;
1126
-
1127
- // Set box-shadow to default focused button
1128
- (0, _handleSwalDom.setFocusStyle)($confirmBtn, params.confirmButtonColor);
1129
- }
1130
-
1131
- /*
1132
- * Allow outside click
1133
- */
1134
- modal.setAttribute('data-allow-outside-click', params.allowOutsideClick);
1135
-
1136
- /*
1137
- * Callback function
1138
- */
1139
- var hasDoneFunction = params.doneFunction ? true : false;
1140
- modal.setAttribute('data-has-done-function', hasDoneFunction);
1141
-
1142
- /*
1143
- * Animation
1144
- */
1145
- if (!params.animation) {
1146
- modal.setAttribute('data-animation', 'none');
1147
- } else if (typeof params.animation === 'string') {
1148
- modal.setAttribute('data-animation', params.animation); // Custom animation
1149
- } else {
1150
- modal.setAttribute('data-animation', 'pop');
1151
- }
1152
-
1153
- /*
1154
- * Timer
1155
- */
1156
- modal.setAttribute('data-timer', params.timer);
1157
- };
1158
-
1159
- exports['default'] = setParameters;
1160
- module.exports = exports['default'];
1161
-
1162
- },{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],9:[function(require,module,exports){
1163
- /*
1164
- * Allow user to pass their own params
1165
- */
1166
- 'use strict';
1167
-
1168
- Object.defineProperty(exports, '__esModule', {
1169
- value: true
1170
- });
1171
- var extend = function extend(a, b) {
1172
- for (var key in b) {
1173
- if (b.hasOwnProperty(key)) {
1174
- a[key] = b[key];
1175
- }
1176
- }
1177
- return a;
1178
- };
1179
-
1180
- /*
1181
- * Convert HEX codes to RGB values (#000000 -> rgb(0,0,0))
1182
- */
1183
- var hexToRgb = function hexToRgb(hex) {
1184
- var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
1185
- return result ? parseInt(result[1], 16) + ', ' + parseInt(result[2], 16) + ', ' + parseInt(result[3], 16) : null;
1186
- };
1187
-
1188
- /*
1189
- * Check if the user is using Internet Explorer 8 (for fallbacks)
1190
- */
1191
- var isIE8 = function isIE8() {
1192
- return window.attachEvent && !window.addEventListener;
1193
- };
1194
-
1195
- /*
1196
- * IE compatible logging for developers
1197
- */
1198
- var logStr = function logStr(string) {
1199
- if (typeof window !== 'undefined' && window.console) {
1200
- // IE...
1201
- window.console.log('SweetAlert: ' + string);
1202
- }
1203
- };
1204
-
1205
- /*
1206
- * Set hover, active and focus-states for buttons
1207
- * (source: http://www.sitepoint.com/javascript-generate-lighter-darker-color)
1208
- */
1209
- var colorLuminance = function colorLuminance(hex, lum) {
1210
- // Validate hex string
1211
- hex = String(hex).replace(/[^0-9a-f]/gi, '');
1212
- if (hex.length < 6) {
1213
- hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
1214
- }
1215
- lum = lum || 0;
1216
-
1217
- // Convert to decimal and change luminosity
1218
- var rgb = '#';
1219
- var c;
1220
- var i;
1221
-
1222
- for (i = 0; i < 3; i++) {
1223
- c = parseInt(hex.substr(i * 2, 2), 16);
1224
- c = Math.round(Math.min(Math.max(0, c + c * lum), 255)).toString(16);
1225
- rgb += ('00' + c).substr(c.length);
1226
- }
1227
-
1228
- return rgb;
1229
- };
1230
-
1231
- exports.extend = extend;
1232
- exports.hexToRgb = hexToRgb;
1233
- exports.isIE8 = isIE8;
1234
- exports.logStr = logStr;
1235
- exports.colorLuminance = colorLuminance;
1236
-
1237
- },{}]},{},[1])
1238
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCIvVXNlcnMvemh1c2hpeWEvUHJvamVjdHMvbm9kZS9zd2VldGFsZXJ0L2Rldi9zd2VldGFsZXJ0LmVzNi5qcyIsIi9Vc2Vycy96aHVzaGl5YS9Qcm9qZWN0cy9ub2RlL3N3ZWV0YWxlcnQvZGV2L21vZHVsZXMvZGVmYXVsdC1wYXJhbXMuanMiLCIvVXNlcnMvemh1c2hpeWEvUHJvamVjdHMvbm9kZS9zd2VldGFsZXJ0L2Rldi9tb2R1bGVzL2hhbmRsZS1jbGljay5qcyIsIi9Vc2Vycy96aHVzaGl5YS9Qcm9qZWN0cy9ub2RlL3N3ZWV0YWxlcnQvZGV2L21vZHVsZXMvaGFuZGxlLWRvbS5qcyIsIi9Vc2Vycy96aHVzaGl5YS9Qcm9qZWN0cy9ub2RlL3N3ZWV0YW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2h0ZXItZGFya2VyLWNvbG9yKVxuICovXG52YXIgY29sb3JMdW1pbmFuY2UgPSBmdW5jdGlvbihoZXgsIGx1bSkge1xuICAvLyBWYWxpZGF0ZSBoZXggc3RyaW5nXG4gIGhleCA9IFN0cmluZyhoZXgpLnJlcGxhY2UoL1teMC05YS1mXS9naSwgJycpO1xuICBpZiAoaGV4Lmxlbmd0aCA8IDYpIHtcbiAgICBoZXggPSBoZXhbMF0gKyBoZXhbMF0gKyBoZXhbMV0gKyBoZXhbMV0gKyBoZXhbMl0gKyBoZXhbMl07XG4gIH1cbiAgbHVtID0gbHVtIHx8IDA7XG5cbiAgLy8gQ29udmVydCB0byBkZWNpbWFsIGFuZCBjaGFuZ2UgbHVtaW5vc2l0eVxuICB2YXIgcmdiID0gJyMnO1xuICB2YXIgYztcbiAgdmFyIGk7XG5cbiAgZm9yIChpID0gMDsgaSA8IDM7IGkrKykge1xuICAgIGMgPSBwYXJzZUludChoZXguc3Vic3RyKGkgKiAyLCAyKSwgMTYpO1xuICAgIGMgPSBNYXRoLnJvdW5kKE1hdGgubWluKE1hdGgubWF4KDAsIGMgKyBjICogbHVtKSwgMjU1KSkudG9TdHJpbmcoMTYpO1xuICAgIHJnYiArPSAoJzAwJyArIGMpLnN1YnN0cihjLmxlbmd0aCk7XG4gIH1cblxuICByZXR1cm4gcmdiO1xufTtcblxuXG5leHBvcnQge1xuICBleHRlbmQsXG4gIGhleFRvUmdiLFxuICBpc0lFOCxcbiAgbG9nU3RyLFxuICBjb2xvckx1bWluYW5jZVxufTtcbiJdfQ==
1239
-
1240
-
1241
- /*
1242
- * Use SweetAlert with RequireJS
1243
- */
1244
-
1245
- if (typeof define === 'function' && define.amd) {
1246
- define(function () {
1247
- return sweetAlert;
1248
- });
1249
- } else if (typeof module !== 'undefined' && module.exports) {
1250
- module.exports = sweetAlert;
1251
- }
1252
-
1253
- })(window, document);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/vendor/sweetalert/sweetalert.css DELETED
@@ -1,935 +0,0 @@
1
- body.stop-scrolling {
2
- height: 100%;
3
- overflow: hidden; }
4
-
5
- .sweet-overlay {
6
- background-color: black;
7
- /* IE8 */
8
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
9
- /* IE8 */
10
- background-color: rgba(0, 0, 0, 0.4);
11
- position: fixed;
12
- left: 0;
13
- right: 0;
14
- top: 0;
15
- bottom: 0;
16
- display: none;
17
- z-index: 10000; }
18
-
19
- .sweet-alert {
20
- background-color: white;
21
- font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
22
- width: 478px;
23
- padding: 17px;
24
- border-radius: 5px;
25
- text-align: center;
26
- position: fixed;
27
- left: 50%;
28
- top: 50%;
29
- margin-left: -256px;
30
- margin-top: -200px;
31
- overflow: hidden;
32
- display: none;
33
- z-index: 99999; }
34
- @media all and (max-width: 540px) {
35
- .sweet-alert {
36
- width: auto;
37
- margin-left: 0;
38
- margin-right: 0;
39
- left: 15px;
40
- right: 15px; } }
41
- .sweet-alert h2 {
42
- color: #575757;
43
- font-size: 30px;
44
- text-align: center;
45
- font-weight: 600;
46
- text-transform: none;
47
- position: relative;
48
- margin: 25px 0;
49
- padding: 0;
50
- line-height: 40px;
51
- display: block; }
52
- .sweet-alert p {
53
- color: #797979;
54
- font-size: 16px;
55
- text-align: center;
56
- font-weight: 300;
57
- position: relative;
58
- text-align: inherit;
59
- float: none;
60
- margin: 0;
61
- padding: 0;
62
- line-height: normal; }
63
- .sweet-alert fieldset {
64
- border: none;
65
- position: relative; }
66
- .sweet-alert .sa-error-container {
67
- background-color: #f1f1f1;
68
- margin-left: -17px;
69
- margin-right: -17px;
70
- overflow: hidden;
71
- padding: 0 10px;
72
- max-height: 0;
73
- webkit-transition: padding 0.15s, max-height 0.15s;
74
- transition: padding 0.15s, max-height 0.15s; }
75
- .sweet-alert .sa-error-container.show {
76
- padding: 10px 0;
77
- max-height: 100px;
78
- webkit-transition: padding 0.2s, max-height 0.2s;
79
- transition: padding 0.25s, max-height 0.25s; }
80
- .sweet-alert .sa-error-container .icon {
81
- display: inline-block;
82
- width: 24px;
83
- height: 24px;
84
- border-radius: 50%;
85
- background-color: #ea7d7d;
86
- color: white;
87
- line-height: 24px;
88
- text-align: center;
89
- margin-right: 3px; }
90
- .sweet-alert .sa-error-container p {
91
- display: inline-block; }
92
- .sweet-alert .sa-input-error {
93
- position: absolute;
94
- top: 29px;
95
- right: 26px;
96
- width: 20px;
97
- height: 20px;
98
- opacity: 0;
99
- -webkit-transform: scale(0.5);
100
- transform: scale(0.5);
101
- -webkit-transform-origin: 50% 50%;
102
- transform-origin: 50% 50%;
103
- -webkit-transition: all 0.1s;
104
- transition: all 0.1s; }
105
- .sweet-alert .sa-input-error::before, .sweet-alert .sa-input-error::after {
106
- content: "";
107
- width: 20px;
108
- height: 6px;
109
- background-color: #f06e57;
110
- border-radius: 3px;
111
- position: absolute;
112
- top: 50%;
113
- margin-top: -4px;
114
- left: 50%;
115
- margin-left: -9px; }
116
- .sweet-alert .sa-input-error::before {
117
- -webkit-transform: rotate(-45deg);
118
- transform: rotate(-45deg); }
119
- .sweet-alert .sa-input-error::after {
120
- -webkit-transform: rotate(45deg);
121
- transform: rotate(45deg); }
122
- .sweet-alert .sa-input-error.show {
123
- opacity: 1;
124
- -webkit-transform: scale(1);
125
- transform: scale(1); }
126
- .sweet-alert input {
127
- width: 100%;
128
- box-sizing: border-box;
129
- border-radius: 3px;
130
- border: 1px solid #d7d7d7;
131
- height: 43px;
132
- margin-top: 10px;
133
- margin-bottom: 17px;
134
- font-size: 18px;
135
- box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.06);
136
- padding: 0 12px;
137
- display: none;
138
- -webkit-transition: all 0.3s;
139
- transition: all 0.3s; }
140
- .sweet-alert input:focus {
141
- outline: none;
142
- box-shadow: 0px 0px 3px #c4e6f5;
143
- border: 1px solid #b4dbed; }
144
- .sweet-alert input:focus::-moz-placeholder {
145
- transition: opacity 0.3s 0.03s ease;
146
- opacity: 0.5; }
147
- .sweet-alert input:focus:-ms-input-placeholder {
148
- transition: opacity 0.3s 0.03s ease;
149
- opacity: 0.5; }
150
- .sweet-alert input:focus::-webkit-input-placeholder {
151
- transition: opacity 0.3s 0.03s ease;
152
- opacity: 0.5; }
153
- .sweet-alert input::-moz-placeholder {
154
- color: #bdbdbd; }
155
- .sweet-alert input::-ms-clear {
156
- display: none; }
157
- .sweet-alert input:-ms-input-placeholder {
158
- color: #bdbdbd; }
159
- .sweet-alert input::-webkit-input-placeholder {
160
- color: #bdbdbd; }
161
- .sweet-alert.show-input input {
162
- display: block; }
163
- .sweet-alert .sa-confirm-button-container {
164
- display: inline-block;
165
- position: relative; }
166
- .sweet-alert .la-ball-fall {
167
- position: absolute;
168
- left: 50%;
169
- top: 50%;
170
- margin-left: -27px;
171
- margin-top: 4px;
172
- opacity: 0;
173
- visibility: hidden; }
174
- .sweet-alert button {
175
- background-color: #8CD4F5;
176
- color: white;
177
- border: none;
178
- box-shadow: none;
179
- font-size: 17px;
180
- font-weight: 500;
181
- -webkit-border-radius: 4px;
182
- border-radius: 5px;
183
- padding: 10px 32px;
184
- margin: 26px 5px 0 5px;
185
- cursor: pointer; }
186
- .sweet-alert button:focus {
187
- outline: none;
188
- box-shadow: 0 0 2px rgba(128, 179, 235, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.05); }
189
- .sweet-alert button:hover {
190
- background-color: #7ecff4; }
191
- .sweet-alert button:active {
192
- background-color: #5dc2f1; }
193
- .sweet-alert button.cancel {
194
- background-color: #C1C1C1; }
195
- .sweet-alert button.cancel:hover {
196
- background-color: #b9b9b9; }
197
- .sweet-alert button.cancel:active {
198
- background-color: #a8a8a8; }
199
- .sweet-alert button.cancel:focus {
200
- box-shadow: rgba(197, 205, 211, 0.8) 0px 0px 2px, rgba(0, 0, 0, 0.0470588) 0px 0px 0px 1px inset !important; }
201
- .sweet-alert button[disabled] {
202
- opacity: .6;
203
- cursor: default; }
204
- .sweet-alert button.confirm[disabled] {
205
- color: transparent; }
206
- .sweet-alert button.confirm[disabled] ~ .la-ball-fall {
207
- opacity: 1;
208
- visibility: visible;
209
- transition-delay: 0s; }
210
- .sweet-alert button::-moz-focus-inner {
211
- border: 0; }
212
- .sweet-alert[data-has-cancel-button=false] button {
213
- box-shadow: none !important; }
214
- .sweet-alert[data-has-confirm-button=false][data-has-cancel-button=false] {
215
- padding-bottom: 40px; }
216
- .sweet-alert .sa-icon {
217
- width: 80px;
218
- height: 80px;
219
- border: 4px solid gray;
220
- -webkit-border-radius: 40px;
221
- border-radius: 40px;
222
- border-radius: 50%;
223
- margin: 20px auto;
224
- padding: 0;
225
- position: relative;
226
- box-sizing: content-box; }
227
- .sweet-alert .sa-icon.sa-error {
228
- border-color: #F27474; }
229
- .sweet-alert .sa-icon.sa-error .sa-x-mark {
230
- position: relative;
231
- display: block; }
232
- .sweet-alert .sa-icon.sa-error .sa-line {
233
- position: absolute;
234
- height: 5px;
235
- width: 47px;
236
- background-color: #F27474;
237
- display: block;
238
- top: 37px;
239
- border-radius: 2px; }
240
- .sweet-alert .sa-icon.sa-error .sa-line.sa-left {
241
- -webkit-transform: rotate(45deg);
242
- transform: rotate(45deg);
243
- left: 17px; }
244
- .sweet-alert .sa-icon.sa-error .sa-line.sa-right {
245
- -webkit-transform: rotate(-45deg);
246
- transform: rotate(-45deg);
247
- right: 16px; }
248
- .sweet-alert .sa-icon.sa-warning {
249
- border-color: #F8BB86; }
250
- .sweet-alert .sa-icon.sa-warning .sa-body {
251
- position: absolute;
252
- width: 5px;
253
- height: 47px;
254
- left: 50%;
255
- top: 10px;
256
- -webkit-border-radius: 2px;
257
- border-radius: 2px;
258
- margin-left: -2px;
259
- background-color: #F8BB86; }
260
- .sweet-alert .sa-icon.sa-warning .sa-dot {
261
- position: absolute;
262
- width: 7px;
263
- height: 7px;
264
- -webkit-border-radius: 50%;
265
- border-radius: 50%;
266
- margin-left: -3px;
267
- left: 50%;
268
- bottom: 10px;
269
- background-color: #F8BB86; }
270
- .sweet-alert .sa-icon.sa-info {
271
- border-color: #C9DAE1; }
272
- .sweet-alert .sa-icon.sa-info::before {
273
- content: "";
274
- position: absolute;
275
- width: 5px;
276
- height: 29px;
277
- left: 50%;
278
- bottom: 17px;
279
- border-radius: 2px;
280
- margin-left: -2px;
281
- background-color: #C9DAE1; }
282
- .sweet-alert .sa-icon.sa-info::after {
283
- content: "";
284
- position: absolute;
285
- width: 7px;
286
- height: 7px;
287
- border-radius: 50%;
288
- margin-left: -3px;
289
- top: 19px;
290
- background-color: #C9DAE1;
291
- left: 50%; }
292
- .sweet-alert .sa-icon.sa-success {
293
- border-color: #A5DC86; }
294
- .sweet-alert .sa-icon.sa-success::before, .sweet-alert .sa-icon.sa-success::after {
295
- content: '';
296
- -webkit-border-radius: 40px;
297
- border-radius: 40px;
298
- border-radius: 50%;
299
- position: absolute;
300
- width: 60px;
301
- height: 120px;
302
- background: white;
303
- -webkit-transform: rotate(45deg);
304
- transform: rotate(45deg); }
305
- .sweet-alert .sa-icon.sa-success::before {
306
- -webkit-border-radius: 120px 0 0 120px;
307
- border-radius: 120px 0 0 120px;
308
- top: -7px;
309
- left: -33px;
310
- -webkit-transform: rotate(-45deg);
311
- transform: rotate(-45deg);
312
- -webkit-transform-origin: 60px 60px;
313
- transform-origin: 60px 60px; }
314
- .sweet-alert .sa-icon.sa-success::after {
315
- -webkit-border-radius: 0 120px 120px 0;
316
- border-radius: 0 120px 120px 0;
317
- top: -11px;
318
- left: 30px;
319
- -webkit-transform: rotate(-45deg);
320
- transform: rotate(-45deg);
321
- -webkit-transform-origin: 0px 60px;
322
- transform-origin: 0px 60px; }
323
- .sweet-alert .sa-icon.sa-success .sa-placeholder {
324
- width: 80px;
325
- height: 80px;
326
- border: 4px solid rgba(165, 220, 134, 0.2);
327
- -webkit-border-radius: 40px;
328
- border-radius: 40px;
329
- border-radius: 50%;
330
- box-sizing: content-box;
331
- position: absolute;
332
- left: -4px;
333
- top: -4px;
334
- z-index: 2; }
335
- .sweet-alert .sa-icon.sa-success .sa-fix {
336
- width: 5px;
337
- height: 90px;
338
- background-color: white;
339
- position: absolute;
340
- left: 28px;
341
- top: 8px;
342
- z-index: 1;
343
- -webkit-transform: rotate(-45deg);
344
- transform: rotate(-45deg); }
345
- .sweet-alert .sa-icon.sa-success .sa-line {
346
- height: 5px;
347
- background-color: #A5DC86;
348
- display: block;
349
- border-radius: 2px;
350
- position: absolute;
351
- z-index: 2; }
352
- .sweet-alert .sa-icon.sa-success .sa-line.sa-tip {
353
- width: 25px;
354
- left: 14px;
355
- top: 46px;
356
- -webkit-transform: rotate(45deg);
357
- transform: rotate(45deg); }
358
- .sweet-alert .sa-icon.sa-success .sa-line.sa-long {
359
- width: 47px;
360
- right: 8px;
361
- top: 38px;
362
- -webkit-transform: rotate(-45deg);
363
- transform: rotate(-45deg); }
364
- .sweet-alert .sa-icon.sa-custom {
365
- background-size: contain;
366
- border-radius: 0;
367
- border: none;
368
- background-position: center center;
369
- background-repeat: no-repeat; }
370
-
371
- /*
372
- * Animations
373
- */
374
- @-webkit-keyframes showSweetAlert {
375
- 0% {
376
- transform: scale(0.7);
377
- -webkit-transform: scale(0.7); }
378
- 45% {
379
- transform: scale(1.05);
380
- -webkit-transform: scale(1.05); }
381
- 80% {
382
- transform: scale(0.95);
383
- -webkit-transform: scale(0.95); }
384
- 100% {
385
- transform: scale(1);
386
- -webkit-transform: scale(1); } }
387
-
388
- @keyframes showSweetAlert {
389
- 0% {
390
- transform: scale(0.7);
391
- -webkit-transform: scale(0.7); }
392
- 45% {
393
- transform: scale(1.05);
394
- -webkit-transform: scale(1.05); }
395
- 80% {
396
- transform: scale(0.95);
397
- -webkit-transform: scale(0.95); }
398
- 100% {
399
- transform: scale(1);
400
- -webkit-transform: scale(1); } }
401
-
402
- @-webkit-keyframes hideSweetAlert {
403
- 0% {
404
- transform: scale(1);
405
- -webkit-transform: scale(1); }
406
- 100% {
407
- transform: scale(0.5);
408
- -webkit-transform: scale(0.5); } }
409
-
410
- @keyframes hideSweetAlert {
411
- 0% {
412
- transform: scale(1);
413
- -webkit-transform: scale(1); }
414
- 100% {
415
- transform: scale(0.5);
416
- -webkit-transform: scale(0.5); } }
417
-
418
- @-webkit-keyframes slideFromTop {
419
- 0% {
420
- top: 0%; }
421
- 100% {
422
- top: 50%; } }
423
-
424
- @keyframes slideFromTop {
425
- 0% {
426
- top: 0%; }
427
- 100% {
428
- top: 50%; } }
429
-
430
- @-webkit-keyframes slideToTop {
431
- 0% {
432
- top: 50%; }
433
- 100% {
434
- top: 0%; } }
435
-
436
- @keyframes slideToTop {
437
- 0% {
438
- top: 50%; }
439
- 100% {
440
- top: 0%; } }
441
-
442
- @-webkit-keyframes slideFromBottom {
443
- 0% {
444
- top: 70%; }
445
- 100% {
446
- top: 50%; } }
447
-
448
- @keyframes slideFromBottom {
449
- 0% {
450
- top: 70%; }
451
- 100% {
452
- top: 50%; } }
453
-
454
- @-webkit-keyframes slideToBottom {
455
- 0% {
456
- top: 50%; }
457
- 100% {
458
- top: 70%; } }
459
-
460
- @keyframes slideToBottom {
461
- 0% {
462
- top: 50%; }
463
- 100% {
464
- top: 70%; } }
465
-
466
- .showSweetAlert[data-animation=pop] {
467
- -webkit-animation: showSweetAlert 0.3s;
468
- animation: showSweetAlert 0.3s; }
469
-
470
- .showSweetAlert[data-animation=none] {
471
- -webkit-animation: none;
472
- animation: none; }
473
-
474
- .showSweetAlert[data-animation=slide-from-top] {
475
- -webkit-animation: slideFromTop 0.3s;
476
- animation: slideFromTop 0.3s; }
477
-
478
- .showSweetAlert[data-animation=slide-from-bottom] {
479
- -webkit-animation: slideFromBottom 0.3s;
480
- animation: slideFromBottom 0.3s; }
481
-
482
- .hideSweetAlert[data-animation=pop] {
483
- -webkit-animation: hideSweetAlert 0.2s;
484
- animation: hideSweetAlert 0.2s; }
485
-
486
- .hideSweetAlert[data-animation=none] {
487
- -webkit-animation: none;
488
- animation: none; }
489
-
490
- .hideSweetAlert[data-animation=slide-from-top] {
491
- -webkit-animation: slideToTop 0.4s;
492
- animation: slideToTop 0.4s; }
493
-
494
- .hideSweetAlert[data-animation=slide-from-bottom] {
495
- -webkit-animation: slideToBottom 0.3s;
496
- animation: slideToBottom 0.3s; }
497
-
498
- @-webkit-keyframes animateSuccessTip {
499
- 0% {
500
- width: 0;
501
- left: 1px;
502
- top: 19px; }
503
- 54% {
504
- width: 0;
505
- left: 1px;
506
- top: 19px; }
507
- 70% {
508
- width: 50px;
509
- left: -8px;
510
- top: 37px; }
511
- 84% {
512
- width: 17px;
513
- left: 21px;
514
- top: 48px; }
515
- 100% {
516
- width: 25px;
517
- left: 14px;
518
- top: 45px; } }
519
-
520
- @keyframes animateSuccessTip {
521
- 0% {
522
- width: 0;
523
- left: 1px;
524
- top: 19px; }
525
- 54% {
526
- width: 0;
527
- left: 1px;
528
- top: 19px; }
529
- 70% {
530
- width: 50px;
531
- left: -8px;
532
- top: 37px; }
533
- 84% {
534
- width: 17px;
535
- left: 21px;
536
- top: 48px; }
537
- 100% {
538
- width: 25px;
539
- left: 14px;
540
- top: 45px; } }
541
-
542
- @-webkit-keyframes animateSuccessLong {
543
- 0% {
544
- width: 0;
545
- right: 46px;
546
- top: 54px; }
547
- 65% {
548
- width: 0;
549
- right: 46px;
550
- top: 54px; }
551
- 84% {
552
- width: 55px;
553
- right: 0px;
554
- top: 35px; }
555
- 100% {
556
- width: 47px;
557
- right: 8px;
558
- top: 38px; } }
559
-
560
- @keyframes animateSuccessLong {
561
- 0% {
562
- width: 0;
563
- right: 46px;
564
- top: 54px; }
565
- 65% {
566
- width: 0;
567
- right: 46px;
568
- top: 54px; }
569
- 84% {
570
- width: 55px;
571
- right: 0px;
572
- top: 35px; }
573
- 100% {
574
- width: 47px;
575
- right: 8px;
576
- top: 38px; } }
577
-
578
- @-webkit-keyframes rotatePlaceholder {
579
- 0% {
580
- transform: rotate(-45deg);
581
- -webkit-transform: rotate(-45deg); }
582
- 5% {
583
- transform: rotate(-45deg);
584
- -webkit-transform: rotate(-45deg); }
585
- 12% {
586
- transform: rotate(-405deg);
587
- -webkit-transform: rotate(-405deg); }
588
- 100% {
589
- transform: rotate(-405deg);
590
- -webkit-transform: rotate(-405deg); } }
591
-
592
- @keyframes rotatePlaceholder {
593
- 0% {
594
- transform: rotate(-45deg);
595
- -webkit-transform: rotate(-45deg); }
596
- 5% {
597
- transform: rotate(-45deg);
598
- -webkit-transform: rotate(-45deg); }
599
- 12% {
600
- transform: rotate(-405deg);
601
- -webkit-transform: rotate(-405deg); }
602
- 100% {
603
- transform: rotate(-405deg);
604
- -webkit-transform: rotate(-405deg); } }
605
-
606
- .animateSuccessTip {
607
- -webkit-animation: animateSuccessTip 0.75s;
608
- animation: animateSuccessTip 0.75s; }
609
-
610
- .animateSuccessLong {
611
- -webkit-animation: animateSuccessLong 0.75s;
612
- animation: animateSuccessLong 0.75s; }
613
-
614
- .sa-icon.sa-success.animate::after {
615
- -webkit-animation: rotatePlaceholder 4.25s ease-in;
616
- animation: rotatePlaceholder 4.25s ease-in; }
617
-
618
- @-webkit-keyframes animateErrorIcon {
619
- 0% {
620
- transform: rotateX(100deg);
621
- -webkit-transform: rotateX(100deg);
622
- opacity: 0; }
623
- 100% {
624
- transform: rotateX(0deg);
625
- -webkit-transform: rotateX(0deg);
626
- opacity: 1; } }
627
-
628
- @keyframes animateErrorIcon {
629
- 0% {
630
- transform: rotateX(100deg);
631
- -webkit-transform: rotateX(100deg);
632
- opacity: 0; }
633
- 100% {
634
- transform: rotateX(0deg);
635
- -webkit-transform: rotateX(0deg);
636
- opacity: 1; } }
637
-
638
- .animateErrorIcon {
639
- -webkit-animation: animateErrorIcon 0.5s;
640
- animation: animateErrorIcon 0.5s; }
641
-
642
- @-webkit-keyframes animateXMark {
643
- 0% {
644
- transform: scale(0.4);
645
- -webkit-transform: scale(0.4);
646
- margin-top: 26px;
647
- opacity: 0; }
648
- 50% {
649
- transform: scale(0.4);
650
- -webkit-transform: scale(0.4);
651
- margin-top: 26px;
652
- opacity: 0; }
653
- 80% {
654
- transform: scale(1.15);
655
- -webkit-transform: scale(1.15);
656
- margin-top: -6px; }
657
- 100% {
658
- transform: scale(1);
659
- -webkit-transform: scale(1);
660
- margin-top: 0;
661
- opacity: 1; } }
662
-
663
- @keyframes animateXMark {
664
- 0% {
665
- transform: scale(0.4);
666
- -webkit-transform: scale(0.4);
667
- margin-top: 26px;
668
- opacity: 0; }
669
- 50% {
670
- transform: scale(0.4);
671
- -webkit-transform: scale(0.4);
672
- margin-top: 26px;
673
- opacity: 0; }
674
- 80% {
675
- transform: scale(1.15);
676
- -webkit-transform: scale(1.15);
677
- margin-top: -6px; }
678
- 100% {
679
- transform: scale(1);
680
- -webkit-transform: scale(1);
681
- margin-top: 0;
682
- opacity: 1; } }
683
-
684
- .animateXMark {
685
- -webkit-animation: animateXMark 0.5s;
686
- animation: animateXMark 0.5s; }
687
-
688
- @-webkit-keyframes pulseWarning {
689
- 0% {
690
- border-color: #F8D486; }
691
- 100% {
692
- border-color: #F8BB86; } }
693
-
694
- @keyframes pulseWarning {
695
- 0% {
696
- border-color: #F8D486; }
697
- 100% {
698
- border-color: #F8BB86; } }
699
-
700
- .pulseWarning {
701
- -webkit-animation: pulseWarning 0.75s infinite alternate;
702
- animation: pulseWarning 0.75s infinite alternate; }
703
-
704
- @-webkit-keyframes pulseWarningIns {
705
- 0% {
706
- background-color: #F8D486; }
707
- 100% {
708
- background-color: #F8BB86; } }
709
-
710
- @keyframes pulseWarningIns {
711
- 0% {
712
- background-color: #F8D486; }
713
- 100% {
714
- background-color: #F8BB86; } }
715
-
716
- .pulseWarningIns {
717
- -webkit-animation: pulseWarningIns 0.75s infinite alternate;
718
- animation: pulseWarningIns 0.75s infinite alternate; }
719
-
720
- @-webkit-keyframes rotate-loading {
721
- 0% {
722
- transform: rotate(0deg); }
723
- 100% {
724
- transform: rotate(360deg); } }
725
-
726
- @keyframes rotate-loading {
727
- 0% {
728
- transform: rotate(0deg); }
729
- 100% {
730
- transform: rotate(360deg); } }
731
-
732
- /* Internet Explorer 9 has some special quirks that are fixed here */
733
- /* The icons are not animated. */
734
- /* This file is automatically merged into sweet-alert.min.js through Gulp */
735
- /* Error icon */
736
- .sweet-alert .sa-icon.sa-error .sa-line.sa-left {
737
- -ms-transform: rotate(45deg) \9; }
738
-
739
- .sweet-alert .sa-icon.sa-error .sa-line.sa-right {
740
- -ms-transform: rotate(-45deg) \9; }
741
-
742
- /* Success icon */
743
- .sweet-alert .sa-icon.sa-success {
744
- border-color: transparent\9; }
745
-
746
- .sweet-alert .sa-icon.sa-success .sa-line.sa-tip {
747
- -ms-transform: rotate(45deg) \9; }
748
-
749
- .sweet-alert .sa-icon.sa-success .sa-line.sa-long {
750
- -ms-transform: rotate(-45deg) \9; }
751
-
752
- /*!
753
- * Load Awesome v1.1.0 (http://github.danielcardoso.net/load-awesome/)
754
- * Copyright 2015 Daniel Cardoso <@DanielCardoso>
755
- * Licensed under MIT
756
- */
757
- .la-ball-fall,
758
- .la-ball-fall > div {
759
- position: relative;
760
- -webkit-box-sizing: border-box;
761
- -moz-box-sizing: border-box;
762
- box-sizing: border-box; }
763
-
764
- .la-ball-fall {
765
- display: block;
766
- font-size: 0;
767
- color: #fff; }
768
-
769
- .la-ball-fall.la-dark {
770
- color: #333; }
771
-
772
- .la-ball-fall > div {
773
- display: inline-block;
774
- float: none;
775
- background-color: currentColor;
776
- border: 0 solid currentColor; }
777
-
778
- .la-ball-fall {
779
- width: 54px;
780
- height: 18px; }
781
-
782
- .la-ball-fall > div {
783
- width: 10px;
784
- height: 10px;
785
- margin: 4px;
786
- border-radius: 100%;
787
- opacity: 0;
788
- -webkit-animation: ball-fall 1s ease-in-out infinite;
789
- -moz-animation: ball-fall 1s ease-in-out infinite;
790
- -o-animation: ball-fall 1s ease-in-out infinite;
791
- animation: ball-fall 1s ease-in-out infinite; }
792
-
793
- .la-ball-fall > div:nth-child(1) {
794
- -webkit-animation-delay: -200ms;
795
- -moz-animation-delay: -200ms;
796
- -o-animation-delay: -200ms;
797
- animation-delay: -200ms; }
798
-
799
- .la-ball-fall > div:nth-child(2) {
800
- -webkit-animation-delay: -100ms;
801
- -moz-animation-delay: -100ms;
802
- -o-animation-delay: -100ms;
803
- animation-delay: -100ms; }
804
-
805
- .la-ball-fall > div:nth-child(3) {
806
- -webkit-animation-delay: 0ms;
807
- -moz-animation-delay: 0ms;
808
- -o-animation-delay: 0ms;
809
- animation-delay: 0ms; }
810
-
811
- .la-ball-fall.la-sm {
812
- width: 26px;
813
- height: 8px; }
814
-
815
- .la-ball-fall.la-sm > div {
816
- width: 4px;
817
- height: 4px;
818
- margin: 2px; }
819
-
820
- .la-ball-fall.la-2x {
821
- width: 108px;
822
- height: 36px; }
823
-
824
- .la-ball-fall.la-2x > div {
825
- width: 20px;
826
- height: 20px;
827
- margin: 8px; }
828
-
829
- .la-ball-fall.la-3x {
830
- width: 162px;
831
- height: 54px; }
832
-
833
- .la-ball-fall.la-3x > div {
834
- width: 30px;
835
- height: 30px;
836
- margin: 12px; }
837
-
838
- /*
839
- * Animation
840
- */
841
- @-webkit-keyframes ball-fall {
842
- 0% {
843
- opacity: 0;
844
- -webkit-transform: translateY(-145%);
845
- transform: translateY(-145%); }
846
- 10% {
847
- opacity: .5; }
848
- 20% {
849
- opacity: 1;
850
- -webkit-transform: translateY(0);
851
- transform: translateY(0); }
852
- 80% {
853
- opacity: 1;
854
- -webkit-transform: translateY(0);
855
- transform: translateY(0); }
856
- 90% {
857
- opacity: .5; }
858
- 100% {
859
- opacity: 0;
860
- -webkit-transform: translateY(145%);
861
- transform: translateY(145%); } }
862
-
863
- @-moz-keyframes ball-fall {
864
- 0% {
865
- opacity: 0;
866
- -moz-transform: translateY(-145%);
867
- transform: translateY(-145%); }
868
- 10% {
869
- opacity: .5; }
870
- 20% {
871
- opacity: 1;
872
- -moz-transform: translateY(0);
873
- transform: translateY(0); }
874
- 80% {
875
- opacity: 1;
876
- -moz-transform: translateY(0);
877
- transform: translateY(0); }
878
- 90% {
879
- opacity: .5; }
880
- 100% {
881
- opacity: 0;
882
- -moz-transform: translateY(145%);
883
- transform: translateY(145%); } }
884
-
885
- @-o-keyframes ball-fall {
886
- 0% {
887
- opacity: 0;
888
- -o-transform: translateY(-145%);
889
- transform: translateY(-145%); }
890
- 10% {
891
- opacity: .5; }
892
- 20% {
893
- opacity: 1;
894
- -o-transform: translateY(0);
895
- transform: translateY(0); }
896
- 80% {
897
- opacity: 1;
898
- -o-transform: translateY(0);
899
- transform: translateY(0); }
900
- 90% {
901
- opacity: .5; }
902
- 100% {
903
- opacity: 0;
904
- -o-transform: translateY(145%);
905
- transform: translateY(145%); } }
906
-
907
- @keyframes ball-fall {
908
- 0% {
909
- opacity: 0;
910
- -webkit-transform: translateY(-145%);
911
- -moz-transform: translateY(-145%);
912
- -o-transform: translateY(-145%);
913
- transform: translateY(-145%); }
914
- 10% {
915
- opacity: .5; }
916
- 20% {
917
- opacity: 1;
918
- -webkit-transform: translateY(0);
919
- -moz-transform: translateY(0);
920
- -o-transform: translateY(0);
921
- transform: translateY(0); }
922
- 80% {
923
- opacity: 1;
924
- -webkit-transform: translateY(0);
925
- -moz-transform: translateY(0);
926
- -o-transform: translateY(0);
927
- transform: translateY(0); }
928
- 90% {
929
- opacity: .5; }
930
- 100% {
931
- opacity: 0;
932
- -webkit-transform: translateY(145%);
933
- -moz-transform: translateY(145%);
934
- -o-transform: translateY(145%);
935
- transform: translateY(145%); } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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1
- !function(e,t,n){"use strict";!function o(e,t,n){function a(s,l){if(!t[s]){if(!e[s]){var i="function"==typeof require&&require;if(!l&&i)return i(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[s]={exports:{}};e[s][0].call(c.exports,function(t){var n=e[s][1][t];return a(n?n:t)},c,c.exports,o,e,t,n)}return t[s].exports}for(var r="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(o,a,r){function s(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(r,"__esModule",{value:!0});var l,i,u,c,d=o("./modules/handle-dom"),f=o("./modules/utils"),p=o("./modules/handle-swal-dom"),m=o("./modules/handle-click"),v=o("./modules/handle-key"),y=s(v),b=o("./modules/default-params"),h=s(b),g=o("./modules/set-params"),w=s(g);r["default"]=u=c=function(){function o(e){var t=a;return t[e]===n?h["default"][e]:t[e]}var a=arguments[0];if((0,d.addClass)(t.body,"stop-scrolling"),(0,p.resetInput)(),a===n)return(0,f.logStr)("SweetAlert expects at least 1 attribute!"),!1;var r=(0,f.extend)({},h["default"]);switch(typeof a){case"string":r.title=a,r.text=arguments[1]||"",r.type=arguments[2]||"";break;case"object":if(a.title===n)return(0,f.logStr)('Missing "title" argument!'),!1;r.title=a.title;for(var s in h["default"])r[s]=o(s);r.confirmButtonText=r.showCancelButton?"Confirm":h["default"].confirmButtonText,r.confirmButtonText=o("confirmButtonText"),r.doneFunction=arguments[1]||null;break;default:return(0,f.logStr)('Unexpected type of argument! Expected "string" or "object", got '+typeof a),!1}(0,w["default"])(r),(0,p.fixVerticalPosition)(),(0,p.openModal)(arguments[1]);for(var u=(0,p.getModal)(),v=u.querySelectorAll("button"),b=["onclick","onmouseover","onmouseout","onmousedown","onmouseup","onfocus"],g=function(e){return(0,m.handleButton)(e,r,u)},C=0;C<v.length;C++)for(var S=0;S<b.length;S++){var x=b[S];v[C][x]=g}(0,p.getOverlay)().onclick=g,l=e.onkeydown;var k=function(e){return(0,y["default"])(e,r,u)};e.onkeydown=k,e.onfocus=function(){setTimeout(function(){i!==n&&(i.focus(),i=n)},0)},c.enableButtons()},u.setDefaults=c.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=typeof e)throw new Error("userParams has to be a object");(0,f.extend)(h["default"],e)},u.close=c.close=function(){var o=(0,p.getModal)();(0,d.fadeOut)((0,p.getOverlay)(),5),(0,d.fadeOut)(o,5),(0,d.removeClass)(o,"showSweetAlert"),(0,d.addClass)(o,"hideSweetAlert"),(0,d.removeClass)(o,"visible");var a=o.querySelector(".sa-icon.sa-success");(0,d.removeClass)(a,"animate"),(0,d.removeClass)(a.querySelector(".sa-tip"),"animateSuccessTip"),(0,d.removeClass)(a.querySelector(".sa-long"),"animateSuccessLong");var r=o.querySelector(".sa-icon.sa-error");(0,d.removeClass)(r,"animateErrorIcon"),(0,d.removeClass)(r.querySelector(".sa-x-mark"),"animateXMark");var s=o.querySelector(".sa-icon.sa-warning");return(0,d.removeClass)(s,"pulseWarning"),(0,d.removeClass)(s.querySelector(".sa-body"),"pulseWarningIns"),(0,d.removeClass)(s.querySelector(".sa-dot"),"pulseWarningIns"),setTimeout(function(){var e=o.getAttribute("data-custom-class");(0,d.removeClass)(o,e)},300),(0,d.removeClass)(t.body,"stop-scrolling"),e.onkeydown=l,e.previousActiveElement&&e.previousActiveElement.focus(),i=n,clearTimeout(o.timeout),!0},u.showInputError=c.showInputError=function(e){var t=(0,p.getModal)(),n=t.querySelector(".sa-input-error");(0,d.addClass)(n,"show");var o=t.querySelector(".sa-error-container");(0,d.addClass)(o,"show"),o.querySelector("p").innerHTML=e,setTimeout(function(){u.enableButtons()},1),t.querySelector("input").focus()},u.resetInputError=c.resetInputError=function(e){if(e&&13===e.keyCode)return!1;var t=(0,p.getModal)(),n=t.querySelector(".sa-input-error");(0,d.removeClass)(n,"show");var o=t.querySelector(".sa-error-container");(0,d.removeClass)(o,"show")},u.disableButtons=c.disableButtons=function(e){var t=(0,p.getModal)(),n=t.querySelector("button.confirm"),o=t.querySelector("button.cancel");n.disabled=!0,o.disabled=!0},u.enableButtons=c.enableButtons=function(e){var t=(0,p.getModal)(),n=t.querySelector("button.confirm"),o=t.querySelector("button.cancel");n.disabled=!1,o.disabled=!1},"undefined"!=typeof e?e.sweetAlert=e.swal=u:(0,f.logStr)("SweetAlert is a frontend module!"),a.exports=r["default"]},{"./modules/default-params":2,"./modules/handle-click":3,"./modules/handle-dom":4,"./modules/handle-key":5,"./modules/handle-swal-dom":6,"./modules/set-params":8,"./modules/utils":9}],2:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var o={title:"",text:"",type:null,allowOutsideClick:!1,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#8CD4F5",cancelButtonText:"Cancel",imageUrl:null,imageSize:null,timer:null,customClass:"",html:!1,animation:!0,allowEscapeKey:!0,inputType:"text",inputPlaceholder:"",inputValue:"",showLoaderOnConfirm:!1};n["default"]=o,t.exports=n["default"]},{}],3:[function(t,n,o){Object.defineProperty(o,"__esModule",{value:!0});var a=t("./utils"),r=(t("./handle-swal-dom"),t("./handle-dom")),s=function(t,n,o){function s(e){m&&n.confirmButtonColor&&(p.style.backgroundColor=e)}var u,c,d,f=t||e.event,p=f.target||f.srcElement,m=-1!==p.className.indexOf("confirm"),v=-1!==p.className.indexOf("sweet-overlay"),y=(0,r.hasClass)(o,"visible"),b=n.doneFunction&&"true"===o.getAttribute("data-has-done-function");switch(m&&n.confirmButtonColor&&(u=n.confirmButtonColor,c=(0,a.colorLuminance)(u,-.04),d=(0,a.colorLuminance)(u,-.14)),f.type){case"mouseover":s(c);break;case"mouseout":s(u);break;case"mousedown":s(d);break;case"mouseup":s(c);break;case"focus":var h=o.querySelector("button.confirm"),g=o.querySelector("button.cancel");m?g.style.boxShadow="none":h.style.boxShadow="none";break;case"click":var w=o===p,C=(0,r.isDescendant)(o,p);if(!w&&!C&&y&&!n.allowOutsideClick)break;m&&b&&y?l(o,n):b&&y||v?i(o,n):(0,r.isDescendant)(o,p)&&"BUTTON"===p.tagName&&sweetAlert.close()}},l=function(e,t){var n=!0;(0,r.hasClass)(e,"show-input")&&(n=e.querySelector("input").value,n||(n="")),t.doneFunction(n),t.closeOnConfirm&&sweetAlert.close(),t.showLoaderOnConfirm&&sweetAlert.disableButtons()},i=function(e,t){var n=String(t.doneFunction).replace(/\s/g,""),o="function("===n.substring(0,9)&&")"!==n.substring(9,10);o&&t.doneFunction(!1),t.closeOnCancel&&sweetAlert.close()};o["default"]={handleButton:s,handleConfirm:l,handleCancel:i},n.exports=o["default"]},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],4:[function(n,o,a){Object.defineProperty(a,"__esModule",{value:!0});var r=function(e,t){return new RegExp(" "+t+" ").test(" "+e.className+" ")},s=function(e,t){r(e,t)||(e.className+=" "+t)},l=function(e,t){var n=" "+e.className.replace(/[\t\r\n]/g," ")+" ";if(r(e,t)){for(;n.indexOf(" "+t+" ")>=0;)n=n.replace(" "+t+" "," ");e.className=n.replace(/^\s+|\s+$/g,"")}},i=function(e){var n=t.createElement("div");return n.appendChild(t.createTextNode(e)),n.innerHTML},u=function(e){e.style.opacity="",e.style.display="block"},c=function(e){if(e&&!e.length)return u(e);for(var t=0;t<e.length;++t)u(e[t])},d=function(e){e.style.opacity="",e.style.display="none"},f=function(e){if(e&&!e.length)return d(e);for(var t=0;t<e.length;++t)d(e[t])},p=function(e,t){for(var n=t.parentNode;null!==n;){if(n===e)return!0;n=n.parentNode}return!1},m=function(e){e.style.left="-9999px",e.style.display="block";var t,n=e.clientHeight;return t="undefined"!=typeof getComputedStyle?parseInt(getComputedStyle(e).getPropertyValue("padding-top"),10):parseInt(e.currentStyle.padding),e.style.left="",e.style.display="none","-"+parseInt((n+t)/2)+"px"},v=function(e,t){if(+e.style.opacity<1){t=t||16,e.style.opacity=0,e.style.display="block";var n=+new Date,o=function a(){e.style.opacity=+e.style.opacity+(new Date-n)/100,n=+new Date,+e.style.opacity<1&&setTimeout(a,t)};o()}e.style.display="block"},y=function(e,t){t=t||16,e.style.opacity=1;var n=+new Date,o=function a(){e.style.opacity=+e.style.opacity-(new Date-n)/100,n=+new Date,+e.style.opacity>0?setTimeout(a,t):e.style.display="none"};o()},b=function(n){if("function"==typeof MouseEvent){var o=new MouseEvent("click",{view:e,bubbles:!1,cancelable:!0});n.dispatchEvent(o)}else if(t.createEvent){var a=t.createEvent("MouseEvents");a.initEvent("click",!1,!1),n.dispatchEvent(a)}else t.createEventObject?n.fireEvent("onclick"):"function"==typeof n.onclick&&n.onclick()},h=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):e.event&&e.event.hasOwnProperty("cancelBubble")&&(e.event.cancelBubble=!0)};a.hasClass=r,a.addClass=s,a.removeClass=l,a.escapeHtml=i,a._show=u,a.show=c,a._hide=d,a.hide=f,a.isDescendant=p,a.getTopMargin=m,a.fadeIn=v,a.fadeOut=y,a.fireClick=b,a.stopEventPropagation=h},{}],5:[function(t,o,a){Object.defineProperty(a,"__esModule",{value:!0});var r=t("./handle-dom"),s=t("./handle-swal-dom"),l=function(t,o,a){var l=t||e.event,i=l.keyCode||l.which,u=a.querySelector("button.confirm"),c=a.querySelector("button.cancel"),d=a.querySelectorAll("button[tabindex]");if(-1!==[9,13,32,27].indexOf(i)){for(var f=l.target||l.srcElement,p=-1,m=0;m<d.length;m++)if(f===d[m]){p=m;break}9===i?(f=-1===p?u:p===d.length-1?d[0]:d[p+1],(0,r.stopEventPropagation)(l),f.focus(),o.confirmButtonColor&&(0,s.setFocusStyle)(f,o.confirmButtonColor)):13===i?("INPUT"===f.tagName&&(f=u,u.focus()),f=-1===p?u:n):27===i&&o.allowEscapeKey===!0?(f=c,(0,r.fireClick)(f,l)):f=n}};a["default"]=l,o.exports=a["default"]},{"./handle-dom":4,"./handle-swal-dom":6}],6:[function(n,o,a){function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(a,"__esModule",{value:!0});var s=n("./utils"),l=n("./handle-dom"),i=n("./default-params"),u=r(i),c=n("./injected-html"),d=r(c),f=".sweet-alert",p=".sweet-overlay",m=function(){var e=t.createElement("div");for(e.innerHTML=d["default"];e.firstChild;)t.body.appendChild(e.firstChild)},v=function x(){var e=t.querySelector(f);return e||(m(),e=x()),e},y=function(){var e=v();return e?e.querySelector("input"):void 0},b=function(){return t.querySelector(p)},h=function(e,t){var n=(0,s.hexToRgb)(t);e.style.boxShadow="0 0 2px rgba("+n+", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"},g=function(n){var o=v();(0,l.fadeIn)(b(),10),(0,l.show)(o),(0,l.addClass)(o,"showSweetAlert"),(0,l.removeClass)(o,"hideSweetAlert"),e.previousActiveElement=t.activeElement;var a=o.querySelector("button.confirm");a.focus(),setTimeout(function(){(0,l.addClass)(o,"visible")},500);var r=o.getAttribute("data-timer");if("null"!==r&&""!==r){var s=n;o.timeout=setTimeout(function(){var e=(s||null)&&"true"===o.getAttribute("data-has-done-function");e?s(null):sweetAlert.close()},r)}},w=function(){var e=v(),t=y();(0,l.removeClass)(e,"show-input"),t.value=u["default"].inputValue,t.setAttribute("type",u["default"].inputType),t.setAttribute("placeholder",u["default"].inputPlaceholder),C()},C=function(e){if(e&&13===e.keyCode)return!1;var t=v(),n=t.querySelector(".sa-input-error");(0,l.removeClass)(n,"show");var o=t.querySelector(".sa-error-container");(0,l.removeClass)(o,"show")},S=function(){var e=v();e.style.marginTop=(0,l.getTopMargin)(v())};a.sweetAlertInitialize=m,a.getModal=v,a.getOverlay=b,a.getInput=y,a.setFocusStyle=h,a.openModal=g,a.resetInput=w,a.resetInputError=C,a.fixVerticalPosition=S},{"./default-params":2,"./handle-dom":4,"./injected-html":7,"./utils":9}],7:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var o='<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert"><div class="sa-icon sa-error">\n <span class="sa-x-mark">\n <span class="sa-line sa-left"></span>\n <span class="sa-line sa-right"></span>\n </span>\n </div><div class="sa-icon sa-warning">\n <span class="sa-body"></span>\n <span class="sa-dot"></span>\n </div><div class="sa-icon sa-info"></div><div class="sa-icon sa-success">\n <span class="sa-line sa-tip"></span>\n <span class="sa-line sa-long"></span>\n\n <div class="sa-placeholder"></div>\n <div class="sa-fix"></div>\n </div><div class="sa-icon sa-custom"></div><h2>Title</h2>\n <p>Text</p>\n <fieldset>\n <input type="text" tabIndex="3" />\n <div class="sa-input-error"></div>\n </fieldset><div class="sa-error-container">\n <div class="icon">!</div>\n <p>Not valid!</p>\n </div><div class="sa-button-container">\n <button class="cancel" tabIndex="2">Cancel</button>\n <div class="sa-confirm-button-container">\n <button class="confirm" tabIndex="1">OK</button><div class="la-ball-fall">\n <div></div>\n <div></div>\n <div></div>\n </div>\n </div>\n </div></div>';n["default"]=o,t.exports=n["default"]},{}],8:[function(e,t,o){Object.defineProperty(o,"__esModule",{value:!0});var a=e("./utils"),r=e("./handle-swal-dom"),s=e("./handle-dom"),l=["error","warning","info","success","input","prompt"],i=function(e){var t=(0,r.getModal)(),o=t.querySelector("h2"),i=t.querySelector("p"),u=t.querySelector("button.cancel"),c=t.querySelector("button.confirm");if(o.innerHTML=e.html?e.title:(0,s.escapeHtml)(e.title).split("\n").join("<br>"),i.innerHTML=e.html?e.text:(0,s.escapeHtml)(e.text||"").split("\n").join("<br>"),e.text&&(0,s.show)(i),e.customClass)(0,s.addClass)(t,e.customClass),t.setAttribute("data-custom-class",e.customClass);else{var d=t.getAttribute("data-custom-class");(0,s.removeClass)(t,d),t.setAttribute("data-custom-class","")}if((0,s.hide)(t.querySelectorAll(".sa-icon")),e.type&&!(0,a.isIE8)()){var f=function(){for(var o=!1,a=0;a<l.length;a++)if(e.type===l[a]){o=!0;break}if(!o)return logStr("Unknown alert type: "+e.type),{v:!1};var i=["success","error","warning","info"],u=n;-1!==i.indexOf(e.type)&&(u=t.querySelector(".sa-icon.sa-"+e.type),(0,s.show)(u));var c=(0,r.getInput)();switch(e.type){case"success":(0,s.addClass)(u,"animate"),(0,s.addClass)(u.querySelector(".sa-tip"),"animateSuccessTip"),(0,s.addClass)(u.querySelector(".sa-long"),"animateSuccessLong");break;case"error":(0,s.addClass)(u,"animateErrorIcon"),(0,s.addClass)(u.querySelector(".sa-x-mark"),"animateXMark");break;case"warning":(0,s.addClass)(u,"pulseWarning"),(0,s.addClass)(u.querySelector(".sa-body"),"pulseWarningIns"),(0,s.addClass)(u.querySelector(".sa-dot"),"pulseWarningIns");break;case"input":case"prompt":c.setAttribute("type",e.inputType),c.value=e.inputValue,c.setAttribute("placeholder",e.inputPlaceholder),(0,s.addClass)(t,"show-input"),setTimeout(function(){c.focus(),c.addEventListener("keyup",swal.resetInputError)},400)}}();if("object"==typeof f)return f.v}if(e.imageUrl){var p=t.querySelector(".sa-icon.sa-custom");p.style.backgroundImage="url("+e.imageUrl+")",(0,s.show)(p);var m=80,v=80;if(e.imageSize){var y=e.imageSize.toString().split("x"),b=y[0],h=y[1];b&&h?(m=b,v=h):logStr("Parameter imageSize expects value with format WIDTHxHEIGHT, got "+e.imageSize)}p.setAttribute("style",p.getAttribute("style")+"width:"+m+"px; height:"+v+"px")}t.setAttribute("data-has-cancel-button",e.showCancelButton),e.showCancelButton?u.style.display="inline-block":(0,s.hide)(u),t.setAttribute("data-has-confirm-button",e.showConfirmButton),e.showConfirmButton?c.style.display="inline-block":(0,s.hide)(c),e.cancelButtonText&&(u.innerHTML=(0,s.escapeHtml)(e.cancelButtonText)),e.confirmButtonText&&(c.innerHTML=(0,s.escapeHtml)(e.confirmButtonText)),e.confirmButtonColor&&(c.style.backgroundColor=e.confirmButtonColor,c.style.borderLeftColor=e.confirmLoadingButtonColor,c.style.borderRightColor=e.confirmLoadingButtonColor,(0,r.setFocusStyle)(c,e.confirmButtonColor)),t.setAttribute("data-allow-outside-click",e.allowOutsideClick);var g=!!e.doneFunction;t.setAttribute("data-has-done-function",g),e.animation?"string"==typeof e.animation?t.setAttribute("data-animation",e.animation):t.setAttribute("data-animation","pop"):t.setAttribute("data-animation","none"),t.setAttribute("data-timer",e.timer)};o["default"]=i,t.exports=o["default"]},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],9:[function(t,n,o){Object.defineProperty(o,"__esModule",{value:!0});var a=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},r=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16):null},s=function(){return e.attachEvent&&!e.addEventListener},l=function(t){"undefined"!=typeof e&&e.console&&e.console.log("SweetAlert: "+t)},i=function(e,t){e=String(e).replace(/[^0-9a-f]/gi,""),e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;var n,o,a="#";for(o=0;3>o;o++)n=parseInt(e.substr(2*o,2),16),n=Math.round(Math.min(Math.max(0,n+n*t),255)).toString(16),a+=("00"+n).substr(n.length);return a};o.extend=a,o.hexToRgb=r,o.isIE8=s,o.logStr=l,o.colorLuminance=i},{}]},{},[1]),"function"==typeof define&&define.amd?define(function(){return sweetAlert}):"undefined"!=typeof module&&module.exports&&(module.exports=sweetAlert)}(window,document);
 
assets/vendor/sweetalert2/LICENSE ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Tristan Edwards & Limon Monte
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
assets/vendor/sweetalert2/README.md ADDED
@@ -0,0 +1,282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SweetAlert2
2
+ -----------
3
+
4
+ [![Build Status](https://travis-ci.org/limonte/sweetalert2.svg?branch=master)](https://travis-ci.org/limonte/sweetalert2)
5
+ [![Version](https://img.shields.io/npm/v/sweetalert2.svg)](https://www.npmjs.com/package/sweetalert2)
6
+ [![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
7
+ [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/limonte/sweetalert2.svg)](http://isitmaintained.com/project/limonte/sweetalert2 "Average time to resolve an issue")
8
+ [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sweetalert2/Lobby)
9
+ [![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/limonte/5)
10
+
11
+ A beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies.
12
+
13
+ What's the difference between SweetAlert and SweetAlert2?
14
+ ---------------------------------------------------------
15
+
16
+ - [Reason of creating this fork is inactivity of original SweetAlert plugin](http://stackoverflow.com/a/27842854/1331425)
17
+ - [SweetAlert to SweetAlert2 migration guide](https://github.com/limonte/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2)
18
+
19
+ ---
20
+
21
+ [See SweetAlert2 in action!](https://limonte.github.io/sweetalert2/)
22
+
23
+ <img src="https://raw.github.com/limonte/sweetalert2/master/assets/sweetalert2.gif" width="686">
24
+
25
+
26
+ Installation
27
+ ------------
28
+
29
+ ```bash
30
+ npm install --save sweetalert2
31
+ ```
32
+
33
+ Or:
34
+
35
+ ```bash
36
+ bower install --save sweetalert2
37
+ ```
38
+
39
+ Or download from CDN: [jsdelivr.com](https://www.jsdelivr.com/projects/sweetalert2) | [cdnjs.com](https://cdnjs.com/libraries/limonte-sweetalert2)
40
+
41
+
42
+ Usage
43
+ -----
44
+
45
+ ```html
46
+ <script src="bower_components/sweetalert2/dist/sweetalert2.min.js"></script>
47
+ <link rel="stylesheet" type="text/css" href="bower_components/sweetalert2/dist/sweetalert2.min.css">
48
+
49
+ <!-- Include a polyfill for ES6 Promises (optional) for IE11, UC Browser and Android browser support -->
50
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.js"></script>
51
+ ```
52
+
53
+ Or:
54
+
55
+ ```js
56
+ // ES6 Modules or TypeScript
57
+ import swal from 'sweetalert2'
58
+
59
+ // CommonJS
60
+ const swal = require('sweetalert2')
61
+ ```
62
+
63
+ Please note that TypeScript is supported, so you don't have to install a third-party declaration file.
64
+
65
+
66
+ Examples
67
+ --------
68
+
69
+ The most basic message:
70
+
71
+ ```js
72
+ swal('Hello world!')
73
+ ```
74
+
75
+ A message signaling an error:
76
+
77
+ ```js
78
+ swal('Oops...', 'Something went wrong!', 'error')
79
+ ```
80
+
81
+ Handling the result of SweetAlert2 modal:
82
+
83
+ ```js
84
+ swal({
85
+ title: 'Are you sure?',
86
+ text: 'You will not be able to recover this imaginary file!',
87
+ type: 'warning',
88
+ showCancelButton: true,
89
+ confirmButtonText: 'Yes, delete it!',
90
+ cancelButtonText: 'No, keep it'
91
+ }).then(function() {
92
+ swal(
93
+ 'Deleted!',
94
+ 'Your imaginary file has been deleted.',
95
+ 'success'
96
+ )
97
+ }, function(dismiss) {
98
+ // dismiss can be 'overlay', 'cancel', 'close', 'esc', 'timer'
99
+ if (dismiss === 'cancel') {
100
+ swal(
101
+ 'Cancelled',
102
+ 'Your imaginary file is safe :)',
103
+ 'error'
104
+ )
105
+ }
106
+ })
107
+ ```
108
+
109
+ [View more examples](https://limonte.github.io/sweetalert2/)
110
+
111
+
112
+ Handling Dismissals
113
+ -------------------
114
+
115
+ When an alert is dismissed by the user, the Promise returned by `swal()` will reject with a string documenting the reason it was dismissed:
116
+
117
+ | String | Description | Related configuration |
118
+ | ----------- | ------------------------------------------------------- | --------------------- |
119
+ | `'overlay'` | The user clicked the overlay. | `allowOutsideClick` |
120
+ | `'cancel'` | The user clicked the cancel button. | `showCancelButton` |
121
+ | `'close'` | The user clicked the close button. | `showCloseButton` |
122
+ | `'esc'` | The user pressed the <kbd>Esc</kbd> key. | `allowEscapeKey` |
123
+ | `'timer'` | The timer ran out, and the alert closed automatically. | `timer` |
124
+
125
+ If rejections are not handled, it will be logged as an error. To avoid this, add a rejection handler to the Promise. Alternatively, you can use `.catch(swal.noop)` as a quick way to simply suppress the errors:
126
+
127
+ ```js
128
+ swal(...)
129
+ .catch(swal.noop)
130
+ ```
131
+
132
+ Modal Types
133
+ -----------
134
+
135
+ | `success` | `error` | `warning` | `info` | `question` |
136
+ | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
137
+ | ![](https://raw.github.com/limonte/sweetalert2/master/assets/swal2-success.png) | ![](https://raw.github.com/limonte/sweetalert2/master/assets/swal2-error.png) | ![](https://raw.github.com/limonte/sweetalert2/master/assets/swal2-warning.png) | ![](https://raw.github.com/limonte/sweetalert2/master/assets/swal2-info.png) | ![](https://raw.github.com/limonte/sweetalert2/master/assets/swal2-question.png) |
138
+
139
+
140
+ Configuration
141
+ -------------
142
+
143
+ | Argument | Default value | Description |
144
+ | ----------------------- | -------------------- | ----------- |
145
+ | `title` | `null` | The title of the modal, as HTML. It can either be added to the object under the key "title" or passed as the first parameter of the function. |
146
+ | `titleText`             | `null` | The title of the modal, as text. Useful to avoid HTML injection. |
147
+ | `text`                 | `null`               | A description for the modal. It can either be added to the object under the key "text" or passed as the second parameter of the function. |
148
+ | `html` | `null` | A HTML description for the modal. If `text` and `html` parameters are provided in the same time, "text" will be used. |
149
+ | `type` | `null` | The type of the modal. SweetAlert2 comes with [5 built-in types](#modal-types) which will show a corresponding icon animation: `warning`, `error`, `success`, `info` and `question`. It can either be put in the array under the key `type` or passed as the third parameter of the function. |
150
+ | `target` | `'body'` | The container element for adding modal into. |
151
+ | `input` | `null` | Input field type, can be `'text'`, `'email'`, `'password'`, `'number'`, `'tel'`, `'range'`, `'textarea'`, `'select'`, `'radio'`, `'checkbox'`, `'file'` and `'url'`. |
152
+ | `width` | `'500px'` | Modal window width, including paddings (`box-sizing: border-box`). Can be in `px` or `%`. |
153
+ | `padding` | `20` | Modal window padding. |
154
+ | `background` | `'#fff'` | Modal window background (CSS `background` property). |
155
+ | `customClass` | `null` | A custom CSS class for the modal. |
156
+ | `timer` | `null` | Auto close timer of the modal. Set in ms (milliseconds). |
157
+ | `animation` | `true` | If set to `false`, modal CSS animation will be disabled. |
158
+ | `allowOutsideClick` | `true` | If set to `false`, the user can't dismiss the modal by clicking outside it. |
159
+ | `allowEscapeKey` | `true` | If set to `false`, the user can't dismiss the modal by pressing the <kbd>Esc</kbd> key. |
160
+ | `allowEnterKey` | `true` | If set to `false`, the user can't confirm the modal by pressing the <kbd>Enter</kbd> or <kbd>Space</kbd> keys, unless they manually focus the confirm button. |
161
+ | `showConfirmButton` | `true` | If set to `false`, a "Confirm"-button will not be shown. It can be useful when you're using `html` parameter for custom HTML description. |
162
+ | `showCancelButton` | `false` | If set to `true`, a "Cancel"-button will be shown, which the user can click on to dismiss the modal. |
163
+ | `confirmButtonText` | `'OK'` | Use this to change the text on the "Confirm"-button. |
164
+ | `cancelButtonText` | `'Cancel'` | Use this to change the text on the "Cancel"-button. |
165
+ | `confirmButtonColor` | `'#3085d6'` | Use this to change the background color of the "Confirm"-button (must be a HEX value). |
166
+ | `cancelButtonColor` | `'#aaa'` | Use this to change the background color of the "Cancel"-button (must be a HEX value). |
167
+ | `confirmButtonClass` | `null` | A custom CSS class for the "Confirm"-button. |
168
+ | `cancelButtonClass` | `null` | A custom CSS class for the "Cancel"-button. |
169
+ | `buttonsStyling` | `true` | Apply default styling to buttons. If you want to use your own classes (e.g. Bootstrap classes) set this parameter to `false`. |
170
+ | `reverseButtons` | `false` | Set to `true` if you want to invert default buttons positions ("Confirm"-button on the right side). |
171
+ | `focusCancel` | `false` | Set to `true` if you want to focus the "Cancel"-button by default. |
172
+ | `showCloseButton` | `false` | Set to `true` to show close button in top right corner of the modal. |
173
+ | `showLoaderOnConfirm` | `false` | Set to `true` to disable buttons and show that something is loading. Useful for AJAX requests. |
174
+ | `preConfirm` | `null` | Function to execute before confirm, should return Promise, see <a href="https://limonte.github.io/sweetalert2/#ajax-request">usage example</a>. |
175
+ | `imageUrl` | `null` | Add an image for the modal. Should contain a string with the path or URL to the image. |
176
+ | `imageWidth` | `null` | If imageUrl is set, you can specify imageWidth to describes image width in px. |
177
+ | `imageHeight` | `null` | Custom image height in px. |
178
+ | `imageClass` | `null` | A custom CSS class for the image. |
179
+ | `inputPlaceholder` | `''` | Input field placeholder. |
180
+ | `inputValue` | `''` | Input field initial value. |
181
+ | `inputOptions` | `{}` or `Promise` | If `input` parameter is set to `'select'` or `'radio'`, you can provide options. Object keys will represent options values, object values will represent options text values. |
182
+ | `inputAutoTrim` | `true` | Automatically remove whitespaces from both ends of a result string. Set this parameter to `false` to disable auto-trimming. |
183
+ | `inputAttributes` | `{}` | HTML input attributes (e.g. `'min'`, `'max'`, `'autocomplete'`, `'accept'`), that are added to the input field. Object keys will represent attributes names, object values will represent attributes values. |
184
+ | `inputValidator` | `null` | Validator for input field, should return Promise, see <a href="https://limonte.github.io/sweetalert2/#select-box">usage example</a>. |
185
+ | `inputClass` | `null` | A custom CSS class for the input field. |
186
+ | `progressSteps` | `[]` | Progress steps, useful for modal queues, see <a href="https://limonte.github.io/sweetalert2/#chaining-modals">usage example</a>. |
187
+ | `currentProgressStep` | `null` | Current active progress step. The default is `swal.getQueueStep()`. |
188
+ | `progressStepsDistance` | `'40px'` | Distance between progress steps. |
189
+ | `onOpen` | `null` | Function to run when modal opens, provides modal DOM element as the first argument. |
190
+ | `onClose` | `null` | Function to run when modal closes, provides modal DOM element as the first argument. |
191
+ | `useRejections` | `true` | Determines whether dismissals (outside click, cancel button, close button, esc key) should reject, or resolve with an object of the format `{ dismiss: reason }`. Set it to `false` to get a cleaner control flow when using `await`, as explained in [#485](https://github.com/limonte/sweetalert2/issues/485). |
192
+
193
+ You can redefine default params by using `swal.setDefaults(customParams)` where `customParams` is an object.
194
+
195
+
196
+ Methods
197
+ -------
198
+
199
+ | Method | Description |
200
+ | ----------------------------------------------- | ----------- |
201
+ | `swal.isVisible()` | Determine if modal is shown. |
202
+ | `swal.setDefaults({Object})` | If you end up using a lot of the same settings when calling SweetAlert2, you can use setDefaults at the start of your program to set them once and for all! |
203
+ | `swal.resetDefaults()` | Resets settings to their default value. |
204
+ | `swal.close()` or `swal.closeModal()` | Close the currently open SweetAlert2 modal programmatically. |
205
+ | `swal.getTitle()` | Get the modal title. |
206
+ | `swal.getContent()` | Get the modal content. |
207
+ | `swal.getImage()` | Get the image. |
208
+ | `swal.getConfirmButton()` | Get the "Confirm" button. |
209
+ | `swal.getCancelButton()` | Get the "Cancel" button. |
210
+ | `swal.enableButtons()` | Enable "Confirm" and "Cancel" buttons. |
211
+ | `swal.disableButtons()` | Disable "Confirm" and "Cancel" buttons. |
212
+ | `swal.enableConfirmButton()` | Enable the "Confirm"-button only. |
213
+ | `swal.disableConfirmButton()` | Disable the "Confirm"-button only. |
214
+ | `swal.enableLoading()` or `swal.showLoading()` | Disable buttons and show loader. This is useful with AJAX requests. |
215
+ | `swal.disableLoading()` or `swal.hideLoading()` | Enable buttons and hide loader. |
216
+ | `swal.clickConfirm()` | Click the "Confirm"-button programmatically. |
217
+ | `swal.clickCancel()` | Click the "Cancel"-button programmatically. |
218
+ | `swal.showValidationError(error)` | Show validation error message. |
219
+ | `swal.resetValidationError()` | Hide validation error message. |
220
+ | `swal.getInput()` | Get the input DOM node, this method works with `input` parameter. |
221
+ | `swal.disableInput()` | Disable input. A disabled input element is unusable and un-clickable. |
222
+ | `swal.enableInput()` | Enable input. |
223
+ | `swal.queue([Array])` | Provide array of SweetAlert2 parameters to show multiple modals, one modal after another or a function that returns alert parameters given modal number. See [usage example](https://limonte.github.io/sweetalert2/#chaining-modals). |
224
+ | `swal.getQueueStep()` | Get the index of current modal in queue. When there's no active queue, `null` will be returned. |
225
+ | `swal.insertQueueStep()` | Insert a modal to queue, you can specify modal positioning with second parameter. By default a modal will be added to the end of a queue. |
226
+ | `swal.deleteQueueStep(index)` | Delete a modal at `index` from queue. |
227
+ | `swal.getProgressSteps()` | Progress steps getter. |
228
+ | `swal.setProgressSteps([])` | Progress steps setter. |
229
+ | `swal.showProgressSteps()` | Show progress steps. |
230
+ | `swal.hideProgressSteps()` | Hide progress steps. |
231
+
232
+
233
+ Browser compatibility
234
+ ---------------------
235
+
236
+ SweetAlert2 works in all major browsers (yes, even IE):
237
+
238
+ - Chrome: :white_check_mark:
239
+ - Safari: :white_check_mark:
240
+ - Firefox: :white_check_mark:
241
+ - Microsoft Edge: :white_check_mark:
242
+ - IE11: :white_check_mark: (ES6 Promise polyfill should be included, see [usage example](#usage)).
243
+ - Opera: :white_check_mark:
244
+ - UC Browser: :white_check_mark:
245
+
246
+ Note that SweetAlert2 **does not** and **will not** provide support or functionality of any kind on IE10 and lower.
247
+
248
+
249
+ Contributing
250
+ ------------
251
+
252
+ If you would like to contribute enhancements or fixes, please do the following:
253
+
254
+ 1. Fork the `sweetalert2` repository and clone it locally.
255
+
256
+ 2. Make sure you have [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/) installed.
257
+
258
+ 3. When in the SweetAlert2 directory, run `npm install` or `yarn install` to install dependencies.
259
+
260
+ 4. Start gulp watcher `gulp watch` to automatically build and minify the SCSS and JS-files.
261
+
262
+ 5. Check that your code is compliant with code linters: `gulp lint`.
263
+
264
+ 6. Ensure that you didn't break any of tests: `npm test`.
265
+
266
+ 7. Make sure that `dist/*` files aren't committed and create a pull request.
267
+
268
+
269
+ Related projects
270
+ ----------------
271
+
272
+ - [toverux/ngsweetalert2](https://github.com/toverux/ngsweetalert2) - SweetAlert2 directive for Angular 2+
273
+ - [lishengzxc/vue-sweetalert](https://github.com/lishengzxc/vue-sweetalert) - SweetAlert2 plugin for Vue.js
274
+ - [limonte/sweetalert2-webpack-demo](https://github.com/limonte/sweetalert2-webpack-demo) - SweetAlert2 + webpack demo
275
+
276
+
277
+ Donations
278
+ ---------
279
+
280
+ If you liked this pl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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * sweetalert2 v6.6.4
3
+ * Released under the MIT License.
4
+ */
5
+ 'use strict';
6
+
7
+ var defaultParams = {
8
+ title: '',
9
+ titleText: '',
10
+ text: '',
11
+ html: '',
12
+ type: null,
13
+ customClass: '',
14
+ target: 'body',
15
+ animation: true,
16
+ allowOutsideClick: true,
17
+ allowEscapeKey: true,
18
+ allowEnterKey: true,
19
+ showConfirmButton: true,
20
+ showCancelButton: false,
21
+ preConfirm: null,
22
+ confirmButtonText: 'OK',
23
+ confirmButtonColor: '#3085d6',
24
+ confirmButtonClass: null,
25
+ cancelButtonText: 'Cancel',
26
+ cancelButtonColor: '#aaa',
27
+ cancelButtonClass: null,
28
+ buttonsStyling: true,
29
+ reverseButtons: false,
30
+ focusCancel: false,
31
+ showCloseButton: false,
32
+ showLoaderOnConfirm: false,
33
+ imageUrl: null,
34
+ imageWidth: null,
35
+ imageHeight: null,
36
+ imageClass: null,
37
+ timer: null,
38
+ width: 500,
39
+ padding: 20,
40
+ background: '#fff',
41
+ input: null,
42
+ inputPlaceholder: '',
43
+ inputValue: '',
44
+ inputOptions: {},
45
+ inputAutoTrim: true,
46
+ inputClass: null,
47
+ inputAttributes: {},
48
+ inputValidator: null,
49
+ progressSteps: [],
50
+ currentProgressStep: null,
51
+ progressStepsDistance: '40px',
52
+ onOpen: null,
53
+ onClose: null,
54
+ useRejections: true
55
+ };
56
+
57
+ var swalPrefix = 'swal2-';
58
+
59
+ var prefix = function prefix(items) {
60
+ var result = {};
61
+ for (var i in items) {
62
+ result[items[i]] = swalPrefix + items[i];
63
+ }
64
+ return result;
65
+ };
66
+
67
+ var swalClasses = prefix(['container', 'shown', 'iosfix', 'modal', 'overlay', 'fade', 'show', 'hide', 'noanimation', 'close', 'title', 'content', 'buttonswrapper', 'confirm', 'cancel', 'icon', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea', 'inputerror', 'validationerror', 'progresssteps', 'activeprogressstep', 'progresscircle', 'progressline', 'loading', 'styled']);
68
+
69
+ var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);
70
+
71
+ /*
72
+ * Set hover, active and focus-states for buttons (source: http://www.sitepoint.com/javascript-generate-lighter-darker-color)
73
+ */
74
+ var colorLuminance = function colorLuminance(hex, lum) {
75
+ // Validate hex string
76
+ hex = String(hex).replace(/[^0-9a-f]/gi, '');
77
+ if (hex.length < 6) {
78
+ hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
79
+ }
80
+ lum = lum || 0;
81
+
82
+ // Convert to decimal and change luminosity
83
+ var rgb = '#';
84
+ for (var i = 0; i < 3; i++) {
85
+ var c = parseInt(hex.substr(i * 2, 2), 16);
86
+ c = Math.round(Math.min(Math.max(0, c + c * lum), 255)).toString(16);
87
+ rgb += ('00' + c).substr(c.length);
88
+ }
89
+
90
+ return rgb;
91
+ };
92
+
93
+ var uniqueArray = function uniqueArray(arr) {
94
+ var result = [];
95
+ for (var i in arr) {
96
+ if (result.indexOf(arr[i]) === -1) {
97
+ result.push(arr[i]);
98
+ }
99
+ }
100
+ return result;
101
+ };
102
+
103
+ /* global MouseEvent */
104
+
105
+ // Remember state in cases where opening and handling a modal will fiddle with it.
106
+ var states = {
107
+ previousWindowKeyDown: null,
108
+ previousActiveElement: null,
109
+ previousBodyPadding: null
110
+ };
111
+
112
+ /*
113
+ * Add modal + overlay to DOM
114
+ */
115
+ var init = function init(params) {
116
+ if (typeof document === 'undefined') {
117
+ console.error('SweetAlert2 requires document to initialize');
118
+ return;
119
+ }
120
+
121
+ var container = document.createElement('div');
122
+ container.className = swalClasses.container;
123
+ container.innerHTML = sweetHTML;
124
+
125
+ var targetElement = document.querySelector(params.target);
126
+ if (!targetElement) {
127
+ console.warn('SweetAlert2: Can\'t find the target "' + params.target + '"');
128
+ targetElement = document.body;
129
+ }
130
+ targetElement.appendChild(container);
131
+
132
+ var modal = getModal();
133
+ var input = getChildByClass(modal, swalClasses.input);
134
+ var file = getChildByClass(modal, swalClasses.file);
135
+ var range = modal.querySelector('.' + swalClasses.range + ' input');
136
+ var rangeOutput = modal.querySelector('.' + swalClasses.range + ' output');
137
+ var select = getChildByClass(modal, swalClasses.select);
138
+ var checkbox = modal.querySelector('.' + swalClasses.checkbox + ' input');
139
+ var textarea = getChildByClass(modal, swalClasses.textarea);
140
+
141
+ input.oninput = function () {
142
+ sweetAlert.resetValidationError();
143
+ };
144
+
145
+ input.onkeydown = function (event) {
146
+ setTimeout(function () {
147
+ if (event.keyCode === 13 && params.allowEnterKey) {
148
+ event.stopPropagation();
149
+ sweetAlert.clickConfirm();
150
+ }
151
+ }, 0);
152
+ };
153
+
154
+ file.onchange = function () {
155
+ sweetAlert.resetValidationError();
156
+ };
157
+
158
+ range.oninput = function () {
159
+ sweetAlert.resetValidationError();
160
+ rangeOutput.value = range.value;
161
+ };
162
+
163
+ range.onchange = function () {
164
+ sweetAlert.resetValidationError();
165
+ range.previousSibling.value = range.value;
166
+ };
167
+
168
+ select.onchange = function () {
169
+ sweetAlert.resetValidationError();
170
+ };
171
+
172
+ checkbox.onchange = function () {
173
+ sweetAlert.resetValidationError();
174
+ };
175
+
176
+ textarea.oninput = function () {
177
+ sweetAlert.resetValidationError();
178
+ };
179
+
180
+ return modal;
181
+ };
182
+
183
+ /*
184
+ * Manipulate DOM
185
+ */
186
+
187
+ var sweetHTML = ('\n <div role="dialog" aria-labelledby="' + swalClasses.title + '" aria-describedby="' + swalClasses.content + '" class="' + swalClasses.modal + '" tabindex="-1">\n <ul class="' + swalClasses.progresssteps + '"></ul>\n <div class="' + swalClasses.icon + ' ' + 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="' + swalClasses.icon + ' ' + iconTypes.question + '">?</div>\n <div class="' + swalClasses.icon + ' ' + iconTypes.warning + '">!</div>\n <div class="' + swalClasses.icon + ' ' + iconTypes.info + '">i</div>\n <div class="' + swalClasses.icon + ' ' + 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="' + swalClasses.image + '">\n <h2 class="' + swalClasses.title + '" id="' + swalClasses.title + '"></h2>\n <div id="' + swalClasses.content + '" class="' + swalClasses.content + '"></div>\n <input class="' + swalClasses.input + '">\n <input type="file" class="' + swalClasses.file + '">\n <div class="' + swalClasses.range + '">\n <output></output>\n <input type="range">\n </div>\n <select class="' + swalClasses.select + '"></select>\n <div class="' + swalClasses.radio + '"></div>\n <label for="' + swalClasses.checkbox + '" class="' + swalClasses.checkbox + '">\n <input type="checkbox">\n </label>\n <textarea class="' + swalClasses.textarea + '"></textarea>\n <div class="' + swalClasses.validationerror + '"></div>\n <div class="' + swalClasses.buttonswrapper + '">\n <button type="button" class="' + swalClasses.confirm + '">OK</button>\n <button type="button" class="' + swalClasses.cancel + '">Cancel</button>\n </div>\n <button type="button" class="' + swalClasses.close + '" aria-label="Close this dialog">&times;</button>\n </div>\n').replace(/(^|\n)\s*/g, '');
188
+
189
+ var getContainer = function getContainer() {
190
+ return document.body.querySelector('.' + swalClasses.container);
191
+ };
192
+
193
+ var getModal = function getModal() {
194
+ return getContainer() ? getContainer().querySelector('.' + swalClasses.modal) : null;
195
+ };
196
+
197
+ var getIcons = function getIcons() {
198
+ var modal = getModal();
199
+ return modal.querySelectorAll('.' + swalClasses.icon);
200
+ };
201
+
202
+ var elementByClass = function elementByClass(className) {
203
+ return getContainer() ? getContainer().querySelector('.' + className) : null;
204
+ };
205
+
206
+ var getTitle = function getTitle() {
207
+ return elementByClass(swalClasses.title);
208
+ };
209
+
210
+ var getContent = function getContent() {
211
+ return elementByClass(swalClasses.content);
212
+ };
213
+
214
+ var getImage = function getImage() {
215
+ return elementByClass(swalClasses.image);
216
+ };
217
+
218
+ var getButtonsWrapper = function getButtonsWrapper() {
219
+ return elementByClass(swalClasses.buttonswrapper);
220
+ };
221
+
222
+ var getProgressSteps = function getProgressSteps() {
223
+ return elementByClass(swalClasses.progresssteps);
224
+ };
225
+
226
+ var getValidationError = function getValidationError() {
227
+ return elementByClass(swalClasses.validationerror);
228
+ };
229
+
230
+ var getConfirmButton = function getConfirmButton() {
231
+ return elementByClass(swalClasses.confirm);
232
+ };
233
+
234
+ var getCancelButton = function getCancelButton() {
235
+ return elementByClass(swalClasses.cancel);
236
+ };
237
+
238
+ var getCloseButton = function getCloseButton() {
239
+ return elementByClass(swalClasses.close);
240
+ };
241
+
242
+ var getFocusableElements = function getFocusableElements(focusCancel) {
243
+ var buttons = [getConfirmButton(), getCancelButton()];
244
+ if (focusCancel) {
245
+ buttons.reverse();
246
+ }
247
+ var focusableElements = buttons.concat(Array.prototype.slice.call(getModal().querySelectorAll('button, input:not([type=hidden]), textarea, select, a, *[tabindex]:not([tabindex="-1"])')));
248
+ return uniqueArray(focusableElements);
249
+ };
250
+
251
+ var hasClass = function hasClass(elem, className) {
252
+ if (elem.classList) {
253
+ return elem.classList.contains(className);
254
+ }
255
+ return false;
256
+ };
257
+
258
+ var focusInput = function focusInput(input) {
259
+ input.focus();
260
+
261
+ // place cursor at end of text in text input
262
+ if (input.type !== 'file') {
263
+ // http://stackoverflow.com/a/2345915/1331425
264
+ var val = input.value;
265
+ input.value = '';
266
+ input.value = val;
267
+ }
268
+ };
269
+
270
+ var addClass = function addClass(elem, className) {
271
+ if (!elem || !className) {
272
+ return;
273
+ }
274
+ var classes = className.split(/\s+/).filter(Boolean);
275
+ classes.forEach(function (className) {
276
+ elem.classList.add(className);
277
+ });
278
+ };
279
+
280
+ var removeClass = function removeClass(elem, className) {
281
+ if (!elem || !className) {
282
+ return;
283
+ }
284
+ var classes = className.split(/\s+/).filter(Boolean);
285
+ classes.forEach(function (className) {
286
+ elem.classList.remove(className);
287
+ });
288
+ };
289
+
290
+ var getChildByClass = function getChildByClass(elem, className) {
291
+ for (var i = 0; i < elem.childNodes.length; i++) {
292
+ if (hasClass(elem.childNodes[i], className)) {
293
+ return elem.childNodes[i];
294
+ }
295
+ }
296
+ };
297
+
298
+ var show = function show(elem, display) {
299
+ if (!display) {
300
+ display = 'block';
301
+ }
302
+ elem.style.opacity = '';
303
+ elem.style.display = display;
304
+ };
305
+
306
+ var hide = function hide(elem) {
307
+ elem.style.opacity = '';
308
+ elem.style.display = 'none';
309
+ };
310
+
311
+ var empty = function empty(elem) {
312
+ while (elem.firstChild) {
313
+ elem.removeChild(elem.firstChild);
314
+ }
315
+ };
316
+
317
+ // borrowed from jqeury $(elem).is(':visible') implementation
318
+ var isVisible = function isVisible(elem) {
319
+ return elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length;
320
+ };
321
+
322
+ var removeStyleProperty = function removeStyleProperty(elem, property) {
323
+ if (elem.style.removeProperty) {
324
+ elem.style.removeProperty(property);
325
+ } else {
326
+ elem.style.removeAttribute(property);
327
+ }
328
+ };
329
+
330
+ var fireClick = function fireClick(node) {
331
+ if (!isVisible(node)) {
332
+ return false;
333
+ }
334
+
335
+ // Taken from http://www.nonobtrusive.com/2011/11/29/programatically-fire-crossbrowser-click-event-with-javascript/
336
+ // Then fixed for today's Chrome browser.
337
+ if (typeof MouseEvent === 'function') {
338
+ // Up-to-date approach
339
+ var mevt = new MouseEvent('click', {
340
+ view: window,
341
+ bubbles: false,
342
+ cancelable: true
343
+ });
344
+ node.dispatchEvent(mevt);
345
+ } else if (document.createEvent) {
346
+ // Fallback
347
+ var evt = document.createEvent('MouseEvents');
348
+ evt.initEvent('click', false, false);
349
+ node.dispatchEvent(evt);
350
+ } else if (document.createEventObject) {
351
+ node.fireEvent('onclick');
352
+ } else if (typeof node.onclick === 'function') {
353
+ node.onclick();
354
+ }
355
+ };
356
+
357
+ var animationEndEvent = function () {
358
+ var testEl = document.createElement('div');
359
+ var transEndEventNames = {
360
+ 'WebkitAnimation': 'webkitAnimationEnd',
361
+ 'OAnimation': 'oAnimationEnd oanimationend',
362
+ 'msAnimation': 'MSAnimationEnd',
363
+ 'animation': 'animationend'
364
+ };
365
+ for (var i in transEndEventNames) {
366
+ if (transEndEventNames.hasOwnProperty(i) && testEl.style[i] !== undefined) {
367
+ return transEndEventNames[i];
368
+ }
369
+ }
370
+
371
+ return false;
372
+ }();
373
+
374
+ // Reset previous window keydown handler and focued element
375
+ var resetPrevState = function resetPrevState() {
376
+ window.onkeydown = states.previousWindowKeyDown;
377
+ if (states.previousActiveElement && states.previousActiveElement.focus) {
378
+ var x = window.scrollX;
379
+ var y = window.scrollY;
380
+ states.previousActiveElement.focus();
381
+ if (x && y) {
382
+ // IE has no scrollX/scrollY support
383
+ window.scrollTo(x, y);
384
+ }
385
+ }
386
+ };
387
+
388
+ // Measure width of scrollbar
389
+ // https://github.com/twbs/bootstrap/blob/master/js/modal.js#L279-L286
390
+ var measureScrollbar = function measureScrollbar() {
391
+ var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;
392
+ if (supportsTouch) {
393
+ return 0;
394
+ }
395
+ var scrollDiv = document.createElement('div');
396
+ scrollDiv.style.width = '50px';
397
+ scrollDiv.style.height = '50px';
398
+ scrollDiv.style.overflow = 'scroll';
399
+ document.body.appendChild(scrollDiv);
400
+ var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
401
+ document.body.removeChild(scrollDiv);
402
+ return scrollbarWidth;
403
+ };
404
+
405
+ // JavaScript Debounce Function
406
+ // Simplivied version of https://davidwalsh.name/javascript-debounce-function
407
+ var debounce = function debounce(func, wait) {
408
+ var timeout = void 0;
409
+ return function () {
410
+ var later = function later() {
411
+ timeout = null;
412
+ func();
413
+ };
414
+ clearTimeout(timeout);
415
+ timeout = setTimeout(later, wait);
416
+ };
417
+ };
418
+
419
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
420
+ return typeof obj;
421
+ } : function (obj) {
422
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
423
+ };
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+ var _extends = Object.assign || function (target) {
446
+ for (var i = 1; i < arguments.length; i++) {
447
+ var source = arguments[i];
448
+
449
+ for (var key in source) {
450
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
451
+ target[key] = source[key];
452
+ }
453
+ }
454
+ }
455
+
456
+ return target;
457
+ };
458
+
459
+ var modalParams = _extends({}, defaultParams);
460
+ var queue = [];
461
+ var swal2Observer = void 0;
462
+
463
+ /*
464
+ * Set type, text and actions on modal
465
+ */
466
+ var setParameters = function setParameters(params) {
467
+ var modal = getModal() || init(params);
468
+
469
+ for (var param in params) {
470
+ if (!defaultParams.hasOwnProperty(param) && param !== 'extraParams') {
471
+ console.warn('SweetAlert2: Unknown parameter "' + param + '"');
472
+ }
473
+ }
474
+
475
+ // Set modal width
476
+ modal.style.width = typeof params.width === 'number' ? params.width + 'px' : params.width;
477
+
478
+ modal.style.padding = params.padding + 'px';
479
+ modal.style.background = params.background;
480
+ var successIconParts = modal.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');
481
+ for (var i = 0; i < successIconParts.length; i++) {
482
+ successIconParts[i].style.background = params.background;
483
+ }
484
+
485
+ var title = getTitle();
486
+ var content = getContent();
487
+ var buttonsWrapper = getButtonsWrapper();
488
+ var confirmButton = getConfirmButton();
489
+ var cancelButton = getCancelButton();
490
+ var closeButton = getCloseButton();
491
+
492
+ // Title
493
+ if (params.titleText) {
494
+ title.innerText = params.titleText;
495
+ } else {
496
+ title.innerHTML = params.title.split('\n').join('<br>');
497
+ }
498
+
499
+ // Content
500
+ if (params.text || params.html) {
501
+ if (_typeof(params.html) === 'object') {
502
+ content.innerHTML = '';
503
+ if (0 in params.html) {
504
+ for (var _i = 0; _i in params.html; _i++) {
505
+ content.appendChild(params.html[_i].cloneNode(true));
506
+ }
507
+ } else {
508
+ content.appendChild(params.html.cloneNode(true));
509
+ }
510
+ } else if (params.html) {
511
+ content.innerHTML = params.html;
512
+ } else if (params.text) {
513
+ content.textContent = params.text;
514
+ }
515
+ show(content);
516
+ } else {
517
+ hide(content);
518
+ }
519
+
520
+ // Close button
521
+ if (params.showCloseButton) {
522
+ show(closeButton);
523
+ } else {
524
+ hide(closeButton);
525
+ }
526
+
527
+ // Custom Class
528
+ modal.className = swalClasses.modal;
529
+ if (params.customClass) {
530
+ addClass(modal, params.customClass);
531
+ }
532
+
533
+ // Progress steps
534
+ var progressStepsContainer = getProgressSteps();
535
+ var currentProgressStep = parseInt(params.currentProgressStep === null ? sweetAlert.getQueueStep() : params.currentProgressStep, 10);
536
+ if (params.progressSteps.length) {
537
+ show(progressStepsContainer);
538
+ empty(progressStepsContainer);
539
+ if (currentProgressStep >= params.progressSteps.length) {
540
+ console.warn('SweetAlert2: Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');
541
+ }
542
+ params.progressSteps.forEach(function (step, index) {
543
+ var circle = document.createElement('li');
544
+ addClass(circle, swalClasses.progresscircle);
545
+ circle.innerHTML = step;
546
+ if (index === currentProgressStep) {
547
+ addClass(circle, swalClasses.activeprogressstep);
548
+ }
549
+ progressStepsContainer.appendChild(circle);
550
+ if (index !== params.progressSteps.length - 1) {
551
+ var line = document.createElement('li');
552
+ addClass(line, swalClasses.progressline);
553
+ line.style.width = params.progressStepsDistance;
554
+ progressStepsContainer.appendChild(line);
555
+ }
556
+ });
557
+ } else {
558
+ hide(progressStepsContainer);
559
+ }
560
+
561
+ // Icon
562
+ var icons = getIcons();
563
+ for (var _i2 = 0; _i2 < icons.length; _i2++) {
564
+ hide(icons[_i2]);
565
+ }
566
+ if (params.type) {
567
+ var validType = false;
568
+ for (var iconType in iconTypes) {
569
+ if (params.type === iconType) {
570
+ validType = true;
571
+ break;
572
+ }
573
+ }
574
+ if (!validType) {
575
+ console.error('SweetAlert2: Unknown alert type: ' + params.type);
576
+ return false;
577
+ }
578
+ var icon = modal.querySelector('.' + swalClasses.icon + '.' + iconTypes[params.type]);
579
+ show(icon);
580
+
581
+ // Animate icon
582
+ if (params.animation) {
583
+ switch (params.type) {
584
+ case 'success':
585
+ addClass(icon, 'swal2-animate-success-icon');
586
+ addClass(icon.querySelector('.swal2-success-line-tip'), 'swal2-animate-success-line-tip');
587
+ addClass(icon.querySelector('.swal2-success-line-long'), 'swal2-animate-success-line-long');
588
+ break;
589
+ case 'error':
590
+ addClass(icon, 'swal2-animate-error-icon');
591
+ addClass(icon.querySelector('.swal2-x-mark'), 'swal2-animate-x-mark');
592
+ break;
593
+ default:
594
+ break;
595
+ }
596
+ }
597
+ }
598
+
599
+ // Custom image
600
+ var image = getImage();
601
+ if (params.imageUrl) {
602
+ image.setAttribute('src', params.imageUrl);
603
+ show(image);
604
+
605
+ if (params.imageWidth) {
606
+ image.setAttribute('width', params.imageWidth);
607
+ } else {
608
+ image.removeAttribute('width');
609
+ }
610
+
611
+ if (params.imageHeight) {
612
+ image.setAttribute('height', params.imageHeight);
613
+ } else {
614
+ image.removeAttribute('height');
615
+ }
616
+
617
+ image.className = swalClasses.image;
618
+ if (params.imageClass) {
619
+ addClass(image, params.imageClass);
620
+ }
621
+ } else {
622
+ hide(image);
623
+ }
624
+
625
+ // Cancel button
626
+ if (params.showCancelButton) {
627
+ cancelButton.style.display = 'inline-block';
628
+ } else {
629
+ hide(cancelButton);
630
+ }
631
+
632
+ // Confirm button
633
+ if (params.showConfirmButton) {
634
+ removeStyleProperty(confirmButton, 'display');
635
+ } else {
636
+ hide(confirmButton);
637
+ }
638
+
639
+ // Buttons wrapper
640
+ if (!params.showConfirmButton && !params.showCancelButton) {
641
+ hide(buttonsWrapper);
642
+ } else {
643
+ show(buttonsWrapper);
644
+ }
645
+
646
+ // Edit text on cancel and confirm buttons
647
+ confirmButton.innerHTML = params.confirmButtonText;
648
+ cancelButton.innerHTML = params.cancelButtonText;
649
+
650
+ // Set buttons to selected background colors
651
+ if (params.buttonsStyling) {
652
+ confirmButton.style.backgroundColor = params.confirmButtonColor;
653
+ cancelButton.style.backgroundColor = params.cancelButtonColor;
654
+ }
655
+
656
+ // Add buttons custom classes
657
+ confirmButton.className = swalClasses.confirm;
658
+ addClass(confirmButton, params.confirmButtonClass);
659
+ cancelButton.className = swalClasses.cancel;
660
+ addClass(cancelButton, params.cancelButtonClass);
661
+
662
+ // Buttons styling
663
+ if (params.buttonsStyling) {
664
+ addClass(confirmButton, swalClasses.styled);
665
+ addClass(cancelButton, swalClasses.styled);
666
+ } else {
667
+ removeClass(confirmButton, swalClasses.styled);
668
+ removeClass(cancelButton, swalClasses.styled);
669
+
670
+ confirmButton.style.backgroundColor = confirmButton.style.borderLeftColor = confirmButton.style.borderRightColor = '';
671
+ cancelButton.style.backgroundColor = cancelButton.style.borderLeftColor = cancelButton.style.borderRightColor = '';
672
+ }
673
+
674
+ // CSS animation
675
+ if (params.animation === true) {
676
+ removeClass(modal, swalClasses.noanimation);
677
+ } else {
678
+ addClass(modal, swalClasses.noanimation);
679
+ }
680
+ };
681
+
682
+ /*
683
+ * Animations
684
+ */
685
+ var openModal = function openModal(animation, onComplete) {
686
+ var container = getContainer();
687
+ var modal = getModal();
688
+
689
+ if (animation) {
690
+ addClass(modal, swalClasses.show);
691
+ addClass(container, swalClasses.fade);
692
+ removeClass(modal, swalClasses.hide);
693
+ } else {
694
+ removeClass(modal, swalClasses.fade);
695
+ }
696
+ show(modal);
697
+
698
+ // scrolling is 'hidden' until animation is done, after that 'auto'
699
+ container.style.overflowY = 'hidden';
700
+ if (animationEndEvent && !hasClass(modal, swalClasses.noanimation)) {
701
+ modal.addEventListener(animationEndEvent, function swalCloseEventFinished() {
702
+ modal.removeEventListener(animationEndEvent, swalCloseEventFinished);
703
+ container.style.overflowY = 'auto';
704
+ });
705
+ } else {
706
+ container.style.overflowY = 'auto';
707
+ }
708
+
709
+ addClass(document.documentElement, swalClasses.shown);
710
+ addClass(document.body, swalClasses.shown);
711
+ addClass(container, swalClasses.shown);
712
+ fixScrollbar();
713
+ iOSfix();
714
+ states.previousActiveElement = document.activeElement;
715
+ if (onComplete !== null && typeof onComplete === 'function') {
716
+ setTimeout(function () {
717
+ onComplete(modal);
718
+ });
719
+ }
720
+ };
721
+
722
+ var fixScrollbar = function fixScrollbar() {
723
+ // for queues, do not do this more than once
724
+ if (states.previousBodyPadding !== null) {
725
+ return;
726
+ }
727
+ // if the body has overflow
728
+ if (document.body.scrollHeight > window.innerHeight) {
729
+ // add padding so the content doesn't shift after removal of scrollbar
730
+ states.previousBodyPadding = document.body.style.paddingRight;
731
+ document.body.style.paddingRight = measureScrollbar() + 'px';
732
+ }
733
+ };
734
+
735
+ var undoScrollbar = function undoScrollbar() {
736
+ if (states.previousBodyPadding !== null) {
737
+ document.body.style.paddingRight = states.previousBodyPadding;
738
+ states.previousBodyPadding = null;
739
+ }
740
+ };
741
+
742
+ // Fix iOS scrolling http://stackoverflow.com/q/39626302/1331425
743
+ var iOSfix = function iOSfix() {
744
+ var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
745
+ if (iOS && !hasClass(document.body, swalClasses.iosfix)) {
746
+ var offset = document.body.scrollTop;
747
+ document.body.style.top = offset * -1 + 'px';
748
+ addClass(document.body, swalClasses.iosfix);
749
+ }
750
+ };
751
+
752
+ var undoIOSfix = function undoIOSfix() {
753
+ if (hasClass(document.body, swalClasses.iosfix)) {
754
+ var offset = parseInt(document.body.style.top, 10);
755
+ removeClass(document.body, swalClasses.iosfix);
756
+ document.body.style.top = '';
757
+ document.body.scrollTop = offset * -1;
758
+ }
759
+ };
760
+
761
+ // SweetAlert entry point
762
+ var sweetAlert = function sweetAlert() {
763
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
764
+ args[_key] = arguments[_key];
765
+ }
766
+
767
+ if (args[0] === undefined) {
768
+ console.error('SweetAlert2 expects at least 1 attribute!');
769
+ return false;
770
+ }
771
+
772
+ var params = _extends({}, modalParams);
773
+
774
+ switch (_typeof(args[0])) {
775
+ case 'string':
776
+ params.title = args[0];
777
+ params.html = args[1];
778
+ params.type = args[2];
779
+
780
+ break;
781
+
782
+ case 'object':
783
+ _extends(params, args[0]);
784
+ params.extraParams = args[0].extraParams;
785
+
786
+ if (params.input === 'email' && params.inputValidator === null) {
787
+ params.inputValidator = function (email) {
788
+ return new Promise(function (resolve, reject) {
789
+ var emailRegex = /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;
790
+ if (emailRegex.test(email)) {
791
+ resolve();
792
+ } else {
793
+ reject('Invalid email address');
794
+ }
795
+ });
796
+ };
797
+ }
798
+
799
+ if (params.input === 'url' && params.inputValidator === null) {
800
+ params.inputValidator = function (url) {
801
+ return new Promise(function (resolve, reject) {
802
+ var urlRegex = /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/;
803
+ if (urlRegex.test(url)) {
804
+ resolve();
805
+ } else {
806
+ reject('Invalid URL');
807
+ }
808
+ });
809
+ };
810
+ }
811
+ break;
812
+
813
+ default:
814
+ console.error('SweetAlert2: Unexpected type of argument! Expected "string" or "object", got ' + _typeof(args[0]));
815
+ return false;
816
+ }
817
+
818
+ setParameters(params);
819
+
820
+ var container = getContainer();
821
+ var modal = getModal();
822
+
823
+ return new Promise(function (resolve, reject) {
824
+ // Close on timer
825
+ if (params.timer) {
826
+ modal.timeout = setTimeout(function () {
827
+ sweetAlert.closeModal(params.onClose);
828
+ if (params.useRejections) {
829
+ reject('timer');
830
+ } else {
831
+ resolve({ dismiss: 'timer' });
832
+ }
833
+ }, params.timer);
834
+ }
835
+
836
+ // Get input element by specified type or, if type isn't specified, by params.input
837
+ var getInput = function getInput(inputType) {
838
+ inputType = inputType || params.input;
839
+ if (!inputType) {
840
+ return null;
841
+ }
842
+ switch (inputType) {
843
+ case 'select':
844
+ case 'textarea':
845
+ case 'file':
846
+ return getChildByClass(modal, swalClasses[inputType]);
847
+ case 'checkbox':
848
+ return modal.querySelector('.' + swalClasses.checkbox + ' input');
849
+ case 'radio':
850
+ return modal.querySelector('.' + swalClasses.radio + ' input:checked') || modal.querySelector('.' + swalClasses.radio + ' input:first-child');
851
+ case 'range':
852
+ return modal.querySelector('.' + swalClasses.range + ' input');
853
+ default:
854
+ return getChildByClass(modal, swalClasses.input);
855
+ }
856
+ };
857
+
858
+ // Get the value of the modal input
859
+ var getInputValue = function getInputValue() {
860
+ var input = getInput();
861
+ if (!input) {
862
+ return null;
863
+ }
864
+ switch (params.input) {
865
+ case 'checkbox':
866
+ return input.checked ? 1 : 0;
867
+ case 'radio':
868
+ return input.checked ? input.value : null;
869
+ case 'file':
870
+ return input.files.length ? input.files[0] : null;
871
+ default:
872
+ return params.inputAutoTrim ? input.value.trim() : input.value;
873
+ }
874
+ };
875
+
876
+ // input autofocus
877
+ if (params.input) {
878
+ setTimeout(function () {
879
+ var input = getInput();
880
+ if (input) {
881
+ focusInput(input);
882
+ }
883
+ }, 0);
884
+ }
885
+
886
+ var confirm = function confirm(value) {
887
+ if (params.showLoaderOnConfirm) {
888
+ sweetAlert.showLoading();
889
+ }
890
+
891
+ if (params.preConfirm) {
892
+ params.preConfirm(value, params.extraParams).then(function (preConfirmValue) {
893
+ sweetAlert.closeModal(params.onClose);
894
+ resolve(preConfirmValue || value);
895
+ }, function (error) {
896
+ sweetAlert.hideLoading();
897
+ if (error) {
898
+ sweetAlert.showValidationError(error);
899
+ }
900
+ });
901
+ } else {
902
+ sweetAlert.closeModal(params.onClose);
903
+ if (params.useRejections) {
904
+ resolve(value);
905
+ } else {
906
+ resolve({ value: value });
907
+ }
908
+ }
909
+ };
910
+
911
+ // Mouse interactions
912
+ var onButtonEvent = function onButtonEvent(event) {
913
+ var e = event || window.event;
914
+ var target = e.target || e.srcElement;
915
+ var confirmButton = getConfirmButton();
916
+ var cancelButton = getCancelButton();
917
+ var targetedConfirm = confirmButton && (confirmButton === target || confirmButton.contains(target));
918
+ var targetedCancel = cancelButton && (cancelButton === target || cancelButton.contains(target));
919
+
920
+ switch (e.type) {
921
+ case 'mouseover':
922
+ case 'mouseup':
923
+ if (params.buttonsStyling) {
924
+ if (targetedConfirm) {
925
+ confirmButton.style.backgroundColor = colorLuminance(params.confirmButtonColor, -0.1);
926
+ } else if (targetedCancel) {
927
+ cancelButton.style.backgroundColor = colorLuminance(params.cancelButtonColor, -0.1);
928
+ }
929
+ }
930
+ break;
931
+ case 'mouseout':
932
+ if (params.buttonsStyling) {
933
+ if (targetedConfirm) {
934
+ confirmButton.style.backgroundColor = params.confirmButtonColor;
935
+ } else if (targetedCancel) {
936
+ cancelButton.style.backgroundColor = params.cancelButtonColor;
937
+ }
938
+ }
939
+ break;
940
+ case 'mousedown':
941
+ if (params.buttonsStyling) {
942
+ if (targetedConfirm) {
943
+ confirmButton.style.backgroundColor = colorLuminance(params.confirmButtonColor, -0.2);
944
+ } else if (targetedCancel) {
945
+ cancelButton.style.backgroundColor = colorLuminance(params.cancelButtonColor, -0.2);
946
+ }
947
+ }
948
+ break;
949
+ case 'click':
950
+ // Clicked 'confirm'
951
+ if (targetedConfirm && sweetAlert.isVisible()) {
952
+ sweetAlert.disableButtons();
953
+ if (params.input) {
954
+ var inputValue = getInputValue();
955
+
956
+ if (params.inputValidator) {
957
+ sweetAlert.disableInput();
958
+ params.inputValidator(inputValue, params.extraParams).then(function () {
959
+ sweetAlert.enableButtons();
960
+ sweetAlert.enableInput();
961
+ confirm(inputValue);
962
+ }, function (error) {
963
+ sweetAlert.enableButtons();
964
+ sweetAlert.enableInput();
965
+ if (error) {
966
+ sweetAlert.showValidationError(error);
967
+ }
968
+ });
969
+ } else {
970
+ confirm(inputValue);
971
+ }
972
+ } else {
973
+ confirm(true);
974
+ }
975
+
976
+ // Clicked 'cancel'
977
+ } else if (targetedCancel && sweetAlert.isVisible()) {
978
+ sweetAlert.disableButtons();
979
+ sweetAlert.closeModal(params.onClose);
980
+ if (params.useRejections) {
981
+ reject('cancel');
982
+ } else {
983
+ resolve({ dismiss: 'cancel' });
984
+ }
985
+ }
986
+ break;
987
+ default:
988
+ }
989
+ };
990
+
991
+ var buttons = modal.querySelectorAll('button');
992
+ for (var i = 0; i < buttons.length; i++) {
993
+ buttons[i].onclick = onButtonEvent;
994
+ buttons[i].onmouseover = onButtonEvent;
995
+ buttons[i].onmouseout = onButtonEvent;
996
+ buttons[i].onmousedown = onButtonEvent;
997
+ }
998
+
999
+ // Closing modal by close button
1000
+ getCloseButton().onclick = function () {
1001
+ sweetAlert.closeModal(params.onClose);
1002
+ if (params.useRejections) {
1003
+ reject('close');
1004
+ } else {
1005
+ resolve({ dismiss: 'close' });
1006
+ }
1007
+ };
1008
+
1009
+ // Closing modal by overlay click
1010
+ container.onclick = function (e) {
1011
+ if (e.target !== container) {
1012
+ return;
1013
+ }
1014
+ if (params.allowOutsideClick) {
1015
+ sweetAlert.closeModal(params.onClose);
1016
+ if (params.useRejections) {
1017
+ reject('overlay');
1018
+ } else {
1019
+ resolve({ dismiss: 'overlay' });
1020
+ }
1021
+ }
1022
+ };
1023
+
1024
+ var buttonsWrapper = getButtonsWrapper();
1025
+ var confirmButton = getConfirmButton();
1026
+ var cancelButton = getCancelButton();
1027
+
1028
+ // Reverse buttons (Confirm on the right side)
1029
+ if (params.reverseButtons) {
1030
+ confirmButton.parentNode.insertBefore(cancelButton, confirmButton);
1031
+ } else {
1032
+ confirmButton.parentNode.insertBefore(confirmButton, cancelButton);
1033
+ }
1034
+
1035
+ // Focus handling
1036
+ var setFocus = function setFocus(index, increment) {
1037
+ var focusableElements = getFocusableElements(params.focusCancel);
1038
+ // search for visible elements and select the next possible match
1039
+ for (var _i3 = 0; _i3 < focusableElements.length; _i3++) {
1040
+ index = index + increment;
1041
+
1042
+ // rollover to first item
1043
+ if (index === focusableElements.length) {
1044
+ index = 0;
1045
+
1046
+ // go to last item
1047
+ } else if (index === -1) {
1048
+ index = focusableElements.length - 1;
1049
+ }
1050
+
1051
+ // determine if element is visible
1052
+ var el = focusableElements[index];
1053
+ if (isVisible(el)) {
1054
+ return el.focus();
1055
+ }
1056
+ }
1057
+ };
1058
+
1059
+ var handleKeyDown = function handleKeyDown(event) {
1060
+ var e = event || window.event;
1061
+ var keyCode = e.keyCode || e.which;
1062
+
1063
+ if ([9, 13, 32, 27, 37, 38, 39, 40].indexOf(keyCode) === -1) {
1064
+ // Don't do work on keys we don't care about.
1065
+ return;
1066
+ }
1067
+
1068
+ var targetElement = e.target || e.srcElement;
1069
+
1070
+ var focusableElements = getFocusableElements(params.focusCancel);
1071
+ var btnIndex = -1; // Find the button - note, this is a nodelist, not an array.
1072
+ for (var _i4 = 0; _i4 < focusableElements.length; _i4++) {
1073
+ if (targetElement === focusableElements[_i4]) {
1074
+ btnIndex = _i4;
1075
+ break;
1076
+ }
1077
+ }
1078
+
1079
+ // TAB
1080
+ if (keyCode === 9) {
1081
+ if (!e.shiftKey) {
1082
+ // Cycle to the next button
1083
+ setFocus(btnIndex, 1);
1084
+ } else {
1085
+ // Cycle to the prev button
1086
+ setFocus(btnIndex, -1);
1087
+ }
1088
+ e.stopPropagation();
1089
+ e.preventDefault();
1090
+
1091
+ // ARROWS - switch focus between buttons
1092
+ } else if (keyCode === 37 || keyCode === 38 || keyCode === 39 || keyCode === 40) {
1093
+ // focus Cancel button if Confirm button is currently focused
1094
+ if (document.activeElement === confirmButton && isVisible(cancelButton)) {
1095
+ cancelButton.focus();
1096
+ // and vice versa
1097
+ } else if (document.activeElement === cancelButton && isVisible(confirmButton)) {
1098
+ confirmButton.focus();
1099
+ }
1100
+
1101
+ // ENTER/SPACE
1102
+ } else if (keyCode === 13 || keyCode === 32) {
1103
+ if (btnIndex === -1 && params.allowEnterKey) {
1104
+ // ENTER/SPACE clicked outside of a button.
1105
+ if (params.focusCancel) {
1106
+ fireClick(cancelButton, e);
1107
+ } else {
1108
+ fireClick(confirmButton, e);
1109
+ }
1110
+ e.stopPropagation();
1111
+ e.preventDefault();
1112
+ }
1113
+
1114
+ // ESC
1115
+ } else if (keyCode === 27 && params.allowEscapeKey === true) {
1116
+ sweetAlert.closeModal(params.onClose);
1117
+ if (params.useRejections) {
1118
+ reject('esc');
1119
+ } else {
1120
+ resolve({ dismiss: 'esc' });
1121
+ }
1122
+ }
1123
+ };
1124
+
1125
+ if (!window.onkeydown || window.onkeydown.toString() !== handleKeyDown.toString()) {
1126
+ states.previousWindowKeyDown = window.onkeydown;
1127
+ window.onkeydown = handleKeyDown;
1128
+ }
1129
+
1130
+ // Loading state
1131
+ if (params.buttonsStyling) {
1132
+ confirmButton.style.borderLeftColor = params.confirmButtonColor;
1133
+ confirmButton.style.borderRightColor = params.confirmButtonColor;
1134
+ }
1135
+
1136
+ /**
1137
+ * Show spinner instead of Confirm button and disable Cancel button
1138
+ */
1139
+ sweetAlert.hideLoading = sweetAlert.disableLoading = function () {
1140
+ if (!params.showConfirmButton) {
1141
+ hide(confirmButton);
1142
+ if (!params.showCancelButton) {
1143
+ hide(getButtonsWrapper());
1144
+ }
1145
+ }
1146
+ removeClass(buttonsWrapper, swalClasses.loading);
1147
+ removeClass(modal, swalClasses.loading);
1148
+ confirmButton.disabled = false;
1149
+ cancelButton.disabled = false;
1150
+ };
1151
+
1152
+ sweetAlert.getTitle = function () {
1153
+ return getTitle();
1154
+ };
1155
+ sweetAlert.getContent = function () {
1156
+ return getContent();
1157
+ };
1158
+ sweetAlert.getInput = function () {
1159
+ return getInput();
1160
+ };
1161
+ sweetAlert.getImage = function () {
1162
+ return getImage();
1163
+ };
1164
+ sweetAlert.getButtonsWrapper = function () {
1165
+ return getButtonsWrapper();
1166
+ };
1167
+ sweetAlert.getConfirmButton = function () {
1168
+ return getConfirmButton();
1169
+ };
1170
+ sweetAlert.getCancelButton = function () {
1171
+ return getCancelButton();
1172
+ };
1173
+
1174
+ sweetAlert.enableButtons = function () {
1175
+ confirmButton.disabled = false;
1176
+ cancelButton.disabled = false;
1177
+ };
1178
+
1179
+ sweetAlert.disableButtons = function () {
1180
+ confirmButton.disabled = true;
1181
+ cancelButton.disabled = true;
1182
+ };
1183
+
1184
+ sweetAlert.enableConfirmButton = function () {
1185
+ confirmButton.disabled = false;
1186
+ };
1187
+
1188
+ sweetAlert.disableConfirmButton = function () {
1189
+ confirmButton.disabled = true;
1190
+ };
1191
+
1192
+ sweetAlert.enableInput = function () {
1193
+ var input = getInput();
1194
+ if (!input) {
1195
+ return false;
1196
+ }
1197
+ if (input.type === 'radio') {
1198
+ var radiosContainer = input.parentNode.parentNode;
1199
+ var radios = radiosContainer.querySelectorAll('input');
1200
+ for (var _i5 = 0; _i5 < radios.length; _i5++) {
1201
+ radios[_i5].disabled = false;
1202
+ }
1203
+ } else {
1204
+ input.disabled = false;
1205
+ }
1206
+ };
1207
+
1208
+ sweetAlert.disableInput = function () {
1209
+ var input = getInput();
1210
+ if (!input) {
1211
+ return false;
1212
+ }
1213
+ if (input && input.type === 'radio') {
1214
+ var radiosContainer = input.parentNode.parentNode;
1215
+ var radios = radiosContainer.querySelectorAll('input');
1216
+ for (var _i6 = 0; _i6 < radios.length; _i6++) {
1217
+ radios[_i6].disabled = true;
1218
+ }
1219
+ } else {
1220
+ input.disabled = true;
1221
+ }
1222
+ };
1223
+
1224
+ // Set modal min-height to disable scrolling inside the modal
1225
+ sweetAlert.recalculateHeight = debounce(function () {
1226
+ var modal = getModal();
1227
+ if (!modal) {
1228
+ return;
1229
+ }
1230
+ var prevState = modal.style.display;
1231
+ modal.style.minHeight = '';
1232
+ show(modal);
1233
+ modal.style.minHeight = modal.scrollHeight + 1 + 'px';
1234
+ modal.style.display = prevState;
1235
+ }, 50);
1236
+
1237
+ // Show block with validation error
1238
+ sweetAlert.showValidationError = function (error) {
1239
+ var validationError = getValidationError();
1240
+ validationError.innerHTML = error;
1241
+ show(validationError);
1242
+
1243
+ var input = getInput();
1244
+ if (input) {
1245
+ focusInput(input);
1246
+ addClass(input, swalClasses.inputerror);
1247
+ }
1248
+ };
1249
+
1250
+ // Hide block with validation error
1251
+ sweetAlert.resetValidationError = function () {
1252
+ var validationError = getValidationError();
1253
+ hide(validationError);
1254
+ sweetAlert.recalculateHeight();
1255
+
1256
+ var input = getInput();
1257
+ if (input) {
1258
+ removeClass(input, swalClasses.inputerror);
1259
+ }
1260
+ };
1261
+
1262
+ sweetAlert.getProgressSteps = function () {
1263
+ return params.progressSteps;
1264
+ };
1265
+
1266
+ sweetAlert.setProgressSteps = function (progressSteps) {
1267
+ params.progressSteps = progressSteps;
1268
+ setParameters(params);
1269
+ };
1270
+
1271
+ sweetAlert.showProgressSteps = function () {
1272
+ show(getProgressSteps());
1273
+ };
1274
+
1275
+ sweetAlert.hideProgressSteps = function () {
1276
+ hide(getProgressSteps());
1277
+ };
1278
+
1279
+ sweetAlert.enableButtons();
1280
+ sweetAlert.hideLoading();
1281
+ sweetAlert.resetValidationError();
1282
+
1283
+ // inputs
1284
+ var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];
1285
+ var input = void 0;
1286
+ for (var _i7 = 0; _i7 < inputTypes.length; _i7++) {
1287
+ var inputClass = swalClasses[inputTypes[_i7]];
1288
+ var inputContainer = getChildByClass(modal, inputClass);
1289
+ input = getInput(inputTypes[_i7]);
1290
+
1291
+ // set attributes
1292
+ if (input) {
1293
+ for (var j in input.attributes) {
1294
+ if (input.attributes.hasOwnProperty(j)) {
1295
+ var attrName = input.attributes[j].name;
1296
+ if (attrName !== 'type' && attrName !== 'value') {
1297
+ input.removeAttribute(attrName);
1298
+ }
1299
+ }
1300
+ }
1301
+ for (var attr in params.inputAttributes) {
1302
+ input.setAttribute(attr, params.inputAttributes[attr]);
1303
+ }
1304
+ }
1305
+
1306
+ // set class
1307
+ inputContainer.className = inputClass;
1308
+ if (params.inputClass) {
1309
+ addClass(inputContainer, params.inputClass);
1310
+ }
1311
+
1312
+ hide(inputContainer);
1313
+ }
1314
+
1315
+ var populateInputOptions = void 0;
1316
+ switch (params.input) {
1317
+ case 'text':
1318
+ case 'email':
1319
+ case 'password':
1320
+ case 'number':
1321
+ case 'tel':
1322
+ case 'url':
1323
+ input = getChildByClass(modal, swalClasses.input);
1324
+ input.value = params.inputValue;
1325
+ input.placeholder = params.inputPlaceholder;
1326
+ input.type = params.input;
1327
+ show(input);
1328
+ break;
1329
+ case 'file':
1330
+ input = getChildByClass(modal, swalClasses.file);
1331
+ input.placeholder = params.inputPlaceholder;
1332
+ input.type = params.input;
1333
+ show(input);
1334
+ break;
1335
+ case 'range':
1336
+ var range = getChildByClass(modal, swalClasses.range);
1337
+ var rangeInput = range.querySelector('input');
1338
+ var rangeOutput = range.querySelector('output');
1339
+ rangeInput.value = params.inputValue;
1340
+ rangeInput.type = params.input;
1341
+ rangeOutput.value = params.inputValue;
1342
+ show(range);
1343
+ break;
1344
+ case 'select':
1345
+ var select = getChildByClass(modal, swalClasses.select);
1346
+ select.innerHTML = '';
1347
+ if (params.inputPlaceholder) {
1348
+ var placeholder = document.createElement('option');
1349
+ placeholder.innerHTML = params.inputPlaceholder;
1350
+ placeholder.value = '';
1351
+ placeholder.disabled = true;
1352
+ placeholder.selected = true;
1353
+ select.appendChild(placeholder);
1354
+ }
1355
+ populateInputOptions = function populateInputOptions(inputOptions) {
1356
+ for (var optionValue in inputOptions) {
1357
+ var option = document.createElement('option');
1358
+ option.value = optionValue;
1359
+ option.innerHTML = inputOptions[optionValue];
1360
+ if (params.inputValue === optionValue) {
1361
+ option.selected = true;
1362
+ }
1363
+ select.appendChild(option);
1364
+ }
1365
+ show(select);
1366
+ select.focus();
1367
+ };
1368
+ break;
1369
+ case 'radio':
1370
+ var radio = getChildByClass(modal, swalClasses.radio);
1371
+ radio.innerHTML = '';
1372
+ populateInputOptions = function populateInputOptions(inputOptions) {
1373
+ for (var radioValue in inputOptions) {
1374
+ var radioInput = document.createElement('input');
1375
+ var radioLabel = document.createElement('label');
1376
+ var radioLabelSpan = document.createElement('span');
1377
+ radioInput.type = 'radio';
1378
+ radioInput.name = swalClasses.radio;
1379
+ radioInput.value = radioValue;
1380
+ if (params.inputValue === radioValue) {
1381
+ radioInput.checked = true;
1382
+ }
1383
+ radioLabelSpan.innerHTML = inputOptions[radioValue];
1384
+ radioLabel.appendChild(radioInput);
1385
+ radioLabel.appendChild(radioLabelSpan);
1386
+ radioLabel.for = radioInput.id;
1387
+ radio.appendChild(radioLabel);
1388
+ }
1389
+ show(radio);
1390
+ var radios = radio.querySelectorAll('input');
1391
+ if (radios.length) {
1392
+ radios[0].focus();
1393
+ }
1394
+ };
1395
+ break;
1396
+ case 'checkbox':
1397
+ var checkbox = getChildByClass(modal, swalClasses.checkbox);
1398
+ var checkboxInput = getInput('checkbox');
1399
+ checkboxInput.type = 'checkbox';
1400
+ checkboxInput.value = 1;
1401
+ checkboxInput.id = swalClasses.checkbox;
1402
+ checkboxInput.checked = Boolean(params.inputValue);
1403
+ var label = checkbox.getElementsByTagName('span');
1404
+ if (label.length) {
1405
+ checkbox.removeChild(label[0]);
1406
+ }
1407
+ label = document.createElement('span');
1408
+ label.innerHTML = params.inputPlaceholder;
1409
+ checkbox.appendChild(label);
1410
+ show(checkbox);
1411
+ break;
1412
+ case 'textarea':
1413
+ var textarea = getChildByClass(modal, swalClasses.textarea);
1414
+ textarea.value = params.inputValue;
1415
+ textarea.placeholder = params.inputPlaceholder;
1416
+ show(textarea);
1417
+ break;
1418
+ case null:
1419
+ break;
1420
+ default:
1421
+ console.error('SweetAlert2: Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "' + params.input + '"');
1422
+ break;
1423
+ }
1424
+
1425
+ if (params.input === 'select' || params.input === 'radio') {
1426
+ if (params.inputOptions instanceof Promise) {
1427
+ sweetAlert.showLoading();
1428
+ params.inputOptions.then(function (inputOptions) {
1429
+ sweetAlert.hideLoading();
1430
+ populateInputOptions(inputOptions);
1431
+ });
1432
+ } else if (_typeof(params.inputOptions) === 'object') {
1433
+ populateInputOptions(params.inputOptions);
1434
+ } else {
1435
+ console.error('SweetAlert2: Unexpected type of inputOptions! Expected object or Promise, got ' + _typeof(params.inputOptions));
1436
+ }
1437
+ }
1438
+
1439
+ openModal(params.animation, params.onOpen);
1440
+
1441
+ // Focus the first element (input or button)
1442
+ if (params.allowEnterKey) {
1443
+ setFocus(-1, 1);
1444
+ } else {
1445
+ if (document.activeElement) {
1446
+ document.activeElement.blur();
1447
+ }
1448
+ }
1449
+
1450
+ // fix scroll
1451
+ getContainer().scrollTop = 0;
1452
+
1453
+ // Observe changes inside the modal and adjust height
1454
+ if (typeof MutationObserver !== 'undefined' && !swal2Observer) {
1455
+ swal2Observer = new MutationObserver(sweetAlert.recalculateHeight);
1456
+ swal2Observer.observe(modal, { childList: true, characterData: true, subtree: true });
1457
+ }
1458
+ });
1459
+ };
1460
+
1461
+ /*
1462
+ * Global function to determine if swal2 modal is shown
1463
+ */
1464
+ sweetAlert.isVisible = function () {
1465
+ return !!getModal();
1466
+ };
1467
+
1468
+ /*
1469
+ * Global function for chaining sweetAlert modals
1470
+ */
1471
+ sweetAlert.queue = function (steps) {
1472
+ queue = steps;
1473
+ var resetQueue = function resetQueue() {
1474
+ queue = [];
1475
+ document.body.removeAttribute('data-swal2-queue-step');
1476
+ };
1477
+ var queueResult = [];
1478
+ return new Promise(function (resolve, reject) {
1479
+ (function step(i, callback) {
1480
+ if (i < queue.length) {
1481
+ document.body.setAttribute('data-swal2-queue-step', i);
1482
+
1483
+ sweetAlert(queue[i]).then(function (result) {
1484
+ queueResult.push(result);
1485
+ step(i + 1, callback);
1486
+ }, function (dismiss) {
1487
+ resetQueue();
1488
+ reject(dismiss);
1489
+ });
1490
+ } else {
1491
+ resetQueue();
1492
+ resolve(queueResult);
1493
+ }
1494
+ })(0);
1495
+ });
1496
+ };
1497
+
1498
+ /*
1499
+ * Global function for getting the index of current modal in queue
1500
+ */
1501
+ sweetAlert.getQueueStep = function () {
1502
+ return document.body.getAttribute('data-swal2-queue-step');
1503
+ };
1504
+
1505
+ /*
1506
+ * Global function for inserting a modal to the queue
1507
+ */
1508
+ sweetAlert.insertQueueStep = function (step, index) {
1509
+ if (index && index < queue.length) {
1510
+ return queue.splice(index, 0, step);
1511
+ }
1512
+ return queue.push(step);
1513
+ };
1514
+
1515
+ /*
1516
+ * Global function for deleting a modal from the queue
1517
+ */
1518
+ sweetAlert.deleteQueueStep = function (index) {
1519
+ if (typeof queue[index] !== 'undefined') {
1520
+ queue.splice(index, 1);
1521
+ }
1522
+ };
1523
+
1524
+ /*
1525
+ * Global function to close sweetAlert
1526
+ */
1527
+ sweetAlert.close = sweetAlert.closeModal = function (onComplete) {
1528
+ var container = getContainer();
1529
+ var modal = getModal();
1530
+ if (!modal) {
1531
+ return;
1532
+ }
1533
+ removeClass(modal, swalClasses.show);
1534
+ addClass(modal, swalClasses.hide);
1535
+ clearTimeout(modal.timeout);
1536
+
1537
+ resetPrevState();
1538
+
1539
+ var removeModalAndResetState = function removeModalAndResetState() {
1540
+ if (container.parentNode) {
1541
+ container.parentNode.removeChild(container);
1542
+ }
1543
+ removeClass(document.documentElement, swalClasses.shown);
1544
+ removeClass(document.body, swalClasses.shown);
1545
+ undoScrollbar();
1546
+ undoIOSfix();
1547
+ };
1548
+
1549
+ // If animation is supported, animate
1550
+ if (animationEndEvent && !hasClass(modal, swalClasses.noanimation)) {
1551
+ modal.addEventListener(animationEndEvent, function swalCloseEventFinished() {
1552
+ modal.removeEventListener(animationEndEvent, swalCloseEventFinished);
1553
+ if (hasClass(modal, swalClasses.hide)) {
1554
+ removeModalAndResetState();
1555
+ }
1556
+ });
1557
+ } else {
1558
+ // Otherwise, remove immediately
1559
+ removeModalAndResetState();
1560
+ }
1561
+ if (onComplete !== null && typeof onComplete === 'function') {
1562
+ setTimeout(function () {
1563
+ onComplete(modal);
1564
+ });
1565
+ }
1566
+ };
1567
+
1568
+ /*
1569
+ * Global function to click 'Confirm' button
1570
+ */
1571
+ sweetAlert.clickConfirm = function () {
1572
+ return getConfirmButton().click();
1573
+ };
1574
+
1575
+ /*
1576
+ * Global function to click 'Cancel' button
1577
+ */
1578
+ sweetAlert.clickCancel = function () {
1579
+ return getCancelButton().click();
1580
+ };
1581
+
1582
+ /**
1583
+ * Show spinner instead of Confirm button and disable Cancel button
1584
+ */
1585
+ sweetAlert.showLoading = sweetAlert.enableLoading = function () {
1586
+ var modal = getModal();
1587
+ if (!modal) {
1588
+ sweetAlert('');
1589
+ }
1590
+ var buttonsWrapper = getButtonsWrapper();
1591
+ var confirmButton = getConfirmButton();
1592
+ var cancelButton = getCancelButton();
1593
+
1594
+ show(buttonsWrapper);
1595
+ show(confirmButton, 'inline-block');
1596
+ addClass(buttonsWrapper, swalClasses.loading);
1597
+ addClass(modal, swalClasses.loading);
1598
+ confirmButton.disabled = true;
1599
+ cancelButton.disabled = true;
1600
+ };
1601
+
1602
+ /**
1603
+ * Set default params for each popup
1604
+ * @param {Object} userParams
1605
+ */
1606
+ sweetAlert.setDefaults = function (userParams) {
1607
+ if (!userParams || (typeof userParams === 'undefined' ? 'undefined' : _typeof(userParams)) !== 'object') {
1608
+ return console.error('SweetAlert2: the argument for setDefaults() is required and has to be a object');
1609
+ }
1610
+
1611
+ for (var param in userParams) {
1612
+ if (!defaultParams.hasOwnProperty(param) && param !== 'extraParams') {
1613
+ console.warn('SweetAlert2: Unknown parameter "' + param + '"');
1614
+ delete userParams[param];
1615
+ }
1616
+ }
1617
+
1618
+ _extends(modalParams, userParams);
1619
+ };
1620
+
1621
+ /**
1622
+ * Reset default params for each popup
1623
+ */
1624
+ sweetAlert.resetDefaults = function () {
1625
+ modalParams = _extends({}, defaultParams);
1626
+ };
1627
+
1628
+ sweetAlert.noop = function () {};
1629
+
1630
+ sweetAlert.version = '6.6.4';
1631
+
1632
+ sweetAlert.default = sweetAlert;
1633
+
1634
+ module.exports = sweetAlert;
1635
+ if (window.Sweetalert2) window.sweetAlert = window.swal = window.Sweetalert2;
assets/vendor/sweetalert2/dist/sweetalert2.css ADDED
@@ -0,0 +1,716 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body.swal2-shown {
2
+ overflow-y: hidden; }
3
+
4
+ body.swal2-iosfix {
5
+ position: fixed;
6
+ left: 0;
7
+ right: 0; }
8
+
9
+ .swal2-container {
10
+ display: -webkit-box;
11
+ display: -ms-flexbox;
12
+ display: flex;
13
+ -webkit-box-align: center;
14
+ -ms-flex-align: center;
15
+ align-items: center;
16
+ position: fixed;
17
+ top: 0;
18
+ left: 0;
19
+ bottom: 0;
20
+ right: 0;
21
+ padding: 10px;
22
+ background-color: transparent;
23
+ z-index: 1060; }
24
+ .swal2-container.swal2-fade {
25
+ -webkit-transition: background-color .1s;
26
+ transition: background-color .1s; }
27
+ .swal2-container.swal2-shown {
28
+ background-color: rgba(0, 0, 0, 0.4); }
29
+
30
+ .swal2-modal {
31
+ background-color: #fff;
32
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
33
+ border-radius: 5px;
34
+ -webkit-box-sizing: border-box;
35
+ box-sizing: border-box;
36
+ text-align: center;
37
+ margin: auto;
38
+ overflow-x: hidden;
39
+ overflow-y: auto;
40
+ display: none;
41
+ position: relative;
42
+ max-width: 100%; }
43
+ .swal2-modal:focus {
44
+ outline: none; }
45
+ .swal2-modal.swal2-loading {
46
+ overflow-y: hidden; }
47
+ .swal2-modal .swal2-title {
48
+ color: #595959;
49
+ font-size: 30px;
50
+ text-align: center;
51
+ font-weight: 600;
52
+ text-transform: none;
53
+ position: relative;
54
+ margin: 0 0 .4em;
55
+ padding: 0;
56
+ display: block;
57
+ word-wrap: break-word; }
58
+ .swal2-modal .swal2-buttonswrapper {
59
+ margin-top: 15px; }
60
+ .swal2-modal .swal2-buttonswrapper:not(.swal2-loading) .swal2-styled[disabled] {
61
+ opacity: .4;
62
+ cursor: no-drop; }
63
+ .swal2-modal .swal2-buttonswrapper.swal2-loading .swal2-styled.swal2-confirm {
64
+ -webkit-box-sizing: border-box;
65
+ box-sizing: border-box;
66
+ border: 4px solid transparent;
67
+ border-color: transparent;
68
+ width: 40px;
69
+ height: 40px;
70
+ padding: 0;
71
+ margin: 7.5px;
72
+ vertical-align: top;
73
+ background-color: transparent !important;
74
+ color: transparent;
75
+ cursor: default;
76
+ border-radius: 100%;
77
+ -webkit-animation: rotate-loading 1.5s linear 0s infinite normal;
78
+ animation: rotate-loading 1.5s linear 0s infinite normal;
79
+ -webkit-user-select: none;
80
+ -moz-user-select: none;
81
+ -ms-user-select: none;
82
+ user-select: none; }
83
+ .swal2-modal .swal2-buttonswrapper.swal2-loading .swal2-styled.swal2-cancel {
84
+ margin-left: 30px;
85
+ margin-right: 30px; }
86
+ .swal2-modal .swal2-buttonswrapper.swal2-loading :not(.swal2-styled).swal2-confirm::after {
87
+ display: inline-block;
88
+ content: '';
89
+ margin-left: 5px 0 15px;
90
+ vertical-align: -1px;
91
+ height: 15px;
92
+ width: 15px;
93
+ border: 3px solid #999999;
94
+ -webkit-box-shadow: 1px 1px 1px #fff;
95
+ box-shadow: 1px 1px 1px #fff;
96
+ border-right-color: transparent;
97
+ border-radius: 50%;
98
+ -webkit-animation: rotate-loading 1.5s linear 0s infinite normal;
99
+ animation: rotate-loading 1.5s linear 0s infinite normal; }
100
+ .swal2-modal .swal2-styled {
101
+ border: 0;
102
+ border-radius: 3px;
103
+ -webkit-box-shadow: none;
104
+ box-shadow: none;
105
+ color: #fff;
106
+ cursor: pointer;
107
+ font-size: 17px;
108
+ font-weight: 500;
109
+ margin: 15px 5px 0;
110
+ padding: 10px 32px; }
111
+ .swal2-modal .swal2-image {
112
+ margin: 20px auto;
113
+ max-width: 100%; }
114
+ .swal2-modal .swal2-close {
115
+ background: transparent;
116
+ border: 0;
117
+ margin: 0;
118
+ padding: 0;
119
+ width: 38px;
120
+ height: 40px;
121
+ font-size: 36px;
122
+ line-height: 40px;
123
+ font-family: serif;
124
+ position: absolute;
125
+ top: 5px;
126
+ right: 8px;
127
+ cursor: pointer;
128
+ color: #cccccc;
129
+ -webkit-transition: color .1s ease;
130
+ transition: color .1s ease; }
131
+ .swal2-modal .swal2-close:hover {
132
+ color: #d55; }
133
+ .swal2-modal > .swal2-input,
134
+ .swal2-modal > .swal2-file,
135
+ .swal2-modal > .swal2-textarea,
136
+ .swal2-modal > .swal2-select,
137
+ .swal2-modal > .swal2-radio,
138
+ .swal2-modal > .swal2-checkbox {
139
+ display: none; }
140
+ .swal2-modal .swal2-content {
141
+ font-size: 18px;
142
+ text-align: center;
143
+ font-weight: 300;
144
+ position: relative;
145
+ float: none;
146
+ margin: 0;
147
+ padding: 0;
148
+ line-height: normal;
149
+ color: #545454;
150
+ word-wrap: break-word; }
151
+ .swal2-modal .swal2-input,
152
+ .swal2-modal .swal2-file,
153
+ .swal2-modal .swal2-textarea,
154
+ .swal2-modal .swal2-select,
155
+ .swal2-modal .swal2-radio,
156
+ .swal2-modal .swal2-checkbox {
157
+ margin: 20px auto; }
158
+ .swal2-modal .swal2-input,
159
+ .swal2-modal .swal2-file,
160
+ .swal2-modal .swal2-textarea {
161
+ width: 100%;
162
+ -webkit-box-sizing: border-box;
163
+ box-sizing: border-box;
164
+ font-size: 18px;
165
+ border-radius: 3px;
166
+ border: 1px solid #d9d9d9;
167
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);
168
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);
169
+ -webkit-transition: border-color box-shadow .3s;
170
+ transition: border-color box-shadow .3s; }
171
+ .swal2-modal .swal2-input.swal2-inputerror,
172
+ .swal2-modal .swal2-file.swal2-inputerror,
173
+ .swal2-modal .swal2-textarea.swal2-inputerror {
174
+ border-color: #f27474 !important;
175
+ -webkit-box-shadow: 0 0 2px #f27474 !important;
176
+ box-shadow: 0 0 2px #f27474 !important; }
177
+ .swal2-modal .swal2-input:focus,
178
+ .swal2-modal .swal2-file:focus,
179
+ .swal2-modal .swal2-textarea:focus {
180
+ outline: none;
181
+ border: 1px solid #b4dbed;
182
+ -webkit-box-shadow: 0 0 3px #c4e6f5;
183
+ box-shadow: 0 0 3px #c4e6f5; }
184
+ .swal2-modal .swal2-input:focus::-webkit-input-placeholder,
185
+ .swal2-modal .swal2-file:focus::-webkit-input-placeholder,
186
+ .swal2-modal .swal2-textarea:focus::-webkit-input-placeholder {
187
+ -webkit-transition: opacity .3s .03s ease;
188
+ transition: opacity .3s .03s ease;
189
+ opacity: .8; }
190
+ .swal2-modal .swal2-input:focus:-ms-input-placeholder,
191
+ .swal2-modal .swal2-file:focus:-ms-input-placeholder,
192
+ .swal2-modal .swal2-textarea:focus:-ms-input-placeholder {
193
+ -webkit-transition: opacity .3s .03s ease;
194
+ transition: opacity .3s .03s ease;
195
+ opacity: .8; }
196
+ .swal2-modal .swal2-input:focus::placeholder,
197
+ .swal2-modal .swal2-file:focus::placeholder,
198
+ .swal2-modal .swal2-textarea:focus::placeholder {
199
+ -webkit-transition: opacity .3s .03s ease;
200
+ transition: opacity .3s .03s ease;
201
+ opacity: .8; }
202
+ .swal2-modal .swal2-input::-webkit-input-placeholder,
203
+ .swal2-modal .swal2-file::-webkit-input-placeholder,
204
+ .swal2-modal .swal2-textarea::-webkit-input-placeholder {
205
+ color: #e6e6e6; }
206
+ .swal2-modal .swal2-input:-ms-input-placeholder,
207
+ .swal2-modal .swal2-file:-ms-input-placeholder,
208
+ .swal2-modal .swal2-textarea:-ms-input-placeholder {
209
+ color: #e6e6e6; }
210
+ .swal2-modal .swal2-input::placeholder,
211
+ .swal2-modal .swal2-file::placeholder,
212
+ .swal2-modal .swal2-textarea::placeholder {
213
+ color: #e6e6e6; }
214
+ .swal2-modal .swal2-range input {
215
+ float: left;
216
+ width: 80%; }
217
+ .swal2-modal .swal2-range output {
218
+ float: right;
219
+ width: 20%;
220
+ font-size: 20px;
221
+ font-weight: 600;
222
+ text-align: center; }
223
+ .swal2-modal .swal2-range input,
224
+ .swal2-modal .swal2-range output {
225
+ height: 43px;
226
+ line-height: 43px;
227
+ vertical-align: middle;
228
+ margin: 20px auto;
229
+ padding: 0; }
230
+ .swal2-modal .swal2-input {
231
+ height: 43px;
232
+ padding: 0 12px; }
233
+ .swal2-modal .swal2-input[type='number'] {
234
+ max-width: 150px; }
235
+ .swal2-modal .swal2-file {
236
+ font-size: 20px; }
237
+ .swal2-modal .swal2-textarea {
238
+ height: 108px;
239
+ padding: 12px; }
240
+ .swal2-modal .swal2-select {
241
+ color: #545454;
242
+ font-size: inherit;
243
+ padding: 5px 10px;
244
+ min-width: 40%;
245
+ max-width: 100%; }
246
+ .swal2-modal .swal2-radio {
247
+ border: 0; }
248
+ .swal2-modal .swal2-radio label:not(:first-child) {
249
+ margin-left: 20px; }
250
+ .swal2-modal .swal2-radio input,
251
+ .swal2-modal .swal2-radio span {
252
+ vertical-align: middle; }
253
+ .swal2-modal .swal2-radio input {
254
+ margin: 0 3px 0 0; }
255
+ .swal2-modal .swal2-checkbox {
256
+ color: #545454; }
257
+ .swal2-modal .swal2-checkbox input,
258
+ .swal2-modal .swal2-checkbox span {
259
+ vertical-align: middle; }
260
+ .swal2-modal .swal2-validationerror {
261
+ background-color: #f0f0f0;
262
+ margin: 0 -20px;
263
+ overflow: hidden;
264
+ padding: 10px;
265
+ color: gray;
266
+ font-size: 16px;
267
+ font-weight: 300;
268
+ display: none; }
269
+ .swal2-modal .swal2-validationerror::before {
270
+ content: '!';
271
+ display: inline-block;
272
+ width: 24px;
273
+ height: 24px;
274
+ border-radius: 50%;
275
+ background-color: #ea7d7d;
276
+ color: #fff;
277
+ line-height: 24px;
278
+ text-align: center;
279
+ margin-right: 10px; }
280
+
281
+ @supports (-ms-accelerator: true) {
282
+ .swal2-range input {
283
+ width: 100% !important; }
284
+ .swal2-range output {
285
+ display: none; } }
286
+
287
+ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
288
+ .swal2-range input {
289
+ width: 100% !important; }
290
+ .swal2-range output {
291
+ display: none; } }
292
+
293
+ .swal2-icon {
294
+ width: 80px;
295
+ height: 80px;
296
+ border: 4px solid transparent;
297
+ border-radius: 50%;
298
+ margin: 20px auto 30px;
299
+ padding: 0;
300
+ position: relative;
301
+ -webkit-box-sizing: content-box;
302
+ box-sizing: content-box;
303
+ cursor: default;
304
+ -webkit-user-select: none;
305
+ -moz-user-select: none;
306
+ -ms-user-select: none;
307
+ user-select: none; }
308
+ .swal2-icon.swal2-error {
309
+ border-color: #f27474; }
310
+ .swal2-icon.swal2-error .swal2-x-mark {
311
+ position: relative;
312
+ display: block; }
313
+ .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
314
+ position: absolute;
315
+ height: 5px;
316
+ width: 47px;
317
+ background-color: #f27474;
318
+ display: block;
319
+ top: 37px;
320
+ border-radius: 2px; }
321
+ .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left'] {
322
+ -webkit-transform: rotate(45deg);
323
+ transform: rotate(45deg);
324
+ left: 17px; }
325
+ .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right'] {
326
+ -webkit-transform: rotate(-45deg);
327
+ transform: rotate(-45deg);
328
+ right: 16px; }
329
+ .swal2-icon.swal2-warning {
330
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
331
+ color: #f8bb86;
332
+ border-color: #facea8;
333
+ font-size: 60px;
334
+ line-height: 80px;
335
+ text-align: center; }
336
+ .swal2-icon.swal2-info {
337
+ font-family: 'Open Sans', sans-serif;
338
+ color: #3fc3ee;
339
+ border-color: #9de0f6;
340
+ font-size: 60px;
341
+ line-height: 80px;
342
+ text-align: center; }
343
+ .swal2-icon.swal2-question {
344
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
345
+ color: #87adbd;
346
+ border-color: #c9dae1;
347
+ font-size: 60px;
348
+ line-height: 80px;
349
+ text-align: center; }
350
+ .swal2-icon.swal2-success {
351
+ border-color: #a5dc86; }
352
+ .swal2-icon.swal2-success [class^='swal2-success-circular-line'] {
353
+ border-radius: 50%;
354
+ position: absolute;
355
+ width: 60px;
356
+ height: 120px;
357
+ -webkit-transform: rotate(45deg);
358
+ transform: rotate(45deg); }
359
+ .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='left'] {
360
+ border-radius: 120px 0 0 120px;
361
+ top: -7px;
362
+ left: -33px;
363
+ -webkit-transform: rotate(-45deg);
364
+ transform: rotate(-45deg);
365
+ -webkit-transform-origin: 60px 60px;
366
+ transform-origin: 60px 60px; }
367
+ .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='right'] {
368
+ border-radius: 0 120px 120px 0;
369
+ top: -11px;
370
+ left: 30px;
371
+ -webkit-transform: rotate(-45deg);
372
+ transform: rotate(-45deg);
373
+ -webkit-transform-origin: 0 60px;
374
+ transform-origin: 0 60px; }
375
+ .swal2-icon.swal2-success .swal2-success-ring {
376
+ width: 80px;
377
+ height: 80px;
378
+ border: 4px solid rgba(165, 220, 134, 0.2);
379
+ border-radius: 50%;
380
+ -webkit-box-sizing: content-box;
381
+ box-sizing: content-box;
382
+ position: absolute;
383
+ left: -4px;
384
+ top: -4px;
385
+ z-index: 2; }
386
+ .swal2-icon.swal2-success .swal2-success-fix {
387
+ width: 7px;
388
+ height: 90px;
389
+ position: absolute;
390
+ left: 28px;
391
+ top: 8px;
392
+ z-index: 1;
393
+ -webkit-transform: rotate(-45deg);
394
+ transform: rotate(-45deg); }
395
+ .swal2-icon.swal2-success [class^='swal2-success-line'] {
396
+ height: 5px;
397
+ background-color: #a5dc86;
398
+ display: block;
399
+ border-radius: 2px;
400
+ position: absolute;
401
+ z-index: 2; }
402
+ .swal2-icon.swal2-success [class^='swal2-success-line'][class$='tip'] {
403
+ width: 25px;
404
+ left: 14px;
405
+ top: 46px;
406
+ -webkit-transform: rotate(45deg);
407
+ transform: rotate(45deg); }
408
+ .swal2-icon.swal2-success [class^='swal2-success-line'][class$='long'] {
409
+ width: 47px;
410
+ right: 8px;
411
+ top: 38px;
412
+ -webkit-transform: rotate(-45deg);
413
+ transform: rotate(-45deg); }
414
+
415
+ .swal2-progresssteps {
416
+ font-weight: 600;
417
+ margin: 0 0 20px;
418
+ padding: 0; }
419
+ .swal2-progresssteps li {
420
+ display: inline-block;
421
+ position: relative; }
422
+ .swal2-progresssteps .swal2-progresscircle {
423
+ background: #3085d6;
424
+ border-radius: 2em;
425
+ color: #fff;
426
+ height: 2em;
427
+ line-height: 2em;
428
+ text-align: center;
429
+ width: 2em;
430
+ z-index: 20; }
431
+ .swal2-progresssteps .swal2-progresscircle:first-child {
432
+ margin-left: 0; }
433
+ .swal2-progresssteps .swal2-progresscircle:last-child {
434
+ margin-right: 0; }
435
+ .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep {
436
+ background: #3085d6; }
437
+ .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progresscircle {
438
+ background: #add8e6; }
439
+ .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progressline {
440
+ background: #add8e6; }
441
+ .swal2-progresssteps .swal2-progressline {
442
+ background: #3085d6;
443
+ height: .4em;
444
+ margin: 0 -1px;
445
+ z-index: 10; }
446
+
447
+ [class^='swal2'] {
448
+ -webkit-tap-highlight-color: transparent; }
449
+
450
+ @-webkit-keyframes showSweetAlert {
451
+ 0% {
452
+ -webkit-transform: scale(0.7);
453
+ transform: scale(0.7); }
454
+ 45% {
455
+ -webkit-transform: scale(1.05);
456
+ transform: scale(1.05); }
457
+ 80% {
458
+ -webkit-transform: scale(0.95);
459
+ transform: scale(0.95); }
460
+ 100% {
461
+ -webkit-transform: scale(1);
462
+ transform: scale(1); } }
463
+
464
+ @keyframes showSweetAlert {
465
+ 0% {
466
+ -webkit-transform: scale(0.7);
467
+ transform: scale(0.7); }
468
+ 45% {
469
+ -webkit-transform: scale(1.05);
470
+ transform: scale(1.05); }
471
+ 80% {
472
+ -webkit-transform: scale(0.95);
473
+ transform: scale(0.95); }
474
+ 100% {
475
+ -webkit-transform: scale(1);
476
+ transform: scale(1); } }
477
+
478
+ @-webkit-keyframes hideSweetAlert {
479
+ 0% {
480
+ -webkit-transform: scale(1);
481
+ transform: scale(1);
482
+ opacity: 1; }
483
+ 100% {
484
+ -webkit-transform: scale(0.5);
485
+ transform: scale(0.5);
486
+ opacity: 0; } }
487
+
488
+ @keyframes hideSweetAlert {
489
+ 0% {
490
+ -webkit-transform: scale(1);
491
+ transform: scale(1);
492
+ opacity: 1; }
493
+ 100% {
494
+ -webkit-transform: scale(0.5);
495
+ transform: scale(0.5);
496
+ opacity: 0; } }
497
+
498
+ .swal2-show {
499
+ -webkit-animation: showSweetAlert 0.3s;
500
+ animation: showSweetAlert 0.3s; }
501
+ .swal2-show.swal2-noanimation {
502
+ -webkit-animation: none;
503
+ animation: none; }
504
+
505
+ .swal2-hide {
506
+ -webkit-animation: hideSweetAlert 0.15s forwards;
507
+ animation: hideSweetAlert 0.15s forwards; }
508
+ .swal2-hide.swal2-noanimation {
509
+ -webkit-animation: none;
510
+ animation: none; }
511
+
512
+ @-webkit-keyframes animate-success-tip {
513
+ 0% {
514
+ width: 0;
515
+ left: 1px;
516
+ top: 19px; }
517
+ 54% {
518
+ width: 0;
519
+ left: 1px;
520
+ top: 19px; }
521
+ 70% {
522
+ width: 50px;
523
+ left: -8px;
524
+ top: 37px; }
525
+ 84% {
526
+ width: 17px;
527
+ left: 21px;
528
+ top: 48px; }
529
+ 100% {
530
+ width: 25px;
531
+ left: 14px;
532
+ top: 45px; } }
533
+
534
+ @keyframes animate-success-tip {
535
+ 0% {
536
+ width: 0;
537
+ left: 1px;
538
+ top: 19px; }
539
+ 54% {
540
+ width: 0;
541
+ left: 1px;
542
+ top: 19px; }
543
+ 70% {
544
+ width: 50px;
545
+ left: -8px;
546
+ top: 37px; }
547
+ 84% {
548
+ width: 17px;
549
+ left: 21px;
550
+ top: 48px; }
551
+ 100% {
552
+ width: 25px;
553
+ left: 14px;
554
+ top: 45px; } }
555
+
556
+ @-webkit-keyframes animate-success-long {
557
+ 0% {
558
+ width: 0;
559
+ right: 46px;
560
+ top: 54px; }
561
+ 65% {
562
+ width: 0;
563
+ right: 46px;
564
+ top: 54px; }
565
+ 84% {
566
+ width: 55px;
567
+ right: 0;
568
+ top: 35px; }
569
+ 100% {
570
+ width: 47px;
571
+ right: 8px;
572
+ top: 38px; } }
573
+
574
+ @keyframes animate-success-long {
575
+ 0% {
576
+ width: 0;
577
+ right: 46px;
578
+ top: 54px; }
579
+ 65% {
580
+ width: 0;
581
+ right: 46px;
582
+ top: 54px; }
583
+ 84% {
584
+ width: 55px;
585
+ right: 0;
586
+ top: 35px; }
587
+ 100% {
588
+ width: 47px;
589
+ right: 8px;
590
+ top: 38px; } }
591
+
592
+ @-webkit-keyframes rotatePlaceholder {
593
+ 0% {
594
+ -webkit-transform: rotate(-45deg);
595
+ transform: rotate(-45deg); }
596
+ 5% {
597
+ -webkit-transform: rotate(-45deg);
598
+ transform: rotate(-45deg); }
599
+ 12% {
600
+ -webkit-transform: rotate(-405deg);
601
+ transform: rotate(-405deg); }
602
+ 100% {
603
+ -webkit-transform: rotate(-405deg);
604
+ transform: rotate(-405deg); } }
605
+
606
+ @keyframes rotatePlaceholder {
607
+ 0% {
608
+ -webkit-transform: rotate(-45deg);
609
+ transform: rotate(-45deg); }
610
+ 5% {
611
+ -webkit-transform: rotate(-45deg);
612
+ transform: rotate(-45deg); }
613
+ 12% {
614
+ -webkit-transform: rotate(-405deg);
615
+ transform: rotate(-405deg); }
616
+ 100% {
617
+ -webkit-transform: rotate(-405deg);
618
+ transform: rotate(-405deg); } }
619
+
620
+ .swal2-animate-success-line-tip {
621
+ -webkit-animation: animate-success-tip 0.75s;
622
+ animation: animate-success-tip 0.75s; }
623
+
624
+ .swal2-animate-success-line-long {
625
+ -webkit-animation: animate-success-long 0.75s;
626
+ animation: animate-success-long 0.75s; }
627
+
628
+ .swal2-success.swal2-animate-success-icon .swal2-success-circular-line-right {
629
+ -webkit-animation: rotatePlaceholder 4.25s ease-in;
630
+ animation: rotatePlaceholder 4.25s ease-in; }
631
+
632
+ @-webkit-keyframes animate-error-icon {
633
+ 0% {
634
+ -webkit-transform: rotateX(100deg);
635
+ transform: rotateX(100deg);
636
+ opacity: 0; }
637
+ 100% {
638
+ -webkit-transform: rotateX(0deg);
639
+ transform: rotateX(0deg);
640
+ opacity: 1; } }
641
+
642
+ @keyframes animate-error-icon {
643
+ 0% {
644
+ -webkit-transform: rotateX(100deg);
645
+ transform: rotateX(100deg);
646
+ opacity: 0; }
647
+ 100% {
648
+ -webkit-transform: rotateX(0deg);
649
+ transform: rotateX(0deg);
650
+ opacity: 1; } }
651
+
652
+ .swal2-animate-error-icon {
653
+ -webkit-animation: animate-error-icon 0.5s;
654
+ animation: animate-error-icon 0.5s; }
655
+
656
+ @-webkit-keyframes animate-x-mark {
657
+ 0% {
658
+ -webkit-transform: scale(0.4);
659
+ transform: scale(0.4);
660
+ margin-top: 26px;
661
+ opacity: 0; }
662
+ 50% {
663
+ -webkit-transform: scale(0.4);
664
+ transform: scale(0.4);
665
+ margin-top: 26px;
666
+ opacity: 0; }
667
+ 80% {
668
+ -webkit-transform: scale(1.15);
669
+ transform: scale(1.15);
670
+ margin-top: -6px; }
671
+ 100% {
672
+ -webkit-transform: scale(1);
673
+ transform: scale(1);
674
+ margin-top: 0;
675
+ opacity: 1; } }
676
+
677
+ @keyframes animate-x-mark {
678
+ 0% {
679
+ -webkit-transform: scale(0.4);
680
+ transform: scale(0.4);
681
+ margin-top: 26px;
682
+ opacity: 0; }
683
+ 50% {
684
+ -webkit-transform: scale(0.4);
685
+ transform: scale(0.4);
686
+ margin-top: 26px;
687
+ opacity: 0; }
688
+ 80% {
689
+ -webkit-transform: scale(1.15);
690
+ transform: scale(1.15);
691
+ margin-top: -6px; }
692
+ 100% {
693
+ -webkit-transform: scale(1);
694
+ transform: scale(1);
695
+ margin-top: 0;
696
+ opacity: 1; } }
697
+
698
+ .swal2-animate-x-mark {
699
+ -webkit-animation: animate-x-mark 0.5s;
700
+ animation: animate-x-mark 0.5s; }
701
+
702
+ @-webkit-keyframes rotate-loading {
703
+ 0% {
704
+ -webkit-transform: rotate(0deg);
705
+ transform: rotate(0deg); }
706
+ 100% {
707
+ -webkit-transform: rotate(360deg);
708
+ transform: rotate(360deg); } }
709
+
710
+ @keyframes rotate-loading {
711
+ 0% {
712
+ -webkit-transform: rotate(0deg);
713
+ transform: rotate(0deg); }
714
+ 100% {
715
+ -webkit-transform: rotate(360deg);
716
+ transform: rotate(360deg); } }
assets/vendor/sweetalert2/dist/sweetalert2.js ADDED
@@ -0,0 +1,1641 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * sweetalert2 v6.6.4
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
+ var defaultParams = {
12
+ title: '',
13
+ titleText: '',
14
+ text: '',
15
+ html: '',
16
+ type: null,
17
+ customClass: '',
18
+ target: 'body',
19
+ animation: true,
20
+ allowOutsideClick: true,
21
+ allowEscapeKey: true,
22
+ allowEnterKey: true,
23
+ showConfirmButton: true,
24
+ showCancelButton: false,
25
+ preConfirm: null,
26
+ confirmButtonText: 'OK',
27
+ confirmButtonColor: '#3085d6',
28
+ confirmButtonClass: null,
29
+ cancelButtonText: 'Cancel',
30
+ cancelButtonColor: '#aaa',
31
+ cancelButtonClass: null,
32
+ buttonsStyling: true,
33
+ reverseButtons: false,
34
+ focusCancel: false,
35
+ showCloseButton: false,
36
+ showLoaderOnConfirm: false,
37
+ imageUrl: null,
38
+ imageWidth: null,
39
+ imageHeight: null,
40
+ imageClass: null,
41
+ timer: null,
42
+ width: 500,
43
+ padding: 20,
44
+ background: '#fff',
45
+ input: null,
46
+ inputPlaceholder: '',
47
+ inputValue: '',
48
+ inputOptions: {},
49
+ inputAutoTrim: true,
50
+ inputClass: null,
51
+ inputAttributes: {},
52
+ inputValidator: null,
53
+ progressSteps: [],
54
+ currentProgressStep: null,
55
+ progressStepsDistance: '40px',
56
+ onOpen: null,
57
+ onClose: null,
58
+ useRejections: true
59
+ };
60
+
61
+ var swalPrefix = 'swal2-';
62
+
63
+ var prefix = function prefix(items) {
64
+ var result = {};
65
+ for (var i in items) {
66
+ result[items[i]] = swalPrefix + items[i];
67
+ }
68
+ return result;
69
+ };
70
+
71
+ var swalClasses = prefix(['container', 'shown', 'iosfix', 'modal', 'overlay', 'fade', 'show', 'hide', 'noanimation', 'close', 'title', 'content', 'buttonswrapper', 'confirm', 'cancel', 'icon', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea', 'inputerror', 'validationerror', 'progresssteps', 'activeprogressstep', 'progresscircle', 'progressline', 'loading', 'styled']);
72
+
73
+ var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);
74
+
75
+ /*
76
+ * Set hover, active and focus-states for buttons (source: http://www.sitepoint.com/javascript-generate-lighter-darker-color)
77
+ */
78
+ var colorLuminance = function colorLuminance(hex, lum) {
79
+ // Validate hex string
80
+ hex = String(hex).replace(/[^0-9a-f]/gi, '');
81
+ if (hex.length < 6) {
82
+ hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
83
+ }
84
+ lum = lum || 0;
85
+
86
+ // Convert to decimal and change luminosity
87
+ var rgb = '#';
88
+ for (var i = 0; i < 3; i++) {
89
+ var c = parseInt(hex.substr(i * 2, 2), 16);
90
+ c = Math.round(Math.min(Math.max(0, c + c * lum), 255)).toString(16);
91
+ rgb += ('00' + c).substr(c.length);
92
+ }
93
+
94
+ return rgb;
95
+ };
96
+
97
+ var uniqueArray = function uniqueArray(arr) {
98
+ var result = [];
99
+ for (var i in arr) {
100
+ if (result.indexOf(arr[i]) === -1) {
101
+ result.push(arr[i]);
102
+ }
103
+ }
104
+ return result;
105
+ };
106
+
107
+ /* global MouseEvent */
108
+
109
+ // Remember state in cases where opening and handling a modal will fiddle with it.
110
+ var states = {
111
+ previousWindowKeyDown: null,
112
+ previousActiveElement: null,
113
+ previousBodyPadding: null
114
+ };
115
+
116
+ /*
117
+ * Add modal + overlay to DOM
118
+ */
119
+ var init = function init(params) {
120
+ if (typeof document === 'undefined') {
121
+ console.error('SweetAlert2 requires document to initialize');
122
+ return;
123
+ }
124
+
125
+ var container = document.createElement('div');
126
+ container.className = swalClasses.container;
127
+ container.innerHTML = sweetHTML;
128
+
129
+ var targetElement = document.querySelector(params.target);
130
+ if (!targetElement) {
131
+ console.warn('SweetAlert2: Can\'t find the target "' + params.target + '"');
132
+ targetElement = document.body;
133
+ }
134
+ targetElement.appendChild(container);
135
+
136
+ var modal = getModal();
137
+ var input = getChildByClass(modal, swalClasses.input);
138
+ var file = getChildByClass(modal, swalClasses.file);
139
+ var range = modal.querySelector('.' + swalClasses.range + ' input');
140
+ var rangeOutput = modal.querySelector('.' + swalClasses.range + ' output');
141
+ var select = getChildByClass(modal, swalClasses.select);
142
+ var checkbox = modal.querySelector('.' + swalClasses.checkbox + ' input');
143
+ var textarea = getChildByClass(modal, swalClasses.textarea);
144
+
145
+ input.oninput = function () {
146
+ sweetAlert.resetValidationError();
147
+ };
148
+
149
+ input.onkeydown = function (event) {
150
+ setTimeout(function () {
151
+ if (event.keyCode === 13 && params.allowEnterKey) {
152
+ event.stopPropagation();
153
+ sweetAlert.clickConfirm();
154
+ }
155
+ }, 0);
156
+ };
157
+
158
+ file.onchange = function () {
159
+ sweetAlert.resetValidationError();
160
+ };
161
+
162
+ range.oninput = function () {
163
+ sweetAlert.resetValidationError();
164
+ rangeOutput.value = range.value;
165
+ };
166
+
167
+ range.onchange = function () {
168
+ sweetAlert.resetValidationError();
169
+ range.previousSibling.value = range.value;
170
+ };
171
+
172
+ select.onchange = function () {
173
+ sweetAlert.resetValidationError();
174
+ };
175
+
176
+ checkbox.onchange = function () {
177
+ sweetAlert.resetValidationError();
178
+ };
179
+
180
+ textarea.oninput = function () {
181
+ sweetAlert.resetValidationError();
182
+ };
183
+
184
+ return modal;
185
+ };
186
+
187
+ /*
188
+ * Manipulate DOM
189
+ */
190
+
191
+ var sweetHTML = ('\n <div role="dialog" aria-labelledby="' + swalClasses.title + '" aria-describedby="' + swalClasses.content + '" class="' + swalClasses.modal + '" tabindex="-1">\n <ul class="' + swalClasses.progresssteps + '"></ul>\n <div class="' + swalClasses.icon + ' ' + 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="' + swalClasses.icon + ' ' + iconTypes.question + '">?</div>\n <div class="' + swalClasses.icon + ' ' + iconTypes.warning + '">!</div>\n <div class="' + swalClasses.icon + ' ' + iconTypes.info + '">i</div>\n <div class="' + swalClasses.icon + ' ' + 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="' + swalClasses.image + '">\n <h2 class="' + swalClasses.title + '" id="' + swalClasses.title + '"></h2>\n <div id="' + swalClasses.content + '" class="' + swalClasses.content + '"></div>\n <input class="' + swalClasses.input + '">\n <input type="file" class="' + swalClasses.file + '">\n <div class="' + swalClasses.range + '">\n <output></output>\n <input type="range">\n </div>\n <select class="' + swalClasses.select + '"></select>\n <div class="' + swalClasses.radio + '"></div>\n <label for="' + swalClasses.checkbox + '" class="' + swalClasses.checkbox + '">\n <input type="checkbox">\n </label>\n <textarea class="' + swalClasses.textarea + '"></textarea>\n <div class="' + swalClasses.validationerror + '"></div>\n <div class="' + swalClasses.buttonswrapper + '">\n <button type="button" class="' + swalClasses.confirm + '">OK</button>\n <button type="button" class="' + swalClasses.cancel + '">Cancel</button>\n </div>\n <button type="button" class="' + swalClasses.close + '" aria-label="Close this dialog">&times;</button>\n </div>\n').replace(/(^|\n)\s*/g, '');
192
+
193
+ var getContainer = function getContainer() {
194
+ return document.body.querySelector('.' + swalClasses.container);
195
+ };
196
+
197
+ var getModal = function getModal() {
198
+ return getContainer() ? getContainer().querySelector('.' + swalClasses.modal) : null;
199
+ };
200
+
201
+ var getIcons = function getIcons() {
202
+ var modal = getModal();
203
+ return modal.querySelectorAll('.' + swalClasses.icon);
204
+ };
205
+
206
+ var elementByClass = function elementByClass(className) {
207
+ return getContainer() ? getContainer().querySelector('.' + className) : null;
208
+ };
209
+
210
+ var getTitle = function getTitle() {
211
+ return elementByClass(swalClasses.title);
212
+ };
213
+
214
+ var getContent = function getContent() {
215
+ return elementByClass(swalClasses.content);
216
+ };
217
+
218
+ var getImage = function getImage() {
219
+ return elementByClass(swalClasses.image);
220
+ };
221
+
222
+ var getButtonsWrapper = function getButtonsWrapper() {
223
+ return elementByClass(swalClasses.buttonswrapper);
224
+ };
225
+
226
+ var getProgressSteps = function getProgressSteps() {
227
+ return elementByClass(swalClasses.progresssteps);
228
+ };
229
+
230
+ var getValidationError = function getValidationError() {
231
+ return elementByClass(swalClasses.validationerror);
232
+ };
233
+
234
+ var getConfirmButton = function getConfirmButton() {
235
+ return elementByClass(swalClasses.confirm);
236
+ };
237
+
238
+ var getCancelButton = function getCancelButton() {
239
+ return elementByClass(swalClasses.cancel);
240
+ };
241
+
242
+ var getCloseButton = function getCloseButton() {
243
+ return elementByClass(swalClasses.close);
244
+ };
245
+
246
+ var getFocusableElements = function getFocusableElements(focusCancel) {
247
+ var buttons = [getConfirmButton(), getCancelButton()];
248
+ if (focusCancel) {
249
+ buttons.reverse();
250
+ }
251
+ var focusableElements = buttons.concat(Array.prototype.slice.call(getModal().querySelectorAll('button, input:not([type=hidden]), textarea, select, a, *[tabindex]:not([tabindex="-1"])')));
252
+ return uniqueArray(focusableElements);
253
+ };
254
+
255
+ var hasClass = function hasClass(elem, className) {
256
+ if (elem.classList) {
257
+ return elem.classList.contains(className);
258
+ }
259
+ return false;
260
+ };
261
+
262
+ var focusInput = function focusInput(input) {
263
+ input.focus();
264
+
265
+ // place cursor at end of text in text input
266
+ if (input.type !== 'file') {
267
+ // http://stackoverflow.com/a/2345915/1331425
268
+ var val = input.value;
269
+ input.value = '';
270
+ input.value = val;
271
+ }
272
+ };
273
+
274
+ var addClass = function addClass(elem, className) {
275
+ if (!elem || !className) {
276
+ return;
277
+ }
278
+ var classes = className.split(/\s+/).filter(Boolean);
279
+ classes.forEach(function (className) {
280
+ elem.classList.add(className);
281
+ });
282
+ };
283
+
284
+ var removeClass = function removeClass(elem, className) {
285
+ if (!elem || !className) {
286
+ return;
287
+ }
288
+ var classes = className.split(/\s+/).filter(Boolean);
289
+ classes.forEach(function (className) {
290
+ elem.classList.remove(className);
291
+ });
292
+ };
293
+
294
+ var getChildByClass = function getChildByClass(elem, className) {
295
+ for (var i = 0; i < elem.childNodes.length; i++) {
296
+ if (hasClass(elem.childNodes[i], className)) {
297
+ return elem.childNodes[i];
298
+ }
299
+ }
300
+ };
301
+
302
+ var show = function show(elem, display) {
303
+ if (!display) {
304
+ display = 'block';
305
+ }
306
+ elem.style.opacity = '';
307
+ elem.style.display = display;
308
+ };
309
+
310
+ var hide = function hide(elem) {
311
+ elem.style.opacity = '';
312
+ elem.style.display = 'none';
313
+ };
314
+
315
+ var empty = function empty(elem) {
316
+ while (elem.firstChild) {
317
+ elem.removeChild(elem.firstChild);
318
+ }
319
+ };
320
+
321
+ // borrowed from jqeury $(elem).is(':visible') implementation
322
+ var isVisible = function isVisible(elem) {
323
+ return elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length;
324
+ };
325
+
326
+ var removeStyleProperty = function removeStyleProperty(elem, property) {
327
+ if (elem.style.removeProperty) {
328
+ elem.style.removeProperty(property);
329
+ } else {
330
+ elem.style.removeAttribute(property);
331
+ }
332
+ };
333
+
334
+ var fireClick = function fireClick(node) {
335
+ if (!isVisible(node)) {
336
+ return false;
337
+ }
338
+
339
+ // Taken from http://www.nonobtrusive.com/2011/11/29/programatically-fire-crossbrowser-click-event-with-javascript/
340
+ // Then fixed for today's Chrome browser.
341
+ if (typeof MouseEvent === 'function') {
342
+ // Up-to-date approach
343
+ var mevt = new MouseEvent('click', {
344
+ view: window,
345
+ bubbles: false,
346
+ cancelable: true
347
+ });
348
+ node.dispatchEvent(mevt);
349
+ } else if (document.createEvent) {
350
+ // Fallback
351
+ var evt = document.createEvent('MouseEvents');
352
+ evt.initEvent('click', false, false);
353
+ node.dispatchEvent(evt);
354
+ } else if (document.createEventObject) {
355
+ node.fireEvent('onclick');
356
+ } else if (typeof node.onclick === 'function') {
357
+ node.onclick();
358
+ }
359
+ };
360
+
361
+ var animationEndEvent = function () {
362
+ var testEl = document.createElement('div');
363
+ var transEndEventNames = {
364
+ 'WebkitAnimation': 'webkitAnimationEnd',
365
+ 'OAnimation': 'oAnimationEnd oanimationend',
366
+ 'msAnimation': 'MSAnimationEnd',
367
+ 'animation': 'animationend'
368
+ };
369
+ for (var i in transEndEventNames) {
370
+ if (transEndEventNames.hasOwnProperty(i) && testEl.style[i] !== undefined) {
371
+ return transEndEventNames[i];
372
+ }
373
+ }
374
+
375
+ return false;
376
+ }();
377
+
378
+ // Reset previous window keydown handler and focued element
379
+ var resetPrevState = function resetPrevState() {
380
+ window.onkeydown = states.previousWindowKeyDown;
381
+ if (states.previousActiveElement && states.previousActiveElement.focus) {
382
+ var x = window.scrollX;
383
+ var y = window.scrollY;
384
+ states.previousActiveElement.focus();
385
+ if (x && y) {
386
+ // IE has no scrollX/scrollY support
387
+ window.scrollTo(x, y);
388
+ }
389
+ }
390
+ };
391
+
392
+ // Measure width of scrollbar
393
+ // https://github.com/twbs/bootstrap/blob/master/js/modal.js#L279-L286
394
+ var measureScrollbar = function measureScrollbar() {
395
+ var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;
396
+ if (supportsTouch) {
397
+ return 0;
398
+ }
399
+ var scrollDiv = document.createElement('div');
400
+ scrollDiv.style.width = '50px';
401
+ scrollDiv.style.height = '50px';
402
+ scrollDiv.style.overflow = 'scroll';
403
+ document.body.appendChild(scrollDiv);
404
+ var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
405
+ document.body.removeChild(scrollDiv);
406
+ return scrollbarWidth;
407
+ };
408
+
409
+ // JavaScript Debounce Function
410
+ // Simplivied version of https://davidwalsh.name/javascript-debounce-function
411
+ var debounce = function debounce(func, wait) {
412
+ var timeout = void 0;
413
+ return function () {
414
+ var later = function later() {
415
+ timeout = null;
416
+ func();
417
+ };
418
+ clearTimeout(timeout);
419
+ timeout = setTimeout(later, wait);
420
+ };
421
+ };
422
+
423
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
424
+ return typeof obj;
425
+ } : function (obj) {
426
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
427
+ };
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+ var _extends = Object.assign || function (target) {
450
+ for (var i = 1; i < arguments.length; i++) {
451
+ var source = arguments[i];
452
+
453
+ for (var key in source) {
454
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
455
+ target[key] = source[key];
456
+ }
457
+ }
458
+ }
459
+
460
+ return target;
461
+ };
462
+
463
+ var modalParams = _extends({}, defaultParams);
464
+ var queue = [];
465
+ var swal2Observer = void 0;
466
+
467
+ /*
468
+ * Set type, text and actions on modal
469
+ */
470
+ var setParameters = function setParameters(params) {
471
+ var modal = getModal() || init(params);
472
+
473
+ for (var param in params) {
474
+ if (!defaultParams.hasOwnProperty(param) && param !== 'extraParams') {
475
+ console.warn('SweetAlert2: Unknown parameter "' + param + '"');
476
+ }
477
+ }
478
+
479
+ // Set modal width
480
+ modal.style.width = typeof params.width === 'number' ? params.width + 'px' : params.width;
481
+
482
+ modal.style.padding = params.padding + 'px';
483
+ modal.style.background = params.background;
484
+ var successIconParts = modal.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');
485
+ for (var i = 0; i < successIconParts.length; i++) {
486
+ successIconParts[i].style.background = params.background;
487
+ }
488
+
489
+ var title = getTitle();
490
+ var content = getContent();
491
+ var buttonsWrapper = getButtonsWrapper();
492
+ var confirmButton = getConfirmButton();
493
+ var cancelButton = getCancelButton();
494
+ var closeButton = getCloseButton();
495
+
496
+ // Title
497
+ if (params.titleText) {
498
+ title.innerText = params.titleText;
499
+ } else {
500
+ title.innerHTML = params.title.split('\n').join('<br>');
501
+ }
502
+
503
+ // Content
504
+ if (params.text || params.html) {
505
+ if (_typeof(params.html) === 'object') {
506
+ content.innerHTML = '';
507
+ if (0 in params.html) {
508
+ for (var _i = 0; _i in params.html; _i++) {
509
+ content.appendChild(params.html[_i].cloneNode(true));
510
+ }
511
+ } else {
512
+ content.appendChild(params.html.cloneNode(true));
513
+ }
514
+ } else if (params.html) {
515
+ content.innerHTML = params.html;
516
+ } else if (params.text) {
517
+ content.textContent = params.text;
518
+ }
519
+ show(content);
520
+ } else {
521
+ hide(content);
522
+ }
523
+
524
+ // Close button
525
+ if (params.showCloseButton) {
526
+ show(closeButton);
527
+ } else {
528
+ hide(closeButton);
529
+ }
530
+
531
+ // Custom Class
532
+ modal.className = swalClasses.modal;
533
+ if (params.customClass) {
534
+ addClass(modal, params.customClass);
535
+ }
536
+
537
+ // Progress steps
538
+ var progressStepsContainer = getProgressSteps();
539
+ var currentProgressStep = parseInt(params.currentProgressStep === null ? sweetAlert.getQueueStep() : params.currentProgressStep, 10);
540
+ if (params.progressSteps.length) {
541
+ show(progressStepsContainer);
542
+ empty(progressStepsContainer);
543
+ if (currentProgressStep >= params.progressSteps.length) {
544
+ console.warn('SweetAlert2: Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');
545
+ }
546
+ params.progressSteps.forEach(function (step, index) {
547
+ var circle = document.createElement('li');
548
+ addClass(circle, swalClasses.progresscircle);
549
+ circle.innerHTML = step;
550
+ if (index === currentProgressStep) {
551
+ addClass(circle, swalClasses.activeprogressstep);
552
+ }
553
+ progressStepsContainer.appendChild(circle);
554
+ if (index !== params.progressSteps.length - 1) {
555
+ var line = document.createElement('li');
556
+ addClass(line, swalClasses.progressline);
557
+ line.style.width = params.progressStepsDistance;
558
+ progressStepsContainer.appendChild(line);
559
+ }
560
+ });
561
+ } else {
562
+ hide(progressStepsContainer);
563
+ }
564
+
565
+ // Icon
566
+ var icons = getIcons();
567
+ for (var _i2 = 0; _i2 < icons.length; _i2++) {
568
+ hide(icons[_i2]);
569
+ }
570
+ if (params.type) {
571
+ var validType = false;
572
+ for (var iconType in iconTypes) {
573
+ if (params.type === iconType) {
574
+ validType = true;
575
+ break;
576
+ }
577
+ }
578
+ if (!validType) {
579
+ console.error('SweetAlert2: Unknown alert type: ' + params.type);
580
+ return false;
581
+ }
582
+ var icon = modal.querySelector('.' + swalClasses.icon + '.' + iconTypes[params.type]);
583
+ show(icon);
584
+
585
+ // Animate icon
586
+ if (params.animation) {
587
+ switch (params.type) {
588
+ case 'success':
589
+ addClass(icon, 'swal2-animate-success-icon');
590
+ addClass(icon.querySelector('.swal2-success-line-tip'), 'swal2-animate-success-line-tip');
591
+ addClass(icon.querySelector('.swal2-success-line-long'), 'swal2-animate-success-line-long');
592
+ break;
593
+ case 'error':
594
+ addClass(icon, 'swal2-animate-error-icon');
595
+ addClass(icon.querySelector('.swal2-x-mark'), 'swal2-animate-x-mark');
596
+ break;
597
+ default:
598
+ break;
599
+ }
600
+ }
601
+ }
602
+
603
+ // Custom image
604
+ var image = getImage();
605
+ if (params.imageUrl) {
606
+ image.setAttribute('src', params.imageUrl);
607
+ show(image);
608
+
609
+ if (params.imageWidth) {
610
+ image.setAttribute('width', params.imageWidth);
611
+ } else {
612
+ image.removeAttribute('width');
613
+ }
614
+
615
+ if (params.imageHeight) {
616
+ image.setAttribute('height', params.imageHeight);
617
+ } else {
618
+ image.removeAttribute('height');
619
+ }
620
+
621
+ image.className = swalClasses.image;
622
+ if (params.imageClass) {
623
+ addClass(image, params.imageClass);
624
+ }
625
+ } else {
626
+ hide(image);
627
+ }
628
+
629
+ // Cancel button
630
+ if (params.showCancelButton) {
631
+ cancelButton.style.display = 'inline-block';
632
+ } else {
633
+ hide(cancelButton);
634
+ }
635
+
636
+ // Confirm button
637
+ if (params.showConfirmButton) {
638
+ removeStyleProperty(confirmButton, 'display');
639
+ } else {
640
+ hide(confirmButton);
641
+ }
642
+
643
+ // Buttons wrapper
644
+ if (!params.showConfirmButton && !params.showCancelButton) {
645
+ hide(buttonsWrapper);
646
+ } else {
647
+ show(buttonsWrapper);
648
+ }
649
+
650
+ // Edit text on cancel and confirm buttons
651
+ confirmButton.innerHTML = params.confirmButtonText;
652
+ cancelButton.innerHTML = params.cancelButtonText;
653
+
654
+ // Set buttons to selected background colors
655
+ if (params.buttonsStyling) {
656
+ confirmButton.style.backgroundColor = params.confirmButtonColor;
657
+ cancelButton.style.backgroundColor = params.cancelButtonColor;
658
+ }
659
+
660
+ // Add buttons custom classes
661
+ confirmButton.className = swalClasses.confirm;
662
+ addClass(confirmButton, params.confirmButtonClass);
663
+ cancelButton.className = swalClasses.cancel;
664
+ addClass(cancelButton, params.cancelButtonClass);
665
+
666
+ // Buttons styling
667
+ if (params.buttonsStyling) {
668
+ addClass(confirmButton, swalClasses.styled);
669
+ addClass(cancelButton, swalClasses.styled);
670
+ } else {
671
+ removeClass(confirmButton, swalClasses.styled);
672
+ removeClass(cancelButton, swalClasses.styled);
673
+
674
+ confirmButton.style.backgroundColor = confirmButton.style.borderLeftColor = confirmButton.style.borderRightColor = '';
675
+ cancelButton.style.backgroundColor = cancelButton.style.borderLeftColor = cancelButton.style.borderRightColor = '';
676
+ }
677
+
678
+ // CSS animation
679
+ if (params.animation === true) {
680
+ removeClass(modal, swalClasses.noanimation);
681
+ } else {
682
+ addClass(modal, swalClasses.noanimation);
683
+ }
684
+ };
685
+
686
+ /*
687
+ * Animations
688
+ */
689
+ var openModal = function openModal(animation, onComplete) {
690
+ var container = getContainer();
691
+ var modal = getModal();
692
+
693
+ if (animation) {
694
+ addClass(modal, swalClasses.show);
695
+ addClass(container, swalClasses.fade);
696
+ removeClass(modal, swalClasses.hide);
697
+ } else {
698
+ removeClass(modal, swalClasses.fade);
699
+ }
700
+ show(modal);
701
+
702
+ // scrolling is 'hidden' until animation is done, after that 'auto'
703
+ container.style.overflowY = 'hidden';
704
+ if (animationEndEvent && !hasClass(modal, swalClasses.noanimation)) {
705
+ modal.addEventListener(animationEndEvent, function swalCloseEventFinished() {
706
+ modal.removeEventListener(animationEndEvent, swalCloseEventFinished);
707
+ container.style.overflowY = 'auto';
708
+ });
709
+ } else {
710
+ container.style.overflowY = 'auto';
711
+ }
712
+
713
+ addClass(document.documentElement, swalClasses.shown);
714
+ addClass(document.body, swalClasses.shown);
715
+ addClass(container, swalClasses.shown);
716
+ fixScrollbar();
717
+ iOSfix();
718
+ states.previousActiveElement = document.activeElement;
719
+ if (onComplete !== null && typeof onComplete === 'function') {
720
+ setTimeout(function () {
721
+ onComplete(modal);
722
+ });
723
+ }
724
+ };
725
+
726
+ var fixScrollbar = function fixScrollbar() {
727
+ // for queues, do not do this more than once
728
+ if (states.previousBodyPadding !== null) {
729
+ return;
730
+ }
731
+ // if the body has overflow
732
+ if (document.body.scrollHeight > window.innerHeight) {
733
+ // add padding so the content doesn't shift after removal of scrollbar
734
+ states.previousBodyPadding = document.body.style.paddingRight;
735
+ document.body.style.paddingRight = measureScrollbar() + 'px';
736
+ }
737
+ };
738
+
739
+ var undoScrollbar = function undoScrollbar() {
740
+ if (states.previousBodyPadding !== null) {
741
+ document.body.style.paddingRight = states.previousBodyPadding;
742
+ states.previousBodyPadding = null;
743
+ }
744
+ };
745
+
746
+ // Fix iOS scrolling http://stackoverflow.com/q/39626302/1331425
747
+ var iOSfix = function iOSfix() {
748
+ var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
749
+ if (iOS && !hasClass(document.body, swalClasses.iosfix)) {
750
+ var offset = document.body.scrollTop;
751
+ document.body.style.top = offset * -1 + 'px';
752
+ addClass(document.body, swalClasses.iosfix);
753
+ }
754
+ };
755
+
756
+ var undoIOSfix = function undoIOSfix() {
757
+ if (hasClass(document.body, swalClasses.iosfix)) {
758
+ var offset = parseInt(document.body.style.top, 10);
759
+ removeClass(document.body, swalClasses.iosfix);
760
+ document.body.style.top = '';
761
+ document.body.scrollTop = offset * -1;
762
+ }
763
+ };
764
+
765
+ // SweetAlert entry point
766
+ var sweetAlert = function sweetAlert() {
767
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
768
+ args[_key] = arguments[_key];
769
+ }
770
+
771
+ if (args[0] === undefined) {
772
+ console.error('SweetAlert2 expects at least 1 attribute!');
773
+ return false;
774
+ }
775
+
776
+ var params = _extends({}, modalParams);
777
+
778
+ switch (_typeof(args[0])) {
779
+ case 'string':
780
+ params.title = args[0];
781
+ params.html = args[1];
782
+ params.type = args[2];
783
+
784
+ break;
785
+
786
+ case 'object':
787
+ _extends(params, args[0]);
788
+ params.extraParams = args[0].extraParams;
789
+
790
+ if (params.input === 'email' && params.inputValidator === null) {
791
+ params.inputValidator = function (email) {
792
+ return new Promise(function (resolve, reject) {
793
+ var emailRegex = /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;
794
+ if (emailRegex.test(email)) {
795
+ resolve();
796
+ } else {
797
+ reject('Invalid email address');
798
+ }
799
+ });
800
+ };
801
+ }
802
+
803
+ if (params.input === 'url' && params.inputValidator === null) {
804
+ params.inputValidator = function (url) {
805
+ return new Promise(function (resolve, reject) {
806
+ var urlRegex = /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/;
807
+ if (urlRegex.test(url)) {
808
+ resolve();
809
+ } else {
810
+ reject('Invalid URL');
811
+ }
812
+ });
813
+ };
814
+ }
815
+ break;
816
+
817
+ default:
818
+ console.error('SweetAlert2: Unexpected type of argument! Expected "string" or "object", got ' + _typeof(args[0]));
819
+ return false;
820
+ }
821
+
822
+ setParameters(params);
823
+
824
+ var container = getContainer();
825
+ var modal = getModal();
826
+
827
+ return new Promise(function (resolve, reject) {
828
+ // Close on timer
829
+ if (params.timer) {
830
+ modal.timeout = setTimeout(function () {
831
+ sweetAlert.closeModal(params.onClose);
832
+ if (params.useRejections) {
833
+ reject('timer');
834
+ } else {
835
+ resolve({ dismiss: 'timer' });
836
+ }
837
+ }, params.timer);
838
+ }
839
+
840
+ // Get input element by specified type or, if type isn't specified, by params.input
841
+ var getInput = function getInput(inputType) {
842
+ inputType = inputType || params.input;
843
+ if (!inputType) {
844
+ return null;
845
+ }
846
+ switch (inputType) {
847
+ case 'select':
848
+ case 'textarea':
849
+ case 'file':
850
+ return getChildByClass(modal, swalClasses[inputType]);
851
+ case 'checkbox':
852
+ return modal.querySelector('.' + swalClasses.checkbox + ' input');
853
+ case 'radio':
854
+ return modal.querySelector('.' + swalClasses.radio + ' input:checked') || modal.querySelector('.' + swalClasses.radio + ' input:first-child');
855
+ case 'range':
856
+ return modal.querySelector('.' + swalClasses.range + ' input');
857
+ default:
858
+ return getChildByClass(modal, swalClasses.input);
859
+ }
860
+ };
861
+
862
+ // Get the value of the modal input
863
+ var getInputValue = function getInputValue() {
864
+ var input = getInput();
865
+ if (!input) {
866
+ return null;
867
+ }
868
+ switch (params.input) {
869
+ case 'checkbox':
870
+ return input.checked ? 1 : 0;
871
+ case 'radio':
872
+ return input.checked ? input.value : null;
873
+ case 'file':
874
+ return input.files.length ? input.files[0] : null;
875
+ default:
876
+ return params.inputAutoTrim ? input.value.trim() : input.value;
877
+ }
878
+ };
879
+
880
+ // input autofocus
881
+ if (params.input) {
882
+ setTimeout(function () {
883
+ var input = getInput();
884
+ if (input) {
885
+ focusInput(input);
886
+ }
887
+ }, 0);
888
+ }
889
+
890
+ var confirm = function confirm(value) {
891
+ if (params.showLoaderOnConfirm) {
892
+ sweetAlert.showLoading();
893
+ }
894
+
895
+ if (params.preConfirm) {
896
+ params.preConfirm(value, params.extraParams).then(function (preConfirmValue) {
897
+ sweetAlert.closeModal(params.onClose);
898
+ resolve(preConfirmValue || value);
899
+ }, function (error) {
900
+ sweetAlert.hideLoading();
901
+ if (error) {
902
+ sweetAlert.showValidationError(error);
903
+ }
904
+ });
905
+ } else {
906
+ sweetAlert.closeModal(params.onClose);
907
+ if (params.useRejections) {
908
+ resolve(value);
909
+ } else {
910
+ resolve({ value: value });
911
+ }
912
+ }
913
+ };
914
+
915
+ // Mouse interactions
916
+ var onButtonEvent = function onButtonEvent(event) {
917
+ var e = event || window.event;
918
+ var target = e.target || e.srcElement;
919
+ var confirmButton = getConfirmButton();
920
+ var cancelButton = getCancelButton();
921
+ var targetedConfirm = confirmButton && (confirmButton === target || confirmButton.contains(target));
922
+ var targetedCancel = cancelButton && (cancelButton === target || cancelButton.contains(target));
923
+
924
+ switch (e.type) {
925
+ case 'mouseover':
926
+ case 'mouseup':
927
+ if (params.buttonsStyling) {
928
+ if (targetedConfirm) {
929
+ confirmButton.style.backgroundColor = colorLuminance(params.confirmButtonColor, -0.1);
930
+ } else if (targetedCancel) {
931
+ cancelButton.style.backgroundColor = colorLuminance(params.cancelButtonColor, -0.1);
932
+ }
933
+ }
934
+ break;
935
+ case 'mouseout':
936
+ if (params.buttonsStyling) {
937
+ if (targetedConfirm) {
938
+ confirmButton.style.backgroundColor = params.confirmButtonColor;
939
+ } else if (targetedCancel) {
940
+ cancelButton.style.backgroundColor = params.cancelButtonColor;
941
+ }
942
+ }
943
+ break;
944
+ case 'mousedown':
945
+ if (params.buttonsStyling) {
946
+ if (targetedConfirm) {
947
+ confirmButton.style.backgroundColor = colorLuminance(params.confirmButtonColor, -0.2);
948
+ } else if (targetedCancel) {
949
+ cancelButton.style.backgroundColor = colorLuminance(params.cancelButtonColor, -0.2);
950
+ }
951
+ }
952
+ break;
953
+ case 'click':
954
+ // Clicked 'confirm'
955
+ if (targetedConfirm && sweetAlert.isVisible()) {
956
+ sweetAlert.disableButtons();
957
+ if (params.input) {
958
+ var inputValue = getInputValue();
959
+
960
+ if (params.inputValidator) {
961
+ sweetAlert.disableInput();
962
+ params.inputValidator(inputValue, params.extraParams).then(function () {
963
+ sweetAlert.enableButtons();
964
+ sweetAlert.enableInput();
965
+ confirm(inputValue);
966
+ }, function (error) {
967
+ sweetAlert.enableButtons();
968
+ sweetAlert.enableInput();
969
+ if (error) {
970
+ sweetAlert.showValidationError(error);
971
+ }
972
+ });
973
+ } else {
974
+ confirm(inputValue);
975
+ }
976
+ } else {
977
+ confirm(true);
978
+ }
979
+
980
+ // Clicked 'cancel'
981
+ } else if (targetedCancel && sweetAlert.isVisible()) {
982
+ sweetAlert.disableButtons();
983
+ sweetAlert.closeModal(params.onClose);
984
+ if (params.useRejections) {
985
+ reject('cancel');
986
+ } else {
987
+ resolve({ dismiss: 'cancel' });
988
+ }
989
+ }
990
+ break;
991
+ default:
992
+ }
993
+ };
994
+
995
+ var buttons = modal.querySelectorAll('button');
996
+ for (var i = 0; i < buttons.length; i++) {
997
+ buttons[i].onclick = onButtonEvent;
998
+ buttons[i].onmouseover = onButtonEvent;
999
+ buttons[i].onmouseout = onButtonEvent;
1000
+ buttons[i].onmousedown = onButtonEvent;
1001
+ }
1002
+
1003
+ // Closing modal by close button
1004
+ getCloseButton().onclick = function () {
1005
+ sweetAlert.closeModal(params.onClose);
1006
+ if (params.useRejections) {
1007
+ reject('close');
1008
+ } else {
1009
+ resolve({ dismiss: 'close' });
1010
+ }
1011
+ };
1012
+
1013
+ // Closing modal by overlay click
1014
+ container.onclick = function (e) {
1015
+ if (e.target !== container) {
1016
+ return;
1017
+ }
1018
+ if (params.allowOutsideClick) {
1019
+ sweetAlert.closeModal(params.onClose);
1020
+ if (params.useRejections) {
1021
+ reject('overlay');
1022
+ } else {
1023
+ resolve({ dismiss: 'overlay' });
1024
+ }
1025
+ }
1026
+ };
1027
+
1028
+ var buttonsWrapper = getButtonsWrapper();
1029
+ var confirmButton = getConfirmButton();
1030
+ var cancelButton = getCancelButton();
1031
+
1032
+ // Reverse buttons (Confirm on the right side)
1033
+ if (params.reverseButtons) {
1034
+ confirmButton.parentNode.insertBefore(cancelButton, confirmButton);
1035
+ } else {
1036
+ confirmButton.parentNode.insertBefore(confirmButton, cancelButton);
1037
+ }
1038
+
1039
+ // Focus handling
1040
+ var setFocus = function setFocus(index, increment) {
1041
+ var focusableElements = getFocusableElements(params.focusCancel);
1042
+ // search for visible elements and select the next possible match
1043
+ for (var _i3 = 0; _i3 < focusableElements.length; _i3++) {
1044
+ index = index + increment;
1045
+
1046
+ // rollover to first item
1047
+ if (index === focusableElements.length) {
1048
+ index = 0;
1049
+
1050
+ // go to last item
1051
+ } else if (index === -1) {
1052
+ index = focusableElements.length - 1;
1053
+ }
1054
+
1055
+ // determine if element is visible
1056
+ var el = focusableElements[index];
1057
+ if (isVisible(el)) {
1058
+ return el.focus();
1059
+ }
1060
+ }
1061
+ };
1062
+
1063
+ var handleKeyDown = function handleKeyDown(event) {
1064
+ var e = event || window.event;
1065
+ var keyCode = e.keyCode || e.which;
1066
+
1067
+ if ([9, 13, 32, 27, 37, 38, 39, 40].indexOf(keyCode) === -1) {
1068
+ // Don't do work on keys we don't care about.
1069
+ return;
1070
+ }
1071
+
1072
+ var targetElement = e.target || e.srcElement;
1073
+
1074
+ var focusableElements = getFocusableElements(params.focusCancel);
1075
+ var btnIndex = -1; // Find the button - note, this is a nodelist, not an array.
1076
+ for (var _i4 = 0; _i4 < focusableElements.length; _i4++) {
1077
+ if (targetElement === focusableElements[_i4]) {
1078
+ btnIndex = _i4;
1079
+ break;
1080
+ }
1081
+ }
1082
+
1083
+ // TAB
1084
+ if (keyCode === 9) {
1085
+ if (!e.shiftKey) {
1086
+ // Cycle to the next button
1087
+ setFocus(btnIndex, 1);
1088
+ } else {
1089
+ // Cycle to the prev button
1090
+ setFocus(btnIndex, -1);
1091
+ }
1092
+ e.stopPropagation();
1093
+ e.preventDefault();
1094
+
1095
+ // ARROWS - switch focus between buttons
1096
+ } else if (keyCode === 37 || keyCode === 38 || keyCode === 39 || keyCode === 40) {
1097
+ // focus Cancel button if Confirm button is currently focused
1098
+ if (document.activeElement === confirmButton && isVisible(cancelButton)) {
1099
+ cancelButton.focus();
1100
+ // and vice versa
1101
+ } else if (document.activeElement === cancelButton && isVisible(confirmButton)) {
1102
+ confirmButton.focus();
1103
+ }
1104
+
1105
+ // ENTER/SPACE
1106
+ } else if (keyCode === 13 || keyCode === 32) {
1107
+ if (btnIndex === -1 && params.allowEnterKey) {
1108
+ // ENTER/SPACE clicked outside of a button.
1109
+ if (params.focusCancel) {
1110
+ fireClick(cancelButton, e);
1111
+ } else {
1112
+ fireClick(confirmButton, e);
1113
+ }
1114
+ e.stopPropagation();
1115
+ e.preventDefault();
1116
+ }
1117
+
1118
+ // ESC
1119
+ } else if (keyCode === 27 && params.allowEscapeKey === true) {
1120
+ sweetAlert.closeModal(params.onClose);
1121
+ if (params.useRejections) {
1122
+ reject('esc');
1123
+ } else {
1124
+ resolve({ dismiss: 'esc' });
1125
+ }
1126
+ }
1127
+ };
1128
+
1129
+ if (!window.onkeydown || window.onkeydown.toString() !== handleKeyDown.toString()) {
1130
+ states.previousWindowKeyDown = window.onkeydown;
1131
+ window.onkeydown = handleKeyDown;
1132
+ }
1133
+
1134
+ // Loading state
1135
+ if (params.buttonsStyling) {
1136
+ confirmButton.style.borderLeftColor = params.confirmButtonColor;
1137
+ confirmButton.style.borderRightColor = params.confirmButtonColor;
1138
+ }
1139
+
1140
+ /**
1141
+ * Show spinner instead of Confirm button and disable Cancel button
1142
+ */
1143
+ sweetAlert.hideLoading = sweetAlert.disableLoading = function () {
1144
+ if (!params.showConfirmButton) {
1145
+ hide(confirmButton);
1146
+ if (!params.showCancelButton) {
1147
+ hide(getButtonsWrapper());
1148
+ }
1149
+ }
1150
+ removeClass(buttonsWrapper, swalClasses.loading);
1151
+ removeClass(modal, swalClasses.loading);
1152
+ confirmButton.disabled = false;
1153
+ cancelButton.disabled = false;
1154
+ };
1155
+
1156
+ sweetAlert.getTitle = function () {
1157
+ return getTitle();
1158
+ };
1159
+ sweetAlert.getContent = function () {
1160
+ return getContent();
1161
+ };
1162
+ sweetAlert.getInput = function () {
1163
+ return getInput();
1164
+ };
1165
+ sweetAlert.getImage = function () {
1166
+ return getImage();
1167
+ };
1168
+ sweetAlert.getButtonsWrapper = function () {
1169
+ return getButtonsWrapper();
1170
+ };
1171
+ sweetAlert.getConfirmButton = function () {
1172
+ return getConfirmButton();
1173
+ };
1174
+ sweetAlert.getCancelButton = function () {
1175
+ return getCancelButton();
1176
+ };
1177
+
1178
+ sweetAlert.enableButtons = function () {
1179
+ confirmButton.disabled = false;
1180
+ cancelButton.disabled = false;
1181
+ };
1182
+
1183
+ sweetAlert.disableButtons = function () {
1184
+ confirmButton.disabled = true;
1185
+ cancelButton.disabled = true;
1186
+ };
1187
+
1188
+ sweetAlert.enableConfirmButton = function () {
1189
+ confirmButton.disabled = false;
1190
+ };
1191
+
1192
+ sweetAlert.disableConfirmButton = function () {
1193
+ confirmButton.disabled = true;
1194
+ };
1195
+
1196
+ sweetAlert.enableInput = function () {
1197
+ var input = getInput();
1198
+ if (!input) {
1199
+ return false;
1200
+ }
1201
+ if (input.type === 'radio') {
1202
+ var radiosContainer = input.parentNode.parentNode;
1203
+ var radios = radiosContainer.querySelectorAll('input');
1204
+ for (var _i5 = 0; _i5 < radios.length; _i5++) {
1205
+ radios[_i5].disabled = false;
1206
+ }
1207
+ } else {
1208
+ input.disabled = false;
1209
+ }
1210
+ };
1211
+
1212
+ sweetAlert.disableInput = function () {
1213
+ var input = getInput();
1214
+ if (!input) {
1215
+ return false;
1216
+ }
1217
+ if (input && input.type === 'radio') {
1218
+ var radiosContainer = input.parentNode.parentNode;
1219
+ var radios = radiosContainer.querySelectorAll('input');
1220
+ for (var _i6 = 0; _i6 < radios.length; _i6++) {
1221
+ radios[_i6].disabled = true;
1222
+ }
1223
+ } else {
1224
+ input.disabled = true;
1225
+ }
1226
+ };
1227
+
1228
+ // Set modal min-height to disable scrolling inside the modal
1229
+ sweetAlert.recalculateHeight = debounce(function () {
1230
+ var modal = getModal();
1231
+ if (!modal) {
1232
+ return;
1233
+ }
1234
+ var prevState = modal.style.display;
1235
+ modal.style.minHeight = '';
1236
+ show(modal);
1237
+ modal.style.minHeight = modal.scrollHeight + 1 + 'px';
1238
+ modal.style.display = prevState;
1239
+ }, 50);
1240
+
1241
+ // Show block with validation error
1242
+ sweetAlert.showValidationError = function (error) {
1243
+ var validationError = getValidationError();
1244
+ validationError.innerHTML = error;
1245
+ show(validationError);
1246
+
1247
+ var input = getInput();
1248
+ if (input) {
1249
+ focusInput(input);
1250
+ addClass(input, swalClasses.inputerror);
1251
+ }
1252
+ };
1253
+
1254
+ // Hide block with validation error
1255
+ sweetAlert.resetValidationError = function () {
1256
+ var validationError = getValidationError();
1257
+ hide(validationError);
1258
+ sweetAlert.recalculateHeight();
1259
+
1260
+ var input = getInput();
1261
+ if (input) {
1262
+ removeClass(input, swalClasses.inputerror);
1263
+ }
1264
+ };
1265
+
1266
+ sweetAlert.getProgressSteps = function () {
1267
+ return params.progressSteps;
1268
+ };
1269
+
1270
+ sweetAlert.setProgressSteps = function (progressSteps) {
1271
+ params.progressSteps = progressSteps;
1272
+ setParameters(params);
1273
+ };
1274
+
1275
+ sweetAlert.showProgressSteps = function () {
1276
+ show(getProgressSteps());
1277
+ };
1278
+
1279
+ sweetAlert.hideProgressSteps = function () {
1280
+ hide(getProgressSteps());
1281
+ };
1282
+
1283
+ sweetAlert.enableButtons();
1284
+ sweetAlert.hideLoading();
1285
+ sweetAlert.resetValidationError();
1286
+
1287
+ // inputs
1288
+ var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];
1289
+ var input = void 0;
1290
+ for (var _i7 = 0; _i7 < inputTypes.length; _i7++) {
1291
+ var inputClass = swalClasses[inputTypes[_i7]];
1292
+ var inputContainer = getChildByClass(modal, inputClass);
1293
+ input = getInput(inputTypes[_i7]);
1294
+
1295
+ // set attributes
1296
+ if (input) {
1297
+ for (var j in input.attributes) {
1298
+ if (input.attributes.hasOwnProperty(j)) {
1299
+ var attrName = input.attributes[j].name;
1300
+ if (attrName !== 'type' && attrName !== 'value') {
1301
+ input.removeAttribute(attrName);
1302
+ }
1303
+ }
1304
+ }
1305
+ for (var attr in params.inputAttributes) {
1306
+ input.setAttribute(attr, params.inputAttributes[attr]);
1307
+ }
1308
+ }
1309
+
1310
+ // set class
1311
+ inputContainer.className = inputClass;
1312
+ if (params.inputClass) {
1313
+ addClass(inputContainer, params.inputClass);
1314
+ }
1315
+
1316
+ hide(inputContainer);
1317
+ }
1318
+
1319
+ var populateInputOptions = void 0;
1320
+ switch (params.input) {
1321
+ case 'text':
1322
+ case 'email':
1323
+ case 'password':
1324
+ case 'number':
1325
+ case 'tel':
1326
+ case 'url':
1327
+ input = getChildByClass(modal, swalClasses.input);
1328
+ input.value = params.inputValue;
1329
+ input.placeholder = params.inputPlaceholder;
1330
+ input.type = params.input;
1331
+ show(input);
1332
+ break;
1333
+ case 'file':
1334
+ input = getChildByClass(modal, swalClasses.file);
1335
+ input.placeholder = params.inputPlaceholder;
1336
+ input.type = params.input;
1337
+ show(input);
1338
+ break;
1339
+ case 'range':
1340
+ var range = getChildByClass(modal, swalClasses.range);
1341
+ var rangeInput = range.querySelector('input');
1342
+ var rangeOutput = range.querySelector('output');
1343
+ rangeInput.value = params.inputValue;
1344
+ rangeInput.type = params.input;
1345
+ rangeOutput.value = params.inputValue;
1346
+ show(range);
1347
+ break;
1348
+ case 'select':
1349
+ var select = getChildByClass(modal, swalClasses.select);
1350
+ select.innerHTML = '';
1351
+ if (params.inputPlaceholder) {
1352
+ var placeholder = document.createElement('option');
1353
+ placeholder.innerHTML = params.inputPlaceholder;
1354
+ placeholder.value = '';
1355
+ placeholder.disabled = true;
1356
+ placeholder.selected = true;
1357
+ select.appendChild(placeholder);
1358
+ }
1359
+ populateInputOptions = function populateInputOptions(inputOptions) {
1360
+ for (var optionValue in inputOptions) {
1361
+ var option = document.createElement('option');
1362
+ option.value = optionValue;
1363
+ option.innerHTML = inputOptions[optionValue];
1364
+ if (params.inputValue === optionValue) {
1365
+ option.selected = true;
1366
+ }
1367
+ select.appendChild(option);
1368
+ }
1369
+ show(select);
1370
+ select.focus();
1371
+ };
1372
+ break;
1373
+ case 'radio':
1374
+ var radio = getChildByClass(modal, swalClasses.radio);
1375
+ radio.innerHTML = '';
1376
+ populateInputOptions = function populateInputOptions(inputOptions) {
1377
+ for (var radioValue in inputOptions) {
1378
+ var radioInput = document.createElement('input');
1379
+ var radioLabel = document.createElement('label');
1380
+ var radioLabelSpan = document.createElement('span');
1381
+ radioInput.type = 'radio';
1382
+ radioInput.name = swalClasses.radio;
1383
+ radioInput.value = radioValue;
1384
+ if (params.inputValue === radioValue) {
1385
+ radioInput.checked = true;
1386
+ }
1387
+ radioLabelSpan.innerHTML = inputOptions[radioValue];
1388
+ radioLabel.appendChild(radioInput);
1389
+ radioLabel.appendChild(radioLabelSpan);
1390
+ radioLabel.for = radioInput.id;
1391
+ radio.appendChild(radioLabel);
1392
+ }
1393
+ show(radio);
1394
+ var radios = radio.querySelectorAll('input');
1395
+ if (radios.length) {
1396
+ radios[0].focus();
1397
+ }
1398
+ };
1399
+ break;
1400
+ case 'checkbox':
1401
+ var checkbox = getChildByClass(modal, swalClasses.checkbox);
1402
+ var checkboxInput = getInput('checkbox');
1403
+ checkboxInput.type = 'checkbox';
1404
+ checkboxInput.value = 1;
1405
+ checkboxInput.id = swalClasses.checkbox;
1406
+ checkboxInput.checked = Boolean(params.inputValue);
1407
+ var label = checkbox.getElementsByTagName('span');
1408
+ if (label.length) {
1409
+ checkbox.removeChild(label[0]);
1410
+ }
1411
+ label = document.createElement('span');
1412
+ label.innerHTML = params.inputPlaceholder;
1413
+ checkbox.appendChild(label);
1414
+ show(checkbox);
1415
+ break;
1416
+ case 'textarea':
1417
+ var textarea = getChildByClass(modal, swalClasses.textarea);
1418
+ textarea.value = params.inputValue;
1419
+ textarea.placeholder = params.inputPlaceholder;
1420
+ show(textarea);
1421
+ break;
1422
+ case null:
1423
+ break;
1424
+ default:
1425
+ console.error('SweetAlert2: Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "' + params.input + '"');
1426
+ break;
1427
+ }
1428
+
1429
+ if (params.input === 'select' || params.input === 'radio') {
1430
+ if (params.inputOptions instanceof Promise) {
1431
+ sweetAlert.showLoading();
1432
+ params.inputOptions.then(function (inputOptions) {
1433
+ sweetAlert.hideLoading();
1434
+ populateInputOptions(inputOptions);
1435
+ });
1436
+ } else if (_typeof(params.inputOptions) === 'object') {
1437
+ populateInputOptions(params.inputOptions);
1438
+ } else {
1439
+ console.error('SweetAlert2: Unexpected type of inputOptions! Expected object or Promise, got ' + _typeof(params.inputOptions));
1440
+ }
1441
+ }
1442
+
1443
+ openModal(params.animation, params.onOpen);
1444
+
1445
+ // Focus the first element (input or button)
1446
+ if (params.allowEnterKey) {
1447
+ setFocus(-1, 1);
1448
+ } else {
1449
+ if (document.activeElement) {
1450
+ document.activeElement.blur();
1451
+ }
1452
+ }
1453
+
1454
+ // fix scroll
1455
+ getContainer().scrollTop = 0;
1456
+
1457
+ // Observe changes inside the modal and adjust height
1458
+ if (typeof MutationObserver !== 'undefined' && !swal2Observer) {
1459
+ swal2Observer = new MutationObserver(sweetAlert.recalculateHeight);
1460
+ swal2Observer.observe(modal, { childList: true, characterData: true, subtree: true });
1461
+ }
1462
+ });
1463
+ };
1464
+
1465
+ /*
1466
+ * Global function to determine if swal2 modal is shown
1467
+ */
1468
+ sweetAlert.isVisible = function () {
1469
+ return !!getModal();
1470
+ };
1471
+
1472
+ /*
1473
+ * Global function for chaining sweetAlert modals
1474
+ */
1475
+ sweetAlert.queue = function (steps) {
1476
+ queue = steps;
1477
+ var resetQueue = function resetQueue() {
1478
+ queue = [];
1479
+ document.body.removeAttribute('data-swal2-queue-step');
1480
+ };
1481
+ var queueResult = [];
1482
+ return new Promise(function (resolve, reject) {
1483
+ (function step(i, callback) {
1484
+ if (i < queue.length) {
1485
+ document.body.setAttribute('data-swal2-queue-step', i);
1486
+
1487
+ sweetAlert(queue[i]).then(function (result) {
1488
+ queueResult.push(result);
1489
+ step(i + 1, callback);
1490
+ }, function (dismiss) {
1491
+ resetQueue();
1492
+ reject(dismiss);
1493
+ });
1494
+ } else {
1495
+ resetQueue();
1496
+ resolve(queueResult);
1497
+ }
1498
+ })(0);
1499
+ });
1500
+ };
1501
+
1502
+ /*
1503
+ * Global function for getting the index of current modal in queue
1504
+ */
1505
+ sweetAlert.getQueueStep = function () {
1506
+ return document.body.getAttribute('data-swal2-queue-step');
1507
+ };
1508
+
1509
+ /*
1510
+ * Global function for inserting a modal to the queue
1511
+ */
1512
+ sweetAlert.insertQueueStep = function (step, index) {
1513
+ if (index && index < queue.length) {
1514
+ return queue.splice(index, 0, step);
1515
+ }
1516
+ return queue.push(step);
1517
+ };
1518
+
1519
+ /*
1520
+ * Global function for deleting a modal from the queue
1521
+ */
1522
+ sweetAlert.deleteQueueStep = function (index) {
1523
+ if (typeof queue[index] !== 'undefined') {
1524
+ queue.splice(index, 1);
1525
+ }
1526
+ };
1527
+
1528
+ /*
1529
+ * Global function to close sweetAlert
1530
+ */
1531
+ sweetAlert.close = sweetAlert.closeModal = function (onComplete) {
1532
+ var container = getContainer();
1533
+ var modal = getModal();
1534
+ if (!modal) {
1535
+ return;
1536
+ }
1537
+ removeClass(modal, swalClasses.show);
1538
+ addClass(modal, swalClasses.hide);
1539
+ clearTimeout(modal.timeout);
1540
+
1541
+ resetPrevState();
1542
+
1543
+ var removeModalAndResetState = function removeModalAndResetState() {
1544
+ if (container.parentNode) {
1545
+ container.parentNode.removeChild(container);
1546
+ }
1547
+ removeClass(document.documentElement, swalClasses.shown);
1548
+ removeClass(document.body, swalClasses.shown);
1549
+ undoScrollbar();
1550
+ undoIOSfix();
1551
+ };
1552
+
1553
+ // If animation is supported, animate
1554
+ if (animationEndEvent && !hasClass(modal, swalClasses.noanimation)) {
1555
+ modal.addEventListener(animationEndEvent, function swalCloseEventFinished() {
1556
+ modal.removeEventListener(animationEndEvent, swalCloseEventFinished);
1557
+ if (hasClass(modal, swalClasses.hide)) {
1558
+ removeModalAndResetState();
1559
+ }
1560
+ });
1561
+ } else {
1562
+ // Otherwise, remove immediately
1563
+ removeModalAndResetState();
1564
+ }
1565
+ if (onComplete !== null && typeof onComplete === 'function') {
1566
+ setTimeout(function () {
1567
+ onComplete(modal);
1568
+ });
1569
+ }
1570
+ };
1571
+
1572
+ /*
1573
+ * Global function to click 'Confirm' button
1574
+ */
1575
+ sweetAlert.clickConfirm = function () {
1576
+ return getConfirmButton().click();
1577
+ };
1578
+
1579
+ /*
1580
+ * Global function to click 'Cancel' button
1581
+ */
1582
+ sweetAlert.clickCancel = function () {
1583
+ return getCancelButton().click();
1584
+ };
1585
+
1586
+ /**
1587
+ * Show spinner instead of Confirm button and disable Cancel button
1588
+ */
1589
+ sweetAlert.showLoading = sweetAlert.enableLoading = function () {
1590
+ var modal = getModal();
1591
+ if (!modal) {
1592
+ sweetAlert('');
1593
+ }
1594
+ var buttonsWrapper = getButtonsWrapper();
1595
+ var confirmButton = getConfirmButton();
1596
+ var cancelButton = getCancelButton();
1597
+
1598
+ show(buttonsWrapper);
1599
+ show(confirmButton, 'inline-block');
1600
+ addClass(buttonsWrapper, swalClasses.loading);
1601
+ addClass(modal, swalClasses.loading);
1602
+ confirmButton.disabled = true;
1603
+ cancelButton.disabled = true;
1604
+ };
1605
+
1606
+ /**
1607
+ * Set default params for each popup
1608
+ * @param {Object} userParams
1609
+ */
1610
+ sweetAlert.setDefaults = function (userParams) {
1611
+ if (!userParams || (typeof userParams === 'undefined' ? 'undefined' : _typeof(userParams)) !== 'object') {
1612
+ return console.error('SweetAlert2: the argument for setDefaults() is required and has to be a object');
1613
+ }
1614
+
1615
+ for (var param in userParams) {
1616
+ if (!defaultParams.hasOwnProperty(param) && param !== 'extraParams') {
1617
+ console.warn('SweetAlert2: Unknown parameter "' + param + '"');
1618
+ delete userParams[param];
1619
+ }
1620
+ }
1621
+
1622
+ _extends(modalParams, userParams);
1623
+ };
1624
+
1625
+ /**
1626
+ * Reset default params for each popup
1627
+ */
1628
+ sweetAlert.resetDefaults = function () {
1629
+ modalParams = _extends({}, defaultParams);
1630
+ };
1631
+
1632
+ sweetAlert.noop = function () {};
1633
+
1634
+ sweetAlert.version = '6.6.4';
1635
+
1636
+ sweetAlert.default = sweetAlert;
1637
+
1638
+ return sweetAlert;
1639
+
1640
+ })));
1641
+ if (window.Sweetalert2) window.sweetAlert = window.swal = window.Sweetalert2;
assets/vendor/sweetalert2/dist/sweetalert2.min.css ADDED
@@ -0,0 +1 @@
 
1
+ body.swal2-shown{overflow-y:hidden}body.swal2-iosfix{position:fixed;left:0;right:0}.swal2-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:fixed;top:0;left:0;bottom:0;right:0;padding:10px;background-color:transparent;z-index:1060}.swal2-container.swal2-fade{-webkit-transition:background-color .1s;transition:background-color .1s}.swal2-container.swal2-shown{background-color:rgba(0,0,0,.4)}.swal2-modal{background-color:#fff;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;border-radius:5px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;margin:auto;overflow-x:hidden;overflow-y:auto;display:none;position:relative;max-width:100%}.swal2-modal:focus{outline:0}.swal2-modal.swal2-loading{overflow-y:hidden}.swal2-modal .swal2-title{color:#595959;font-size:30px;text-align:center;font-weight:600;text-transform:none;position:relative;margin:0 0 .4em;padding:0;display:block;word-wrap:break-word}.swal2-modal .swal2-buttonswrapper{margin-top:15px}.swal2-modal .swal2-buttonswrapper:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4;cursor:no-drop}.swal2-modal .swal2-buttonswrapper.swal2-loading .swal2-styled.swal2-confirm{-webkit-box-sizing:border-box;box-sizing:border-box;border:4px solid transparent;border-color:transparent;width:40px;height:40px;padding:0;margin:7.5px;vertical-align:top;background-color:transparent!important;color:transparent;cursor:default;border-radius:100%;-webkit-animation:rotate-loading 1.5s linear 0s infinite normal;animation:rotate-loading 1.5s linear 0s infinite normal;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-modal .swal2-buttonswrapper.swal2-loading .swal2-styled.swal2-cancel{margin-left:30px;margin-right:30px}.swal2-modal .swal2-buttonswrapper.swal2-loading :not(.swal2-styled).swal2-confirm::after{display:inline-block;content:'';margin-left:5px 0 15px;vertical-align:-1px;height:15px;width:15px;border:3px solid #999;-webkit-box-shadow:1px 1px 1px #fff;box-shadow:1px 1px 1px #fff;border-right-color:transparent;border-radius:50%;-webkit-animation:rotate-loading 1.5s linear 0s infinite normal;animation:rotate-loading 1.5s linear 0s infinite normal}.swal2-modal .swal2-styled{border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;color:#fff;cursor:pointer;font-size:17px;font-weight:500;margin:15px 5px 0;padding:10px 32px}.swal2-modal .swal2-image{margin:20px auto;max-width:100%}.swal2-modal .swal2-close{background:0 0;border:0;margin:0;padding:0;width:38px;height:40px;font-size:36px;line-height:40px;font-family:serif;position:absolute;top:5px;right:8px;cursor:pointer;color:#ccc;-webkit-transition:color .1s ease;transition:color .1s ease}.swal2-modal .swal2-close:hover{color:#d55}.swal2-modal>.swal2-checkbox,.swal2-modal>.swal2-file,.swal2-modal>.swal2-input,.swal2-modal>.swal2-radio,.swal2-modal>.swal2-select,.swal2-modal>.swal2-textarea{display:none}.swal2-modal .swal2-content{font-size:18px;text-align:center;font-weight:300;position:relative;float:none;margin:0;padding:0;line-height:normal;color:#545454;word-wrap:break-word}.swal2-modal .swal2-checkbox,.swal2-modal .swal2-file,.swal2-modal .swal2-input,.swal2-modal .swal2-radio,.swal2-modal .swal2-select,.swal2-modal .swal2-textarea{margin:20px auto}.swal2-modal .swal2-file,.swal2-modal .swal2-input,.swal2-modal .swal2-textarea{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:18px;border-radius:3px;border:1px solid #d9d9d9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.06);box-shadow:inset 0 1px 1px rgba(0,0,0,.06);-webkit-transition:border-color box-shadow .3s;transition:border-color box-shadow .3s}.swal2-modal .swal2-file.swal2-inputerror,.swal2-modal .swal2-input.swal2-inputerror,.swal2-modal .swal2-textarea.swal2-inputerror{border-color:#f27474!important;-webkit-box-shadow:0 0 2px #f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-modal .swal2-file:focus,.swal2-modal .swal2-input:focus,.swal2-modal .swal2-textarea:focus{outline:0;border:1px solid #b4dbed;-webkit-box-shadow:0 0 3px #c4e6f5;box-shadow:0 0 3px #c4e6f5}.swal2-modal .swal2-file:focus::-webkit-input-placeholder,.swal2-modal .swal2-input:focus::-webkit-input-placeholder,.swal2-modal .swal2-textarea:focus::-webkit-input-placeholder{-webkit-transition:opacity .3s .03s ease;transition:opacity .3s .03s ease;opacity:.8}.swal2-modal .swal2-file:focus:-ms-input-placeholder,.swal2-modal .swal2-input:focus:-ms-input-placeholder,.swal2-modal .swal2-textarea:focus:-ms-input-placeholder{-webkit-transition:opacity .3s .03s ease;transition:opacity .3s .03s ease;opacity:.8}.swal2-modal .swal2-file:focus::placeholder,.swal2-modal .swal2-input:focus::placeholder,.swal2-modal .swal2-textarea:focus::placeholder{-webkit-transition:opacity .3s .03s ease;transition:opacity .3s .03s ease;opacity:.8}.swal2-modal .swal2-file::-webkit-input-placeholder,.swal2-modal .swal2-input::-webkit-input-placeholder,.swal2-modal .swal2-textarea::-webkit-input-placeholder{color:#e6e6e6}.swal2-modal .swal2-file:-ms-input-placeholder,.swal2-modal .swal2-input:-ms-input-placeholder,.swal2-modal .swal2-textarea:-ms-input-placeholder{color:#e6e6e6}.swal2-modal .swal2-file::placeholder,.swal2-modal .swal2-input::placeholder,.swal2-modal .swal2-textarea::placeholder{color:#e6e6e6}.swal2-modal .swal2-range input{float:left;width:80%}.swal2-modal .swal2-range output{float:right;width:20%;font-size:20px;font-weight:600;text-align:center}.swal2-modal .swal2-range input,.swal2-modal .swal2-range output{height:43px;line-height:43px;vertical-align:middle;margin:20px auto;padding:0}.swal2-modal .swal2-input{height:43px;padding:0 12px}.swal2-modal .swal2-input[type=number]{max-width:150px}.swal2-modal .swal2-file{font-size:20px}.swal2-modal .swal2-textarea{height:108px;padding:12px}.swal2-modal .swal2-select{color:#545454;font-size:inherit;padding:5px 10px;min-width:40%;max-width:100%}.swal2-modal .swal2-radio{border:0}.swal2-modal .swal2-radio label:not(:first-child){margin-left:20px}.swal2-modal .swal2-radio input,.swal2-modal .swal2-radio span{vertical-align:middle}.swal2-modal .swal2-radio input{margin:0 3px 0 0}.swal2-modal .swal2-checkbox{color:#545454}.swal2-modal .swal2-checkbox input,.swal2-modal .swal2-checkbox span{vertical-align:middle}.swal2-modal .swal2-validationerror{background-color:#f0f0f0;margin:0 -20px;overflow:hidden;padding:10px;color:gray;font-size:16px;font-weight:300;display:none}.swal2-modal .swal2-validationerror::before{content:'!';display:inline-block;width:24px;height:24px;border-radius:50%;background-color:#ea7d7d;color:#fff;line-height:24px;text-align:center;margin-right:10px}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}.swal2-icon{width:80px;height:80px;border:4px solid transparent;border-radius:50%;margin:20px auto 30px;padding:0;position:relative;-webkit-box-sizing:content-box;box-sizing:content-box;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon.swal2-error{border-color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;display:block}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{position:absolute;height:5px;width:47px;background-color:#f27474;display:block;top:37px;border-radius:2px}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{-webkit-transform:rotate(45deg);transform:rotate(45deg);left:17px}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:16px}.swal2-icon.swal2-warning{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#f8bb86;border-color:#facea8;font-size:60px;line-height:80px;text-align:center}.swal2-icon.swal2-info{font-family:'Open Sans',sans-serif;color:#3fc3ee;border-color:#9de0f6;font-size:60px;line-height:80px;text-align:center}.swal2-icon.swal2-question{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#87adbd;border-color:#c9dae1;font-size:60px;line-height:80px;text-align:center}.swal2-icon.swal2-success{border-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{border-radius:50%;position:absolute;width:60px;height:120px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{border-radius:120px 0 0 120px;top:-7px;left:-33px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:60px 60px;transform-origin:60px 60px}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{border-radius:0 120px 120px 0;top:-11px;left:30px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 60px;transform-origin:0 60px}.swal2-icon.swal2-success .swal2-success-ring{width:80px;height:80px;border:4px solid rgba(165,220,134,.2);border-radius:50%;-webkit-box-sizing:content-box;box-sizing:content-box;position:absolute;left:-4px;top:-4px;z-index:2}.swal2-icon.swal2-success .swal2-success-fix{width:7px;height:90px;position:absolute;left:28px;top:8px;z-index:1;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{height:5px;background-color:#a5dc86;display:block;border-radius:2px;position:absolute;z-index:2}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{width:25px;left:14px;top:46px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{width:47px;right:8px;top:38px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-progresssteps{font-weight:600;margin:0 0 20px;padding:0}.swal2-progresssteps li{display:inline-block;position:relative}.swal2-progresssteps .swal2-progresscircle{background:#3085d6;border-radius:2em;color:#fff;height:2em;line-height:2em;text-align:center;width:2em;z-index:20}.swal2-progresssteps .swal2-progresscircle:first-child{margin-left:0}.swal2-progresssteps .swal2-progresscircle:last-child{margin-right:0}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep{background:#3085d6}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep~.swal2-progresscircle{background:#add8e6}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep~.swal2-progressline{background:#add8e6}.swal2-progresssteps .swal2-progressline{background:#3085d6;height:.4em;margin:0 -1px;z-index:10}[class^=swal2]{-webkit-tap-highlight-color:transparent}@-webkit-keyframes showSweetAlert{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes showSweetAlert{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hideSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@keyframes hideSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}.swal2-show{-webkit-animation:showSweetAlert .3s;animation:showSweetAlert .3s}.swal2-show.swal2-noanimation{-webkit-animation:none;animation:none}.swal2-hide{-webkit-animation:hideSweetAlert .15s forwards;animation:hideSweetAlert .15s forwards}.swal2-hide.swal2-noanimation{-webkit-animation:none;animation:none}@-webkit-keyframes animate-success-tip{0%{width:0;left:1px;top:19px}54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@keyframes animate-success-tip{0%{width:0;left:1px;top:19px}54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@-webkit-keyframes animate-success-long{0%{width:0;right:46px;top:54px}65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@keyframes animate-success-long{0%{width:0;right:46px;top:54px}65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@-webkit-keyframes rotatePlaceholder{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes rotatePlaceholder{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}.swal2-animate-success-line-tip{-webkit-animation:animate-success-tip .75s;animation:animate-success-tip .75s}.swal2-animate-success-line-long{-webkit-animation:animate-success-long .75s;animation:animate-success-long .75s}.swal2-success.swal2-animate-success-icon .swal2-success-circular-line-right{-webkit-animation:rotatePlaceholder 4.25s ease-in;animation:rotatePlaceholder 4.25s ease-in}@-webkit-keyframes animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@keyframes animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}.swal2-animate-error-icon{-webkit-animation:animate-error-icon .5s;animation:animate-error-icon .5s}@-webkit-keyframes animate-x-mark{0%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}100%{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}@keyframes animate-x-mark{0%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}100%{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}.swal2-animate-x-mark{-webkit-animation:animate-x-mark .5s;animation:animate-x-mark .5s}@-webkit-keyframes rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}
assets/vendor/sweetalert2/dist/sweetalert2.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Sweetalert2=t()}(this,function(){"use strict";var e={title:"",titleText:"",text:"",html:"",type:null,customClass:"",target:"body",animation:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonColor:"#3085d6",confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonColor:"#aaa",cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusCancel:!1,showCloseButton:!1,showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageClass:null,timer:null,width:500,padding:20,background:"#fff",input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,progressSteps:[],currentProgressStep:null,progressStepsDistance:"40px",onOpen:null,onClose:null,useRejections:!0},t=function(e){var t={};for(var n in e)t[e[n]]="swal2-"+e[n];return t},n=t(["container","shown","iosfix","modal","overlay","fade","show","hide","noanimation","close","title","content","buttonswrapper","confirm","cancel","icon","image","input","file","range","select","radio","checkbox","textarea","inputerror","validationerror","progresssteps","activeprogressstep","progresscircle","progressline","loading","styled"]),o=t(["success","warning","info","question","error"]),r=function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var n="#",o=0;o<3;o++){var r=parseInt(e.substr(2*o,2),16);n+=("00"+(r=Math.round(Math.min(Math.max(0,r+r*t),255)).toString(16))).substr(r.length)}return n},i=function(e){var t=[];for(var n in e)-1===t.indexOf(e[n])&&t.push(e[n]);return t},a={previousWindowKeyDown:null,previousActiveElement:null,previousBodyPadding:null},l=function(e){if("undefined"==typeof document)return void console.error("SweetAlert2 requires document to initialize");var t=document.createElement("div");t.className=n.container,t.innerHTML=s;var o=document.querySelector(e.target);o||(console.warn("SweetAlert2: Can't find the target \""+e.target+'"'),o=document.body),o.appendChild(t);var r=c(),i=A(r,n.input),a=A(r,n.file),l=r.querySelector("."+n.range+" input"),u=r.querySelector("."+n.range+" output"),d=A(r,n.select),p=r.querySelector("."+n.checkbox+" input"),f=A(r,n.textarea);return i.oninput=function(){J.resetValidationError()},i.onkeydown=function(t){setTimeout(function(){13===t.keyCode&&e.allowEnterKey&&(t.stopPropagation(),J.clickConfirm())},0)},a.onchange=function(){J.resetValidationError()},l.oninput=function(){J.resetValidationError(),u.value=l.value},l.onchange=function(){J.resetValidationError(),l.previousSibling.value=l.value},d.onchange=function(){J.resetValidationError()},p.onchange=function(){J.resetValidationError()},f.oninput=function(){J.resetValidationError()},r},s=('\n <div role="dialog" aria-labelledby="'+n.title+'" aria-describedby="'+n.content+'" class="'+n.modal+'" tabindex="-1">\n <ul class="'+n.progresssteps+'"></ul>\n <div class="'+n.icon+" "+o.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="'+n.icon+" "+o.question+'">?</div>\n <div class="'+n.icon+" "+o.warning+'">!</div>\n <div class="'+n.icon+" "+o.info+'">i</div>\n <div class="'+n.icon+" "+o.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="'+n.image+'">\n <h2 class="'+n.title+'" id="'+n.title+'"></h2>\n <div id="'+n.content+'" class="'+n.content+'"></div>\n <input class="'+n.input+'">\n <input type="file" class="'+n.file+'">\n <div class="'+n.range+'">\n <output></output>\n <input type="range">\n </div>\n <select class="'+n.select+'"></select>\n <div class="'+n.radio+'"></div>\n <label for="'+n.checkbox+'" class="'+n.checkbox+'">\n <input type="checkbox">\n </label>\n <textarea class="'+n.textarea+'"></textarea>\n <div class="'+n.validationerror+'"></div>\n <div class="'+n.buttonswrapper+'">\n <button type="button" class="'+n.confirm+'">OK</button>\n <button type="button" class="'+n.cancel+'">Cancel</button>\n </div>\n <button type="button" class="'+n.close+'" aria-label="Close this dialog">&times;</button>\n </div>\n').replace(/(^|\n)\s*/g,""),u=function(){return document.body.querySelector("."+n.container)},c=function(){return u()?u().querySelector("."+n.modal):null},d=function(){return c().querySelectorAll("."+n.icon)},p=function(e){return u()?u().querySelector("."+e):null},f=function(){return p(n.title)},m=function(){return p(n.content)},v=function(){return p(n.image)},h=function(){return p(n.buttonswrapper)},g=function(){return p(n.progresssteps)},y=function(){return p(n.validationerror)},b=function(){return p(n.confirm)},w=function(){return p(n.cancel)},C=function(){return p(n.close)},k=function(e){var t=[b(),w()];e&&t.reverse();var n=t.concat(Array.prototype.slice.call(c().querySelectorAll('button, input:not([type=hidden]), textarea, select, a, *[tabindex]:not([tabindex="-1"])')));return i(n)},x=function(e,t){return!!e.classList&&e.classList.contains(t)},S=function(e){if(e.focus(),"file"!==e.type){var t=e.value;e.value="",e.value=t}},E=function(e,t){e&&t&&t.split(/\s+/).filter(Boolean).forEach(function(t){e.classList.add(t)})},B=function(e,t){e&&t&&t.split(/\s+/).filter(Boolean).forEach(function(t){e.classList.remove(t)})},A=function(e,t){for(var n=0;n<e.childNodes.length;n++)if(x(e.childNodes[n],t))return e.childNodes[n]},P=function(e,t){t||(t="block"),e.style.opacity="",e.style.display=t},T=function(e){e.style.opacity="",e.style.display="none"},L=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},M=function(e){return e.offsetWidth||e.offsetHeight||e.getClientRects().length},q=function(e,t){e.style.removeProperty?e.style.removeProperty(t):e.style.removeAttribute(t)},V=function(e){if(!M(e))return!1;if("function"==typeof MouseEvent){var t=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0});e.dispatchEvent(t)}else if(document.createEvent){var n=document.createEvent("MouseEvents");n.initEvent("click",!1,!1),e.dispatchEvent(n)}else document.createEventObject?e.fireEvent("onclick"):"function"==typeof e.onclick&&e.onclick()},O=function(){var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",msAnimation:"MSAnimationEnd",animation:"animationend"};for(var n in t)if(t.hasOwnProperty(n)&&void 0!==e.style[n])return t[n];return!1}(),H=function(){if(window.onkeydown=a.previousWindowKeyDown,a.previousActiveElement&&a.previousActiveElement.focus){var e=window.scrollX,t=window.scrollY;a.previousActiveElement.focus(),e&&t&&window.scrollTo(e,t)}},N=function(){if("ontouchstart"in window||navigator.msMaxTouchPoints)return 0;var e=document.createElement("div");e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t},j=function(e,t){var n=void 0;return function(){var o=function(){n=null,e()};clearTimeout(n),n=setTimeout(o,t)}},R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K=I({},e),D=[],W=void 0,U=function(t){var r=c()||l(t);for(var i in t)e.hasOwnProperty(i)||"extraParams"===i||console.warn('SweetAlert2: Unknown parameter "'+i+'"');r.style.width="number"==typeof t.width?t.width+"px":t.width,r.style.padding=t.padding+"px",r.style.background=t.background;for(var a=r.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),s=0;s<a.length;s++)a[s].style.background=t.background;var u=f(),p=m(),y=h(),k=b(),x=w(),S=C();if(t.titleText?u.innerText=t.titleText:u.innerHTML=t.title.split("\n").join("<br>"),t.text||t.html){if("object"===R(t.html))if(p.innerHTML="",0 in t.html)for(var A=0;A in t.html;A++)p.appendChild(t.html[A].cloneNode(!0));else p.appendChild(t.html.cloneNode(!0));else t.html?p.innerHTML=t.html:t.text&&(p.textContent=t.text);P(p)}else T(p);t.showCloseButton?P(S):T(S),r.className=n.modal,t.customClass&&E(r,t.customClass);var M=g(),V=parseInt(null===t.currentProgressStep?J.getQueueStep():t.currentProgressStep,10);t.progressSteps.length?(P(M),L(M),V>=t.progressSteps.length&&console.warn("SweetAlert2: Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(function(e,o){var r=document.createElement("li");if(E(r,n.progresscircle),r.innerHTML=e,o===V&&E(r,n.activeprogressstep),M.appendChild(r),o!==t.progressSteps.length-1){var i=document.createElement("li");E(i,n.progressline),i.style.width=t.progressStepsDistance,M.appendChild(i)}})):T(M);for(var O=d(),H=0;H<O.length;H++)T(O[H]);if(t.type){var N=!1;for(var j in o)if(t.type===j){N=!0;break}if(!N)return console.error("SweetAlert2: Unknown alert type: "+t.type),!1;var I=r.querySelector("."+n.icon+"."+o[t.type]);if(P(I),t.animation)switch(t.type){case"success":E(I,"swal2-animate-success-icon"),E(I.querySelector(".swal2-success-line-tip"),"swal2-animate-success-line-tip"),E(I.querySelector(".swal2-success-line-long"),"swal2-animate-success-line-long");break;case"error":E(I,"swal2-animate-error-icon"),E(I.querySelector(".swal2-x-mark"),"swal2-animate-x-mark")}}var K=v();t.imageUrl?(K.setAttribute("src",t.imageUrl),P(K),t.imageWidth?K.setAttribute("width",t.imageWidth):K.removeAttribute("width"),t.imageHeight?K.setAttribute("height",t.imageHeight):K.removeAttribute("height"),K.className=n.image,t.imageClass&&E(K,t.imageClass)):T(K),t.showCancelButton?x.style.display="inline-block":T(x),t.showConfirmButton?q(k,"display"):T(k),t.showConfirmButton||t.showCancelButton?P(y):T(y),k.innerHTML=t.confirmButtonText,x.innerHTML=t.cancelButtonText,t.buttonsStyling&&(k.style.backgroundColor=t.confirmButtonColor,x.style.backgroundColor=t.cancelButtonColor),k.className=n.confirm,E(k,t.confirmButtonClass),x.className=n.cancel,E(x,t.cancelButtonClass),t.buttonsStyling?(E(k,n.styled),E(x,n.styled)):(B(k,n.styled),B(x,n.styled),k.style.backgroundColor=k.style.borderLeftColor=k.style.borderRightColor="",x.style.backgroundColor=x.style.borderLeftColor=x.style.borderRightColor=""),!0===t.animation?B(r,n.noanimation):E(r,n.noanimation)},z=function(e,t){var o=u(),r=c();e?(E(r,n.show),E(o,n.fade),B(r,n.hide)):B(r,n.fade),P(r),o.style.overflowY="hidden",O&&!x(r,n.noanimation)?r.addEventListener(O,function e(){r.removeEventListener(O,e),o.style.overflowY="auto"}):o.style.overflowY="auto",E(document.documentElement,n.shown),E(document.body,n.shown),E(o,n.shown),Q(),Z(),a.previousActiveElement=document.activeElement,null!==t&&"function"==typeof t&&setTimeout(function(){t(r)})},Q=function(){null===a.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(a.previousBodyPadding=document.body.style.paddingRight,document.body.style.paddingRight=N()+"px")},Y=function(){null!==a.previousBodyPadding&&(document.body.style.paddingRight=a.previousBodyPadding,a.previousBodyPadding=null)},Z=function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!x(document.body,n.iosfix)){var e=document.body.scrollTop;document.body.style.top=-1*e+"px",E(document.body,n.iosfix)}},$=function(){if(x(document.body,n.iosfix)){var e=parseInt(document.body.style.top,10);B(document.body,n.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}},J=function e(){for(var t=arguments.length,o=Array(t),i=0;i<t;i++)o[i]=arguments[i];if(void 0===o[0])return console.error("SweetAlert2 expects at least 1 attribute!"),!1;var l=I({},K);switch(R(o[0])){case"string":l.title=o[0],l.html=o[1],l.type=o[2];break;case"object":I(l,o[0]),l.extraParams=o[0].extraParams,"email"===l.input&&null===l.inputValidator&&(l.inputValidator=function(e){return new Promise(function(t,n){/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(e)?t():n("Invalid email address")})}),"url"===l.input&&null===l.inputValidator&&(l.inputValidator=function(e){return new Promise(function(t,n){/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/.test(e)?t():n("Invalid URL")})});break;default:return console.error('SweetAlert2: Unexpected type of argument! Expected "string" or "object", got '+R(o[0])),!1}U(l);var s=u(),d=c();return new Promise(function(t,o){l.timer&&(d.timeout=setTimeout(function(){e.closeModal(l.onClose),l.useRejections?o("timer"):t({dismiss:"timer"})},l.timer));var i=function(e){if(!(e=e||l.input))return null;switch(e){case"select":case"textarea":case"file":return A(d,n[e]);case"checkbox":return d.querySelector("."+n.checkbox+" input");case"radio":return d.querySelector("."+n.radio+" input:checked")||d.querySelector("."+n.radio+" input:first-child");case"range":return d.querySelector("."+n.range+" input");default:return A(d,n.input)}},p=function(){var e=i();if(!e)return null;switch(l.input){case"checkbox":return e.checked?1:0;case"radio":return e.checked?e.value:null;case"file":return e.files.length?e.files[0]:null;default:return l.inputAutoTrim?e.value.trim():e.value}};l.input&&setTimeout(function(){var e=i();e&&S(e)},0);for(var x=function(n){l.showLoaderOnConfirm&&e.showLoading(),l.preConfirm?l.preConfirm(n,l.extraParams).then(function(o){e.closeModal(l.onClose),t(o||n)},function(t){e.hideLoading(),t&&e.showValidationError(t)}):(e.closeModal(l.onClose),t(l.useRejections?n:{value:n}))},L=function(n){var i=n||window.event,a=i.target||i.srcElement,s=b(),u=w(),c=s&&(s===a||s.contains(a)),d=u&&(u===a||u.contains(a));switch(i.type){case"mouseover":case"mouseup":l.buttonsStyling&&(c?s.style.backgroundColor=r(l.confirmButtonColor,-.1):d&&(u.style.backgroundColor=r(l.cancelButtonColor,-.1)));break;case"mouseout":l.buttonsStyling&&(c?s.style.backgroundColor=l.confirmButtonColor:d&&(u.style.backgroundColor=l.cancelButtonColor));break;case"mousedown":l.buttonsStyling&&(c?s.style.backgroundColor=r(l.confirmButtonColor,-.2):d&&(u.style.backgroundColor=r(l.cancelButtonColor,-.2)));break;case"click":if(c&&e.isVisible())if(e.disableButtons(),l.input){var f=p();l.inputValidator?(e.disableInput(),l.inputValidator(f,l.extraParams).then(function(){e.enableButtons(),e.enableInput(),x(f)},function(t){e.enableButtons(),e.enableInput(),t&&e.showValidationError(t)})):x(f)}else x(!0);else d&&e.isVisible()&&(e.disableButtons(),e.closeModal(l.onClose),l.useRejections?o("cancel"):t({dismiss:"cancel"}))}},q=d.querySelectorAll("button"),O=0;O<q.length;O++)q[O].onclick=L,q[O].onmouseover=L,q[O].onmouseout=L,q[O].onmousedown=L;C().onclick=function(){e.closeModal(l.onClose),l.useRejections?o("close"):t({dismiss:"close"})},s.onclick=function(n){n.target===s&&l.allowOutsideClick&&(e.closeModal(l.onClose),l.useRejections?o("overlay"):t({dismiss:"overlay"}))};var H=h(),N=b(),I=w();l.reverseButtons?N.parentNode.insertBefore(I,N):N.parentNode.insertBefore(N,I);var K=function(e,t){for(var n=k(l.focusCancel),o=0;o<n.length;o++){(e+=t)===n.length?e=0:-1===e&&(e=n.length-1);var r=n[e];if(M(r))return r.focus()}},D=function(n){var r=n||window.event,i=r.keyCode||r.which;if(-1!==[9,13,32,27,37,38,39,40].indexOf(i)){for(var a=r.target||r.srcElement,s=k(l.focusCancel),u=-1,c=0;c<s.length;c++)if(a===s[c]){u=c;break}9===i?(r.shiftKey?K(u,-1):K(u,1),r.stopPropagation(),r.preventDefault()):37===i||38===i||39===i||40===i?document.activeElement===N&&M(I)?I.focus():document.activeElement===I&&M(N)&&N.focus():13===i||32===i?-1===u&&l.allowEnterKey&&(V(l.focusCancel?I:N),r.stopPropagation(),r.preventDefault()):27===i&&!0===l.allowEscapeKey&&(e.closeModal(l.onClose),l.useRejections?o("esc"):t({dismiss:"esc"}))}};window.onkeydown&&window.onkeydown.toString()===D.toString()||(a.previousWindowKeyDown=window.onkeydown,window.onkeydown=D),l.buttonsStyling&&(N.style.borderLeftColor=l.confirmButtonColor,N.style.borderRightColor=l.confirmButtonColor),e.hideLoading=e.disableLoading=function(){l.showConfirmButton||(T(N),l.showCancelButton||T(h())),B(H,n.loading),B(d,n.loading),N.disabled=!1,I.disabled=!1},e.getTitle=function(){return f()},e.getContent=function(){return m()},e.getInput=function(){return i()},e.getImage=function(){return v()},e.getButtonsWrapper=function(){return h()},e.getConfirmButton=function(){return b()},e.getCancelButton=function(){return w()},e.enableButtons=function(){N.disabled=!1,I.disabled=!1},e.disableButtons=function(){N.disabled=!0,I.disabled=!0},e.enableConfirmButton=function(){N.disabled=!1},e.disableConfirmButton=function(){N.disabled=!0},e.enableInput=function(){var e=i();if(!e)return!1;if("radio"===e.type)for(var t=e.parentNode.parentNode.querySelectorAll("input"),n=0;n<t.length;n++)t[n].disabled=!1;else e.disabled=!1},e.disableInput=function(){var e=i();if(!e)return!1;if(e&&"radio"===e.type)for(var t=e.parentNode.parentNode.querySelectorAll("input"),n=0;n<t.length;n++)t[n].disabled=!0;else e.disabled=!0},e.recalculateHeight=j(function(){var e=c();if(e){var t=e.style.display;e.style.minHeight="",P(e),e.style.minHeight=e.scrollHeight+1+"px",e.style.display=t}},50),e.showValidationError=function(e){var t=y();t.innerHTML=e,P(t);var o=i();o&&(S(o),E(o,n.inputerror))},e.resetValidationError=function(){var t=y();T(t),e.recalculateHeight();var o=i();o&&B(o,n.inputerror)},e.getProgressSteps=function(){return l.progressSteps},e.setProgressSteps=function(e){l.progressSteps=e,U(l)},e.showProgressSteps=function(){P(g())},e.hideProgressSteps=function(){T(g())},e.enableButtons(),e.hideLoading(),e.resetValidationError();for(var Q=["input","file","range","select","radio","checkbox","textarea"],Y=void 0,Z=0;Z<Q.length;Z++){var $=n[Q[Z]],J=A(d,$);if(Y=i(Q[Z])){for(var X in Y.attributes)if(Y.attributes.hasOwnProperty(X)){var _=Y.attributes[X].name;"type"!==_&&"value"!==_&&Y.removeAttribute(_)}for(var F in l.inputAttributes)Y.setAttribute(F,l.inputAttributes[F])}J.className=$,l.inputClass&&E(J,l.inputClass),T(J)}var G=void 0;switch(l.input){case"text":case"email":case"password":case"number":case"tel":case"url":(Y=A(d,n.input)).value=l.inputValue,Y.placeholder=l.inputPlaceholder,Y.type=l.input,P(Y);break;case"file":(Y=A(d,n.file)).placeholder=l.inputPlaceholder,Y.type=l.input,P(Y);break;case"range":var ee=A(d,n.range),te=ee.querySelector("input"),ne=ee.querySelector("output");te.value=l.inputValue,te.type=l.input,ne.value=l.inputValue,P(ee);break;case"select":var oe=A(d,n.select);if(oe.innerHTML="",l.inputPlaceholder){var re=document.createElement("option");re.innerHTML=l.inputPlaceholder,re.value="",re.disabled=!0,re.selected=!0,oe.appendChild(re)}G=function(e){for(var t in e){var n=document.createElement("option");n.value=t,n.innerHTML=e[t],l.inputValue===t&&(n.selected=!0),oe.appendChild(n)}P(oe),oe.focus()};break;case"radio":var ie=A(d,n.radio);ie.innerHTML="",G=function(e){for(var t in e){var o=document.createElement("input"),r=document.createElement("label"),i=document.createElement("span");o.type="radio",o.name=n.radio,o.value=t,l.inputValue===t&&(o.checked=!0),i.innerHTML=e[t],r.appendChild(o),r.appendChild(i),r.for=o.id,ie.appendChild(r)}P(ie);var a=ie.querySelectorAll("input");a.length&&a[0].focus()};break;case"checkbox":var ae=A(d,n.checkbox),le=i("checkbox");le.type="checkbox",le.value=1,le.id=n.checkbox,le.checked=Boolean(l.inputValue);var se=ae.getElementsByTagName("span");se.length&&ae.removeChild(se[0]),(se=document.createElement("span")).innerHTML=l.inputPlaceholder,ae.appendChild(se),P(ae);break;case"textarea":var ue=A(d,n.textarea);ue.value=l.inputValue,ue.placeholder=l.inputPlaceholder,P(ue);break;case null:break;default:console.error('SweetAlert2: Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'+l.input+'"')}"select"!==l.input&&"radio"!==l.input||(l.inputOptions instanceof Promise?(e.showLoading(),l.inputOptions.then(function(t){e.hideLoading(),G(t)})):"object"===R(l.inputOptions)?G(l.inputOptions):console.error("SweetAlert2: Unexpected type of inputOptions! Expected object or Promise, got "+R(l.inputOptions))),z(l.animation,l.onOpen),l.allowEnterKey?K(-1,1):document.activeElement&&document.activeElement.blur(),u().scrollTop=0,"undefined"==typeof MutationObserver||W||(W=new MutationObserver(e.recalculateHeight)).observe(d,{childList:!0,characterData:!0,subtree:!0})})};return J.isVisible=function(){return!!c()},J.queue=function(e){D=e;var t=function(){D=[],document.body.removeAttribute("data-swal2-queue-step")},n=[];return new Promise(function(e,o){!function r(i,a){i<D.length?(document.body.setAttribute("data-swal2-queue-step",i),J(D[i]).then(function(e){n.push(e),r(i+1,a)},function(e){t(),o(e)})):(t(),e(n))}(0)})},J.getQueueStep=function(){return document.body.getAttribute("data-swal2-queue-step")},J.insertQueueStep=function(e,t){return t&&t<D.length?D.splice(t,0,e):D.push(e)},J.deleteQueueStep=function(e){void 0!==D[e]&&D.splice(e,1)},J.close=J.closeModal=function(e){var t=u(),o=c();if(o){B(o,n.show),E(o,n.hide),clearTimeout(o.timeout),H();var r=function(){t.parentNode&&t.parentNode.removeChild(t),B(document.documentElement,n.shown),B(document.body,n.shown),Y(),$()};O&&!x(o,n.noanimation)?o.addEventListener(O,function e(){o.removeEventListener(O,e),x(o,n.hide)&&r()}):r(),null!==e&&"function"==typeof e&&setTimeout(function(){e(o)})}},J.clickConfirm=function(){return b().click()},J.clickCancel=function(){return w().click()},J.showLoading=J.enableLoading=function(){var e=c();e||J("");var t=h(),o=b(),r=w();P(t),P(o,"inline-block"),E(t,n.loading),E(e,n.loading),o.disabled=!0,r.disabled=!0},J.setDefaults=function(t){if(!t||"object"!==(void 0===t?"undefined":R(t)))return console.error("SweetAlert2: the argument for setDefaults() is required and has to be a object");for(var n in t)e.hasOwnProperty(n)||"extraParams"===n||(console.warn('SweetAlert2: Unknown parameter "'+n+'"'),delete t[n]);I(K,t)},J.resetDefaults=function(){K=I({},e)},J.noop=function(){},J.version="6.6.4",J.default=J,J}),window.Sweetalert2&&(window.sweetAlert=window.swal=window.Sweetalert2);
assets/vendor/sweetalert2/package.json ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_args": [
3
+ [
4
+ {
5
+ "raw": "sweetalert2",
6
+ "scope": null,
7
+ "escapedName": "sweetalert2",
8
+ "name": "sweetalert2",
9
+ "rawSpec": "",
10
+ "spec": "latest",
11
+ "type": "tag"
12
+ },
13
+ "/Applications/MAMP/htdocs/wpuf/wp-content/plugins/WP-User-Frontend"
14
+ ]
15
+ ],
16
+ "_from": "sweetalert2@latest",
17
+ "_id": "sweetalert2@6.6.4",
18
+ "_inCache": true,
19
+ "_location": "/sweetalert2",
20
+ "_nodeVersion": "7.10.0",
21
+ "_npmOperationalInternal": {
22
+ "host": "s3://npm-registry-packages",
23
+ "tmp": "tmp/sweetalert2-6.6.4.tgz_1495375135182_0.1165739013813436"
24
+ },
25
+ "_npmUser": {
26
+ "name": "limonte",
27
+ "email": "limon.monte@gmail.com"
28
+ },
29
+ "_npmVersion": "4.2.0",
30
+ "_phantomChildren": {},
31
+ "_requested": {
32
+ "raw": "sweetalert2",
33
+ "scope": null,
34
+ "escapedName": "sweetalert2",
35
+ "name": "sweetalert2",
36
+ "rawSpec": "",
37
+ "spec": "latest",
38
+ "type": "tag"
39
+ },
40
+ "_requiredBy": [
41
+ "#USER"
42
+ ],
43
+ "_resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-6.6.4.tgz",
44
+ "_shasum": "7799100c4dba878de2a9581b3f42d29f3dd1d9e0",
45
+ "_shrinkwrap": null,
46
+ "_spec": "sweetalert2",
47
+ "_where": "/Applications/MAMP/htdocs/wpuf/wp-content/plugins/WP-User-Frontend",
48
+ "author": {
49
+ "name": "Limon Monte",
50
+ "email": "limon.monte@gmail.com",
51
+ "url": "https://limonte.github.io"
52
+ },
53
+ "bugs": {
54
+ "url": "https://github.com/limonte/sweetalert2/issues"
55
+ },
56
+ "contributors": [
57
+ {
58
+ "name": "Johan Fagerberg",
59
+ "url": "https://github.com/birjolaxew"
60
+ },
61
+ {
62
+ "name": "Morgan Touverey-Quilling",
63
+ "email": "mtouverey@alembic-dev.com",
64
+ "url": "https://github.com/toverux"
65
+ },
66
+ {
67
+ "name": "Sam Turrell",
68
+ "email": "sam@samturrell.co.uk",
69
+ "url": "http://samturrell.co.uk"
70
+ },
71
+ {
72
+ "name": "Tristan Edwards",
73
+ "email": "tristan.edwards@me.com",
74
+ "url": "http://tristanedwards.me"
75
+ },
76
+ {
77
+ "name": "Leo Correa",
78
+ "email": "lcorr005@gmail.com",
79
+ "url": "https://leonardocorrea.com/"
80
+ },
81
+ {
82
+ "name": "Joseph Schultz",
83
+ "url": "https://github.com/acupajoe"
84
+ }
85
+ ],
86
+ "dependencies": {},
87
+ "description": "A beautiful, responsive, customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes, supported fork of sweetalert",
88
+ "devDependencies": {
89
+ "babel-plugin-external-helpers": "latest",
90
+ "babel-plugin-transform-object-assign": "latest",
91
+ "babel-preset-es2015": "latest",
92
+ "gemini": "latest",
93
+ "gemini-sauce": "latest",
94
+ "gulp": "latest",
95
+ "gulp-autoprefixer": "latest",
96
+ "gulp-clean-css": "latest",
97
+ "gulp-rename": "latest",
98
+ "gulp-rollup": "latest",
99
+ "gulp-sass": "latest",
100
+ "gulp-sass-lint": "latest",
101
+ "gulp-standard": "^8.0.0",
102
+ "gulp-uglify": "latest",
103
+ "rollup": "latest",
104
+ "rollup-plugin-babel": "latest",
105
+ "standard": "^8.0.0",
106
+ "testem": "latest",
107
+ "uglify-js": "latest"
108
+ },
109
+ "directories": {},
110
+ "dist": {
111
+ "shasum": "7799100c4dba878de2a9581b3f42d29f3dd1d9e0",
112
+ "tarball": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-6.6.4.tgz"
113
+ },
114
+ "engines": {
115
+ "node": ">=0.10.0"
116
+ },
117
+ "files": [
118
+ "dist",
119
+ "src",
120
+ "sweetalert2.d.ts"
121
+ ],
122
+ "gitHead": "a3c915077db4c4bbdf53d0c6b74bbe5383306686",
123
+ "homepage": "https://limonte.github.io/sweetalert2/",
124
+ "jsnext:main": "src/sweetalert2.js",
125
+ "keywords": [
126
+ "sweetalert",
127
+ "sweetalert2",
128
+ "alert",
129
+ "prompt"
130
+ ],
131
+ "license": "MIT",
132
+ "main": "dist/sweetalert2.js",
133
+ "maintainers": [
134
+ {
135
+ "name": "birjolaxew",
136
+ "email": "johanringmann@gmail.com"
137
+ },
138
+ {
139
+ "name": "jdcrensh",
140
+ "email": "jdcrensh@gmail.com"
141
+ },
142
+ {
143
+ "name": "limonte",
144
+ "email": "limon.monte@gmail.com"
145
+ },
146
+ {
147
+ "name": "samturrell",
148
+ "email": "sam@samturrell.co.uk"
149
+ },
150
+ {
151
+ "name": "toverux",
152
+ "email": "mtouverey@methodinthemadness.eu"
153
+ }
154
+ ],
155
+ "name": "sweetalert2",
156
+ "optionalDependencies": {},
157
+ "readme": "ERROR: No README data found!",
158
+ "repository": {
159
+ "type": "git",
160
+ "url": "git+https://github.com/limonte/sweetalert2.git"
161
+ },
162
+ "scripts": {
163
+ "assume-dist-unchanged": "git ls-files dist | tr '\\n' ' ' | xargs git update-index --assume-unchanged",
164
+ "no-assume-dist-unchanged": "git ls-files dist | tr '\\n' ' ' | xargs git update-index --no-assume-unchanged",
165
+ "test": "testem ci"
166
+ },
167
+ "standard": {
168
+ "ignore": [
169
+ "dist/"
170
+ ],
171
+ "global": [
172
+ "gemini",
173
+ "MutationObserver"
174
+ ]
175
+ },
176
+ "types": "sweetalert2.d.ts",
177
+ "version": "6.6.4"
178
+ }
assets/vendor/sweetalert2/src/colors.scss ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $swal2-white: #fff !default;
2
+ $swal2-black: #000 !default;
3
+ $swal2-transparent: rgba($swal2-black, 0) !default;
4
+
5
+ $swal2-success: #a5dc86 !default;
6
+ $swal2-success-border: rgba($swal2-success, .2) !default;
7
+ $swal2-error: #f27474 !default;
8
+ $swal2-warning: #f8bb86 !default;
9
+ $swal2-info: #3fc3ee !default;
10
+ $swal2-question: #87adbd !default;
11
+
12
+ $swal2-overlay: rgba($swal2-black, .4) !default;
13
+
14
+ $swal2-close-button: lighten($swal2-black, 80) !default;
15
+ $swal2-close-button-hover: #d55 !default;
16
+
17
+ $swal2-input-border: lighten($swal2-black, 85) !default;
18
+ $swal2-input-border-focus: #b4dbed !default;
19
+ $swal2-input-box-shadow: rgba($swal2-black, .06) !default;
20
+ $swal2-input-box-shadow-focus: #c4e6f5 !default;
21
+
22
+ $swal2-validationerror-background: #ea7d7d !default;
23
+ $swal2-validationerror-color: $swal2-white !default;
assets/vendor/sweetalert2/src/sweetalert2.js ADDED
@@ -0,0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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import defaultParams from './utils/params.js'
2
+ import { swalClasses, iconTypes } from './utils/classes.js'
3
+ import { colorLuminance } from './utils/utils.js'
4
+ import * as dom from './utils/dom.js'
5
+
6
+ let modalParams = Object.assign({}, defaultParams)
7
+ let queue = []
8
+ let swal2Observer
9
+
10
+ /*
11
+ * Set type, text and actions on modal
12
+ */
13
+ const setParameters = (params) => {
14
+ const modal = dom.getModal() || dom.init(params)
15
+
16
+ for (let param in params) {
17
+ if (!defaultParams.hasOwnProperty(param) && param !== 'extraParams') {
18
+ console.warn(`SweetAlert2: Unknown parameter "${param}"`)
19
+ }
20
+ }
21
+
22
+ // Set modal width
23
+ modal.style.width = (typeof params.width === 'number') ? params.width + 'px' : params.width
24
+
25
+ modal.style.padding = params.padding + 'px'
26
+ modal.style.background = params.background
27
+ const successIconParts = modal.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix')
28
+ for (let i = 0; i < successIconParts.length; i++) {
29
+ successIconParts[i].style.background = params.background
30
+ }
31
+
32
+ const title = dom.getTitle()
33
+ const content = dom.getContent()
34
+ const buttonsWrapper = dom.getButtonsWrapper()
35
+ const confirmButton = dom.getConfirmButton()
36
+ const cancelButton = dom.getCancelButton()
37
+ const closeButton = dom.getCloseButton()
38
+
39
+ // Title
40
+ if (params.titleText) {
41
+ title.innerText = params.titleText
42
+ } else {
43
+ title.innerHTML = params.title.split('\n').join('<br>')
44
+ }
45
+
46
+ // Content
47
+ if (params.text || params.html) {
48
+ if (typeof params.html === 'object') {
49
+ content.innerHTML = ''
50
+ if (0 in params.html) {
51
+ for (let i = 0; i in params.html; i++) {
52
+ content.appendChild(params.html[i].cloneNode(true))
53
+ }
54
+ } else {
55
+ content.appendChild(params.html.cloneNode(true))
56
+ }
57
+ } else if (params.html) {
58
+ content.innerHTML = params.html
59
+ } else if (params.text) {
60
+ content.textContent = params.text
61
+ }
62
+ dom.show(content)
63
+ } else {
64
+ dom.hide(content)
65
+ }
66
+
67
+ // Close button
68
+ if (params.showCloseButton) {
69
+ dom.show(closeButton)
70
+ } else {
71
+ dom.hide(closeButton)
72
+ }
73
+
74
+ // Custom Class
75
+ modal.className = swalClasses.modal
76
+ if (params.customClass) {
77
+ dom.addClass(modal, params.customClass)
78
+ }
79
+
80
+ // Progress steps
81
+ let progressStepsContainer = dom.getProgressSteps()
82
+ let currentProgressStep = parseInt(params.currentProgressStep === null ? sweetAlert.getQueueStep() : params.currentProgressStep, 10)
83
+ if (params.progressSteps.length) {
84
+ dom.show(progressStepsContainer)
85
+ dom.empty(progressStepsContainer)
86
+ if (currentProgressStep >= params.progressSteps.length) {
87
+ console.warn(
88
+ 'SweetAlert2: Invalid currentProgressStep parameter, it should be less than progressSteps.length ' +
89
+ '(currentProgressStep like JS arrays starts from 0)'
90
+ )
91
+ }
92
+ params.progressSteps.forEach((step, index) => {
93
+ let circle = document.createElement('li')
94
+ dom.addClass(circle, swalClasses.progresscircle)
95
+ circle.innerHTML = step
96
+ if (index === currentProgressStep) {
97
+ dom.addClass(circle, swalClasses.activeprogressstep)
98
+ }
99
+ progressStepsContainer.appendChild(circle)
100
+ if (index !== params.progressSteps.length - 1) {
101
+ let line = document.createElement('li')
102
+ dom.addClass(line, swalClasses.progressline)
103
+ line.style.width = params.progressStepsDistance
104
+ progressStepsContainer.appendChild(line)
105
+ }
106
+ })
107
+ } else {
108
+ dom.hide(progressStepsContainer)
109
+ }
110
+
111
+ // Icon
112
+ const icons = dom.getIcons()
113
+ for (let i = 0; i < icons.length; i++) {
114
+ dom.hide(icons[i])
115
+ }
116
+ if (params.type) {
117
+ let validType = false
118
+ for (let iconType in iconTypes) {
119
+ if (params.type === iconType) {
120
+ validType = true
121
+ break
122
+ }
123
+ }
124
+ if (!validType) {
125
+ console.error(`SweetAlert2: Unknown alert type: ${params.type}`)
126
+ return false
127
+ }
128
+ const icon = modal.querySelector(`.${swalClasses.icon}.${iconTypes[params.type]}`)
129
+ dom.show(icon)
130
+
131
+ // Animate icon
132
+ if (params.animation) {
133
+ switch (params.type) {
134
+ case 'success':
135
+ dom.addClass(icon, 'swal2-animate-success-icon')
136
+ dom.addClass(icon.querySelector('.swal2-success-line-tip'), 'swal2-animate-success-line-tip')
137
+ dom.addClass(icon.querySelector('.swal2-success-line-long'), 'swal2-animate-success-line-long')
138
+ break
139
+ case 'error':
140
+ dom.addClass(icon, 'swal2-animate-error-icon')
141
+ dom.addClass(icon.querySelector('.swal2-x-mark'), 'swal2-animate-x-mark')
142
+ break
143
+ default:
144
+ break
145
+ }
146
+ }
147
+ }
148
+
149
+ // Custom image
150
+ const image = dom.getImage()
151
+ if (params.imageUrl) {
152
+ image.setAttribute('src', params.imageUrl)
153
+ dom.show(image)
154
+
155
+ if (params.imageWidth) {
156
+ image.setAttribute('width', params.imageWidth)
157
+ } else {
158
+ image.removeAttribute('width')
159
+ }
160
+
161
+ if (params.imageHeight) {
162
+ image.setAttribute('height', params.imageHeight)
163
+ } else {
164
+ image.removeAttribute('height')
165
+ }
166
+
167
+ image.className = swalClasses.image
168
+ if (params.imageClass) {
169
+ dom.addClass(image, params.imageClass)
170
+ }
171
+ } else {
172
+ dom.hide(image)
173
+ }
174
+
175
+ // Cancel button
176
+ if (params.showCancelButton) {
177
+ cancelButton.style.display = 'inline-block'
178
+ } else {
179
+ dom.hide(cancelButton)
180
+ }
181
+
182
+ // Confirm button
183
+ if (params.showConfirmButton) {
184
+ dom.removeStyleProperty(confirmButton, 'display')
185
+ } else {
186
+ dom.hide(confirmButton)
187
+ }
188
+
189
+ // Buttons wrapper
190
+ if (!params.showConfirmButton && !params.showCancelButton) {
191
+ dom.hide(buttonsWrapper)
192
+ } else {
193
+ dom.show(buttonsWrapper)
194
+ }
195
+
196
+ // Edit text on cancel and confirm buttons
197
+ confirmButton.innerHTML = params.confirmButtonText
198
+ cancelButton.innerHTML = params.cancelButtonText
199
+
200
+ // Set buttons to selected background colors
201
+ if (params.buttonsStyling) {
202
+ confirmButton.style.backgroundColor = params.confirmButtonColor
203
+ cancelButton.style.backgroundColor = params.cancelButtonColor
204
+ }
205
+
206
+ // Add buttons custom classes
207
+ confirmButton.className = swalClasses.confirm
208
+ dom.addClass(confirmButton, params.confirmButtonClass)
209
+ cancelButton.className = swalClasses.cancel
210
+ dom.addClass(cancelButton, params.cancelButtonClass)
211
+
212
+ // Buttons styling
213
+ if (params.buttonsStyling) {
214
+ dom.addClass(confirmButton, swalClasses.styled)
215
+ dom.addClass(cancelButton, swalClasses.styled)
216
+ } else {
217
+ dom.removeClass(confirmButton, swalClasses.styled)
218
+ dom.removeClass(cancelButton, swalClasses.styled)
219
+
220
+ confirmButton.style.backgroundColor = confirmButton.style.borderLeftColor = confirmButton.style.borderRightColor = ''
221
+ cancelButton.style.backgroundColor = cancelButton.style.borderLeftColor = cancelButton.style.borderRightColor = ''
222
+ }
223
+
224
+ // CSS animation
225
+ if (params.animation === true) {
226
+ dom.removeClass(modal, swalClasses.noanimation)
227
+ } else {
228
+ dom.addClass(modal, swalClasses.noanimation)
229
+ }
230
+ }
231
+
232
+ /*
233
+ * Animations
234
+ */
235
+ const openModal = (animation, onComplete) => {
236
+ const container = dom.getContainer()
237
+ const modal = dom.getModal()
238
+
239
+ if (animation) {
240
+ dom.addClass(modal, swalClasses.show)
241
+ dom.addClass(container, swalClasses.fade)
242
+ dom.removeClass(modal, swalClasses.hide)
243
+ } else {
244
+ dom.removeClass(modal, swalClasses.fade)
245
+ }
246
+ dom.show(modal)
247
+
248
+ // scrolling is 'hidden' until animation is done, after that 'auto'
249
+ container.style.overflowY = 'hidden'
250
+ if (dom.animationEndEvent && !dom.hasClass(modal, swalClasses.noanimation)) {
251
+ modal.addEventListener(dom.animationEndEvent, function swalCloseEventFinished () {
252
+ modal.removeEventListener(dom.animationEndEvent, swalCloseEventFinished)
253
+ container.style.overflowY = 'auto'
254
+ })
255
+ } else {
256
+ container.style.overflowY = 'auto'
257
+ }
258
+
259
+ dom.addClass(document.documentElement, swalClasses.shown)
260
+ dom.addClass(document.body, swalClasses.shown)
261
+ dom.addClass(container, swalClasses.shown)
262
+ fixScrollbar()
263
+ iOSfix()
264
+ dom.states.previousActiveElement = document.activeElement
265
+ if (onComplete !== null && typeof onComplete === 'function') {
266
+ setTimeout(function () {
267
+ onComplete(modal)
268
+ })
269
+ }
270
+ }
271
+
272
+ const fixScrollbar = () => {
273
+ // for queues, do not do this more than once
274
+ if (dom.states.previousBodyPadding !== null) {
275
+ return
276
+ }
277
+ // if the body has overflow
278
+ if (document.body.scrollHeight > window.innerHeight) {
279
+ // add padding so the content doesn't shift after removal of scrollbar
280
+ dom.states.previousBodyPadding = document.body.style.paddingRight
281
+ document.body.style.paddingRight = dom.measureScrollbar() + 'px'
282
+ }
283
+ }
284
+
285
+ const undoScrollbar = () => {
286
+ if (dom.states.previousBodyPadding !== null) {
287
+ document.body.style.paddingRight = dom.states.previousBodyPadding
288
+ dom.states.previousBodyPadding = null
289
+ }
290
+ }
291
+
292
+ // Fix iOS scrolling http://stackoverflow.com/q/39626302/1331425
293
+ const iOSfix = () => {
294
+ const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream
295
+ if (iOS && !dom.hasClass(document.body, swalClasses.iosfix)) {
296
+ const offset = document.body.scrollTop
297
+ document.body.style.top = (offset * -1) + 'px'
298
+ dom.addClass(document.body, swalClasses.iosfix)
299
+ }
300
+ }
301
+
302
+ const undoIOSfix = () => {
303
+ if (dom.hasClass(document.body, swalClasses.iosfix)) {
304
+ const offset = parseInt(document.body.style.top, 10)
305
+ dom.removeClass(document.body, swalClasses.iosfix)
306
+ document.body.style.top = ''
307
+ document.body.scrollTop = (offset * -1)
308
+ }
309
+ }
310
+
311
+ // SweetAlert entry point
312
+ const sweetAlert = (...args) => {
313
+ if (args[0] === undefined) {
314
+ console.error('SweetAlert2 expects at least 1 attribute!')
315
+ return false
316
+ }
317
+
318
+ let params = Object.assign({}, modalParams)
319
+
320
+ switch (typeof args[0]) {
321
+ case 'string':
322
+ [params.title, params.html, params.type] = args
323
+ break
324
+
325
+ case 'object':
326
+ Object.assign(params, args[0])
327
+ params.extraParams = args[0].extraParams
328
+
329
+ if (params.input === 'email' && params.inputValidator === null) {
330
+ params.inputValidator = (email) => {
331
+ return new Promise((resolve, reject) => {
332
+ const emailRegex = /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/
333
+ if (emailRegex.test(email)) {
334
+ resolve()
335
+ } else {
336
+ reject('Invalid email address')
337
+ }
338
+ })
339
+ }
340
+ }
341
+
342
+ if (params.input === 'url' && params.inputValidator === null) {
343
+ params.inputValidator = (url) => {
344
+ return new Promise((resolve, reject) => {
345
+ const urlRegex = /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/
346
+ if (urlRegex.test(url)) {
347
+ resolve()
348
+ } else {
349
+ reject('Invalid URL')
350
+ }
351
+ })
352
+ }
353
+ }
354
+ break
355
+
356
+ default:
357
+ console.error('SweetAlert2: Unexpected type of argument! Expected "string" or "object", got ' + typeof args[0])
358
+ return false
359
+ }
360
+
361
+ setParameters(params)
362
+
363
+ const container = dom.getContainer()
364
+ const modal = dom.getModal()
365
+
366
+ return new Promise((resolve, reject) => {
367
+ // Close on timer
368
+ if (params.timer) {
369
+ modal.timeout = setTimeout(() => {
370
+ sweetAlert.closeModal(params.onClose)
371
+ if (params.useRejections) {
372
+ reject('timer')
373
+ } else {
374
+ resolve({dismiss: 'timer'})
375
+ }
376
+ }, params.timer)
377
+ }
378
+
379
+ // Get input element by specified type or, if type isn't specified, by params.input
380
+ const getInput = (inputType) => {
381
+ inputType = inputType || params.input
382
+ if (!inputType) {
383
+ return null
384
+ }
385
+ switch (inputType) {
386
+ case 'select':
387
+ case 'textarea':
388
+ case 'file':
389
+ return dom.getChildByClass(modal, swalClasses[inputType])
390
+ case 'checkbox':
391
+ return modal.querySelector(`.${swalClasses.checkbox} input`)
392
+ case 'radio':
393
+ return modal.querySelector(`.${swalClasses.radio} input:checked`) ||
394
+ modal.querySelector(`.${swalClasses.radio} input:first-child`)
395
+ case 'range':
396
+ return modal.querySelector(`.${swalClasses.range} input`)
397
+ default:
398
+ return dom.getChildByClass(modal, swalClasses.input)
399
+ }
400
+ }
401
+
402
+ // Get the value of the modal input
403
+ const getInputValue = () => {
404
+ const input = getInput()
405
+ if (!input) {
406
+ return null
407
+ }
408
+ switch (params.input) {
409
+ case 'checkbox':
410
+ return input.checked ? 1 : 0
411
+ case 'radio':
412
+ return input.checked ? input.value : null
413
+ case 'file':
414
+ return input.files.length ? input.files[0] : null
415
+ default:
416
+ return params.inputAutoTrim ? input.value.trim() : input.value
417
+ }
418
+ }
419
+
420
+ // input autofocus
421
+ if (params.input) {
422
+ setTimeout(() => {
423
+ const input = getInput()
424
+ if (input) {
425
+ dom.focusInput(input)
426
+ }
427
+ }, 0)
428
+ }
429
+
430
+ const confirm = (value) => {
431
+ if (params.showLoaderOnConfirm) {
432
+ sweetAlert.showLoading()
433
+ }
434
+
435
+ if (params.preConfirm) {
436
+ params.preConfirm(value, params.extraParams).then(
437
+ (preConfirmValue) => {
438
+ sweetAlert.closeModal(params.onClose)
439
+ resolve(preConfirmValue || value)
440
+ },
441
+ (error) => {
442
+ sweetAlert.hideLoading()
443
+ if (error) {
444
+ sweetAlert.showValidationError(error)
445
+ }
446
+ }
447
+ )
448
+ } else {
449
+ sweetAlert.closeModal(params.onClose)
450
+ if (params.useRejections) {
451
+ resolve(value)
452
+ } else {
453
+ resolve({value: value})
454
+ }
455
+ }
456
+ }
457
+
458
+ // Mouse interactions
459
+ const onButtonEvent = (event) => {
460
+ const e = event || window.event
461
+ const target = e.target || e.srcElement
462
+ const confirmButton = dom.getConfirmButton()
463
+ const cancelButton = dom.getCancelButton()
464
+ const targetedConfirm = confirmButton && (confirmButton === target || confirmButton.contains(target))
465
+ const targetedCancel = cancelButton && (cancelButton === target || cancelButton.contains(target))
466
+
467
+ switch (e.type) {
468
+ case 'mouseover':
469
+ case 'mouseup':
470
+ if (params.buttonsStyling) {
471
+ if (targetedConfirm) {
472
+ confirmButton.style.backgroundColor = colorLuminance(params.confirmButtonColor, -0.1)
473
+ } else if (targetedCancel) {
474
+ cancelButton.style.backgroundColor = colorLuminance(params.cancelButtonColor, -0.1)
475
+ }
476
+ }
477
+ break
478
+ case 'mouseout':
479
+ if (params.buttonsStyling) {
480
+ if (targetedConfirm) {
481
+ confirmButton.style.backgroundColor = params.confirmButtonColor
482
+ } else if (targetedCancel) {
483
+ cancelButton.style.backgroundColor = params.cancelButtonColor
484
+ }
485
+ }
486
+ break
487
+ case 'mousedown':
488
+ if (params.buttonsStyling) {
489
+ if (targetedConfirm) {
490
+ confirmButton.style.backgroundColor = colorLuminance(params.confirmButtonColor, -0.2)
491
+ } else if (targetedCancel) {
492
+ cancelButton.style.backgroundColor = colorLuminance(params.cancelButtonColor, -0.2)
493
+ }
494
+ }
495
+ break
496
+ case 'click':
497
+ // Clicked 'confirm'
498
+ if (targetedConfirm && sweetAlert.isVisible()) {
499
+ sweetAlert.disableButtons()
500
+ if (params.input) {
501
+ const inputValue = getInputValue()
502
+
503
+ if (params.inputValidator) {
504
+ sweetAlert.disableInput()
505
+ params.inputValidator(inputValue, params.extraParams).then(
506
+ () => {
507
+ sweetAlert.enableButtons()
508
+ sweetAlert.enableInput()
509
+ confirm(inputValue)
510
+ },
511
+ (error) => {
512
+ sweetAlert.enableButtons()
513
+ sweetAlert.enableInput()
514
+ if (error) {
515
+ sweetAlert.showValidationError(error)
516
+ }
517
+ }
518
+ )
519
+ } else {
520
+ confirm(inputValue)
521
+ }
522
+ } else {
523
+ confirm(true)
524
+ }
525
+
526
+ // Clicked 'cancel'
527
+ } else if (targetedCancel && sweetAlert.isVisible()) {
528
+ sweetAlert.disableButtons()
529
+ sweetAlert.closeModal(params.onClose)
530
+ if (params.useRejections) {
531
+ reject('cancel')
532
+ } else {
533
+ resolve({dismiss: 'cancel'})
534
+ }
535
+ }
536
+ break
537
+ default:
538
+ }
539
+ }
540
+
541
+ const buttons = modal.querySelectorAll('button')
542
+ for (let i = 0; i < buttons.length; i++) {
543
+ buttons[i].onclick = onButtonEvent
544
+ buttons[i].onmouseover = onButtonEvent
545
+ buttons[i].onmouseout = onButtonEvent
546
+ buttons[i].onmousedown = onButtonEvent
547
+ }
548
+
549
+ // Closing modal by close button
550
+ dom.getCloseButton().onclick = () => {
551
+ sweetAlert.closeModal(params.onClose)
552
+ if (params.useRejections) {
553
+ reject('close')
554
+ } else {
555
+ resolve({dismiss: 'close'})
556
+ }
557
+ }
558
+
559
+ // Closing modal by overlay click
560
+ container.onclick = (e) => {
561
+ if (e.target !== container) {
562
+ return
563
+ }
564
+ if (params.allowOutsideClick) {
565
+ sweetAlert.closeModal(params.onClose)
566
+ if (params.useRejections) {
567
+ reject('overlay')
568
+ } else {
569
+ resolve({dismiss: 'overlay'})
570
+ }
571
+ }
572
+ }
573
+
574
+ const buttonsWrapper = dom.getButtonsWrapper()
575
+ const confirmButton = dom.getConfirmButton()
576
+ const cancelButton = dom.getCancelButton()
577
+
578
+ // Reverse buttons (Confirm on the right side)
579
+ if (params.reverseButtons) {
580
+ confirmButton.parentNode.insertBefore(cancelButton, confirmButton)
581
+ } else {
582
+ confirmButton.parentNode.insertBefore(confirmButton, cancelButton)
583
+ }
584
+
585
+ // Focus handling
586
+ const setFocus = (index, increment) => {
587
+ const focusableElements = dom.getFocusableElements(params.focusCancel)
588
+ // search for visible elements and select the next possible match
589
+ for (let i = 0; i < focusableElements.length; i++) {
590
+ index = index + increment
591
+
592
+ // rollover to first item
593
+ if (index === focusableElements.length) {
594
+ index = 0
595
+
596
+ // go to last item
597
+ } else if (index === -1) {
598
+ index = focusableElements.length - 1
599
+ }
600
+
601
+ // determine if element is visible
602
+ const el = focusableElements[index]
603
+ if (dom.isVisible(el)) {
604
+ return el.focus()
605
+ }
606
+ }
607
+ }
608
+
609
+ const handleKeyDown = (event) => {
610
+ const e = event || window.event
611
+ const keyCode = e.keyCode || e.which
612
+
613
+ if ([9, 13, 32, 27, 37, 38, 39, 40].indexOf(keyCode) === -1) {
614
+ // Don't do work on keys we don't care about.
615
+ return
616
+ }
617
+
618
+ const targetElement = e.target || e.srcElement
619
+
620
+ const focusableElements = dom.getFocusableElements(params.focusCancel)
621
+ let btnIndex = -1 // Find the button - note, this is a nodelist, not an array.
622
+ for (let i = 0; i < focusableElements.length; i++) {
623
+ if (targetElement === focusableElements[i]) {
624
+ btnIndex = i
625
+ break
626
+ }
627
+ }
628
+
629
+ // TAB
630
+ if (keyCode === 9) {
631
+ if (!e.shiftKey) {
632
+ // Cycle to the next button
633
+ setFocus(btnIndex, 1)
634
+ } else {
635
+ // Cycle to the prev button
636
+ setFocus(btnIndex, -1)
637
+ }
638
+ e.stopPropagation()
639
+ e.preventDefault()
640
+
641
+ // ARROWS - switch focus between buttons
642
+ } else if (keyCode === 37 || keyCode === 38 || keyCode === 39 || keyCode === 40) {
643
+ // focus Cancel button if Confirm button is currently focused
644
+ if (document.activeElement === confirmButton && dom.isVisible(cancelButton)) {
645
+ cancelButton.focus()
646
+ // and vice versa
647
+ } else if (document.activeElement === cancelButton && dom.isVisible(confirmButton)) {
648
+ confirmButton.focus()
649
+ }
650
+
651
+ // ENTER/SPACE
652
+ } else if (keyCode === 13 || keyCode === 32) {
653
+ if (btnIndex === -1 && params.allowEnterKey) {
654
+ // ENTER/SPACE clicked outside of a button.
655
+ if (params.focusCancel) {
656
+ dom.fireClick(cancelButton, e)
657
+ } else {
658
+ dom.fireClick(confirmButton, e)
659
+ }
660
+ e.stopPropagation()
661
+ e.preventDefault()
662
+ }
663
+
664
+ // ESC
665
+ } else if (keyCode === 27 && params.allowEscapeKey === true) {
666
+ sweetAlert.closeModal(params.onClose)
667
+ if (params.useRejections) {
668
+ reject('esc')
669
+ } else {
670
+ resolve({dismiss: 'esc'})
671
+ }
672
+ }
673
+ }
674
+
675
+ if (!window.onkeydown || window.onkeydown.toString() !== handleKeyDown.toString()) {
676
+ dom.states.previousWindowKeyDown = window.onkeydown
677
+ window.onkeydown = handleKeyDown
678
+ }
679
+
680
+ // Loading state
681
+ if (params.buttonsStyling) {
682
+ confirmButton.style.borderLeftColor = params.confirmButtonColor
683
+ confirmButton.style.borderRightColor = params.confirmButtonColor
684
+ }
685
+
686
+ /**
687
+ * Show spinner instead of Confirm button and disable Cancel button
688
+ */
689
+ sweetAlert.hideLoading = sweetAlert.disableLoading = () => {
690
+ if (!params.showConfirmButton) {
691
+ dom.hide(confirmButton)
692
+ if (!params.showCancelButton) {
693
+ dom.hide(dom.getButtonsWrapper())
694
+ }
695
+ }
696
+ dom.removeClass(buttonsWrapper, swalClasses.loading)
697
+ dom.removeClass(modal, swalClasses.loading)
698
+ confirmButton.disabled = false
699
+ cancelButton.disabled = false
700
+ }
701
+
702
+ sweetAlert.getTitle = () => dom.getTitle()
703
+ sweetAlert.getContent = () => dom.getContent()
704
+ sweetAlert.getInput = () => getInput()
705
+ sweetAlert.getImage = () => dom.getImage()
706
+ sweetAlert.getButtonsWrapper = () => dom.getButtonsWrapper()
707
+ sweetAlert.getConfirmButton = () => dom.getConfirmButton()
708
+ sweetAlert.getCancelButton = () => dom.getCancelButton()
709
+
710
+ sweetAlert.enableButtons = () => {
711
+ confirmButton.disabled = false
712
+ cancelButton.disabled = false
713
+ }
714
+
715
+ sweetAlert.disableButtons = () => {
716
+ confirmButton.disabled = true
717
+ cancelButton.disabled = true
718
+ }
719
+
720
+ sweetAlert.enableConfirmButton = () => {
721
+ confirmButton.disabled = false
722
+ }
723
+
724
+ sweetAlert.disableConfirmButton = () => {
725
+ confirmButton.disabled = true
726
+ }
727
+
728
+ sweetAlert.enableInput = () => {
729
+ const input = getInput()
730
+ if (!input) {
731
+ return false
732
+ }
733
+ if (input.type === 'radio') {
734
+ const radiosContainer = input.parentNode.parentNode
735
+ const radios = radiosContainer.querySelectorAll('input')
736
+ for (let i = 0; i < radios.length; i++) {
737
+ radios[i].disabled = false
738
+ }
739
+ } else {
740
+ input.disabled = false
741
+ }
742
+ }
743
+
744
+ sweetAlert.disableInput = () => {
745
+ const input = getInput()
746
+ if (!input) {
747
+ return false
748
+ }
749
+ if (input && input.type === 'radio') {
750
+ const radiosContainer = input.parentNode.parentNode
751
+ const radios = radiosContainer.querySelectorAll('input')
752
+ for (let i = 0; i < radios.length; i++) {
753
+ radios[i].disabled = true
754
+ }
755
+ } else {
756
+ input.disabled = true
757
+ }
758
+ }
759
+
760
+ // Set modal min-height to disable scrolling inside the modal
761
+ sweetAlert.recalculateHeight = dom.debounce(() => {
762
+ const modal = dom.getModal()
763
+ if (!modal) {
764
+ return
765
+ }
766
+ const prevState = modal.style.display
767
+ modal.style.minHeight = ''
768
+ dom.show(modal)
769
+ modal.style.minHeight = (modal.scrollHeight + 1) + 'px'
770
+ modal.style.display = prevState
771
+ }, 50)
772
+
773
+ // Show block with validation error
774
+ sweetAlert.showValidationError = (error) => {
775
+ const validationError = dom.getValidationError()
776
+ validationError.innerHTML = error
777
+ dom.show(validationError)
778
+
779
+ const input = getInput()
780
+ if (input) {
781
+ dom.focusInput(input)
782
+ dom.addClass(input, swalClasses.inputerror)
783
+ }
784
+ }
785
+
786
+ // Hide block with validation error
787
+ sweetAlert.resetValidationError = () => {
788
+ const validationError = dom.getValidationError()
789
+ dom.hide(validationError)
790
+ sweetAlert.recalculateHeight()
791
+
792
+ const input = getInput()
793
+ if (input) {
794
+ dom.removeClass(input, swalClasses.inputerror)
795
+ }
796
+ }
797
+
798
+ sweetAlert.getProgressSteps = () => {
799
+ return params.progressSteps
800
+ }
801
+
802
+ sweetAlert.setProgressSteps = (progressSteps) => {
803
+ params.progressSteps = progressSteps
804
+ setParameters(params)
805
+ }
806
+
807
+ sweetAlert.showProgressSteps = () => {
808
+ dom.show(dom.getProgressSteps())
809
+ }
810
+
811
+ sweetAlert.hideProgressSteps = () => {
812
+ dom.hide(dom.getProgressSteps())
813
+ }
814
+
815
+ sweetAlert.enableButtons()
816
+ sweetAlert.hideLoading()
817
+ sweetAlert.resetValidationError()
818
+
819
+ // inputs
820
+ const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']
821
+ let input
822
+ for (let i = 0; i < inputTypes.length; i++) {
823
+ const inputClass = swalClasses[inputTypes[i]]
824
+ const inputContainer = dom.getChildByClass(modal, inputClass)
825
+ input = getInput(inputTypes[i])
826
+
827
+ // set attributes
828
+ if (input) {
829
+ for (let j in input.attributes) {
830
+ if (input.attributes.hasOwnProperty(j)) {
831
+ const attrName = input.attributes[j].name
832
+ if (attrName !== 'type' && attrName !== 'value') {
833
+ input.removeAttribute(attrName)
834
+ }
835
+ }
836
+ }
837
+ for (let attr in params.inputAttributes) {
838
+ input.setAttribute(attr, params.inputAttributes[attr])
839
+ }
840
+ }
841
+
842
+ // set class
843
+ inputContainer.className = inputClass
844
+ if (params.inputClass) {
845
+ dom.addClass(inputContainer, params.inputClass)
846
+ }
847
+
848
+ dom.hide(inputContainer)
849
+ }
850
+
851
+ let populateInputOptions
852
+ switch (params.input) {
853
+ case 'text':
854
+ case 'email':
855
+ case 'password':
856
+ case 'number':
857
+ case 'tel':
858
+ case 'url':
859
+ input = dom.getChildByClass(modal, swalClasses.input)
860
+ input.value = params.inputValue
861
+ input.placeholder = params.inputPlaceholder
862
+ input.type = params.input
863
+ dom.show(input)
864
+ break
865
+ case 'file':
866
+ input = dom.getChildByClass(modal, swalClasses.file)
867
+ input.placeholder = params.inputPlaceholder
868
+ input.type = params.input
869
+ dom.show(input)
870
+ break
871
+ case 'range':
872
+ const range = dom.getChildByClass(modal, swalClasses.range)
873
+ const rangeInput = range.querySelector('input')
874
+ const rangeOutput = range.querySelector('output')
875
+ rangeInput.value = params.inputValue
876
+ rangeInput.type = params.input
877
+ rangeOutput.value = params.inputValue
878
+ dom.show(range)
879
+ break
880
+ case 'select':
881
+ const select = dom.getChildByClass(modal, swalClasses.select)
882
+ select.innerHTML = ''
883
+ if (params.inputPlaceholder) {
884
+ const placeholder = document.createElement('option')
885
+ placeholder.innerHTML = params.inputPlaceholder
886
+ placeholder.value = ''
887
+ placeholder.disabled = true
888
+ placeholder.selected = true
889
+ select.appendChild(placeholder)
890
+ }
891
+ populateInputOptions = (inputOptions) => {
892
+ for (let optionValue in inputOptions) {
893
+ const option = document.createElement('option')
894
+ option.value = optionValue
895
+ option.innerHTML = inputOptions[optionValue]
896
+ if (params.inputValue === optionValue) {
897
+ option.selected = true
898
+ }
899
+ select.appendChild(option)
900
+ }
901
+ dom.show(select)
902
+ select.focus()
903
+ }
904
+ break
905
+ case 'radio':
906
+ const radio = dom.getChildByClass(modal, swalClasses.radio)
907
+ radio.innerHTML = ''
908
+ populateInputOptions = (inputOptions) => {
909
+ for (let radioValue in inputOptions) {
910
+ const radioInput = document.createElement('input')
911
+ const radioLabel = document.createElement('label')
912
+ const radioLabelSpan = document.createElement('span')
913
+ radioInput.type = 'radio'
914
+ radioInput.name = swalClasses.radio
915
+ radioInput.value = radioValue
916
+ if (params.inputValue === radioValue) {
917
+ radioInput.checked = true
918
+ }
919
+ radioLabelSpan.innerHTML = inputOptions[radioValue]
920
+ radioLabel.appendChild(radioInput)
921
+ radioLabel.appendChild(radioLabelSpan)
922
+ radioLabel.for = radioInput.id
923
+ radio.appendChild(radioLabel)
924
+ }
925
+ dom.show(radio)
926
+ const radios = radio.querySelectorAll('input')
927
+ if (radios.length) {
928
+ radios[0].focus()
929
+ }
930
+ }
931
+ break
932
+ case 'checkbox':
933
+ const checkbox = dom.getChildByClass(modal, swalClasses.checkbox)
934
+ const checkboxInput = getInput('checkbox')
935
+ checkboxInput.type = 'checkbox'
936
+ checkboxInput.value = 1
937
+ checkboxInput.id = swalClasses.checkbox
938
+ checkboxInput.checked = Boolean(params.inputValue)
939
+ let label = checkbox.getElementsByTagName('span')
940
+ if (label.length) {
941
+ checkbox.removeChild(label[0])
942
+ }
943
+ label = document.createElement('span')
944
+ label.innerHTML = params.inputPlaceholder
945
+ checkbox.appendChild(label)
946
+ dom.show(checkbox)
947
+ break
948
+ case 'textarea':
949
+ const textarea = dom.getChildByClass(modal, swalClasses.textarea)
950
+ textarea.value = params.inputValue
951
+ textarea.placeholder = params.inputPlaceholder
952
+ dom.show(textarea)
953
+ break
954
+ case null:
955
+ break
956
+ default:
957
+ console.error(`SweetAlert2: Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${params.input}"`)
958
+ break
959
+ }
960
+
961
+ if (params.input === 'select' || params.input === 'radio') {
962
+ if (params.inputOptions instanceof Promise) {
963
+ sweetAlert.showLoading()
964
+ params.inputOptions.then((inputOptions) => {
965
+ sweetAlert.hideLoading()
966
+ populateInputOptions(inputOptions)
967
+ })
968
+ } else if (typeof params.inputOptions === 'object') {
969
+ populateInputOptions(params.inputOptions)
970
+ } else {
971
+ console.error('SweetAlert2: Unexpected type of inputOptions! Expected object or Promise, got ' + typeof params.inputOptions)
972
+ }
973
+ }
974
+
975
+ openModal(params.animation, params.onOpen)
976
+
977
+ // Focus the first element (input or button)
978
+ if (params.allowEnterKey) {
979
+ setFocus(-1, 1)
980
+ } else {
981
+ if (document.activeElement) {
982
+ document.activeElement.blur()
983
+ }
984
+ }
985
+
986
+ // fix scroll
987
+ dom.getContainer().scrollTop = 0
988
+
989
+ // Observe changes inside the modal and adjust height
990
+ if (typeof MutationObserver !== 'undefined' && !swal2Observer) {
991
+ swal2Observer = new MutationObserver(sweetAlert.recalculateHeight)
992
+ swal2Observer.observe(modal, {childList: true, characterData: true, subtree: true})
993
+ }
994
+ })
995
+ }
996
+
997
+ /*
998
+ * Global function to determine if swal2 modal is shown
999
+ */
1000
+ sweetAlert.isVisible = () => {
1001
+ return !!dom.getModal()
1002
+ }
1003
+
1004
+ /*
1005
+ * Global function for chaining sweetAlert modals
1006
+ */
1007
+ sweetAlert.queue = (steps) => {
1008
+ queue = steps
1009
+ const resetQueue = () => {
1010
+ queue = []
1011
+ document.body.removeAttribute('data-swal2-queue-step')
1012
+ }
1013
+ let queueResult = []
1014
+ return new Promise((resolve, reject) => {
1015
+ (function step (i, callback) {
1016
+ if (i < queue.length) {
1017
+ document.body.setAttribute('data-swal2-queue-step', i)
1018
+
1019
+ sweetAlert(queue[i]).then(
1020
+ (result) => {
1021
+ queueResult.push(result)
1022
+ step(i + 1, callback)
1023
+ },
1024
+ (dismiss) => {
1025
+ resetQueue()
1026
+ reject(dismiss)
1027
+ }
1028
+ )
1029
+ } else {
1030
+ resetQueue()
1031
+ resolve(queueResult)
1032
+ }
1033
+ })(0)
1034
+ })
1035
+ }
1036
+
1037
+ /*
1038
+ * Global function for getting the index of current modal in queue
1039
+ */
1040
+ sweetAlert.getQueueStep = () => document.body.getAttribute('data-swal2-queue-step')
1041
+
1042
+ /*
1043
+ * Global function for inserting a modal to the queue
1044
+ */
1045
+ sweetAlert.insertQueueStep = (step, index) => {
1046
+ if (index && index < queue.length) {
1047
+ return queue.splice(index, 0, step)
1048
+ }
1049
+ return queue.push(step)
1050
+ }
1051
+
1052
+ /*
1053
+ * Global function for deleting a modal from the queue
1054
+ */
1055
+ sweetAlert.deleteQueueStep = (index) => {
1056
+ if (typeof queue[index] !== 'undefined') {
1057
+ queue.splice(index, 1)
1058
+ }
1059
+ }
1060
+
1061
+ /*
1062
+ * Global function to close sweetAlert
1063
+ */
1064
+ sweetAlert.close = sweetAlert.closeModal = (onComplete) => {
1065
+ const container = dom.getContainer()
1066
+ const modal = dom.getModal()
1067
+ if (!modal) {
1068
+ return
1069
+ }
1070
+ dom.removeClass(modal, swalClasses.show)
1071
+ dom.addClass(modal, swalClasses.hide)
1072
+ clearTimeout(modal.timeout)
1073
+
1074
+ dom.resetPrevState()
1075
+
1076
+ const removeModalAndResetState = () => {
1077
+ if (container.parentNode) {
1078
+ container.parentNode.removeChild(container)
1079
+ }
1080
+ dom.removeClass(document.documentElement, swalClasses.shown)
1081
+ dom.removeClass(document.body, swalClasses.shown)
1082
+ undoScrollbar()
1083
+ undoIOSfix()
1084
+ }
1085
+
1086
+ // If animation is supported, animate
1087
+ if (dom.animationEndEvent && !dom.hasClass(modal, swalClasses.noanimation)) {
1088
+ modal.addEventListener(dom.animationEndEvent, function swalCloseEventFinished () {
1089
+ modal.removeEventListener(dom.animationEndEvent, swalCloseEventFinished)
1090
+ if (dom.hasClass(modal, swalClasses.hide)) {
1091
+ removeModalAndResetState()
1092
+ }
1093
+ })
1094
+ } else {
1095
+ // Otherwise, remove immediately
1096
+ removeModalAndResetState()
1097
+ }
1098
+ if (onComplete !== null && typeof onComplete === 'function') {
1099
+ setTimeout(function () {
1100
+ onComplete(modal)
1101
+ })
1102
+ }
1103
+ }
1104
+
1105
+ /*
1106
+ * Global function to click 'Confirm' button
1107
+ */
1108
+ sweetAlert.clickConfirm = () => dom.getConfirmButton().click()
1109
+
1110
+ /*
1111
+ * Global function to click 'Cancel' button
1112
+ */
1113
+ sweetAlert.clickCancel = () => dom.getCancelButton().click()
1114
+
1115
+ /**
1116
+ * Show spinner instead of Confirm button and disable Cancel button
1117
+ */
1118
+ sweetAlert.showLoading = sweetAlert.enableLoading = () => {
1119
+ const modal = dom.getModal()
1120
+ if (!modal) {
1121
+ sweetAlert('')
1122
+ }
1123
+ const buttonsWrapper = dom.getButtonsWrapper()
1124
+ const confirmButton = dom.getConfirmButton()
1125
+ const cancelButton = dom.getCancelButton()
1126
+
1127
+ dom.show(buttonsWrapper)
1128
+ dom.show(confirmButton, 'inline-block')
1129
+ dom.addClass(buttonsWrapper, swalClasses.loading)
1130
+ dom.addClass(modal, swalClasses.loading)
1131
+ confirmButton.disabled = true
1132
+ cancelButton.disabled = true
1133
+ }
1134
+
1135
+ /**
1136
+ * Set default params for each popup
1137
+ * @param {Object} userParams
1138
+ */
1139
+ sweetAlert.setDefaults = (userParams) => {
1140
+ if (!userParams || typeof userParams !== 'object') {
1141
+ return console.error('SweetAlert2: the argument for setDefaults() is required and has to be a object')
1142
+ }
1143
+
1144
+ for (let param in userParams) {
1145
+ if (!defaultParams.hasOwnProperty(param) && param !== 'extraParams') {
1146
+ console.warn(`SweetAlert2: Unknown parameter "${param}"`)
1147
+ delete userParams[param]
1148
+ }
1149
+ }
1150
+
1151
+ Object.assign(modalParams, userParams)
1152
+ }
1153
+
1154
+ /**
1155
+ * Reset default params for each popup
1156
+ */
1157
+ sweetAlert.resetDefaults = () => {
1158
+ modalParams = Object.assign({}, defaultParams)
1159
+ }
1160
+
1161
+ sweetAlert.noop = () => { }
1162
+
1163
+ sweetAlert.version = ''
1164
+
1165
+ sweetAlert.default = sweetAlert
1166
+
1167
+ export default sweetAlert
assets/vendor/sweetalert2/src/sweetalert2.scss ADDED
@@ -0,0 +1,786 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // SweetAlert2
2
+ // github.com/limonte/sweetalert2
3
+
4
+ @import 'colors';
5
+
6
+ body {
7
+ &.swal2-shown {
8
+ overflow-y: hidden;
9
+ }
10
+
11
+ &.swal2-iosfix {
12
+ position: fixed;
13
+ left: 0;
14
+ right: 0;
15
+ }
16
+ }
17
+
18
+ .swal2-container {
19
+ // centering
20
+ display: flex;
21
+ align-items: center;
22
+ position: fixed;
23
+ top: 0;
24
+ left: 0;
25
+ bottom: 0;
26
+ right: 0;
27
+ padding: 10px;
28
+
29
+ // backdrop
30
+ background-color: transparent;
31
+
32
+ z-index: 1060;
33
+
34
+ &.swal2-fade {
35
+ transition: background-color .1s;
36
+ }
37
+
38
+ &.swal2-shown {
39
+ background-color: $swal2-overlay;
40
+ }
41
+ }
42
+
43
+ .swal2-modal {
44
+ background-color: $swal2-white;
45
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
46
+ border-radius: 5px;
47
+ box-sizing: border-box;
48
+ text-align: center;
49
+ margin: auto;
50
+ overflow-x: hidden;
51
+ overflow-y: auto;
52
+ display: none;
53
+ position: relative;
54
+ max-width: 100%;
55
+
56
+ &:focus {
57
+ outline: none;
58
+ }
59
+
60
+ &.swal2-loading {
61
+ overflow-y: hidden;
62
+ }
63
+
64
+ .swal2-title {
65
+ color: lighten($swal2-black, 35);
66
+ font-size: 30px;
67
+ text-align: center;
68
+ font-weight: 600;
69
+ text-transform: none;
70
+ position: relative;
71
+ margin: 0 0 .4em;
72
+ padding: 0;
73
+ display: block;
74
+ word-wrap: break-word;
75
+ }
76
+
77
+ .swal2-buttonswrapper {
78
+ margin-top: 15px;
79
+
80
+ &:not(.swal2-loading) {
81
+ .swal2-styled {
82
+ &[disabled] {
83
+ opacity: .4;
84
+ cursor: no-drop;
85
+ }
86
+ }
87
+ }
88
+
89
+ &.swal2-loading {
90
+ .swal2-styled {
91
+ &.swal2-confirm {
92
+ box-sizing: border-box;
93
+ border: 4px solid transparent;
94
+ border-color: transparent;
95
+ width: 40px;
96
+ height: 40px;
97
+ padding: 0;
98
+ margin: 7.5px;
99
+ vertical-align: top;
100
+ background-color: transparent !important;
101
+ color: transparent;
102
+ cursor: default;
103
+ border-radius: 100%;
104
+ animation: rotate-loading 1.5s linear 0s infinite normal;
105
+ user-select: none;
106
+ }
107
+
108
+ &.swal2-cancel {
109
+ margin-left: 30px;
110
+ margin-right: 30px;
111
+ }
112
+ }
113
+
114
+ :not(.swal2-styled) {
115
+ &.swal2-confirm {
116
+ &::after {
117
+ display: inline-block;
118
+ content: '';
119
+ margin-left: 5px 0 15px;
120
+ vertical-align: -1px;
121
+ height: 15px;
122
+ width: 15px;
123
+ border: 3px solid lighten($swal2-black, 60);
124
+ box-shadow: 1px 1px 1px $swal2-white;
125
+ border-right-color: transparent;
126
+ border-radius: 50%;
127
+ animation: rotate-loading 1.5s linear 0s infinite normal;
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }
133
+
134
+ .swal2-styled {
135
+ border: 0;
136
+ border-radius: 3px;
137
+ box-shadow: none;
138
+ color: $swal2-white;
139
+ cursor: pointer;
140
+ font-size: 17px;
141
+ font-weight: 500;
142
+ margin: 15px 5px 0;
143
+ padding: 10px 32px;
144
+ }
145
+
146
+ .swal2-image {
147
+ margin: 20px auto;
148
+ max-width: 100%;
149
+ }
150
+
151
+ .swal2-close {
152
+ background: $swal2-transparent;
153
+ border: 0;
154
+ margin: 0;
155
+ padding: 0;
156
+ width: 38px;
157
+ height: 40px;
158
+ font-size: 36px;
159
+ line-height: 40px;
160
+ font-family: serif;
161
+ position: absolute;
162
+ top: 5px;
163
+ right: 8px;
164
+ cursor: pointer;
165
+ color: $swal2-close-button;
166
+ transition: color .1s ease;
167
+
168
+ &:hover {
169
+ color: $swal2-close-button-hover;
170
+ }
171
+ }
172
+
173
+ > .swal2-input,
174
+ > .swal2-file,
175
+ > .swal2-textarea,
176
+ > .swal2-select,
177
+ > .swal2-radio,
178
+ > .swal2-checkbox {
179
+ display: none;
180
+ }
181
+
182
+ .swal2-content {
183
+ font-size: 18px;
184
+ text-align: center;
185
+ font-weight: 300;
186
+ position: relative;
187
+ float: none;
188
+ margin: 0;
189
+ padding: 0;
190
+ line-height: normal;
191
+ color: lighten($swal2-black, 33);
192
+ word-wrap: break-word;
193
+ }
194
+
195
+ .swal2-input,
196
+ .swal2-file,
197
+ .swal2-textarea,
198
+ .swal2-select,
199
+ .swal2-radio,
200
+ .swal2-checkbox {
201
+ margin: 20px auto;
202
+ }
203
+
204
+ .swal2-input,
205
+ .swal2-file,
206
+ .swal2-textarea {
207
+ width: 100%;
208
+ box-sizing: border-box;
209
+ font-size: 18px;
210
+ border-radius: 3px;
211
+ border: 1px solid $swal2-input-border;
212
+ box-shadow: inset 0 1px 1px $swal2-input-box-shadow;
213
+ transition: border-color box-shadow .3s;
214
+
215
+ &.swal2-inputerror {
216
+ border-color: $swal2-error !important;
217
+ box-shadow: 0 0 2px $swal2-error !important;
218
+ }
219
+
220
+ &:focus {
221
+ outline: none;
222
+ border: 1px solid $swal2-input-border-focus;
223
+ box-shadow: 0 0 3px $swal2-input-box-shadow-focus;
224
+
225
+ &::placeholder {
226
+ transition: opacity .3s .03s ease;
227
+ opacity: .8;
228
+ }
229
+ }
230
+
231
+ &::placeholder {
232
+ color: lighten($swal2-black, 90);
233
+ }
234
+ }
235
+
236
+ .swal2-range {
237
+ input {
238
+ float: left;
239
+ width: 80%;
240
+ }
241
+
242
+ output {
243
+ float: right;
244
+ width: 20%;
245
+ font-size: 20px;
246
+ font-weight: 600;
247
+ text-align: center;
248
+ }
249
+
250
+ input,
251
+ output {
252
+ height: 43px;
253
+ line-height: 43px;
254
+ vertical-align: middle;
255
+ margin: 20px auto;
256
+ padding: 0;
257
+ }
258
+ }
259
+
260
+ .swal2-input {
261
+ height: 43px;
262
+ padding: 0 12px;
263
+
264
+ &[type='number'] {
265
+ max-width: 150px;
266
+ }
267
+ }
268
+
269
+ .swal2-file {
270
+ font-size: 20px;
271
+ }
272
+
273
+ .swal2-textarea {
274
+ height: 108px;
275
+ padding: 12px;
276
+ }
277
+
278
+ .swal2-select {
279
+ color: lighten($swal2-black, 33);
280
+ font-size: inherit;
281
+ padding: 5px 10px;
282
+ min-width: 40%;
283
+ max-width: 100%;
284
+ }
285
+
286
+ .swal2-radio {
287
+ border: 0;
288
+
289
+ label {
290
+ &:not(:first-child) {
291
+ margin-left: 20px;
292
+ }
293
+ }
294
+
295
+ input,
296
+ span {
297
+ vertical-align: middle;
298
+ }
299
+
300
+ input {
301
+ margin: 0 3px 0 0;
302
+ }
303
+ }
304
+
305
+ .swal2-checkbox {
306
+ color: lighten($swal2-black, 33);
307
+
308
+ input,
309
+ span {
310
+ vertical-align: middle;
311
+ }
312
+ }
313
+
314
+ .swal2-validationerror {
315
+ background-color: lighten($swal2-black, 94);
316
+ margin: 0 -20px;
317
+ overflow: hidden;
318
+ padding: 10px;
319
+ color: lighten($swal2-black, 50);
320
+ font-size: 16px;
321
+ font-weight: 300;
322
+ display: none;
323
+
324
+ &::before {
325
+ content: '!';
326
+ display: inline-block;
327
+ width: 24px;
328
+ height: 24px;
329
+ border-radius: 50%;
330
+ background-color: $swal2-validationerror-background;
331
+ color: $swal2-validationerror-color;
332
+ line-height: 24px;
333
+ text-align: center;
334
+ margin-right: 10px;
335
+ }
336
+ }
337
+ }
338
+
339
+ @supports (-ms-accelerator: true) {
340
+ .swal2-range {
341
+ input {
342
+ width: 100% !important;
343
+ }
344
+
345
+ output {
346
+ display: none;
347
+ }
348
+ }
349
+ }
350
+
351
+ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
352
+ .swal2-range {
353
+ input {
354
+ width: 100% !important;
355
+ }
356
+
357
+ output {
358
+ display: none;
359
+ }
360
+ }
361
+ }
362
+
363
+ .swal2-icon {
364
+ width: 80px;
365
+ height: 80px;
366
+ border: 4px solid transparent;
367
+ border-radius: 50%;
368
+ margin: 20px auto 30px;
369
+ padding: 0;
370
+ position: relative;
371
+ box-sizing: content-box;
372
+ cursor: default;
373
+ user-select: none;
374
+
375
+ &.swal2-error {
376
+ border-color: $swal2-error;
377
+
378
+ .swal2-x-mark {
379
+ position: relative;
380
+ display: block;
381
+ }
382
+
383
+ [class^='swal2-x-mark-line'] {
384
+ position: absolute;
385
+ height: 5px;
386
+ width: 47px;
387
+ background-color: $swal2-error;
388
+ display: block;
389
+ top: 37px;
390
+ border-radius: 2px;
391
+
392
+ &[class$='left'] {
393
+ transform: rotate(45deg);
394
+ left: 17px;
395
+ }
396
+
397
+ &[class$='right'] {
398
+ transform: rotate(-45deg);
399
+ right: 16px;
400
+ }
401
+ }
402
+ }
403
+
404
+ &.swal2-warning {
405
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
406
+ color: $swal2-warning;
407
+ border-color: lighten($swal2-warning, 7);
408
+ font-size: 60px;
409
+ line-height: 80px;
410
+ text-align: center;
411
+ }
412
+
413
+ &.swal2-info {
414
+ font-family: 'Open Sans', sans-serif;
415
+ color: $swal2-info;
416
+ border-color: lighten($swal2-info, 20);
417
+ font-size: 60px;
418
+ line-height: 80px;
419
+ text-align: center;
420
+ }
421
+
422
+ &.swal2-question {
423
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
424
+ color: $swal2-question;
425
+ border-color: lighten($swal2-question, 20);
426
+ font-size: 60px;
427
+ line-height: 80px;
428
+ text-align: center;
429
+ }
430
+
431
+ &.swal2-success {
432
+ border-color: $swal2-success;
433
+
434
+ [class^='swal2-success-circular-line'] { // Emulate moving circular line
435
+ border-radius: 50%;
436
+ position: absolute;
437
+ width: 60px;
438
+ height: 120px;
439
+ transform: rotate(45deg);
440
+
441
+ &[class$='left'] {
442
+ border-radius: 120px 0 0 120px;
443
+ top: -7px;
444
+ left: -33px;
445
+
446
+ transform: rotate(-45deg);
447
+ transform-origin: 60px 60px;
448
+ }
449
+
450
+ &[class$='right'] {
451
+ border-radius: 0 120px 120px 0;
452
+ top: -11px;
453
+ left: 30px;
454
+
455
+ transform: rotate(-45deg);
456
+ transform-origin: 0 60px;
457
+ }
458
+ }
459
+
460
+ .swal2-success-ring { // Ring
461
+ width: 80px;
462
+ height: 80px;
463
+ border: 4px solid $swal2-success-border;
464
+ border-radius: 50%;
465
+ box-sizing: content-box;
466
+
467
+ position: absolute;
468
+ left: -4px;
469
+ top: -4px;
470
+ z-index: 2;
471
+ }
472
+
473
+ .swal2-success-fix { // Hide corners left from animation
474
+ width: 7px;
475
+ height: 90px;
476
+
477
+ position: absolute;
478
+ left: 28px;
479
+ top: 8px;
480
+ z-index: 1;
481
+
482
+ transform: rotate(-45deg);
483
+ }
484
+
485
+ [class^='swal2-success-line'] {
486
+ height: 5px;
487
+ background-color: $swal2-success;
488
+ display: block;
489
+ border-radius: 2px;
490
+
491
+ position: absolute;
492
+ z-index: 2;
493
+
494
+ &[class$='tip'] {
495
+ width: 25px;
496
+
497
+ left: 14px;
498
+ top: 46px;
499
+
500
+ transform: rotate(45deg);
501
+ }
502
+
503
+ &[class$='long'] {
504
+ width: 47px;
505
+
506
+ right: 8px;
507
+ top: 38px;
508
+
509
+ transform: rotate(-45deg);
510
+ }
511
+ }
512
+ }
513
+ }
514
+
515
+ .swal2-progresssteps {
516
+ $lightblue: #add8e6;
517
+ $blue: #3085d6;
518
+
519
+ font-weight: 600;
520
+ margin: 0 0 20px;
521
+ padding: 0;
522
+
523
+ li {
524
+ display: inline-block;
525
+ position: relative;
526
+ }
527
+
528
+ .swal2-progresscircle {
529
+ background: $blue;
530
+ border-radius: 2em;
531
+ color: $swal2-white;
532
+ height: 2em;
533
+ line-height: 2em;
534
+ text-align: center;
535
+ width: 2em;
536
+ z-index: 20;
537
+
538
+ &:first-child {
539
+ margin-left: 0;
540
+ }
541
+
542
+ &:last-child {
543
+ margin-right: 0;
544
+ }
545
+
546
+ &.swal2-activeprogressstep {
547
+ background: $blue;
548
+
549
+ ~ .swal2-progresscircle {
550
+ background: $lightblue;
551
+ }
552
+
553
+ ~ .swal2-progressline {
554
+ background: $lightblue;
555
+ }
556
+ }
557
+ }
558
+
559
+ .swal2-progressline {
560
+ background: $blue;
561
+ height: .4em;
562
+ margin: 0 -1px;
563
+ z-index: 10;
564
+ }
565
+ }
566
+
567
+
568
+ // github.com/limonte/sweetalert2/issues/268
569
+ [class^='swal2'] {
570
+ -webkit-tap-highlight-color: $swal2-transparent;
571
+ }
572
+
573
+ // Animations
574
+
575
+ @mixin keyframes($animation-name) {
576
+ @keyframes #{$animation-name} {
577
+ @content;
578
+ }
579
+ }
580
+
581
+ @mixin animation($str) {
582
+ animation: #{$str};
583
+ }
584
+
585
+
586
+ // Modal animation
587
+
588
+ @include keyframes(showSweetAlert) {
589
+ 0% {
590
+ transform: scale(.7);
591
+ }
592
+
593
+ 45% {
594
+ transform: scale(1.05);
595
+ }
596
+
597
+ 80% {
598
+ transform: scale(.95);
599
+ }
600
+
601
+ 100% {
602
+ transform: scale(1);
603
+ }
604
+ }
605
+
606
+ @include keyframes(hideSweetAlert) {
607
+ 0% {
608
+ transform: scale(1);
609
+ opacity: 1;
610
+ }
611
+
612
+ 100% {
613
+ transform: scale(.5);
614
+ opacity: 0;
615
+ }
616
+ }
617
+
618
+ .swal2-show {
619
+ @include animation('showSweetAlert 0.3s');
620
+
621
+ &.swal2-noanimation {
622
+ @include animation('none');
623
+ }
624
+ }
625
+
626
+ .swal2-hide {
627
+ @include animation('hideSweetAlert 0.15s forwards');
628
+
629
+ &.swal2-noanimation {
630
+ @include animation('none');
631
+ }
632
+ }
633
+
634
+
635
+
636
+ // Success icon animation
637
+
638
+ @include keyframes(animate-success-tip) {
639
+ 0% {
640
+ width: 0;
641
+ left: 1px;
642
+ top: 19px;
643
+ }
644
+
645
+ 54% {
646
+ width: 0;
647
+ left: 1px;
648
+ top: 19px;
649
+ }
650
+
651
+ 70% {
652
+ width: 50px;
653
+ left: -8px;
654
+ top: 37px;
655
+ }
656
+
657
+ 84% {
658
+ width: 17px;
659
+ left: 21px;
660
+ top: 48px;
661
+ }
662
+
663
+ 100% {
664
+ width: 25px;
665
+ left: 14px;
666
+ top: 45px;
667
+ }
668
+ }
669
+
670
+ @include keyframes(animate-success-long) {
671
+ 0% {
672
+ width: 0;
673
+ right: 46px;
674
+ top: 54px;
675
+ }
676
+
677
+ 65% {
678
+ width: 0;
679
+ right: 46px;
680
+ top: 54px;
681
+ }
682
+
683
+ 84% {
684
+ width: 55px;
685
+ right: 0;
686
+ top: 35px;
687
+ }
688
+
689
+ 100% {
690
+ width: 47px;
691
+ right: 8px;
692
+ top: 38px;
693
+ }
694
+ }
695
+
696
+ @include keyframes(rotatePlaceholder) {
697
+ 0% {
698
+ transform: rotate(-45deg);
699
+ }
700
+
701
+ 5% {
702
+ transform: rotate(-45deg);
703
+ }
704
+
705
+ 12% {
706
+ transform: rotate(-405deg);
707
+ }
708
+
709
+ 100% {
710
+ transform: rotate(-405deg);
711
+ }
712
+ }
713
+
714
+ .swal2-animate-success-line-tip {
715
+ @include animation('animate-success-tip 0.75s');
716
+ }
717
+
718
+ .swal2-animate-success-line-long {
719
+ @include animation('animate-success-long 0.75s');
720
+ }
721
+
722
+ .swal2-success {
723
+ &.swal2-animate-success-icon {
724
+ .swal2-success-circular-line-right {
725
+ @include animation('rotatePlaceholder 4.25s ease-in');
726
+ }
727
+ }
728
+ }
729
+
730
+
731
+ // Error icon animation
732
+
733
+ @include keyframes(animate-error-icon) {
734
+ 0% {
735
+ transform: rotateX(100deg);
736
+ opacity: 0;
737
+ }
738
+
739
+ 100% {
740
+ transform: rotateX(0deg);
741
+ opacity: 1;
742
+ }
743
+ }
744
+
745
+ .swal2-animate-error-icon {
746
+ @include animation('animate-error-icon 0.5s');
747
+ }
748
+
749
+ @include keyframes(animate-x-mark) {
750
+ 0% {
751
+ transform: scale(.4);
752
+ margin-top: 26px;
753
+ opacity: 0;
754
+ }
755
+
756
+ 50% {
757
+ transform: scale(.4);
758
+ margin-top: 26px;
759
+ opacity: 0;
760
+ }
761
+
762
+ 80% {
763
+ transform: scale(1.15);
764
+ margin-top: -6px;
765
+ }
766
+
767
+ 100% {
768
+ transform: scale(1);
769
+ margin-top: 0;
770
+ opacity: 1;
771
+ }
772
+ }
773
+
774
+ .swal2-animate-x-mark {
775
+ @include animation('animate-x-mark 0.5s');
776
+ }
777
+
778
+ @include keyframes(rotate-loading) {
779
+ 0% {
780
+ transform: rotate(0deg);
781
+ }
782
+
783
+ 100% {
784
+ transform: rotate(360deg);
785
+ }
786
+ }
assets/vendor/sweetalert2/src/utils/classes.js ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export const swalPrefix = 'swal2-'
2
+
3
+ export const prefix = (items) => {
4
+ const result = {}
5
+ for (const i in items) {
6
+ result[items[i]] = swalPrefix + items[i]
7
+ }
8
+ return result
9
+ }
10
+
11
+ export const swalClasses = prefix([
12
+ 'container',
13
+ 'shown',
14
+ 'iosfix',
15
+ 'modal',
16
+ 'overlay',
17
+ 'fade',
18
+ 'show',
19
+ 'hide',
20
+ 'noanimation',
21
+ 'close',
22
+ 'title',
23
+ 'content',
24
+ 'buttonswrapper',
25
+ 'confirm',
26
+ 'cancel',
27
+ 'icon',
28
+ 'image',
29
+ 'input',
30
+ 'file',
31
+ 'range',
32
+ 'select',
33
+ 'radio',
34
+ 'checkbox',
35
+ 'textarea',
36
+ 'inputerror',
37
+ 'validationerror',
38
+ 'progresssteps',
39
+ 'activeprogressstep',
40
+ 'progresscircle',
41
+ 'progressline',
42
+ 'loading',
43
+ 'styled'
44
+ ])
45
+
46
+ export const iconTypes = prefix([
47
+ 'success',
48
+ 'warning',
49
+ 'info',
50
+ 'question',
51
+ 'error'
52
+ ])
assets/vendor/sweetalert2/src/utils/dom.js ADDED
@@ -0,0 +1,332 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global MouseEvent */
2
+
3
+ import { default as sweetAlert } from '../sweetalert2.js'
4
+ import { swalClasses, iconTypes } from './classes.js'
5
+ import { uniqueArray } from './utils.js'
6
+
7
+ // Remember state in cases where opening and handling a modal will fiddle with it.
8
+ export const states = {
9
+ previousWindowKeyDown: null,
10
+ previousActiveElement: null,
11
+ previousBodyPadding: null
12
+ }
13
+
14
+ /*
15
+ * Add modal + overlay to DOM
16
+ */
17
+ export const init = (params) => {
18
+ if (typeof document === 'undefined') {
19
+ console.error('SweetAlert2 requires document to initialize')
20
+ return
21
+ }
22
+
23
+ const container = document.createElement('div')
24
+ container.className = swalClasses.container
25
+ container.innerHTML = sweetHTML
26
+
27
+ let targetElement = document.querySelector(params.target)
28
+ if (!targetElement) {
29
+ console.warn(`SweetAlert2: Can't find the target "${params.target}"`)
30
+ targetElement = document.body
31
+ }
32
+ targetElement.appendChild(container)
33
+
34
+ const modal = getModal()
35
+ const input = getChildByClass(modal, swalClasses.input)
36
+ const file = getChildByClass(modal, swalClasses.file)
37
+ const range = modal.querySelector(`.${swalClasses.range} input`)
38
+ const rangeOutput = modal.querySelector(`.${swalClasses.range} output`)
39
+ const select = getChildByClass(modal, swalClasses.select)
40
+ const checkbox = modal.querySelector(`.${swalClasses.checkbox} input`)
41
+ const textarea = getChildByClass(modal, swalClasses.textarea)
42
+
43
+ input.oninput = () => {
44
+ sweetAlert.resetValidationError()
45
+ }
46
+
47
+ input.onkeydown = (event) => {
48
+ setTimeout(() => {
49
+ if (event.keyCode === 13 && params.allowEnterKey) {
50
+ event.stopPropagation()
51
+ sweetAlert.clickConfirm()
52
+ }
53
+ }, 0)
54
+ }
55
+
56
+ file.onchange = () => {
57
+ sweetAlert.resetValidationError()
58
+ }
59
+
60
+ range.oninput = () => {
61
+ sweetAlert.resetValidationError()
62
+ rangeOutput.value = range.value
63
+ }
64
+
65
+ range.onchange = () => {
66
+ sweetAlert.resetValidationError()
67
+ range.previousSibling.value = range.value
68
+ }
69
+
70
+ select.onchange = () => {
71
+ sweetAlert.resetValidationError()
72
+ }
73
+
74
+ checkbox.onchange = () => {
75
+ sweetAlert.resetValidationError()
76
+ }
77
+
78
+ textarea.oninput = () => {
79
+ sweetAlert.resetValidationError()
80
+ }
81
+
82
+ return modal
83
+ }
84
+
85
+ /*
86
+ * Manipulate DOM
87
+ */
88
+
89
+ const sweetHTML = `
90
+ <div role="dialog" aria-labelledby="${swalClasses.title}" aria-describedby="${swalClasses.content}" class="${swalClasses.modal}" tabindex="-1">
91
+ <ul class="${swalClasses.progresssteps}"></ul>
92
+ <div class="${swalClasses.icon} ${iconTypes.error}">
93
+ <span class="swal2-x-mark"><span class="swal2-x-mark-line-left"></span><span class="swal2-x-mark-line-right"></span></span>
94
+ </div>
95
+ <div class="${swalClasses.icon} ${iconTypes.question}">?</div>
96
+ <div class="${swalClasses.icon} ${iconTypes.warning}">!</div>
97
+ <div class="${swalClasses.icon} ${iconTypes.info}">i</div>
98
+ <div class="${swalClasses.icon} ${iconTypes.success}">
99
+ <div class="swal2-success-circular-line-left"></div>
100
+ <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
101
+ <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
102
+ <div class="swal2-success-circular-line-right"></div>
103
+ </div>
104
+ <img class="${swalClasses.image}">
105
+ <h2 class="${swalClasses.title}" id="${swalClasses.title}"></h2>
106
+ <div id="${swalClasses.content}" class="${swalClasses.content}"></div>
107
+ <input class="${swalClasses.input}">
108
+ <input type="file" class="${swalClasses.file}">
109
+ <div class="${swalClasses.range}">
110
+ <output></output>
111
+ <input type="range">
112
+ </div>
113
+ <select class="${swalClasses.select}"></select>
114
+ <div class="${swalClasses.radio}"></div>
115
+ <label for="${swalClasses.checkbox}" class="${swalClasses.checkbox}">
116
+ <input type="checkbox">
117
+ </label>
118
+ <textarea class="${swalClasses.textarea}"></textarea>
119
+ <div class="${swalClasses.validationerror}"></div>
120
+ <div class="${swalClasses.buttonswrapper}">
121
+ <button type="button" class="${swalClasses.confirm}">OK</button>
122
+ <button type="button" class="${swalClasses.cancel}">Cancel</button>
123
+ </div>
124
+ <button type="button" class="${swalClasses.close}" aria-label="Close this dialog">&times;</button>
125
+ </div>
126
+ `.replace(/(^|\n)\s*/g, '')
127
+
128
+ export const getContainer = () => document.body.querySelector('.' + swalClasses.container)
129
+
130
+ export const getModal = () => getContainer() ? getContainer().querySelector('.' + swalClasses.modal) : null
131
+
132
+ export const getIcons = () => {
133
+ const modal = getModal()
134
+ return modal.querySelectorAll('.' + swalClasses.icon)
135
+ }
136
+
137
+ export const elementByClass = (className) => getContainer() ? getContainer().querySelector('.' + className) : null
138
+
139
+ export const getTitle = () => elementByClass(swalClasses.title)
140
+
141
+ export const getContent = () => elementByClass(swalClasses.content)
142
+
143
+ export const getImage = () => elementByClass(swalClasses.image)
144
+
145
+ export const getButtonsWrapper = () => elementByClass(swalClasses.buttonswrapper)
146
+
147
+ export const getProgressSteps = () => elementByClass(swalClasses.progresssteps)
148
+
149
+ export const getValidationError = () => elementByClass(swalClasses.validationerror)
150
+
151
+ export const getConfirmButton = () => elementByClass(swalClasses.confirm)
152
+
153
+ export const getCancelButton = () => elementByClass(swalClasses.cancel)
154
+
155
+ export const getCloseButton = () => elementByClass(swalClasses.close)
156
+
157
+ export const getFocusableElements = (focusCancel) => {
158
+ const buttons = [getConfirmButton(), getCancelButton()]
159
+ if (focusCancel) {
160
+ buttons.reverse()
161
+ }
162
+ const focusableElements = buttons.concat(Array.prototype.slice.call(
163
+ getModal().querySelectorAll('button, input:not([type=hidden]), textarea, select, a, *[tabindex]:not([tabindex="-1"])')
164
+ ))
165
+ return uniqueArray(focusableElements)
166
+ }
167
+
168
+ export const hasClass = (elem, className) => {
169
+ if (elem.classList) {
170
+ return elem.classList.contains(className)
171
+ }
172
+ return false
173
+ }
174
+
175
+ export const focusInput = (input) => {
176
+ input.focus()
177
+
178
+ // place cursor at end of text in text input
179
+ if (input.type !== 'file') {
180
+ // http://stackoverflow.com/a/2345915/1331425
181
+ const val = input.value
182
+ input.value = ''
183
+ input.value = val
184
+ }
185
+ }
186
+
187
+ export const addClass = (elem, className) => {
188
+ if (!elem || !className) {
189
+ return
190
+ }
191
+ const classes = className.split(/\s+/).filter(Boolean)
192
+ classes.forEach((className) => {
193
+ elem.classList.add(className)
194
+ })
195
+ }
196
+
197
+ export const removeClass = (elem, className) => {
198
+ if (!elem || !className) {
199
+ return
200
+ }
201
+ const classes = className.split(/\s+/).filter(Boolean)
202
+ classes.forEach((className) => {
203
+ elem.classList.remove(className)
204
+ })
205
+ }
206
+
207
+ export const getChildByClass = (elem, className) => {
208
+ for (let i = 0; i < elem.childNodes.length; i++) {
209
+ if (hasClass(elem.childNodes[i], className)) {
210
+ return elem.childNodes[i]
211
+ }
212
+ }
213
+ }
214
+
215
+ export const show = (elem, display) => {
216
+ if (!display) {
217
+ display = 'block'
218
+ }
219
+ elem.style.opacity = ''
220
+ elem.style.display = display
221
+ }
222
+
223
+ export const hide = (elem) => {
224
+ elem.style.opacity = ''
225
+ elem.style.display = 'none'
226
+ }
227
+
228
+ export const empty = (elem) => {
229
+ while (elem.firstChild) {
230
+ elem.removeChild(elem.firstChild)
231
+ }
232
+ }
233
+
234
+ // borrowed from jqeury $(elem).is(':visible') implementation
235
+ export const isVisible = (elem) => elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length
236
+
237
+ export const removeStyleProperty = (elem, property) => {
238
+ if (elem.style.removeProperty) {
239
+ elem.style.removeProperty(property)
240
+ } else {
241
+ elem.style.removeAttribute(property)
242
+ }
243
+ }
244
+
245
+ export const fireClick = (node) => {
246
+ if (!isVisible(node)) {
247
+ return false
248
+ }
249
+
250
+ // Taken from http://www.nonobtrusive.com/2011/11/29/programatically-fire-crossbrowser-click-event-with-javascript/
251
+ // Then fixed for today's Chrome browser.
252
+ if (typeof MouseEvent === 'function') {
253
+ // Up-to-date approach
254
+ const mevt = new MouseEvent('click', {
255
+ view: window,
256
+ bubbles: false,
257
+ cancelable: true
258
+ })
259
+ node.dispatchEvent(mevt)
260
+ } else if (document.createEvent) {
261
+ // Fallback
262
+ const evt = document.createEvent('MouseEvents')
263
+ evt.initEvent('click', false, false)
264
+ node.dispatchEvent(evt)
265
+ } else if (document.createEventObject) {
266
+ node.fireEvent('onclick')
267
+ } else if (typeof node.onclick === 'function') {
268
+ node.onclick()
269
+ }
270
+ }
271
+
272
+ export const animationEndEvent = (() => {
273
+ const testEl = document.createElement('div')
274
+ const transEndEventNames = {
275
+ 'WebkitAnimation': 'webkitAnimationEnd',
276
+ 'OAnimation': 'oAnimationEnd oanimationend',
277
+ 'msAnimation': 'MSAnimationEnd',
278
+ 'animation': 'animationend'
279
+ }
280
+ for (const i in transEndEventNames) {
281
+ if (transEndEventNames.hasOwnProperty(i) &&
282
+ testEl.style[i] !== undefined) {
283
+ return transEndEventNames[i]
284
+ }
285
+ }
286
+
287
+ return false
288
+ })()
289
+
290
+ // Reset previous window keydown handler and focued element
291
+ export const resetPrevState = () => {
292
+ window.onkeydown = states.previousWindowKeyDown
293
+ if (states.previousActiveElement && states.previousActiveElement.focus) {
294
+ let x = window.scrollX
295
+ let y = window.scrollY
296
+ states.previousActiveElement.focus()
297
+ if (x && y) { // IE has no scrollX/scrollY support
298
+ window.scrollTo(x, y)
299
+ }
300
+ }
301
+ }
302
+
303
+ // Measure width of scrollbar
304
+ // https://github.com/twbs/bootstrap/blob/master/js/modal.js#L279-L286
305
+ export const measureScrollbar = () => {
306
+ var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints
307
+ if (supportsTouch) {
308
+ return 0
309
+ }
310
+ const scrollDiv = document.createElement('div')
311
+ scrollDiv.style.width = '50px'
312
+ scrollDiv.style.height = '50px'
313
+ scrollDiv.style.overflow = 'scroll'
314
+ document.body.appendChild(scrollDiv)
315
+ const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
316
+ document.body.removeChild(scrollDiv)
317
+ return scrollbarWidth
318
+ }
319
+
320
+ // JavaScript Debounce Function
321
+ // Simplivied version of https://davidwalsh.name/javascript-debounce-function
322
+ export const debounce = (func, wait) => {
323
+ let timeout
324
+ return () => {
325
+ const later = () => {
326
+ timeout = null
327
+ func()
328
+ }
329
+ clearTimeout(timeout)
330
+ timeout = setTimeout(later, wait)
331
+ }
332
+ }
assets/vendor/sweetalert2/src/utils/params.js ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export default {
2
+ title: '',
3
+ titleText: '',
4
+ text: '',
5
+ html: '',
6
+ type: null,
7
+ customClass: '',
8
+ target: 'body',
9
+ animation: true,
10
+ allowOutsideClick: true,
11
+ allowEscapeKey: true,
12
+ allowEnterKey: true,
13
+ showConfirmButton: true,
14
+ showCancelButton: false,
15
+ preConfirm: null,
16
+ confirmButtonText: 'OK',
17
+ confirmButtonColor: '#3085d6',
18
+ confirmButtonClass: null,
19
+ cancelButtonText: 'Cancel',
20
+ cancelButtonColor: '#aaa',
21
+ cancelButtonClass: null,
22
+ buttonsStyling: true,
23
+ reverseButtons: false,
24
+ focusCancel: false,
25
+ showCloseButton: false,
26
+ showLoaderOnConfirm: false,
27
+ imageUrl: null,
28
+ imageWidth: null,
29
+ imageHeight: null,
30
+ imageClass: null,
31
+ timer: null,
32
+ width: 500,
33
+ padding: 20,
34
+ background: '#fff',
35
+ input: null,
36
+ inputPlaceholder: '',
37
+ inputValue: '',
38
+ inputOptions: {},
39
+ inputAutoTrim: true,
40
+ inputClass: null,
41
+ inputAttributes: {},
42
+ inputValidator: null,
43
+ progressSteps: [],
44
+ currentProgressStep: null,
45
+ progressStepsDistance: '40px',
46
+ onOpen: null,
47
+ onClose: null,
48
+ useRejections: true
49
+ }
assets/vendor/sweetalert2/src/utils/utils.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Set hover, active and focus-states for buttons (source: http://www.sitepoint.com/javascript-generate-lighter-darker-color)
3
+ */
4
+ export const colorLuminance = (hex, lum) => {
5
+ // Validate hex string
6
+ hex = String(hex).replace(/[^0-9a-f]/gi, '')
7
+ if (hex.length < 6) {
8
+ hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]
9
+ }
10
+ lum = lum || 0
11
+
12
+ // Convert to decimal and change luminosity
13
+ let rgb = '#'
14
+ for (let i = 0; i < 3; i++) {
15
+ let c = parseInt(hex.substr(i * 2, 2), 16)
16
+ c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16)
17
+ rgb += ('00' + c).substr(c.length)
18
+ }
19
+
20
+ return rgb
21
+ }
22
+
23
+ export const uniqueArray = (arr) => {
24
+ const result = []
25
+ for (var i in arr) {
26
+ if (result.indexOf(arr[i]) === -1) {
27
+ result.push(arr[i])
28
+ }
29
+ }
30
+ return result
31
+ }
assets/vendor/vue/vue.js CHANGED
File without changes
assets/vendor/vue/vue.min.js CHANGED
File without changes
assets/vendor/vuex/vuex.js CHANGED
File without changes
assets/vendor/vuex/vuex.min.js CHANGED
File without changes
class/frontend-dashboard.php CHANGED
File without changes
class/frontend-form-post.php CHANGED
@@ -577,9 +577,7 @@ class WPUF_Frontend_Form_Post extends WPUF_Render_Form {
577
  $form_id = isset( $_POST['form_id'] ) ? intval( $_POST['form_id'] ) : 0;
578
  $form_vars = $this->get_input_fields( $form_id );
579
  $form_settings = wpuf_get_form_settings( $form_id );
580
-
581
- $content_slug = 'post_content_' . $form_id;
582
- $post_content = isset( $_POST[ $content_slug ] ) ? trim( $_POST[ $content_slug ] ) : isset( $_POST[ 'post_content' ] ) ? $_POST[ 'post_content' ] : '';
583
 
584
  list( $post_vars, $taxonomy_vars, $meta_vars ) = $form_vars;
585
 
577
  $form_id = isset( $_POST['form_id'] ) ? intval( $_POST['form_id'] ) : 0;
578
  $form_vars = $this->get_input_fields( $form_id );
579
  $form_settings = wpuf_get_form_settings( $form_id );
580
+ $post_content = isset( $_POST[ 'post_content' ] ) ? $_POST[ 'post_content' ] : '';
 
 
581
 
582
  list( $post_vars, $taxonomy_vars, $meta_vars ) = $form_vars;
583
 
class/render-form.php CHANGED
@@ -442,6 +442,10 @@ class WPUF_Render_Form {
442
  if ( typeof wpuf_conditional_items === 'undefined' ) {
443
  wpuf_conditional_items = [];
444
  }
 
 
 
 
445
  </script>
446
  <?php
447
 
@@ -843,7 +847,6 @@ class WPUF_Render_Form {
843
  </div>
844
 
845
  <?php
846
- // var_dump($attr);
847
  if ( isset( $attr['word_restriction'] ) && $attr['word_restriction'] ) {
848
  $this->check_word_restriction_func( $attr['word_restriction'], 'no', $attr['name'] . '_' . $form_id );
849
  }
@@ -1015,7 +1018,6 @@ class WPUF_Render_Form {
1015
  */
1016
  function radio( $attr, $post_id, $type, $form_id ) {
1017
  $selected = isset( $attr['selected'] ) ? $attr['selected'] : '';
1018
-
1019
  if ( $post_id ) {
1020
  $selected = $this->get_meta( $post_id, $attr['name'], $type, true );
1021
  }
@@ -1028,7 +1030,7 @@ class WPUF_Render_Form {
1028
  foreach ($attr['options'] as $value => $option) {
1029
  ?>
1030
 
1031
- <label <?php echo $attr['inline'] == 'yes' ? 'class="wpuf-radio-inline"' : null; ?>>
1032
  <input name="<?php echo $attr['name']; ?>" class="<?php echo 'wpuf_'.$attr['name']. '_'. $form_id; ?>" type="radio" value="<?php echo esc_attr( $value ); ?>"<?php checked( $selected, $value ); ?> />
1033
  <?php echo $option; ?>
1034
  </label>
@@ -1067,8 +1069,7 @@ class WPUF_Render_Form {
1067
  foreach ($attr['options'] as $value => $option) {
1068
 
1069
  ?>
1070
-
1071
- <label <?php echo $attr['inline'] == 'yes' ? 'class="wpuf-checkbox-inline"' : null; ?>>
1072
  <input type="checkbox" class="<?php echo 'wpuf_'.$attr['name']. '_'. $form_id; ?>" name="<?php echo $attr['name']; ?>[]" value="<?php echo esc_attr( $value ); ?>"<?php echo in_array( $value, $selected ) ? ' checked="checked"' : ''; ?> />
1073
  <?php echo $option; ?>
1074
  </label>
@@ -1148,31 +1149,37 @@ class WPUF_Render_Form {
1148
  if ( $post_id ) {
1149
  $attr['required'] = 'no';
1150
  }
 
 
 
1151
  ?>
1152
 
1153
  <div class="wpuf-fields">
1154
- <input id="pass1" type="password" class="password <?php echo ' wpuf_'.$attr['name'].'_'.$form_id; ?>" data-required="<?php echo $attr['required'] ?>" data-type="text"<?php $this->required_html5( $attr ); ?> name="pass1" placeholder="<?php echo esc_attr( $attr['placeholder'] ); ?>" value="" size="<?php echo esc_attr( $attr['size'] ) ?>" />
1155
  <?php $this->help_text( $attr ); ?>
1156
  </div>
1157
 
1158
  <?php
1159
- if ( $attr['repeat_pass'] == 'yes' ) {
1160
  echo '</li>';
1161
- echo '<li>';
1162
 
1163
  $this->label( array('name' => 'pass2', 'label' => $attr['re_pass_label'], 'required' => $post_id ? 'no' : 'yes') );
1164
  ?>
1165
 
1166
  <div class="wpuf-fields">
1167
- <input id="pass2" type="password" class="password <?php echo ' wpuf_'.$attr['name'].'_'.$form_id; ?>" data-required="<?php echo $attr['required'] ?>" data-type="text"<?php $this->required_html5( $attr ); ?> name="pass2" value="" size="<?php echo esc_attr( $attr['size'] ) ?>" />
1168
  </div>
1169
 
1170
  <?php
1171
  }
1172
 
1173
- if ( $attr['repeat_pass'] == 'yes' && $attr['pass_strength'] == 'yes' ) {
1174
  echo '</li>';
1175
  echo '<li>';
 
 
 
1176
  ?>
1177
  <div class="wpuf-label">
1178
  &nbsp;
@@ -1180,20 +1187,50 @@ class WPUF_Render_Form {
1180
 
1181
  <div class="wpuf-fields">
1182
  <div id="pass-strength-result" style="display: block"><?php _e( 'Strength indicator' ); ?></div>
1183
- <script src="<?php echo includes_url( 'js/zxcvbn.min.js' ); ?>"></script>
1184
- <script src="<?php echo admin_url( 'js/password-strength-meter.js' ); ?>"></script>
1185
- <script type="text/javascript">
1186
- var pwsL10n = {
1187
- empty: "<?php _e( 'Strength indicator', 'wpuf' ); ?>",
1188
- short: "<?php _e( 'Very weak', 'wpuf' ); ?>",
1189
- bad: "<?php _e( 'Weak', 'wpuf' ); ?>",
1190
- good: "<?php _e( 'Medium', 'wpuf' ); ?>",
1191
- strong: "<?php _e( 'Strong', 'wpuf' ); ?>",
1192
- mismatch: "<?php _e( 'Mismatch', 'wpuf' ); ?>"
1193
- };
1194
- try{convertEntities(pwsL10n);}catch(e){};
1195
- </script>
1196
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1197
  <?php
1198
  }
1199
 
@@ -1265,6 +1302,11 @@ class WPUF_Render_Form {
1265
  $terms = wp_get_post_terms( $post_id, $taxonomy, array('fields' => 'ids') );
1266
  }
1267
 
 
 
 
 
 
1268
  $div_class = 'wpuf_' . $attr['name'] . '_' . $attr['type'] . '_' . $attr['id'] . '_' . $form_id;
1269
  ?>
1270
 
@@ -1401,7 +1443,7 @@ class WPUF_Render_Form {
1401
  function html( $attr, $form_id ) {
1402
  ?>
1403
  <div class="wpuf-fields <?php echo ' wpuf_'.$attr['name'].'_'.$form_id; ?>">
1404
- <?php echo do_shortcode( $attr['html'] ); ?>
1405
  </div>
1406
  <?php
1407
  }
@@ -1479,7 +1521,8 @@ class WPUF_Render_Form {
1479
  <script type="text/javascript">
1480
  ;(function($) {
1481
  $(document).ready( function(){
1482
- new WPUF_Uploader('wpuf-<?php echo $unique_id; ?>-pickfiles', 'wpuf-<?php echo $unique_id; ?>-upload-container', <?php echo $attr['count']; ?>, '<?php echo $attr['name']; ?>', 'jpg,jpeg,gif,png,bmp', <?php echo $attr['max_size'] ?>);
 
1483
  });
1484
  })(jQuery);
1485
  </script>
442
  if ( typeof wpuf_conditional_items === 'undefined' ) {
443
  wpuf_conditional_items = [];
444
  }
445
+
446
+ if ( typeof wpuf_plupload_items === 'undefined' ) {
447
+ wpuf_plupload_items = [];
448
+ }
449
  </script>
450
  <?php
451
 
847
  </div>
848
 
849
  <?php
 
850
  if ( isset( $attr['word_restriction'] ) && $attr['word_restriction'] ) {
851
  $this->check_word_restriction_func( $attr['word_restriction'], 'no', $attr['name'] . '_' . $form_id );
852
  }
1018
  */
1019
  function radio( $attr, $post_id, $type, $form_id ) {
1020
  $selected = isset( $attr['selected'] ) ? $attr['selected'] : '';
 
1021
  if ( $post_id ) {
1022
  $selected = $this->get_meta( $post_id, $attr['name'], $type, true );
1023
  }
1030
  foreach ($attr['options'] as $value => $option) {
1031
  ?>
1032
 
1033
+ <label <?php echo $attr['inline'] == 'yes' ? 'class="wpuf-radio-inline"' : 'class="wpuf-radio-block"'; ?>>
1034
  <input name="<?php echo $attr['name']; ?>" class="<?php echo 'wpuf_'.$attr['name']. '_'. $form_id; ?>" type="radio" value="<?php echo esc_attr( $value ); ?>"<?php checked( $selected, $value ); ?> />
1035
  <?php echo $option; ?>
1036
  </label>
1069
  foreach ($attr['options'] as $value => $option) {
1070
 
1071
  ?>
1072
+ <label <?php echo $attr['inline'] == 'yes' ? 'class="wpuf-checkbox-inline"' : 'class="wpuf-checkbox-block"'; ?>>
 
1073
  <input type="checkbox" class="<?php echo 'wpuf_'.$attr['name']. '_'. $form_id; ?>" name="<?php echo $attr['name']; ?>[]" value="<?php echo esc_attr( $value ); ?>"<?php echo in_array( $value, $selected ) ? ' checked="checked"' : ''; ?> />
1074
  <?php echo $option; ?>
1075
  </label>
1149
  if ( $post_id ) {
1150
  $attr['required'] = 'no';
1151
  }
1152
+
1153
+ $repeat_pass = ( $attr['repeat_pass'] == 'yes' ) ? true : false;
1154
+ $pass_strength = ( $attr['pass_strength'] == 'yes' ) ? true : false;
1155
  ?>
1156
 
1157
  <div class="wpuf-fields">
1158
+ <input id="pass1" type="password" class="password <?php echo ' wpuf_'.$attr['name'].'_'.$form_id; ?>" data-required="<?php echo $attr['required'] ?>" data-type="password"<?php $this->required_html5( $attr ); ?> data-repeat="<?php echo $repeat_pass ? 'true' : 'false'; ?>" name="pass1" placeholder="<?php echo esc_attr( $attr['placeholder'] ); ?>" value="" size="<?php echo esc_attr( $attr['size'] ) ?>" />
1159
  <?php $this->help_text( $attr ); ?>
1160
  </div>
1161
 
1162
  <?php
1163
+ if ( $repeat_pass ) {
1164
  echo '</li>';
1165
+ echo '<li class="wpuf-el password-repeat" data-label="' . esc_attr( 'Confirm Password', 'wpuf' ) . '">';
1166
 
1167
  $this->label( array('name' => 'pass2', 'label' => $attr['re_pass_label'], 'required' => $post_id ? 'no' : 'yes') );
1168
  ?>
1169
 
1170
  <div class="wpuf-fields">
1171
+ <input id="pass2" type="password" class="password <?php echo ' wpuf_'.$attr['name'].'_'.$form_id; ?>" data-required="<?php echo $attr['required'] ?>" data-type="confirm_password"<?php $this->required_html5( $attr ); ?> name="pass2" value="" size="<?php echo esc_attr( $attr['size'] ) ?>" />
1172
  </div>
1173
 
1174
  <?php
1175
  }
1176
 
1177
+ if ( $pass_strength ) {
1178
  echo '</li>';
1179
  echo '<li>';
1180
+
1181
+ wp_enqueue_script( 'zxcvbn' );
1182
+ wp_enqueue_script( 'password-strength-meter' );
1183
  ?>
1184
  <div class="wpuf-label">
1185
  &nbsp;
1187
 
1188
  <div class="wpuf-fields">
1189
  <div id="pass-strength-result" style="display: block"><?php _e( 'Strength indicator' ); ?></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
1190
  </div>
1191
+
1192
+ <script type="text/javascript">
1193
+ jQuery(function($) {
1194
+ function check_pass_strength() {
1195
+ var pass1 = $('#pass1').val(),
1196
+ pass2 = $('#pass2').val(),
1197
+ strength;
1198
+
1199
+ if ( typeof pass2 === undefined ) {
1200
+ pass2 = pass1;
1201
+ }
1202
+
1203
+ $('#pass-strength-result').removeClass('short bad good strong');
1204
+ if (!pass1) {
1205
+ $('#pass-strength-result').html(pwsL10n.empty);
1206
+ return;
1207
+ }
1208
+
1209
+ strength = wp.passwordStrength.meter(pass1, wp.passwordStrength.userInputBlacklist(), pass2);
1210
+
1211
+ switch (strength) {
1212
+ case 2:
1213
+ $('#pass-strength-result').addClass('bad').html(pwsL10n.bad);
1214
+ break;
1215
+ case 3:
1216
+ $('#pass-strength-result').addClass('good').html(pwsL10n.good);
1217
+ break;
1218
+ case 4:
1219
+ $('#pass-strength-result').addClass('strong').html(pwsL10n.strong);
1220
+ break;
1221
+ case 5:
1222
+ $('#pass-strength-result').addClass('short').html(pwsL10n.mismatch);
1223
+ break;
1224
+ default:
1225
+ $('#pass-strength-result').addClass('short').html(pwsL10n['short']);
1226
+ }
1227
+ }
1228
+
1229
+ $('#pass1').val('').keyup(check_pass_strength);
1230
+ $('#pass2').val('').keyup(check_pass_strength);
1231
+ $('#pass-strength-result').show();
1232
+ });
1233
+ </script>
1234
  <?php
1235
  }
1236
 
1302
  $terms = wp_get_post_terms( $post_id, $taxonomy, array('fields' => 'ids') );
1303
  }
1304
 
1305
+ if ( ! taxonomy_exists( $taxonomy ) ) {
1306
+ echo '<br><div class="wpuf-message">' . __( 'This field is no longer available.', 'wpuf' ) . '</div>';
1307
+ return;
1308
+ }
1309
+
1310
  $div_class = 'wpuf_' . $attr['name'] . '_' . $attr['type'] . '_' . $attr['id'] . '_' . $form_id;
1311
  ?>
1312
 
1443
  function html( $attr, $form_id ) {
1444
  ?>
1445
  <div class="wpuf-fields <?php echo ' wpuf_'.$attr['name'].'_'.$form_id; ?>">
1446
+ <?php echo $attr['html']; ?>
1447
  </div>
1448
  <?php
1449
  }
1521
  <script type="text/javascript">
1522
  ;(function($) {
1523
  $(document).ready( function(){
1524
+ var uploader = new WPUF_Uploader('wpuf-<?php echo $unique_id; ?>-pickfiles', 'wpuf-<?php echo $unique_id; ?>-upload-container', <?php echo $attr['count']; ?>, '<?php echo $attr['name']; ?>', 'jpg,jpeg,gif,png,bmp', <?php echo $attr['max_size'] ?>);
1525
+ wpuf_plupload_items.push(uploader);
1526
  });
1527
  })(jQuery);
1528
  </script>
class/upgrades.php CHANGED
File without changes
class/upload.php CHANGED
File without changes
includes/free/edit-user.php CHANGED
@@ -69,10 +69,9 @@ function wpuf_show_users() {
69
  }
70
  }
71
 
72
- //var_dump($to_be_deleted);
73
  //delete the user
74
  if ( current_user_can( 'delete_users' ) && $delete_flag == true ) {
75
- //var_dump($userdata);
76
  wp_delete_user( $to_be_deleted );
77
  echo '<div class="success">' . __( 'User Deleted', 'wpuf' ) . '</div>';
78
  } else {
69
  }
70
  }
71
 
 
72
  //delete the user
73
  if ( current_user_can( 'delete_users' ) && $delete_flag == true ) {
74
+
75
  wp_delete_user( $to_be_deleted );
76
  echo '<div class="success">' . __( 'User Deleted', 'wpuf' ) . '</div>';
77
  } else {
includes/free/loader.php CHANGED
@@ -132,8 +132,6 @@ class WPUF_Free_Loader extends WPUF_Pro_Prompt {
132
 
133
  function settings_login_prompt( $fields ) {
134
 
135
- // var_dump( $fields ); die();
136
-
137
  $new_field = array(
138
  'name' => 'something',
139
  'label' => __( 'Pro Feature', 'wpuf' ),
@@ -143,8 +141,6 @@ class WPUF_Free_Loader extends WPUF_Pro_Prompt {
143
 
144
  array_unshift( $fields['wpuf_profile'], $new_field );
145
 
146
- // var_dump( $fields ); die();
147
-
148
  return $fields;
149
  }
150
 
132
 
133
  function settings_login_prompt( $fields ) {
134
 
 
 
135
  $new_field = array(
136
  'name' => 'something',
137
  'label' => __( 'Pro Feature', 'wpuf' ),
141
 
142
  array_unshift( $fields['wpuf_profile'], $new_field );
143
 
 
 
144
  return $fields;
145
  }
146
 
languages/readme.txt CHANGED
File without changes
languages/wpuf-fa_IR.mo CHANGED
File without changes
languages/wpuf-fa_IR.po CHANGED
File without changes
languages/wpuf.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the GPL2.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP User Frontend 2.5.2\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wedevs.com/support/forum/plugin-support/wp-user-frontend/\n"
8
- "POT-Creation-Date: 2017-04-27 10:13:37+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -39,17 +39,17 @@ msgid "value"
39
  msgstr ""
40
 
41
  #: admin/form-builder/assets/js/components/field-option-data/template.php:5
42
- #: admin/template.php:247
43
  msgid "Show values"
44
  msgstr ""
45
 
46
  #: admin/form-builder/assets/js/components/field-option-data/template.php:16
47
- #: admin/template.php:250 admin/template.php:308
48
  msgid "Label"
49
  msgstr ""
50
 
51
  #: admin/form-builder/assets/js/components/field-option-data/template.php:20
52
- #: admin/template.php:250 admin/template.php:308
53
  msgid "Value"
54
  msgstr ""
55
 
@@ -67,12 +67,12 @@ msgstr ""
67
 
68
  #: admin/form-builder/assets/js/components/form-featured_image/template.php:5
69
  #: admin/form-builder/assets/js/components/form-image_upload/template.php:5
70
- #: class/render-form.php:1448
71
  msgid "Select Image"
72
  msgstr ""
73
 
74
  #: admin/form-builder/assets/js/components/form-post_content/template.php:4
75
- #: class/render-form.php:908
76
  msgid "Insert Photo"
77
  msgstr ""
78
 
@@ -80,6 +80,14 @@ msgstr ""
80
  msgid "— Select —"
81
  msgstr ""
82
 
 
 
 
 
 
 
 
 
83
  #: admin/form-builder/class-wpuf-admin-form-builder-ajax.php:29
84
  msgid "Unauthorized operation"
85
  msgstr ""
@@ -88,50 +96,50 @@ msgstr ""
88
  msgid "Invalid form id"
89
  msgstr ""
90
 
91
- #: admin/form-builder/class-wpuf-admin-form-builder.php:302
92
  msgid "Custom Fields"
93
  msgstr ""
94
 
95
- #: admin/form-builder/class-wpuf-admin-form-builder.php:323
96
  msgid "Others"
97
  msgstr ""
98
 
99
- #: admin/form-builder/class-wpuf-admin-form-builder.php:339
100
  msgid "Advanced Options"
101
  msgstr ""
102
 
103
- #: admin/form-builder/class-wpuf-admin-form-builder.php:340
104
  msgid "Are you sure you want to delete this field?"
105
  msgstr ""
106
 
107
- #: admin/form-builder/class-wpuf-admin-form-builder.php:341
108
  msgid "Yes, delete it"
109
  msgstr ""
110
 
111
- #: admin/form-builder/class-wpuf-admin-form-builder.php:342
112
  msgid "No, cancel it"
113
  msgstr ""
114
 
115
- #: admin/form-builder/class-wpuf-admin-form-builder.php:343
116
  msgid "OK"
117
  msgstr ""
118
 
119
- #: admin/form-builder/class-wpuf-admin-form-builder.php:344
120
  #: class/payment.php:168 class/subscription.php:829
121
  #: templates/dashboard/subscription.php:59
122
  msgid "Cancel"
123
  msgstr ""
124
 
125
- #: admin/form-builder/class-wpuf-admin-form-builder.php:345
126
  #: includes/free/admin/shortcode-builder.php:69
127
  msgid "Close"
128
  msgstr ""
129
 
130
- #: admin/form-builder/class-wpuf-admin-form-builder.php:346
131
  msgid "This field must contain at least one choice"
132
  msgstr ""
133
 
134
- #: admin/form-builder/class-wpuf-admin-form-builder.php:347
135
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:376
136
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:416
137
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:472
@@ -139,65 +147,65 @@ msgstr ""
139
  msgid "Option"
140
  msgstr ""
141
 
142
- #: admin/form-builder/class-wpuf-admin-form-builder.php:348
143
  msgid "Column"
144
  msgstr ""
145
 
146
- #: admin/form-builder/class-wpuf-admin-form-builder.php:349
147
  msgid "This field must contain at least one column"
148
  msgstr ""
149
 
150
- #: admin/form-builder/class-wpuf-admin-form-builder.php:350
151
  msgid "is available in Pro version"
152
  msgstr ""
153
 
154
- #: admin/form-builder/class-wpuf-admin-form-builder.php:351
155
  msgid "Please upgrade to the Pro version to unlock all these awesome features"
156
  msgstr ""
157
 
158
- #: admin/form-builder/class-wpuf-admin-form-builder.php:352
159
  msgid "Get the Pro version"
160
  msgstr ""
161
 
162
- #: admin/form-builder/class-wpuf-admin-form-builder.php:353 admin/form.php:743
163
  msgid "Select"
164
  msgstr ""
165
 
166
- #: admin/form-builder/class-wpuf-admin-form-builder.php:354
167
  msgid "Saved form data"
168
  msgstr ""
169
 
170
- #: admin/form-builder/class-wpuf-admin-form-builder.php:355
171
  msgid "You have unsaved changes."
172
  msgstr ""
173
 
174
- #: admin/form-builder/class-wpuf-admin-form-builder.php:356
175
  #: admin/form-builder/views/form-builder.php:45
176
  msgid "Click to copy shortcode"
177
  msgstr ""
178
 
179
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:44
180
- #: admin/template.php:79
181
  msgid "Field Label"
182
  msgstr ""
183
 
184
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:48
185
- #: admin/template.php:80
186
  msgid "Enter a title of this field"
187
  msgstr ""
188
 
189
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:53
190
- #: admin/template.php:97
191
  msgid "Help text"
192
  msgstr ""
193
 
194
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:57
195
- #: admin/template.php:98
196
  msgid "Give the user some information about this field"
197
  msgstr ""
198
 
199
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:62
200
- #: admin/template.php:70
201
  msgid "Required"
202
  msgstr ""
203
 
@@ -207,7 +215,7 @@ msgstr ""
207
  #: admin/post-forms-list-table.php:340 admin/settings-options.php:94
208
  #: admin/settings-options.php:174 admin/settings-options.php:185
209
  #: admin/settings-options.php:274 admin/subscription.php:145
210
- #: admin/template.php:73 includes/free/form-element.php:475
211
  msgid "Yes"
212
  msgstr ""
213
 
@@ -217,7 +225,7 @@ msgstr ""
217
  #: admin/post-forms-list-table.php:341 admin/settings-options.php:95
218
  #: admin/settings-options.php:175 admin/settings-options.php:186
219
  #: admin/settings-options.php:275 admin/subscription.php:147
220
- #: admin/template.php:74 includes/free/form-element.php:476
221
  msgid "No"
222
  msgstr ""
223
 
@@ -228,7 +236,7 @@ msgid ""
228
  msgstr ""
229
 
230
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:77
231
- #: admin/template.php:102
232
  msgid "CSS Class Name"
233
  msgstr ""
234
 
@@ -238,64 +246,64 @@ msgstr ""
238
 
239
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:88
240
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:616
241
- #: admin/template.php:85 admin/template.php:578
242
  msgid "Meta Key"
243
  msgstr ""
244
 
245
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:92
246
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:620
247
- #: admin/template.php:86 admin/template.php:579
248
  msgid "Name of the meta key this field will save to"
249
  msgstr ""
250
 
251
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:110
252
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:180
253
- #: admin/template.php:129 admin/template.php:189
254
  msgid "Placeholder text"
255
  msgstr ""
256
 
257
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:114
258
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:184
259
- #: admin/template.php:130
260
  msgid "Text for HTML5 placeholder attribute"
261
  msgstr ""
262
 
263
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:119
264
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:192
265
- #: admin/template.php:134 admin/template.php:194
266
  msgid "Default value"
267
  msgstr ""
268
 
269
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:123
270
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:196
271
- #: admin/template.php:135
272
  msgid "The default value this field will have"
273
  msgstr ""
274
 
275
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:128
276
- #: admin/template.php:139
277
  msgid "Size"
278
  msgstr ""
279
 
280
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:133
281
- #: admin/template.php:140
282
  msgid "Size of this input field"
283
  msgstr ""
284
 
285
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:140
286
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:215
287
- #: admin/template.php:144 admin/template.php:209
288
  msgid "Word Restriction"
289
  msgstr ""
290
 
291
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:144
292
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:219
293
- #: admin/template.php:148 admin/template.php:213
294
  msgid "Numebr of words the author to be restricted in"
295
  msgstr ""
296
 
297
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:162
298
- #: admin/template.php:179
299
  msgid "Rows"
300
  msgstr ""
301
 
@@ -304,7 +312,7 @@ msgid "Number of rows in textarea"
304
  msgstr ""
305
 
306
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:171
307
- #: admin/template.php:184
308
  msgid "Columns"
309
  msgstr ""
310
 
@@ -315,22 +323,22 @@ msgstr ""
315
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:201
316
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:290
317
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:297
318
- #: admin/template.php:199
319
  msgid "Textarea"
320
  msgstr ""
321
 
322
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:204
323
- #: admin/template.php:202
324
  msgid "Normal"
325
  msgstr ""
326
 
327
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:205
328
- #: admin/template.php:203
329
  msgid "Rich textarea"
330
  msgstr ""
331
 
332
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:206
333
- #: admin/template.php:204
334
  msgid "Teeny Rich textarea"
335
  msgstr ""
336
 
@@ -346,8 +354,8 @@ msgid "Text"
346
  msgstr ""
347
 
348
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:327
349
- #: admin/template.php:401 admin/template.php:425 admin/template.php:457
350
- #: admin/template.php:489 templates/dashboard/posts.php:84
351
  #: templates/dashboard.php:37
352
  msgid "Options"
353
  msgstr ""
@@ -357,12 +365,12 @@ msgid "Add options for the form field"
357
  msgstr ""
358
 
359
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:351
360
- #: admin/template.php:452 admin/template.php:484
361
  msgid "Select Text"
362
  msgstr ""
363
 
364
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:355
365
- #: admin/template.php:441 admin/template.php:473
366
  msgid ""
367
  "First element of the select dropdown. Leave this empty if you don't want to "
368
  "show this field"
@@ -418,17 +426,17 @@ msgstr ""
418
 
419
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:590
420
  #: admin/html/form-settings-post.php:17 class/transactions-list-table.php:48
421
- #: includes/free/edit-user.php:153
422
  msgid "Email"
423
  msgstr ""
424
 
425
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:625
426
- #: admin/template.php:585
427
  msgid "Meta Value"
428
  msgstr ""
429
 
430
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:629
431
- #: admin/template.php:586
432
  msgid "Enter the meta value"
433
  msgstr ""
434
 
@@ -437,22 +445,22 @@ msgid "Hidden Field"
437
  msgstr ""
438
 
439
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:665
440
- #: admin/form.php:662 admin/template-post.php:105 admin/template.php:649
441
  msgid "Max. file size"
442
  msgstr ""
443
 
444
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:669
445
- #: admin/form.php:666 admin/template-post.php:93 admin/template.php:637
446
  msgid "Enter maximum upload size limit in KB"
447
  msgstr ""
448
 
449
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:674
450
- #: admin/template.php:654
451
  msgid "Max. files"
452
  msgstr ""
453
 
454
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:678
455
- #: admin/template.php:638
456
  msgid "Number of images can be uploaded"
457
  msgstr ""
458
 
@@ -463,7 +471,7 @@ msgid "Image Upload"
463
  msgstr ""
464
 
465
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:716
466
- #: admin/template.php:547 admin/template.php:607 class/upload.php:164
467
  #: templates/dashboard/posts.php:74 templates/dashboard.php:27
468
  #: wpuf-functions.php:703
469
  msgid "Title"
@@ -474,7 +482,7 @@ msgid "Title of the section"
474
  msgstr ""
475
 
476
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:725
477
- #: admin/subscription.php:206 admin/template.php:612 class/upload.php:166
478
  #: wpuf-functions.php:709
479
  msgid "Description"
480
  msgstr ""
@@ -494,7 +502,7 @@ msgid "Some description about this section"
494
  msgstr ""
495
 
496
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:761
497
- #: admin/template.php:552
498
  msgid "HTML Codes"
499
  msgstr ""
500
 
@@ -535,33 +543,29 @@ msgstr ""
535
  msgid "Field Options"
536
  msgstr ""
537
 
538
- #: admin/form-handler.php:5 admin/form.php:38 admin/settings.php:55
539
- msgid "User Frontend"
540
- msgstr ""
541
-
542
- #: admin/form-handler.php:56 admin/form-handler.php:183
543
  msgid "You do not have sufficient permissions to do this action"
544
  msgstr ""
545
 
546
- #: admin/form-handler.php:319 admin/form-handler.php:339
547
  msgid "%d form moved to the trash."
548
  msgid_plural "%d forms moved to the trash."
549
  msgstr[0] ""
550
  msgstr[1] ""
551
 
552
- #: admin/form-handler.php:323 admin/form-handler.php:343
553
  msgid "%d form restored from the trash."
554
  msgid_plural "%d forms restored from the trash."
555
  msgstr[0] ""
556
  msgstr[1] ""
557
 
558
- #: admin/form-handler.php:327 admin/form-handler.php:347
559
  msgid "%d form permanently deleted."
560
  msgid_plural "%d forms permanently deleted."
561
  msgstr[0] ""
562
  msgstr[1] ""
563
 
564
- #: admin/form-handler.php:332 admin/form-handler.php:352
565
  msgid "Form duplicated successfully. <a href=\"%s\">View form.</a>"
566
  msgstr ""
567
 
@@ -575,94 +579,94 @@ msgstr ""
575
  msgid "Want a new integration? <a href=\"%s\" target=\"_blank\">Let us know</a>."
576
  msgstr ""
577
 
578
- #: admin/form-template.php:170
579
  msgid "Form Template"
580
  msgstr ""
581
 
582
- #: admin/form-template.php:173
583
  msgid "&mdash; No Template &mdash;"
584
  msgstr ""
585
 
586
- #: admin/form-template.php:182
587
  msgid ""
588
  "If selected a form template, it will try to execute that integration "
589
  "options when new post created and updated."
590
  msgstr ""
591
 
592
- #: admin/form.php:51 admin/form.php:71 admin/form.php:73 admin/form.php:109
593
  msgid "Forms"
594
  msgstr ""
595
 
596
- #: admin/form.php:72 admin/form.php:110
597
  msgid "Form"
598
  msgstr ""
599
 
600
- #: admin/form.php:74 admin/form.php:112 admin/post-forms-list-table-view.php:8
601
  msgid "Add Form"
602
  msgstr ""
603
 
604
- #: admin/form.php:75 admin/form.php:113
605
  msgid "Add New Form"
606
  msgstr ""
607
 
608
- #: admin/form.php:76 admin/form.php:114 admin/installer.php:75
609
  #: admin/post-forms-list-table.php:387 admin/subscription.php:227
610
  #: class/subscription.php:360 includes/free/admin/shortcode-button.php:90
611
- #: includes/free/edit-user.php:100 templates/dashboard/posts.php:150
612
  #: templates/dashboard.php:104
613
  msgid "Edit"
614
  msgstr ""
615
 
616
- #: admin/form.php:77 admin/form.php:115
617
  msgid "Edit Form"
618
  msgstr ""
619
 
620
- #: admin/form.php:78 admin/form.php:116
621
  msgid "New Form"
622
  msgstr ""
623
 
624
- #: admin/form.php:79 admin/form.php:80 admin/form.php:117 admin/form.php:118
625
  msgid "View Form"
626
  msgstr ""
627
 
628
- #: admin/form.php:81 admin/form.php:119
629
  msgid "Search Form"
630
  msgstr ""
631
 
632
- #: admin/form.php:82 admin/form.php:120
633
  msgid "No Form Found"
634
  msgstr ""
635
 
636
- #: admin/form.php:83 admin/form.php:121
637
  msgid "No Form Found in Trash"
638
  msgstr ""
639
 
640
- #: admin/form.php:84 admin/form.php:122
641
  msgid "Parent Form"
642
  msgstr ""
643
 
644
- #: admin/form.php:89
645
  msgid "Registraton Forms"
646
  msgstr ""
647
 
648
- #: admin/form.php:111 includes/free/loader.php:65
649
  msgid "Registration Forms"
650
  msgstr ""
651
 
652
- #: admin/form.php:196 includes/free/form-element.php:211
653
  #: includes/free/form-element.php:248
654
  msgid "Notification"
655
  msgstr ""
656
 
657
- #: admin/form.php:229
658
  msgid "Post Settings"
659
  msgstr ""
660
 
661
- #: admin/form.php:230
662
  msgid "Edit Settings"
663
  msgstr ""
664
 
665
- #: admin/form.php:231 includes/free/form-element.php:55
666
  msgid "Post Expiration"
667
  msgstr ""
668
 
@@ -679,7 +683,7 @@ msgid "Taxonomies"
679
  msgstr ""
680
 
681
  #: admin/form.php:422 admin/html/form-settings-post.php:28
682
- #: class/render-form.php:615
683
  msgid "Save Draft"
684
  msgstr ""
685
 
@@ -1164,23 +1168,23 @@ msgstr ""
1164
  msgid "Draft"
1165
  msgstr ""
1166
 
1167
- #: admin/posting.php:56 class/render-form.php:1460 wpuf.php:351
1168
  msgid "Are you sure?"
1169
  msgstr ""
1170
 
1171
- #: admin/posting.php:62 wpuf.php:357
1172
  msgid "Allowed Files"
1173
  msgstr ""
1174
 
1175
- #: admin/posting.php:65 wpuf.php:360
1176
  msgid "Maximum number of files reached!"
1177
  msgstr ""
1178
 
1179
- #: admin/posting.php:66 wpuf.php:361
1180
  msgid "The file you have uploaded exceeds the file size limit. Please try again."
1181
  msgstr ""
1182
 
1183
- #: admin/posting.php:67 wpuf.php:362
1184
  msgid "You have uploaded an incorrect file type. Please try again."
1185
  msgstr ""
1186
 
@@ -1633,6 +1637,10 @@ msgstr ""
1633
  msgid "WP User Frontend"
1634
  msgstr ""
1635
 
 
 
 
 
1636
  #: admin/settings.php:65
1637
  msgid "Subscriptions"
1638
  msgstr ""
@@ -1719,7 +1727,7 @@ msgstr ""
1719
  msgid "Post Count"
1720
  msgstr ""
1721
 
1722
- #: admin/subscription.php:210 includes/free/edit-user.php:94
1723
  msgid "Action"
1724
  msgstr ""
1725
 
@@ -1727,9 +1735,9 @@ msgstr ""
1727
  msgid "Are you sure to delete this pack?"
1728
  msgstr ""
1729
 
1730
- #: admin/subscription.php:231 class/render-form.php:1460
1731
  #: class/transactions-list-table.php:114 class/transactions-list-table.php:175
1732
- #: class/upload.php:171 includes/free/edit-user.php:101
1733
  #: templates/dashboard/posts.php:160 templates/dashboard.php:114
1734
  msgid "Delete"
1735
  msgstr ""
@@ -1895,11 +1903,11 @@ msgstr ""
1895
  msgid "Toggle"
1896
  msgstr ""
1897
 
1898
- #: admin/template.php:103
1899
  msgid "Add a CSS class name for this field"
1900
  msgstr ""
1901
 
1902
- #: admin/template.php:307
1903
  msgid "show values"
1904
  msgstr ""
1905
 
@@ -2085,7 +2093,7 @@ msgstr ""
2085
  msgid "Author Info"
2086
  msgstr ""
2087
 
2088
- #: class/frontend-dashboard.php:102 includes/free/edit-user.php:98
2089
  msgid "%s"
2090
  msgstr ""
2091
 
@@ -2223,33 +2231,17 @@ msgstr ""
2223
  msgid "Please make sure you've published your form."
2224
  msgstr ""
2225
 
2226
- #: class/render-form.php:1182 class/render-form.php:1187
2227
- #: includes/free/edit-profile.php:198 templates/dashboard/edit-profile.php:36
2228
  msgid "Strength indicator"
2229
  msgstr ""
2230
 
2231
- #: class/render-form.php:1188
2232
- msgid "Very weak"
2233
- msgstr ""
2234
-
2235
- #: class/render-form.php:1189
2236
- msgid "Weak"
2237
- msgstr ""
2238
-
2239
- #: class/render-form.php:1190
2240
- msgid "Medium"
2241
- msgstr ""
2242
-
2243
- #: class/render-form.php:1191
2244
- msgid "Strong"
2245
- msgstr ""
2246
-
2247
- #: class/render-form.php:1192
2248
- msgid "Mismatch"
2249
  msgstr ""
2250
 
2251
- #: class/render-form.php:1214 class/render-form.php:1322
2252
- msgid "-- Select --"
2253
  msgstr ""
2254
 
2255
  #: class/subscription.php:358
@@ -2507,8 +2499,8 @@ msgstr ""
2507
  msgid "<strong>Success</strong>: Profile updated"
2508
  msgstr ""
2509
 
2510
- #: includes/free/edit-profile.php:96 includes/free/edit-user.php:93
2511
- #: includes/free/edit-user.php:145 templates/login-form.php:21
2512
  msgid "Username"
2513
  msgstr ""
2514
 
@@ -2615,53 +2607,53 @@ msgstr ""
2615
  msgid "You don't have permission for this purpose"
2616
  msgstr ""
2617
 
2618
- #: includes/free/edit-user.php:77
2619
  msgid "User Deleted"
2620
  msgstr ""
2621
 
2622
- #: includes/free/edit-user.php:120 includes/free/edit-user.php:178
2623
  msgid "Add New User"
2624
  msgstr ""
2625
 
2626
- #: includes/free/edit-user.php:133
2627
  msgid "User Added"
2628
  msgstr ""
2629
 
2630
- #: includes/free/edit-user.php:161
2631
  msgid "Role"
2632
  msgstr ""
2633
 
2634
- #: includes/free/edit-user.php:205
2635
  msgid "<strong>ERROR</strong>: Please enter a username"
2636
  msgstr ""
2637
 
2638
- #: includes/free/edit-user.php:207
2639
  msgid ""
2640
  "<strong>ERROR</strong>: This username is invalid because it uses illegal "
2641
  "characters. Please enter a valid username"
2642
  msgstr ""
2643
 
2644
- #: includes/free/edit-user.php:210
2645
  msgid ""
2646
  "<strong>ERROR</strong>: This username is already registered, please choose "
2647
  "another one"
2648
  msgstr ""
2649
 
2650
- #: includes/free/edit-user.php:215
2651
  msgid "<strong>ERROR</strong>: Please type your e-mail address"
2652
  msgstr ""
2653
 
2654
- #: includes/free/edit-user.php:217
2655
  msgid "<strong>ERROR</strong>: The email address isn&#8217;t correct"
2656
  msgstr ""
2657
 
2658
- #: includes/free/edit-user.php:220
2659
  msgid ""
2660
  "<strong>ERROR</strong>: This email is already registered, please choose "
2661
  "another one"
2662
  msgstr ""
2663
 
2664
- #: includes/free/edit-user.php:243
2665
  msgid ""
2666
  "<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the "
2667
  "<a href=\"mailto:%s\">webmaster</a> !"
@@ -2809,11 +2801,11 @@ msgstr ""
2809
  msgid "Use Coupon codes for subscription for discounts."
2810
  msgstr ""
2811
 
2812
- #: includes/free/loader.php:139
2813
  msgid "Pro Feature"
2814
  msgstr ""
2815
 
2816
- #: includes/free/loader.php:157
2817
  msgid "Upgrade to Pro"
2818
  msgstr ""
2819
 
@@ -3292,11 +3284,11 @@ msgstr ""
3292
  msgid "is not valid"
3293
  msgstr ""
3294
 
3295
- #: wpuf.php:345
3296
  msgid "Please fix the errors to proceed"
3297
  msgstr ""
3298
 
3299
- #: wpuf.php:347
3300
  msgid "Word limit reached"
3301
  msgstr ""
3302
 
2
  # This file is distributed under the GPL2.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP User Frontend 2.5.3\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wedevs.com/support/forum/plugin-support/wp-user-frontend/\n"
8
+ "POT-Creation-Date: 2017-06-08 17:02:25+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
39
  msgstr ""
40
 
41
  #: admin/form-builder/assets/js/components/field-option-data/template.php:5
42
+ #: admin/template.php:244
43
  msgid "Show values"
44
  msgstr ""
45
 
46
  #: admin/form-builder/assets/js/components/field-option-data/template.php:16
47
+ #: admin/template.php:247 admin/template.php:305
48
  msgid "Label"
49
  msgstr ""
50
 
51
  #: admin/form-builder/assets/js/components/field-option-data/template.php:20
52
+ #: admin/template.php:247 admin/template.php:305
53
  msgid "Value"
54
  msgstr ""
55
 
67
 
68
  #: admin/form-builder/assets/js/components/form-featured_image/template.php:5
69
  #: admin/form-builder/assets/js/components/form-image_upload/template.php:5
70
+ #: class/render-form.php:1490
71
  msgid "Select Image"
72
  msgstr ""
73
 
74
  #: admin/form-builder/assets/js/components/form-post_content/template.php:4
75
+ #: class/render-form.php:911
76
  msgid "Insert Photo"
77
  msgstr ""
78
 
80
  msgid "— Select —"
81
  msgstr ""
82
 
83
+ #: admin/form-builder/assets/js/components/merge-tags/template.php:8
84
+ msgid "Form Fields"
85
+ msgstr ""
86
+
87
+ #: admin/form-builder/assets/js/components/merge-tags/template.php:16
88
+ msgid "No fields available"
89
+ msgstr ""
90
+
91
  #: admin/form-builder/class-wpuf-admin-form-builder-ajax.php:29
92
  msgid "Unauthorized operation"
93
  msgstr ""
96
  msgid "Invalid form id"
97
  msgstr ""
98
 
99
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:320
100
  msgid "Custom Fields"
101
  msgstr ""
102
 
103
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:341
104
  msgid "Others"
105
  msgstr ""
106
 
107
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:357
108
  msgid "Advanced Options"
109
  msgstr ""
110
 
111
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:358
112
  msgid "Are you sure you want to delete this field?"
113
  msgstr ""
114
 
115
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:359
116
  msgid "Yes, delete it"
117
  msgstr ""
118
 
119
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:360
120
  msgid "No, cancel it"
121
  msgstr ""
122
 
123
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:361
124
  msgid "OK"
125
  msgstr ""
126
 
127
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:362
128
  #: class/payment.php:168 class/subscription.php:829
129
  #: templates/dashboard/subscription.php:59
130
  msgid "Cancel"
131
  msgstr ""
132
 
133
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:363
134
  #: includes/free/admin/shortcode-builder.php:69
135
  msgid "Close"
136
  msgstr ""
137
 
138
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:364
139
  msgid "This field must contain at least one choice"
140
  msgstr ""
141
 
142
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:365
143
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:376
144
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:416
145
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:472
147
  msgid "Option"
148
  msgstr ""
149
 
150
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:366
151
  msgid "Column"
152
  msgstr ""
153
 
154
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:367
155
  msgid "This field must contain at least one column"
156
  msgstr ""
157
 
158
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:368
159
  msgid "is available in Pro version"
160
  msgstr ""
161
 
162
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:369
163
  msgid "Please upgrade to the Pro version to unlock all these awesome features"
164
  msgstr ""
165
 
166
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:370
167
  msgid "Get the Pro version"
168
  msgstr ""
169
 
170
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:371 admin/form.php:743
171
  msgid "Select"
172
  msgstr ""
173
 
174
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:372
175
  msgid "Saved form data"
176
  msgstr ""
177
 
178
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:373
179
  msgid "You have unsaved changes."
180
  msgstr ""
181
 
182
+ #: admin/form-builder/class-wpuf-admin-form-builder.php:374
183
  #: admin/form-builder/views/form-builder.php:45
184
  msgid "Click to copy shortcode"
185
  msgstr ""
186
 
187
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:44
188
+ #: admin/template.php:76
189
  msgid "Field Label"
190
  msgstr ""
191
 
192
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:48
193
+ #: admin/template.php:77
194
  msgid "Enter a title of this field"
195
  msgstr ""
196
 
197
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:53
198
+ #: admin/template.php:94
199
  msgid "Help text"
200
  msgstr ""
201
 
202
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:57
203
+ #: admin/template.php:95
204
  msgid "Give the user some information about this field"
205
  msgstr ""
206
 
207
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:62
208
+ #: admin/template.php:67
209
  msgid "Required"
210
  msgstr ""
211
 
215
  #: admin/post-forms-list-table.php:340 admin/settings-options.php:94
216
  #: admin/settings-options.php:174 admin/settings-options.php:185
217
  #: admin/settings-options.php:274 admin/subscription.php:145
218
+ #: admin/template.php:70 includes/free/form-element.php:475
219
  msgid "Yes"
220
  msgstr ""
221
 
225
  #: admin/post-forms-list-table.php:341 admin/settings-options.php:95
226
  #: admin/settings-options.php:175 admin/settings-options.php:186
227
  #: admin/settings-options.php:275 admin/subscription.php:147
228
+ #: admin/template.php:71 includes/free/form-element.php:476
229
  msgid "No"
230
  msgstr ""
231
 
236
  msgstr ""
237
 
238
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:77
239
+ #: admin/template.php:99
240
  msgid "CSS Class Name"
241
  msgstr ""
242
 
246
 
247
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:88
248
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:616
249
+ #: admin/template.php:82 admin/template.php:575
250
  msgid "Meta Key"
251
  msgstr ""
252
 
253
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:92
254
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:620
255
+ #: admin/template.php:83 admin/template.php:576
256
  msgid "Name of the meta key this field will save to"
257
  msgstr ""
258
 
259
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:110
260
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:180
261
+ #: admin/template.php:126 admin/template.php:186
262
  msgid "Placeholder text"
263
  msgstr ""
264
 
265
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:114
266
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:184
267
+ #: admin/template.php:127
268
  msgid "Text for HTML5 placeholder attribute"
269
  msgstr ""
270
 
271
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:119
272
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:192
273
+ #: admin/template.php:131 admin/template.php:191
274
  msgid "Default value"
275
  msgstr ""
276
 
277
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:123
278
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:196
279
+ #: admin/template.php:132
280
  msgid "The default value this field will have"
281
  msgstr ""
282
 
283
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:128
284
+ #: admin/template.php:136
285
  msgid "Size"
286
  msgstr ""
287
 
288
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:133
289
+ #: admin/template.php:137
290
  msgid "Size of this input field"
291
  msgstr ""
292
 
293
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:140
294
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:215
295
+ #: admin/template.php:141 admin/template.php:206
296
  msgid "Word Restriction"
297
  msgstr ""
298
 
299
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:144
300
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:219
301
+ #: admin/template.php:145 admin/template.php:210
302
  msgid "Numebr of words the author to be restricted in"
303
  msgstr ""
304
 
305
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:162
306
+ #: admin/template.php:176
307
  msgid "Rows"
308
  msgstr ""
309
 
312
  msgstr ""
313
 
314
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:171
315
+ #: admin/template.php:181
316
  msgid "Columns"
317
  msgstr ""
318
 
323
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:201
324
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:290
325
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:297
326
+ #: admin/template.php:196
327
  msgid "Textarea"
328
  msgstr ""
329
 
330
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:204
331
+ #: admin/template.php:199
332
  msgid "Normal"
333
  msgstr ""
334
 
335
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:205
336
+ #: admin/template.php:200
337
  msgid "Rich textarea"
338
  msgstr ""
339
 
340
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:206
341
+ #: admin/template.php:201
342
  msgid "Teeny Rich textarea"
343
  msgstr ""
344
 
354
  msgstr ""
355
 
356
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:327
357
+ #: admin/template.php:398 admin/template.php:422 admin/template.php:454
358
+ #: admin/template.php:486 templates/dashboard/posts.php:84
359
  #: templates/dashboard.php:37
360
  msgid "Options"
361
  msgstr ""
365
  msgstr ""
366
 
367
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:351
368
+ #: admin/template.php:449 admin/template.php:481
369
  msgid "Select Text"
370
  msgstr ""
371
 
372
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:355
373
+ #: admin/template.php:438 admin/template.php:470
374
  msgid ""
375
  "First element of the select dropdown. Leave this empty if you don't want to "
376
  "show this field"
426
 
427
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:590
428
  #: admin/html/form-settings-post.php:17 class/transactions-list-table.php:48
429
+ #: includes/free/edit-user.php:152
430
  msgid "Email"
431
  msgstr ""
432
 
433
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:625
434
+ #: admin/template.php:582
435
  msgid "Meta Value"
436
  msgstr ""
437
 
438
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:629
439
+ #: admin/template.php:583
440
  msgid "Enter the meta value"
441
  msgstr ""
442
 
445
  msgstr ""
446
 
447
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:665
448
+ #: admin/form.php:662 admin/template-post.php:105 admin/template.php:646
449
  msgid "Max. file size"
450
  msgstr ""
451
 
452
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:669
453
+ #: admin/form.php:666 admin/template-post.php:93 admin/template.php:634
454
  msgid "Enter maximum upload size limit in KB"
455
  msgstr ""
456
 
457
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:674
458
+ #: admin/template.php:651
459
  msgid "Max. files"
460
  msgstr ""
461
 
462
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:678
463
+ #: admin/template.php:635
464
  msgid "Number of images can be uploaded"
465
  msgstr ""
466
 
471
  msgstr ""
472
 
473
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:716
474
+ #: admin/template.php:544 admin/template.php:604 class/upload.php:164
475
  #: templates/dashboard/posts.php:74 templates/dashboard.php:27
476
  #: wpuf-functions.php:703
477
  msgid "Title"
482
  msgstr ""
483
 
484
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:725
485
+ #: admin/subscription.php:206 admin/template.php:609 class/upload.php:166
486
  #: wpuf-functions.php:709
487
  msgid "Description"
488
  msgstr ""
502
  msgstr ""
503
 
504
  #: admin/form-builder/class-wpuf-form-builder-field-settings.php:761
505
+ #: admin/template.php:549
506
  msgid "HTML Codes"
507
  msgstr ""
508
 
543
  msgid "Field Options"
544
  msgstr ""
545
 
546
+ #: admin/form-handler.php:54 admin/form-handler.php:181
 
 
 
 
547
  msgid "You do not have sufficient permissions to do this action"
548
  msgstr ""
549
 
550
+ #: admin/form-handler.php:317 admin/form-handler.php:337
551
  msgid "%d form moved to the trash."
552
  msgid_plural "%d forms moved to the trash."
553
  msgstr[0] ""
554
  msgstr[1] ""
555
 
556
+ #: admin/form-handler.php:321 admin/form-handler.php:341
557
  msgid "%d form restored from the trash."
558
  msgid_plural "%d forms restored from the trash."
559
  msgstr[0] ""
560
  msgstr[1] ""
561
 
562
+ #: admin/form-handler.php:325 admin/form-handler.php:345
563
  msgid "%d form permanently deleted."
564
  msgid_plural "%d forms permanently deleted."
565
  msgstr[0] ""
566
  msgstr[1] ""
567
 
568
+ #: admin/form-handler.php:330 admin/form-handler.php:350
569
  msgid "Form duplicated successfully. <a href=\"%s\">View form.</a>"
570
  msgstr ""
571
 
579
  msgid "Want a new integration? <a href=\"%s\" target=\"_blank\">Let us know</a>."
580
  msgstr ""
581
 
582
+ #: admin/form-template.php:169
583
  msgid "Form Template"
584
  msgstr ""
585
 
586
+ #: admin/form-template.php:172
587
  msgid "&mdash; No Template &mdash;"
588
  msgstr ""
589
 
590
+ #: admin/form-template.php:181
591
  msgid ""
592
  "If selected a form template, it will try to execute that integration "
593
  "options when new post created and updated."
594
  msgstr ""
595
 
596
+ #: admin/form.php:49 admin/form.php:69 admin/form.php:71 admin/form.php:107
597
  msgid "Forms"
598
  msgstr ""
599
 
600
+ #: admin/form.php:70 admin/form.php:108
601
  msgid "Form"
602
  msgstr ""
603
 
604
+ #: admin/form.php:72 admin/form.php:110 admin/post-forms-list-table-view.php:8
605
  msgid "Add Form"
606
  msgstr ""
607
 
608
+ #: admin/form.php:73 admin/form.php:111
609
  msgid "Add New Form"
610
  msgstr ""
611
 
612
+ #: admin/form.php:74 admin/form.php:112 admin/installer.php:75
613
  #: admin/post-forms-list-table.php:387 admin/subscription.php:227
614
  #: class/subscription.php:360 includes/free/admin/shortcode-button.php:90
615
+ #: includes/free/edit-user.php:99 templates/dashboard/posts.php:150
616
  #: templates/dashboard.php:104
617
  msgid "Edit"
618
  msgstr ""
619
 
620
+ #: admin/form.php:75 admin/form.php:113
621
  msgid "Edit Form"
622
  msgstr ""
623
 
624
+ #: admin/form.php:76 admin/form.php:114
625
  msgid "New Form"
626
  msgstr ""
627
 
628
+ #: admin/form.php:77 admin/form.php:78 admin/form.php:115 admin/form.php:116
629
  msgid "View Form"
630
  msgstr ""
631
 
632
+ #: admin/form.php:79 admin/form.php:117
633
  msgid "Search Form"
634
  msgstr ""
635
 
636
+ #: admin/form.php:80 admin/form.php:118
637
  msgid "No Form Found"
638
  msgstr ""
639
 
640
+ #: admin/form.php:81 admin/form.php:119
641
  msgid "No Form Found in Trash"
642
  msgstr ""
643
 
644
+ #: admin/form.php:82 admin/form.php:120
645
  msgid "Parent Form"
646
  msgstr ""
647
 
648
+ #: admin/form.php:87
649
  msgid "Registraton Forms"
650
  msgstr ""
651
 
652
+ #: admin/form.php:109 includes/free/loader.php:65
653
  msgid "Registration Forms"
654
  msgstr ""
655
 
656
+ #: admin/form.php:194 includes/free/form-element.php:211
657
  #: includes/free/form-element.php:248
658
  msgid "Notification"
659
  msgstr ""
660
 
661
+ #: admin/form.php:227
662
  msgid "Post Settings"
663
  msgstr ""
664
 
665
+ #: admin/form.php:228
666
  msgid "Edit Settings"
667
  msgstr ""
668
 
669
+ #: admin/form.php:229 includes/free/form-element.php:55
670
  msgid "Post Expiration"
671
  msgstr ""
672
 
683
  msgstr ""
684
 
685
  #: admin/form.php:422 admin/html/form-settings-post.php:28
686
+ #: class/render-form.php:619
687
  msgid "Save Draft"
688
  msgstr ""
689
 
1168
  msgid "Draft"
1169
  msgstr ""
1170
 
1171
+ #: admin/posting.php:56 class/render-form.php:1502 wpuf.php:350
1172
  msgid "Are you sure?"
1173
  msgstr ""
1174
 
1175
+ #: admin/posting.php:62 wpuf.php:356
1176
  msgid "Allowed Files"
1177
  msgstr ""
1178
 
1179
+ #: admin/posting.php:65 wpuf.php:359
1180
  msgid "Maximum number of files reached!"
1181
  msgstr ""
1182
 
1183
+ #: admin/posting.php:66 wpuf.php:360
1184
  msgid "The file you have uploaded exceeds the file size limit. Please try again."
1185
  msgstr ""
1186
 
1187
+ #: admin/posting.php:67 wpuf.php:361
1188
  msgid "You have uploaded an incorrect file type. Please try again."
1189
  msgstr ""
1190
 
1637
  msgid "WP User Frontend"
1638
  msgstr ""
1639
 
1640
+ #: admin/settings.php:55
1641
+ msgid "User Frontend"
1642
+ msgstr ""
1643
+
1644
  #: admin/settings.php:65
1645
  msgid "Subscriptions"
1646
  msgstr ""
1727
  msgid "Post Count"
1728
  msgstr ""
1729
 
1730
+ #: admin/subscription.php:210 includes/free/edit-user.php:93
1731
  msgid "Action"
1732
  msgstr ""
1733
 
1735
  msgid "Are you sure to delete this pack?"
1736
  msgstr ""
1737
 
1738
+ #: admin/subscription.php:231 class/render-form.php:1502
1739
  #: class/transactions-list-table.php:114 class/transactions-list-table.php:175
1740
+ #: class/upload.php:171 includes/free/edit-user.php:100
1741
  #: templates/dashboard/posts.php:160 templates/dashboard.php:114
1742
  msgid "Delete"
1743
  msgstr ""
1903
  msgid "Toggle"
1904
  msgstr ""
1905
 
1906
+ #: admin/template.php:100
1907
  msgid "Add a CSS class name for this field"
1908
  msgstr ""
1909
 
1910
+ #: admin/template.php:304
1911
  msgid "show values"
1912
  msgstr ""
1913
 
2093
  msgid "Author Info"
2094
  msgstr ""
2095
 
2096
+ #: class/frontend-dashboard.php:102 includes/free/edit-user.php:97
2097
  msgid "%s"
2098
  msgstr ""
2099
 
2231
  msgid "Please make sure you've published your form."
2232
  msgstr ""
2233
 
2234
+ #: class/render-form.php:1189 includes/free/edit-profile.php:198
2235
+ #: templates/dashboard/edit-profile.php:36
2236
  msgid "Strength indicator"
2237
  msgstr ""
2238
 
2239
+ #: class/render-form.php:1251 class/render-form.php:1364
2240
+ msgid "-- Select --"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2241
  msgstr ""
2242
 
2243
+ #: class/render-form.php:1306
2244
+ msgid "This field is no longer available."
2245
  msgstr ""
2246
 
2247
  #: class/subscription.php:358
2499
  msgid "<strong>Success</strong>: Profile updated"
2500
  msgstr ""
2501
 
2502
+ #: includes/free/edit-profile.php:96 includes/free/edit-user.php:92
2503
+ #: includes/free/edit-user.php:144 templates/login-form.php:21
2504
  msgid "Username"
2505
  msgstr ""
2506
 
2607
  msgid "You don't have permission for this purpose"
2608
  msgstr ""
2609
 
2610
+ #: includes/free/edit-user.php:76
2611
  msgid "User Deleted"
2612
  msgstr ""
2613
 
2614
+ #: includes/free/edit-user.php:119 includes/free/edit-user.php:177
2615
  msgid "Add New User"
2616
  msgstr ""
2617
 
2618
+ #: includes/free/edit-user.php:132
2619
  msgid "User Added"
2620
  msgstr ""
2621
 
2622
+ #: includes/free/edit-user.php:160
2623
  msgid "Role"
2624
  msgstr ""
2625
 
2626
+ #: includes/free/edit-user.php:204
2627
  msgid "<strong>ERROR</strong>: Please enter a username"
2628
  msgstr ""
2629
 
2630
+ #: includes/free/edit-user.php:206
2631
  msgid ""
2632
  "<strong>ERROR</strong>: This username is invalid because it uses illegal "
2633
  "characters. Please enter a valid username"
2634
  msgstr ""
2635
 
2636
+ #: includes/free/edit-user.php:209
2637
  msgid ""
2638
  "<strong>ERROR</strong>: This username is already registered, please choose "
2639
  "another one"
2640
  msgstr ""
2641
 
2642
+ #: includes/free/edit-user.php:214
2643
  msgid "<strong>ERROR</strong>: Please type your e-mail address"
2644
  msgstr ""
2645
 
2646
+ #: includes/free/edit-user.php:216
2647
  msgid "<strong>ERROR</strong>: The email address isn&#8217;t correct"
2648
  msgstr ""
2649
 
2650
+ #: includes/free/edit-user.php:219
2651
  msgid ""
2652
  "<strong>ERROR</strong>: This email is already registered, please choose "
2653
  "another one"
2654
  msgstr ""
2655
 
2656
+ #: includes/free/edit-user.php:242
2657
  msgid ""
2658
  "<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the "
2659
  "<a href=\"mailto:%s\">webmaster</a> !"
2801
  msgid "Use Coupon codes for subscription for discounts."
2802
  msgstr ""
2803
 
2804
+ #: includes/free/loader.php:137
2805
  msgid "Pro Feature"
2806
  msgstr ""
2807
 
2808
+ #: includes/free/loader.php:153
2809
  msgid "Upgrade to Pro"
2810
  msgstr ""
2811
 
3284
  msgid "is not valid"
3285
  msgstr ""
3286
 
3287
+ #: wpuf.php:344
3288
  msgid "Please fix the errors to proceed"
3289
  msgstr ""
3290
 
3291
+ #: wpuf.php:346
3292
  msgid "Word limit reached"
3293
  msgstr ""
3294
 
lib/class.settings-api.php CHANGED
File without changes
lib/recaptchalib.php CHANGED
File without changes
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === WP User Frontend ===
2
- Contributors: tareq1988, wedevs
3
  Donate link: https://tareq.co/donate/
4
  Tags: frontend, post, edit, dashboard, restrict, content submission, guest post, guest, registration, profile, anonymous post, gravity, gravity forms, formidable, author, author profile, authors, comments, conditional fields, conditional logic, custom fields, file uploads, form builder, front-end login, front-end registration, profile builder, profiles, member, member directory, members, Membership
5
  Requires at least: 4.0
6
- Tested up to: 4.7.3
7
  Stable tag: trunk
8
  License: GPLv2
9
 
@@ -116,22 +116,24 @@ After having installed the plugin:
116
 
117
  == Screenshots ==
118
 
119
- 1. Admin panel
120
- 2. Admin panel &rarr; Dashboard Tab
121
- 3. Admin panel &rarr; Login Tab
122
- 4. Admin panel &rarr; Payments Tab
123
- 5. Post Forms
124
- 6. Form Builder
125
- 7. Form Builder &rarr; Post Settings
126
- 8. Form Builder &rarr; Edit Settings
127
- 9. Form Elements
128
- 10. Subscription Packs
129
- 11. Subscription Pack Settings
130
- 12. Subscription Packs in a Page
131
- 13. Subscription Payment Screen
132
- 14. A single Form Element on Form Editor
133
- 15. A Form in a Page
134
- 16. Frontend User Dashboard
 
 
135
 
136
  == Frequently Asked Questions ==
137
 
@@ -161,6 +163,29 @@ redirected to the edit page with that post id. Then you'll see the edit post for
161
 
162
  == Changelog ==
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  = v2.5.2 (27 April, 2017) =
165
 
166
  * [improve] Added word limit feature for text field
@@ -190,12 +215,14 @@ redirected to the edit page with that post id. Then you'll see the edit post for
190
  * [fix] Image/File upload field not working when JavaScript is optimized by Async JavaScript plugin
191
  * [fix] "save draft" button not working post saving as pending, conflict with subscription
192
 
 
193
  = v2.5.1 (22 March, 2017) =
194
 
195
  * [improve] Update vue.js and vuex.js version
196
  * [improve] Update parent_slug parameter of add_submenu_page function to 'wp-user-frontend'
197
  * [fix] Admin fields in form edit section reset on clicking 'Save form' button
198
 
 
199
  = v2.5 (18 March, 2017) =
200
 
201
  * [new] Brand new form builder added for post form and profile form
@@ -203,6 +230,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
203
  * [improve] `wpuf_add_html` filter name changed to `wpuf_custom_field_render`
204
  * [improve] add and update price formating function
205
 
 
206
  = v2.4.4 (22 February, 2017) =
207
 
208
  * [fix] Undefined JavaScript error when post is editing in admin
@@ -273,6 +301,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
273
 
274
  * [fix] License renewal prompt fix
275
 
 
276
  = v2.3.14 (10 August, 2016) =
277
 
278
  * [fix] Text domain and translated strings updated
@@ -290,6 +319,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
290
  * [new] Post taxonomies visibility in form builder are now dependent on the post type selected (Pro).
291
  * [new] Multiple forms in the same page
292
 
 
293
  = v2.3.13 (30 March, 2016) =
294
 
295
  * [fix] Paypal user agent changed and issue with paypal transection fixed
@@ -297,6 +327,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
297
  * [fix] Upload.js has been modified
298
  * [fix] Problem with saving form element in php 7.0.0 is fixed
299
 
 
300
  = v2.3.12 (8 February, 2016) =
301
 
302
  * [new] WooCommerce Product Category and Attributes are now sectionized
@@ -308,6 +339,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
308
  * [new] Hook added before registration form
309
  * [fix] SSL issue fixed
310
 
 
311
  = v2.3.11 (8 February, 2016) =
312
 
313
  * [fix] File upload vulnerability fix. Props to: Panagiotis Vagenas
@@ -317,6 +349,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
317
  * [fix] Product taxonomy fixes
318
  * [new] No-captcha support added
319
 
 
320
  = v2.3.10 (5 Ocotber, 2015) =
321
 
322
  * [fix] Custom css is now working
@@ -328,6 +361,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
328
  * [new] Confirmation alert added when user wants to delete subscription in frontend
329
  * [fix] Publish post after paypal payment completion
330
 
 
331
  = v2.3.9 (13 Sepetember, 2015) =
332
 
333
  * [fix] Newly registered users were having no meta named "wpuf_postlock"
@@ -339,6 +373,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
339
  * [fix] Error undefined object post when updating user profile
340
  * [improve] Button style in payment form
341
 
 
342
  = v2.3.8 (3rd Sepetember, 2015) =
343
 
344
  * [fix] Problem with wpuf lock post fixed.
@@ -348,6 +383,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
348
  * [fix] Scripts and styles of wpuf are now loading when needed.
349
  * [add] RTL support improvement
350
 
 
351
  = v2.3.7 (24 August, 2015) =
352
 
353
  * [fix] Problem with conditional logic in image upload field fixed.
@@ -357,6 +393,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
357
  * [new] Persian language translation added
358
  * [fix] Problem with 'pay per post' feature fixed
359
 
 
360
  = v2.3.6 (13 July, 2015) =
361
 
362
  * [fix] Login page bug fixed.
@@ -367,31 +404,38 @@ redirected to the edit page with that post id. Then you'll see the edit post for
367
  * [fix] Problem with captcha and really simple captcha fixed.
368
  * [fix] Problem with action hook fixed.
369
 
 
370
  = v2.3.5 (2 July, 2015) =
371
 
372
  * [fix] Ajax taxonomy field bug fixed.
373
 
 
374
  = v2.3.4 (June 29, 2015) =
375
 
376
  * [fix] Featured image caption was not being updated
377
 
 
378
  = v2.3.3 (June 24, 2015) =
379
 
380
  * [fix] Post status settings in form, wasn't being updated.
381
 
 
382
  = v2.3.2 (June 22, 2015) =
383
 
384
  * [fix] Featured image upload fix
385
  * [new] Image upload field brought back to free
386
 
 
387
  = v2.3.1 (June 21, 2015) =
388
 
389
  * [fix] Compatibility problem with PHP < 5.2. Accidental PHP array shorthand used.
390
 
 
391
  = version 2.3 (June 20, 2015) =
392
 
393
  * Pro plugin released as free with less features
394
 
 
395
  = version 1.3.2 =
396
 
397
  * [improve] post thumbnail image association added
@@ -402,11 +446,13 @@ redirected to the edit page with that post id. Then you'll see the edit post for
402
  * [fix] Two click needed to submit a post
403
  * [fix] dashboard author bio height fix
404
 
 
405
  = version 1.3.1 =
406
 
407
  * [fix] `[wpuf_editpost]` typo fix
408
  * [fix] clean $dashboard_query from corrupting beyond use
409
 
 
410
  = version 1.3 =
411
 
412
  * [fix] PayPal payment user_id issue fixed
@@ -414,21 +460,25 @@ redirected to the edit page with that post id. Then you'll see the edit post for
414
  * [fix] PHP 5.4 strict warnings fix
415
  * [update] new version of settings api class
416
 
 
417
  = version 1.2.3 =
418
 
419
  * [fix] `has_shortcode()` brought back again by renaming as `wpuf_has_shortcode()`
420
  * [fix] all the labels now have a default text
421
 
 
422
  = version 1.2.2 =
423
 
424
  * [fix] shortcode error fix for edit users
425
  * [fix] plugin css/js url
426
  * [fix] removed has_shortcode() call
427
 
 
428
  = version 1.2.1 =
429
 
430
  * [fix] Performance problem with wp_list_users()
431
 
 
432
  = version 1.2 =
433
 
434
  * [fix] Subscription post publish
@@ -437,6 +487,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
437
  * [fix] Category checklist bug fix
438
  * [new] Checkbox field in custom field
439
 
 
440
  = version 1.1 =
441
 
442
  * warning for multisite fix
@@ -446,6 +497,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
446
  * post date bug fix
447
  * category dropdown fix
448
 
 
449
  = version 1.0 =
450
 
451
  * Admin panel converted to settings API
@@ -462,6 +514,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
462
  * Subscription and payment rewrite. Extra payment gateways can be added as plugin
463
  * Other payment currency added
464
 
 
465
  = version 0.7 =
466
 
467
  * admin ui improved
@@ -473,6 +526,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
473
  * localized ajaxurl and posting message
474
  * improved action hooks and filter hooks
475
 
 
476
  = version 0.6 =
477
 
478
  * fixed error on attachment delete
@@ -483,6 +537,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
483
  * fixed admin panel block logic
484
  * filter hook added on edit post for post args
485
 
 
486
  = version 0.5 =
487
 
488
  * filters on add posting page for blocking the post capa
@@ -499,6 +554,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
499
  * missing custom meta field added on edit post form
500
  * jQuery validation added on edit post form
501
 
 
502
  = version 0.3 =
503
 
504
  * rich/plain text on/off fixed
@@ -507,6 +563,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
507
  * stripslashes on admin/frontend meta field
508
  * 404 error fix on add post
509
 
 
510
  = version 0.2 =
511
 
512
  * Admin settings page has been improved
1
  === WP User Frontend ===
2
+ Contributors: tareq1988, sk.shaikat, rabbii, wedevs
3
  Donate link: https://tareq.co/donate/
4
  Tags: frontend, post, edit, dashboard, restrict, content submission, guest post, guest, registration, profile, anonymous post, gravity, gravity forms, formidable, author, author profile, authors, comments, conditional fields, conditional logic, custom fields, file uploads, form builder, front-end login, front-end registration, profile builder, profiles, member, member directory, members, Membership
5
  Requires at least: 4.0
6
+ Tested up to: 4.8
7
  Stable tag: trunk
8
  License: GPLv2
9
 
116
 
117
  == Screenshots ==
118
 
119
+ 1. Create Forms with Powerful Builders
120
+ 2. 25+ Customizable Form Elements
121
+ 3. Fully Customizable Form Elements
122
+ 4. Frontend View of Your Forms
123
+ 5. Get Detailed List of your Forms
124
+ 6. Let Your Users View Details of Their Posts
125
+ 7. Let Your users Edit Their Profiles from Frontend
126
+ 8. Allow Users to Buy Subscription Packs
127
+ 9. Create Subscription Packs Easily
128
+ 10. Configure Your Subscription Packs
129
+ 11. Set Up Pricings for Subscription Packs
130
+ 12. Show Subscribed Subscriptions Packs
131
+ 13. Customizable Form with Individual Post Settings
132
+ 14. Customize Your Post on the Fly
133
+ 15. Control and configure everything from
134
+ 16. Dashboard Settings to Configure Posts
135
+ 17. Login, Restriction, Frontend Security
136
+ 18. Set Payment Related Options
137
 
138
  == Frequently Asked Questions ==
139
 
163
 
164
  == Changelog ==
165
 
166
+ = v2.5.3 (8 June, 2017) =
167
+
168
+ * [improve] Update action name by removing language changing option
169
+ * [improve] Update SweetAlert version
170
+ * [improve] Added merge tags component
171
+ * [improve] Correctly use password strength meter and show mismatch
172
+ * [improve] Add post forms js dependency filter
173
+ * [improve] Radio/checkbox inline-block CSS added
174
+ * [fix] Default option not set in radio field
175
+ * [fix] Selected option gets level rather than value
176
+ * [fix] Multi select and checkbox default value issue
177
+ * [fix] Refresh upload buttons on multistep forms on each step change
178
+ * [fix] Radio buttons pre-select default option not working while editing the button value
179
+ * [fix] Corrected the plugin documentation link
180
+ * [fix] Mail not going on post expiration
181
+ * [fix] Cannot delete attribute field from product form after delete attribute
182
+ * [fix] Overload Js in subscription and form setting
183
+ * [fix] Post empty content issue on save draft
184
+ * [fix] Form render error when using shortcodes in custom html field
185
+ * [fix] Conflict with Imagify Image Optimizer plugin
186
+ * [fix] When site language changed, Add Form/ Edit Form page display nothing
187
+
188
+
189
  = v2.5.2 (27 April, 2017) =
190
 
191
  * [improve] Added word limit feature for text field
215
  * [fix] Image/File upload field not working when JavaScript is optimized by Async JavaScript plugin
216
  * [fix] "save draft" button not working post saving as pending, conflict with subscription
217
 
218
+
219
  = v2.5.1 (22 March, 2017) =
220
 
221
  * [improve] Update vue.js and vuex.js version
222
  * [improve] Update parent_slug parameter of add_submenu_page function to 'wp-user-frontend'
223
  * [fix] Admin fields in form edit section reset on clicking 'Save form' button
224
 
225
+
226
  = v2.5 (18 March, 2017) =
227
 
228
  * [new] Brand new form builder added for post form and profile form
230
  * [improve] `wpuf_add_html` filter name changed to `wpuf_custom_field_render`
231
  * [improve] add and update price formating function
232
 
233
+
234
  = v2.4.4 (22 February, 2017) =
235
 
236
  * [fix] Undefined JavaScript error when post is editing in admin
301
 
302
  * [fix] License renewal prompt fix
303
 
304
+
305
  = v2.3.14 (10 August, 2016) =
306
 
307
  * [fix] Text domain and translated strings updated
319
  * [new] Post taxonomies visibility in form builder are now dependent on the post type selected (Pro).
320
  * [new] Multiple forms in the same page
321
 
322
+
323
  = v2.3.13 (30 March, 2016) =
324
 
325
  * [fix] Paypal user agent changed and issue with paypal transection fixed
327
  * [fix] Upload.js has been modified
328
  * [fix] Problem with saving form element in php 7.0.0 is fixed
329
 
330
+
331
  = v2.3.12 (8 February, 2016) =
332
 
333
  * [new] WooCommerce Product Category and Attributes are now sectionized
339
  * [new] Hook added before registration form
340
  * [fix] SSL issue fixed
341
 
342
+
343
  = v2.3.11 (8 February, 2016) =
344
 
345
  * [fix] File upload vulnerability fix. Props to: Panagiotis Vagenas
349
  * [fix] Product taxonomy fixes
350
  * [new] No-captcha support added
351
 
352
+
353
  = v2.3.10 (5 Ocotber, 2015) =
354
 
355
  * [fix] Custom css is now working
361
  * [new] Confirmation alert added when user wants to delete subscription in frontend
362
  * [fix] Publish post after paypal payment completion
363
 
364
+
365
  = v2.3.9 (13 Sepetember, 2015) =
366
 
367
  * [fix] Newly registered users were having no meta named "wpuf_postlock"
373
  * [fix] Error undefined object post when updating user profile
374
  * [improve] Button style in payment form
375
 
376
+
377
  = v2.3.8 (3rd Sepetember, 2015) =
378
 
379
  * [fix] Problem with wpuf lock post fixed.
383
  * [fix] Scripts and styles of wpuf are now loading when needed.
384
  * [add] RTL support improvement
385
 
386
+
387
  = v2.3.7 (24 August, 2015) =
388
 
389
  * [fix] Problem with conditional logic in image upload field fixed.
393
  * [new] Persian language translation added
394
  * [fix] Problem with 'pay per post' feature fixed
395
 
396
+
397
  = v2.3.6 (13 July, 2015) =
398
 
399
  * [fix] Login page bug fixed.
404
  * [fix] Problem with captcha and really simple captcha fixed.
405
  * [fix] Problem with action hook fixed.
406
 
407
+
408
  = v2.3.5 (2 July, 2015) =
409
 
410
  * [fix] Ajax taxonomy field bug fixed.
411
 
412
+
413
  = v2.3.4 (June 29, 2015) =
414
 
415
  * [fix] Featured image caption was not being updated
416
 
417
+
418
  = v2.3.3 (June 24, 2015) =
419
 
420
  * [fix] Post status settings in form, wasn't being updated.
421
 
422
+
423
  = v2.3.2 (June 22, 2015) =
424
 
425
  * [fix] Featured image upload fix
426
  * [new] Image upload field brought back to free
427
 
428
+
429
  = v2.3.1 (June 21, 2015) =
430
 
431
  * [fix] Compatibility problem with PHP < 5.2. Accidental PHP array shorthand used.
432
 
433
+
434
  = version 2.3 (June 20, 2015) =
435
 
436
  * Pro plugin released as free with less features
437
 
438
+
439
  = version 1.3.2 =
440
 
441
  * [improve] post thumbnail image association added
446
  * [fix] Two click needed to submit a post
447
  * [fix] dashboard author bio height fix
448
 
449
+
450
  = version 1.3.1 =
451
 
452
  * [fix] `[wpuf_editpost]` typo fix
453
  * [fix] clean $dashboard_query from corrupting beyond use
454
 
455
+
456
  = version 1.3 =
457
 
458
  * [fix] PayPal payment user_id issue fixed
460
  * [fix] PHP 5.4 strict warnings fix
461
  * [update] new version of settings api class
462
 
463
+
464
  = version 1.2.3 =
465
 
466
  * [fix] `has_shortcode()` brought back again by renaming as `wpuf_has_shortcode()`
467
  * [fix] all the labels now have a default text
468
 
469
+
470
  = version 1.2.2 =
471
 
472
  * [fix] shortcode error fix for edit users
473
  * [fix] plugin css/js url
474
  * [fix] removed has_shortcode() call
475
 
476
+
477
  = version 1.2.1 =
478
 
479
  * [fix] Performance problem with wp_list_users()
480
 
481
+
482
  = version 1.2 =
483
 
484
  * [fix] Subscription post publish
487
  * [fix] Category checklist bug fix
488
  * [new] Checkbox field in custom field
489
 
490
+
491
  = version 1.1 =
492
 
493
  * warning for multisite fix
497
  * post date bug fix
498
  * category dropdown fix
499
 
500
+
501
  = version 1.0 =
502
 
503
  * Admin panel converted to settings API
514
  * Subscription and payment rewrite. Extra payment gateways can be added as plugin
515
  * Other payment currency added
516
 
517
+
518
  = version 0.7 =
519
 
520
  * admin ui improved
526
  * localized ajaxurl and posting message
527
  * improved action hooks and filter hooks
528
 
529
+
530
  = version 0.6 =
531
 
532
  * fixed error on attachment delete
537
  * fixed admin panel block logic
538
  * filter hook added on edit post for post args
539
 
540
+
541
  = version 0.5 =
542
 
543
  * filters on add posting page for blocking the post capa
554
  * missing custom meta field added on edit post form
555
  * jQuery validation added on edit post form
556
 
557
+
558
  = version 0.3 =
559
 
560
  * rich/plain text on/off fixed
563
  * stripslashes on admin/frontend meta field
564
  * 404 error fix on add post
565
 
566
+
567
  = version 0.2 =
568
 
569
  * Admin settings page has been improved
templates/logged-in.php CHANGED
File without changes
templates/login-form.php CHANGED
File without changes
templates/lost-pass-form.php CHANGED
File without changes
templates/reset-pass-form.php CHANGED
File without changes
wpuf.php CHANGED
@@ -4,13 +4,13 @@ Plugin Name: WP User Frontend
4
  Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
5
  Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
6
  Author: Tareq Hasan
7
- Version: 2.5.2
8
  Author URI: https://tareq.co
9
  License: GPL2
10
  TextDomain: wpuf
11
  */
12
 
13
- define( 'WPUF_VERSION', '2.5.2' );
14
  define( 'WPUF_FILE', __FILE__ );
15
  define( 'WPUF_ROOT', dirname( __FILE__ ) );
16
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
@@ -117,7 +117,7 @@ class WP_User_Frontend {
117
  $message = get_post_meta( $each_post->ID, 'wpuf-post_expiration_message', true );
118
 
119
  if ( !empty( $message ) ) {
120
- wp_mail( $each_post->post_author, $mail_subject, $message );
121
  }
122
  }
123
  //save an option for debugging purpose
@@ -285,7 +285,6 @@ class WP_User_Frontend {
285
  </script>
286
  <?php
287
  wp_enqueue_script( 'wpuf-form', WPUF_ASSET_URI . '/js/frontend-form' . $suffix . '.js', array('jquery') );
288
- wp_enqueue_script( 'wpuf-conditional-logic', WPUF_ASSET_URI . '/js/conditional-logic.js', array('jquery'), false, true );
289
  }
290
 
291
  wp_enqueue_style( 'wpuf-css', WPUF_ASSET_URI . '/css/frontend-forms.css' );
@@ -448,7 +447,7 @@ class WP_User_Frontend {
448
  }
449
 
450
  $links[] = '<a href="' . admin_url( 'admin.php?page=wpuf-settings' ) . '">Settings</a>';
451
- $links[] = '<a href="http://docs.wedevs.com/category/plugins/wp-user-frontend-pro/" target="_blank">Documentation</a>';
452
 
453
  return $links;
454
  }
4
  Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
5
  Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
6
  Author: Tareq Hasan
7
+ Version: 2.5.3
8
  Author URI: https://tareq.co
9
  License: GPL2
10
  TextDomain: wpuf
11
  */
12
 
13
+ define( 'WPUF_VERSION', '2.5.3' );
14
  define( 'WPUF_FILE', __FILE__ );
15
  define( 'WPUF_ROOT', dirname( __FILE__ ) );
16
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
117
  $message = get_post_meta( $each_post->ID, 'wpuf-post_expiration_message', true );
118
 
119
  if ( !empty( $message ) ) {
120
+ wp_mail( get_the_author_meta( 'user_email', $each_post->post_author ), $mail_subject, $message );
121
  }
122
  }
123
  //save an option for debugging purpose
285
  </script>
286
  <?php
287
  wp_enqueue_script( 'wpuf-form', WPUF_ASSET_URI . '/js/frontend-form' . $suffix . '.js', array('jquery') );
 
288
  }
289
 
290
  wp_enqueue_style( 'wpuf-css', WPUF_ASSET_URI . '/css/frontend-forms.css' );
447
  }
448
 
449
  $links[] = '<a href="' . admin_url( 'admin.php?page=wpuf-settings' ) . '">Settings</a>';
450
+ $links[] = '<a href="https://docs.wedevs.com/docs/wp-user-frontend-pro/getting-started/how-to-install/" target="_blank">Documentation</a>';
451
 
452
  return $links;
453
  }