WooCommerce Variation Swatches - Version 1.0.16

Version Description

  • Update: Improve JS Functionality
  • Update: Multisite Compatibility
Download this release

Release Info

Developer EmranAhmed
Plugin Icon 128x128 WooCommerce Variation Swatches
Version 1.0.16
Comparing to
See all releases

Code changes from version 1.0.15 to 1.0.16

README.txt CHANGED
@@ -124,6 +124,10 @@ Yes, it's compatible with any woocommerce theme including Flatsome / X-Theme / A
124
 
125
  Yes, it supports any kinds of product quick view.
126
 
 
 
 
 
127
  = How to use it on ajax load more? =
128
 
129
  Just call this javascript function on ajax load event `$('.variations_form').wc_variation_form()`. And your are ready to go.
@@ -141,6 +145,11 @@ Just call this javascript function on ajax load event `$('.variations_form').wc_
141
 
142
  == Changelog ==
143
 
 
 
 
 
 
144
  = 1.0.15 =
145
 
146
  * New: Attribute deselect option
124
 
125
  Yes, it supports any kinds of product quick view.
126
 
127
+ = Does it work on multisite? =
128
+
129
+ Yes, it is.
130
+
131
  = How to use it on ajax load more? =
132
 
133
  Just call this javascript function on ajax load event `$('.variations_form').wc_variation_form()`. And your are ready to go.
145
 
146
  == Changelog ==
147
 
148
+ = 1.0.16 =
149
+
150
+ * Update: Improve JS Functionality
151
+ * Update: Multisite Compatibility
152
+
153
  = 1.0.15 =
154
 
155
  * New: Attribute deselect option
assets/css/admin.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * WooCommerce Variation Swatches v1.0.15
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-3-15 15:30:38
6
  * Released under the GPLv3 license.
7
  */
8
  .button.button-danger {
1
  /*!
2
+ * WooCommerce Variation Swatches v1.0.16
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-3-28 13:17:53
6
  * Released under the GPLv3 license.
7
  */
8
  .button.button-danger {
assets/css/admin.min.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * WooCommerce Variation Swatches v1.0.15
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-3-15 15:30:42
6
  * Released under the GPLv3 license.
7
  */
8
  .button.button-danger{color:#fff;background-color:#af2d2b;border-color:#a62d2b;-webkit-box-shadow:0 1px 0 #a72d2b;box-shadow:0 1px 0 #a72d2b;vertical-align:top}.button.button-danger.active,.button.button-danger:active,.button.button-danger:focus,.button.button-danger:hover{color:#fff;background:#c9302c}[data-depends]{display:none}.meta-image-field-wrapper{display:table}.meta-image-field-wrapper .button{margin:5px 0;display:block}.meta-image-field-wrapper .image-preview{display:table-cell;width:60px;padding-right:10px}.meta-image-field-wrapper .button-wrapper{display:table-cell;vertical-align:top}.gwp-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px}.gwp-rate-stars svg,.gwp-rate-stars svg a{fill:#ffb900;stroke:#ffb900;cursor:pointer}.gwp-rate-stars svg:hover,.gwp-rate-stars svg a:hover{fill:#ffb900}.gwp-rate-stars svg:hover~svg,.gwp-rate-stars svg:hover~svg a,.gwp-rate-stars svg a:hover~svg,.gwp-rate-stars svg a:hover~svg a{fill:none}#wvs-meta-preview{width:30px}.wvs-preview{width:30px;height:30px;border:1px solid #000}
1
  /*!
2
+ * WooCommerce Variation Swatches v1.0.16
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-3-28 13:17:58
6
  * Released under the GPLv3 license.
7
  */
8
  .button.button-danger{color:#fff;background-color:#af2d2b;border-color:#a62d2b;-webkit-box-shadow:0 1px 0 #a72d2b;box-shadow:0 1px 0 #a72d2b;vertical-align:top}.button.button-danger.active,.button.button-danger:active,.button.button-danger:focus,.button.button-danger:hover{color:#fff;background:#c9302c}[data-depends]{display:none}.meta-image-field-wrapper{display:table}.meta-image-field-wrapper .button{margin:5px 0;display:block}.meta-image-field-wrapper .image-preview{display:table-cell;width:60px;padding-right:10px}.meta-image-field-wrapper .button-wrapper{display:table-cell;vertical-align:top}.gwp-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px}.gwp-rate-stars svg,.gwp-rate-stars svg a{fill:#ffb900;stroke:#ffb900;cursor:pointer}.gwp-rate-stars svg:hover,.gwp-rate-stars svg a:hover{fill:#ffb900}.gwp-rate-stars svg:hover~svg,.gwp-rate-stars svg:hover~svg a,.gwp-rate-stars svg a:hover~svg,.gwp-rate-stars svg a:hover~svg a{fill:none}#wvs-meta-preview{width:30px}.wvs-preview{width:30px;height:30px;border:1px solid #000}
assets/css/frontend-tooltip.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * WooCommerce Variation Swatches v1.0.15
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-3-15 15:30:38
6
  * Released under the GPLv3 license.
7
  */
8
  .variable-items-wrapper [data-wvstooltip] {
@@ -59,4 +59,4 @@
59
  }
60
 
61
 
62
- /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2Nzcy9mcm9udGVuZC10b29sdGlwLmNzcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3NyYy9zY3NzL3NyYy9zY3NzL3Rvb2x0aXAuc2NzcyIsIndlYnBhY2s6Ly8vLi90b29sdGlwLnNjc3MiXSwic291cmNlc0NvbnRlbnQiOlsiLnZhcmlhYmxlLWl0ZW1zLXdyYXBwZXIge1xuICBbZGF0YS13dnN0b29sdGlwXSB7XG4gICAgcG9zaXRpb24gOiByZWxhdGl2ZTtcbiAgICBjdXJzb3IgICA6IHBvaW50ZXI7XG4gICAgfVxuXG4gIFtkYXRhLXd2c3Rvb2x0aXBdOmJlZm9yZSxcbiAgW2RhdGEtd3ZzdG9vbHRpcF06YWZ0ZXIge1xuICAgIHZpc2liaWxpdHkgICAgIDogaGlkZGVuO1xuICAgIG9wYWNpdHkgICAgICAgIDogMDtcbiAgICBwb2ludGVyLWV2ZW50cyA6IG5vbmU7XG4gICAgYm94LXNpemluZyAgICAgOiBpbmhlcml0O1xuICAgIHBvc2l0aW9uICAgICAgIDogYWJzb2x1dGU7XG4gICAgYm90dG9tICAgICAgICAgOiAxMzAlO1xuICAgIGxlZnQgICAgICAgICAgIDogNTAlO1xuICAgIHotaW5kZXggICAgICAgIDogOTk7XG4gICAgdHJhbnNmb3JtICAgICAgOiB0cmFuc2xhdGVaKDApO1xuICAgIH1cblxuICBbZGF0YS13dnN0b29sdGlwXTpiZWZvcmUge1xuICAgIG1hcmdpbi1ib3R0b20gICAgOiA1cHg7XG4gICAgbWFyZ2luLWxlZnQgICAgICA6IC01MHB4O1xuICAgIHBhZGRpbmcgICAgICAgICAgOiA3cHg7XG4gICAgd2lkdGggICAgICAgICAgICA6IDEwMHB4O1xuICAgIGJvcmRlci1yYWRpdXMgICAgOiAzcHg7XG4gICAgYmFja2dyb3VuZC1jb2xvciA6ICMwMDAwMDA7XG4gICAgYmFja2dyb3VuZC1jb2xvciA6IGhzbGEoMCwgMCUsIDIwJSwgMC45KTtcbiAgICBjb2xvciAgICAgICAgICAgIDogI0ZGRkZGRjtcbiAgICBjb250ZW50ICAgICAgICAgIDogYXR0cihkYXRhLXd2c3Rvb2x0aXApO1xuICAgIHRleHQtYWxpZ24gICAgICAgOiBjZW50ZXI7XG4gICAgZm9udC1zaXplICAgICAgICA6IDE0cHg7XG4gICAgbGluZS1oZWlnaHQgICAgICA6IDEuMjtcbiAgICB9XG5cbiAgW2RhdGEtd3ZzdG9vbHRpcF06YWZ0ZXIge1xuICAgIG1hcmdpbi1sZWZ0ICA6IC01cHg7XG4gICAgd2lkdGggICAgICAgIDogMDtcbiAgICBib3JkZXItdG9wICAgOiA1cHggc29saWQgIzAwMDAwMDtcbiAgICBib3JkZXItdG9wICAgOiA1cHggc29saWQgaHNsYSgwLCAwJSwgMjAlLCAwLjkpO1xuICAgIGJvcmRlci1yaWdodCA6IDVweCBzb2xpZCB0cmFuc3BhcmVudDtcbiAgICBib3JkZXItbGVmdCAgOiA1cHggc29saWQgdHJhbnNwYXJlbnQ7XG4gICAgY29udGVudCAgICAgID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0E7QUFBQTtBQ0FBO0FBQ0E7QURqQkE7QUFvQkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FDQUE7QUFDQTtBRGhDQTtBQW1DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUNBQTtBQUNBO0FERUE7O0FBRUE7QUFDQTtBQ0FBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9*/
1
  /*!
2
+ * WooCommerce Variation Swatches v1.0.16
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-3-28 13:17:53
6
  * Released under the GPLv3 license.
7
  */
8
  .variable-items-wrapper [data-wvstooltip] {
59
  }
60
 
61
 
62
+ /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2Nzcy9mcm9udGVuZC10b29sdGlwLmNzcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3NyYy9zY3NzL3NyYy9zY3NzL3Rvb2x0aXAuc2NzcyIsIndlYnBhY2s6Ly8vLi90b29sdGlwLnNjc3MiXSwic291cmNlc0NvbnRlbnQiOlsiLnZhcmlhYmxlLWl0ZW1zLXdyYXBwZXIge1xuICBbZGF0YS13dnN0b29sdGlwXSB7XG4gICAgcG9zaXRpb24gOiByZWxhdGl2ZTtcbiAgICBjdXJzb3IgICA6IHBvaW50ZXI7XG4gICAgfVxuXG4gIFtkYXRhLXd2c3Rvb2x0aXBdOmJlZm9yZSxcbiAgW2RhdGEtd3ZzdG9vbHRpcF06YWZ0ZXIge1xuICAgIHZpc2liaWxpdHkgICAgIDogaGlkZGVuO1xuICAgIG9wYWNpdHkgICAgICAgIDogMDtcbiAgICBwb2ludGVyLWV2ZW50cyA6IG5vbmU7XG4gICAgYm94LXNpemluZyAgICAgOiBpbmhlcml0O1xuICAgIHBvc2l0aW9uICAgICAgIDogYWJzb2x1dGU7XG4gICAgYm90dG9tICAgICAgICAgOiAxMzAlO1xuICAgIGxlZnQgICAgICAgICAgIDogNTAlO1xuICAgIHotaW5kZXggICAgICAgIDogOTk7XG4gICAgdHJhbnNmb3JtICAgICAgOiB0cmFuc2xhdGVaKDApO1xuICAgIH1cblxuICBbZGF0YS13dnN0b29sdGlwXTpiZWZvcmUge1xuICAgIG1hcmdpbi1ib3R0b20gICAgOiA1cHg7XG4gICAgbWFyZ2luLWxlZnQgICAgICA6IC01MHB4O1xuICAgIHBhZGRpbmcgICAgICAgICAgOiA3cHg7XG4gICAgd2lkdGggICAgICAgICAgICA6IDEwMHB4O1xuICAgIGJvcmRlci1yYWRpdXMgICAgOiAzcHg7XG4gICAgYmFja2dyb3VuZC1jb2xvciA6ICMwMDAwMDA7XG4gICAgYmFja2dyb3VuZC1jb2xvciA6IHJnYmEoNTEsIDUxLCA1MSwgMC45KTtcbiAgICBjb2xvciAgICAgICAgICAgIDogI0ZGRkZGRjtcbiAgICBjb250ZW50ICAgICAgICAgIDogYXR0cihkYXRhLXd2c3Rvb2x0aXApO1xuICAgIHRleHQtYWxpZ24gICAgICAgOiBjZW50ZXI7XG4gICAgZm9udC1zaXplICAgICAgICA6IDE0cHg7XG4gICAgbGluZS1oZWlnaHQgICAgICA6IDEuMjtcbiAgICB9XG5cbiAgW2RhdGEtd3ZzdG9vbHRpcF06YWZ0ZXIge1xuICAgIG1hcmdpbi1sZWZ0ICA6IC01cHg7XG4gICAgd2lkdGggICAgICAgIDogMDtcbiAgICBib3JkZXItdG9wICAgOiA1cHggc29saWQgIzAwMDAwMDtcbiAgICBib3JkZXItdG9wICAgOiA1cHggc29saWQgcmdiYSg1MSwgNTEsIDUxLCAwLjkpO1xuICAgIGJvcmRlci1yaWdodCA6IDVweCBzb2xpZCB0cmFuc3BhcmVudDtcbiAgICBib3JkZXItbGVmdCAgOiA1cHggc29saWQgdHJhbnNwYXJlbnQ7XG4gICAg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DQTtBQUNBO0FBQ0E7QUFBQTtBQ0FBO0FBQ0E7QURqQkE7QUFvQkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FDQUE7QUFDQTtBRGhDQTtBQW1DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUNBQTtBQUNBO0FERUE7O0FBRUE7QUFDQTtBQ0FBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9*/
assets/css/frontend-tooltip.min.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * WooCommerce Variation Swatches v1.0.15
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-3-15 15:30:42
6
  * Released under the GPLv3 license.
7
  */
8
  .variable-items-wrapper [data-wvstooltip]{position:relative;cursor:pointer}.variable-items-wrapper [data-wvstooltip]:after,.variable-items-wrapper [data-wvstooltip]:before{visibility:hidden;opacity:0;pointer-events:none;-webkit-box-sizing:inherit;box-sizing:inherit;position:absolute;bottom:130%;left:50%;z-index:99;-webkit-transform:translateZ(0);transform:translateZ(0)}.variable-items-wrapper [data-wvstooltip]:before{margin-bottom:5px;margin-left:-50px;padding:7px;width:100px;border-radius:3px;background-color:#000;background-color:rgba(51,51,51,.9);color:#fff;content:attr(data-wvstooltip);text-align:center;font-size:14px;line-height:1.2}.variable-items-wrapper [data-wvstooltip]:after{margin-left:-5px;width:0;border-top:5px solid #000;border-top:5px solid rgba(51,51,51,.9);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0}.variable-items-wrapper [data-wvstooltip]:hover:after,.variable-items-wrapper [data-wvstooltip]:hover:before{visibility:visible;opacity:1}
1
  /*!
2
+ * WooCommerce Variation Swatches v1.0.16
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-3-28 13:17:58
6
  * Released under the GPLv3 license.
7
  */
8
  .variable-items-wrapper [data-wvstooltip]{position:relative;cursor:pointer}.variable-items-wrapper [data-wvstooltip]:after,.variable-items-wrapper [data-wvstooltip]:before{visibility:hidden;opacity:0;pointer-events:none;-webkit-box-sizing:inherit;box-sizing:inherit;position:absolute;bottom:130%;left:50%;z-index:99;-webkit-transform:translateZ(0);transform:translateZ(0)}.variable-items-wrapper [data-wvstooltip]:before{margin-bottom:5px;margin-left:-50px;padding:7px;width:100px;border-radius:3px;background-color:#000;background-color:rgba(51,51,51,.9);color:#fff;content:attr(data-wvstooltip);text-align:center;font-size:14px;line-height:1.2}.variable-items-wrapper [data-wvstooltip]:after{margin-left:-5px;width:0;border-top:5px solid #000;border-top:5px solid rgba(51,51,51,.9);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0}.variable-items-wrapper [data-wvstooltip]:hover:after,.variable-items-wrapper [data-wvstooltip]:hover:before{visibility:visible;opacity:1}
assets/css/frontend.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * WooCommerce Variation Swatches v1.0.15
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-3-15 15:30:38
6
  * Released under the GPLv3 license.
7
  */
8
  .variable-items-wrapper {
@@ -14,7 +14,39 @@
14
  margin: 0;
15
  }
16
 
17
- .variable-items-wrapper .variable-item {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  -webkit-box-sizing: border-box;
19
  box-sizing: border-box;
20
  list-style: none;
@@ -30,7 +62,7 @@
30
  align-items: center;
31
  }
32
 
33
- .variable-items-wrapper .variable-item.color-variable-item {
34
  padding: 2px;
35
  margin: 2px;
36
  width: 30px;
@@ -38,13 +70,13 @@
38
  border: 1px solid rgba(0, 0, 0, 0.2);
39
  }
40
 
41
- .variable-items-wrapper .variable-item.color-variable-item span {
42
  width: 20px;
43
  height: 20px;
44
  position: relative;
45
  }
46
 
47
- .variable-items-wrapper .variable-item.color-variable-item span::after {
48
  position: absolute;
49
  content: "";
50
  width: 20px;
@@ -54,7 +86,7 @@
54
  box-shadow: inset 0 0 1px 0 rgba(0, 0, 0, 0.5);
55
  }
56
 
57
- .variable-items-wrapper .variable-item.button-variable-item {
58
  padding: 2px;
59
  margin: 2px;
60
  width: 36px;
@@ -62,19 +94,19 @@
62
  border: 1px solid rgba(0, 0, 0, 0.2);
63
  }
64
 
65
- .variable-items-wrapper .variable-item.button-variable-item span {
66
  font-size: 1rem;
67
  line-height: 1;
68
  }
69
 
70
- .variable-items-wrapper .variable-item.button-variable-item.selected,
71
- .variable-items-wrapper .variable-item.button-variable-item.selected:hover {
72
  border: 1px solid #000000;
73
  background: #000000;
74
  color: #FFFFFF;
75
  }
76
 
77
- .variable-items-wrapper .variable-item.image-variable-item {
78
  padding: 2px;
79
  margin: 2px;
80
  width: 40px;
@@ -82,28 +114,28 @@
82
  border: 1px solid rgba(0, 0, 0, 0.2);
83
  }
84
 
85
- .variable-items-wrapper .variable-item:last-of-type {
86
  margin-right: 0;
87
  }
88
 
89
- .variable-items-wrapper .variable-item:hover {
90
  border: 1px solid #000000;
91
  }
92
 
93
- .variable-items-wrapper .variable-item.color-variable-item.selected,
94
- .variable-items-wrapper .variable-item.color-variable-item.selected:hover,
95
- .variable-items-wrapper .variable-item.image-variable-item.selected,
96
- .variable-items-wrapper .variable-item.image-variable-item.selected:hover {
97
  border: 1px solid #000000;
98
  }
99
 
100
- .variable-items-wrapper .variable-item.selected,
101
- .variable-items-wrapper .variable-item.selected:hover {
102
  border: 1px solid #000000;
103
  }
104
 
105
- .variable-items-wrapper .variable-item.disabled,
106
- .variable-items-wrapper .variable-item.disabled:hover {
107
  cursor: not-allowed;
108
  opacity: 0.5;
109
  }
@@ -143,4 +175,4 @@
143
  }
144
 
145
 
146
- /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2Nzc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xuICAgICAgICAgIGJvcmRlci1yYWRpdXMgOiAxMDAlO1xuICAgICAgICAgIGJveC1zaGFkb3cgICAgOiBpbnNldCAwIDAgMXB4IDAgcmdiYSgwLCAwLCAwLCAwLjUpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgJi5idXR0b24tdmFyaWFibGUtaXRlbSB7XG4gICAgICBwYWRkaW5nIDogMnB4O1xuICAgICAgbWFyZ2luICA6IDJweDtcbiAgICAgIHdpZHRoICAgOiAzNnB4O1xuICAgICAgaGVpZ2h0ICA6IDM2cHg7XG4gICAgICBib3JkZXIgIDogMXB4IHNvbGlkIHJnYmEoMCwgMCwgMCwgMC4yKTtcblxuICAgICAgc3BhbiB7XG4gICAgICAgIGZvbnQtc2l6ZSAgIDogMXJlbTtcbiAgICAgICAgbGluZS1oZWlnaHQgOiAxO1xuICAgICAgICB9XG4gICAgICAmLnNlbGVjdGVkLFxuICAgICAgJi5zZWxlY3RlZDpob3ZlciB7XG4gICAgICAgIGJvcmRlciAgICAgOiAxcHggc29saWQgIzAwMDAwMDtcbiAgICAgICAgYmFja2dyb3VuZCA6ICMwMDAwMDA7XG4gICAgICAgIGNvbG9yICAgICAgOiAjRkZGRkZGO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAmLmltYWdlLXZhcmlhYmxlLWl0ZW0ge1xuICAgICAgcGFkZGluZyA6IDJweDtcbiAgICAgIG1hcmdpbiAgOiAycHg7XG4gICAgICB3aWR0aCAgIDogNDBweDtcbiAgICAgIGhlaWdodCAgOiA0MHB4O1xuICAgICAgYm9yZGVyICA6IDFweCBzb2xpZCByZ2JhKDAsIDAsIDAsIDAuMik7XG4gICAgICB9XG5cbiAgICAmOmxhc3Qtb2YtdHlwZSB7XG4gICAgICBtYXJnaW4tcmlnaHQgOiAwO1xuICAgICAgfVxuICAgICY6aG92ZXIge1xuICAgICAgYm9yZGVyIDogMXB4IHNvbGlkICMwMDAwMDA7XG4gICAgICB9XG5cb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0FBcUVBO0FDS0E7QUFDQTtBRDNFQTs7QUEyRUE7QUNJQTtBQUNBO0FEaEZBOztBQStFQTtBQUNBO0FDS0E7QUFDQTtBRDNGQTtBQTZGQTtBQ0NBO0FBQ0E7QURDQTtBQUNBO0FDQ0E7QUFDQTtBREdBO0FBRUE7QUNGQTtBQUNBO0FERUE7O0FBRUE7QUNBQTtBQUNBO0FESUE7QUFDQTtBQ0ZBO0FBQ0E7QUREQTtBQUlBO0FDQUE7QUFDQTtBREFBO0FBQ0E7QUFDQTtBQ0VBO0FBQ0E7QURWQTtBQVlBO0FDQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=*/
1
  /*!
2
+ * WooCommerce Variation Swatches v1.0.16
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-3-28 13:17:53
6
  * Released under the GPLv3 license.
7
  */
8
  .variable-items-wrapper {
14
  margin: 0;
15
  }
16
 
17
+ .variable-items-wrapper.radio-variable-wrapper {
18
+ /*display : inline-flex;
19
+ flex-direction : column;*/
20
+ display: block;
21
+ }
22
+
23
+ .variable-items-wrapper .radio-variable-item {
24
+ -webkit-box-sizing: border-box;
25
+ box-sizing: border-box;
26
+ list-style: none;
27
+ cursor: pointer;
28
+ margin: 0;
29
+ }
30
+
31
+ .variable-items-wrapper .radio-variable-item label,
32
+ .variable-items-wrapper .radio-variable-item input {
33
+ cursor: pointer;
34
+ }
35
+
36
+ .variable-items-wrapper .radio-variable-item.disabled,
37
+ .variable-items-wrapper .radio-variable-item.disabled:hover {
38
+ cursor: not-allowed;
39
+ opacity: 0.5;
40
+ }
41
+
42
+ .variable-items-wrapper .radio-variable-item.disabled label,
43
+ .variable-items-wrapper .radio-variable-item.disabled input,
44
+ .variable-items-wrapper .radio-variable-item.disabled:hover label,
45
+ .variable-items-wrapper .radio-variable-item.disabled:hover input {
46
+ cursor: not-allowed;
47
+ }
48
+
49
+ .variable-items-wrapper .variable-item:not(.radio-variable-item) {
50
  -webkit-box-sizing: border-box;
51
  box-sizing: border-box;
52
  list-style: none;
62
  align-items: center;
63
  }
64
 
65
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item {
66
  padding: 2px;
67
  margin: 2px;
68
  width: 30px;
70
  border: 1px solid rgba(0, 0, 0, 0.2);
71
  }
72
 
73
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item span {
74
  width: 20px;
75
  height: 20px;
76
  position: relative;
77
  }
78
 
79
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item span::after {
80
  position: absolute;
81
  content: "";
82
  width: 20px;
86
  box-shadow: inset 0 0 1px 0 rgba(0, 0, 0, 0.5);
87
  }
88
 
89
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item {
90
  padding: 2px;
91
  margin: 2px;
92
  width: 36px;
94
  border: 1px solid rgba(0, 0, 0, 0.2);
95
  }
96
 
97
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item span {
98
  font-size: 1rem;
99
  line-height: 1;
100
  }
101
 
102
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item.selected,
103
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item.selected:hover {
104
  border: 1px solid #000000;
105
  background: #000000;
106
  color: #FFFFFF;
107
  }
108
 
109
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).image-variable-item {
110
  padding: 2px;
111
  margin: 2px;
112
  width: 40px;
114
  border: 1px solid rgba(0, 0, 0, 0.2);
115
  }
116
 
117
+ .variable-items-wrapper .variable-item:not(.radio-variable-item):last-of-type {
118
  margin-right: 0;
119
  }
120
 
121
+ .variable-items-wrapper .variable-item:not(.radio-variable-item):hover {
122
  border: 1px solid #000000;
123
  }
124
 
125
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item.selected,
126
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item.selected:hover,
127
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).image-variable-item.selected,
128
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).image-variable-item.selected:hover {
129
  border: 1px solid #000000;
130
  }
131
 
132
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).selected,
133
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).selected:hover {
134
  border: 1px solid #000000;
135
  }
136
 
137
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).disabled,
138
+ .variable-items-wrapper .variable-item:not(.radio-variable-item).disabled:hover {
139
  cursor: not-allowed;
140
  opacity: 0.5;
141
  }
175
  }
176
 
177
 
178
+ /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2Nzcy9mcm9udGVuZC5jc3MiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9zcmMvc2Nzcy9mcm9udGVuZC5zY3NzIiwid2VicGFjazovLy8uL2Zyb250ZW5kLnNjc3MiXSwic291cmNlc0NvbnRlbnQiOlsiLnZhcmlhYmxlLWl0ZW1zLXdyYXBwZXIge1xuICBkaXNwbGF5ICAgOiBmbGV4O1xuICBmbGV4LXdyYXAgOiB3cmFwO1xuICBtYXJnaW4gICAgOiAwO1xuXG4gICYucmFkaW8tdmFyaWFibGUtd3JhcHBlciB7XG4gICAgLypkaXNwbGF5ICAgICAgICA6IGlubGluZS1mbGV4O1xuICAgIGZsZXgtZGlyZWN0aW9uIDogY29sdW1uOyovXG4gICAgZGlzcGxheSA6IGJsb2NrO1xuICAgIH1cblxuICAucmFkaW8tdmFyaWFibGUtaXRlbSB7XG4gICAgYm94LXNpemluZyA6IGJvcmRlci1ib3g7XG4gICAgbGlzdC1zdHlsZSA6IG5vbmU7XG4gICAgY3Vyc29yICAgICA6IHBvaW50ZXI7XG4gICAgbWFyZ2luICAgICA6IDA7XG4gICAgbGFiZWwsIGlucHV0IHtcbiAgICAgIGN1cnNvciA6IHBvaW50ZXI7XG4gICAgICB9XG4gICAgJi5kaXNhYmxlZCxcbiAgICAmLmRpc2FibGVkOmhvdmVyIHtcbiAgICAgIGN1cnNvciAgOiBub3QtYWxsb3dlZDtcbiAgICAgIG9wYWNpdHkgOiAwLjU7XG4gICAgICBsYWJlbCwgaW5wdXQge1xuICAgICAgICBjdXJzb3IgOiBub3QtYWxsb3dlZDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAudmFyaWFibGUtaXRlbTpub3QoLnJhZGlvLXZhcmlhYmxlLWl0ZW0pIHtcbiAgICBib3gtc2l6aW5nICAgICAgOiBib3JkZXItYm94O1xuICAgIGxpc3Qtc3R5bGUgICAgICA6IG5vbmU7XG4gICAgY3Vyc29yICAgICAgICAgIDogcG9pbnRlcjtcbiAgICBkaXNwbGF5ICAgICAgICAgOiBmbGV4O1xuICAgIGp1c3RpZnktY29udGVudCA6IGNlbnRlcjtcbiAgICBhbGlnbi1pdGVtcyAgICAgOiBjZW50ZXI7XG5cbiAgICAmLmNvbG9yLXZhcmlhYmxlLWl0ZW0ge1xuICAgICAgcGFkZGluZyA6IDJweDtcbiAgICAgIG1hcmdpbiAgOiAycHg7XG4gICAgICB3aWR0aCAgIDogMzBweDtcbiAgICAgIGhlaWdodCAgOiAzMHB4O1xuICAgICAgYm9yZGVyICA6IDFweCBzb2xpZCByZ2JhKDAsIDAsIDAsIDAuMik7XG5cbiAgICAgIHNwYW4ge1xuICAgICAgICB3aWR0aCAgICA6IDIwcHg7XG4gICAgICAgIGhlaWdodCAgIDogMjBweDtcbiAgICAgICAgcG9zaXRpb24gOiByZWxhdGl2ZTtcblxuICAgICAgICAmOjphZnRlciB7XG4gICAgICAgICAgcG9zaXRpb24gICAgICA6IGFic29sdXRlO1xuICAgICAgICAgIGNvbnRlbnQgICAgICAgOiBcIlwiO1xuICAgICAgICAgIHdpZHRoICAgICAgICAgOiAyMHB4O1xuICAgICAgICAgIGhlaWdodCAgICAgICAgOiAyMHB4O1xuICAgICAgICAgIGJvcmRlci1yYWRpdXMgO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QTtBQXlIQTtBQ1FBO0FBQ0E7QURKQTtBQUVBO0FDS0E7QUFDQTtBRExBOztBQUVBO0FDT0E7QUFDQTtBREhBO0FBQ0E7QUNLQTtBQUNBO0FEUkE7QUFJQTtBQ09BO0FBQ0E7QURaQTtBQU1BO0FBQ0E7QUNTQTtBQUNBO0FEakJBO0FBWUE7QUNRQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==*/
assets/css/frontend.min.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * WooCommerce Variation Swatches v1.0.15
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-3-15 15:30:42
6
  * Released under the GPLv3 license.
7
  */
8
- .variable-items-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0}.variable-items-wrapper .variable-item{-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.variable-items-wrapper .variable-item.color-variable-item{padding:2px;margin:2px;width:30px;height:30px;border:1px solid rgba(0,0,0,.2)}.variable-items-wrapper .variable-item.color-variable-item span{width:20px;height:20px;position:relative}.variable-items-wrapper .variable-item.color-variable-item span:after{position:absolute;content:"";width:20px;height:20px;border-radius:100%;-webkit-box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5);box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5)}.variable-items-wrapper .variable-item.button-variable-item{padding:2px;margin:2px;width:36px;height:36px;border:1px solid rgba(0,0,0,.2)}.variable-items-wrapper .variable-item.button-variable-item span{font-size:1rem;line-height:1}.variable-items-wrapper .variable-item.button-variable-item.selected,.variable-items-wrapper .variable-item.button-variable-item.selected:hover{border:1px solid #000;background:#000;color:#fff}.variable-items-wrapper .variable-item.image-variable-item{padding:2px;margin:2px;width:40px;height:40px;border:1px solid rgba(0,0,0,.2)}.variable-items-wrapper .variable-item:last-of-type{margin-right:0}.variable-items-wrapper .variable-item.color-variable-item.selected,.variable-items-wrapper .variable-item.color-variable-item.selected:hover,.variable-items-wrapper .variable-item.image-variable-item.selected,.variable-items-wrapper .variable-item.image-variable-item.selected:hover,.variable-items-wrapper .variable-item.selected,.variable-items-wrapper .variable-item.selected:hover,.variable-items-wrapper .variable-item:hover{border:1px solid #000}.variable-items-wrapper .variable-item.disabled,.variable-items-wrapper .variable-item.disabled:hover{cursor:not-allowed;opacity:.5}.variable-items-wrapper [data-tooltip]:before{background:rgba(0,0,0,.99)!important}.variable-items-wrapper [data-tooltip]:after{border-top-color:rgba(0,0,0,.99)!important}.woo-variation-swatches-style-rounded .variable-item,.woo-variation-swatches-style-rounded .variable-item img,.woo-variation-swatches-style-rounded .variable-item span{border-radius:100%}.woo-variation-swatches-style-squared .variable-item{border-radius:0}.woo-variation-swatches-style-squared .variable-item.button-variable-item{width:auto}.woo-variation-swatches-style-squared .variable-item.button-variable-item span{width:auto;padding:0 1rem}.woo-variation-swatches-style-squared .variable-item.color-variable-item span:after{border-radius:0}
1
  /*!
2
+ * WooCommerce Variation Swatches v1.0.16
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-3-28 13:17:58
6
  * Released under the GPLv3 license.
7
  */
8
+ .variable-items-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0}.variable-items-wrapper.radio-variable-wrapper{display:block}.variable-items-wrapper .radio-variable-item{-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;cursor:pointer;margin:0}.variable-items-wrapper .radio-variable-item input,.variable-items-wrapper .radio-variable-item label{cursor:pointer}.variable-items-wrapper .radio-variable-item.disabled,.variable-items-wrapper .radio-variable-item.disabled:hover{cursor:not-allowed;opacity:.5}.variable-items-wrapper .radio-variable-item.disabled:hover input,.variable-items-wrapper .radio-variable-item.disabled:hover label,.variable-items-wrapper .radio-variable-item.disabled input,.variable-items-wrapper .radio-variable-item.disabled label{cursor:not-allowed}.variable-items-wrapper .variable-item:not(.radio-variable-item){-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item{padding:2px;margin:2px;width:30px;height:30px;border:1px solid rgba(0,0,0,.2)}.variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item span{width:20px;height:20px;position:relative}.variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item span:after{position:absolute;content:"";width:20px;height:20px;border-radius:100%;-webkit-box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5);box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5)}.variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item{padding:2px;margin:2px;width:36px;height:36px;border:1px solid rgba(0,0,0,.2)}.variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item span{font-size:1rem;line-height:1}.variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item.selected,.variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item.selected:hover{border:1px solid #000;background:#000;color:#fff}.variable-items-wrapper .variable-item:not(.radio-variable-item).image-variable-item{padding:2px;margin:2px;width:40px;height:40px;border:1px solid rgba(0,0,0,.2)}.variable-items-wrapper .variable-item:not(.radio-variable-item):last-of-type{margin-right:0}.variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item.selected,.variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item.selected:hover,.variable-items-wrapper .variable-item:not(.radio-variable-item).image-variable-item.selected,.variable-items-wrapper .variable-item:not(.radio-variable-item).image-variable-item.selected:hover,.variable-items-wrapper .variable-item:not(.radio-variable-item).selected,.variable-items-wrapper .variable-item:not(.radio-variable-item).selected:hover,.variable-items-wrapper .variable-item:not(.radio-variable-item):hover{border:1px solid #000}.variable-items-wrapper .variable-item:not(.radio-variable-item).disabled,.variable-items-wrapper .variable-item:not(.radio-variable-item).disabled:hover{cursor:not-allowed;opacity:.5}.variable-items-wrapper [data-tooltip]:before{background:rgba(0,0,0,.99)!important}.variable-items-wrapper [data-tooltip]:after{border-top-color:rgba(0,0,0,.99)!important}.woo-variation-swatches-style-rounded .variable-item,.woo-variation-swatches-style-rounded .variable-item img,.woo-variation-swatches-style-rounded .variable-item span{border-radius:100%}.woo-variation-swatches-style-squared .variable-item{border-radius:0}.woo-variation-swatches-style-squared .variable-item.button-variable-item{width:auto}.woo-variation-swatches-style-squared .variable-item.button-variable-item span{width:auto;padding:0 1rem}.woo-variation-swatches-style-squared .variable-item.color-variable-item span:after{border-radius:0}
assets/css/wvs-customize-heading-control.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * WooCommerce Variation Swatches v1.0.15
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-3-15 15:30:38
6
  * Released under the GPLv3 license.
7
  */
8
  .accordion-section-content li:nth-child(2).customize-control-wvs-heading .wvs-customize-heading-control-title {
1
  /*!
2
+ * WooCommerce Variation Swatches v1.0.16
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-3-28 13:17:53
6
  * Released under the GPLv3 license.
7
  */
8
  .accordion-section-content li:nth-child(2).customize-control-wvs-heading .wvs-customize-heading-control-title {
assets/css/wvs-customize-heading-control.min.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * WooCommerce Variation Swatches v1.0.15
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-3-15 15:30:42
6
  * Released under the GPLv3 license.
7
  */
8
  .accordion-section-content li:nth-child(2).customize-control-wvs-heading .wvs-customize-heading-control-title{margin-top:-15px;margin-bottom:0}.wvs-customize-heading-control-title{background-color:#191e23;padding:10px 15px;color:#fff;margin:5px -15px;font-size:1rem;font-weight:200;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
1
  /*!
2
+ * WooCommerce Variation Swatches v1.0.16
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-3-28 13:17:58
6
  * Released under the GPLv3 license.
7
  */
8
  .accordion-section-content li:nth-child(2).customize-control-wvs-heading .wvs-customize-heading-control-title{margin-top:-15px;margin-bottom:0}.wvs-customize-heading-control-title{background-color:#191e23;padding:10px 15px;color:#fff;margin:5px -15px;font-size:1rem;font-weight:200;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
assets/js/admin.js CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * WooCommerce Variation Swatches v1.0.15
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-3-15 15:30:38
6
  * Released under the GPLv3 license.
7
  */
8
  /******/ (function(modules) { // webpackBootstrap
@@ -102,6 +102,11 @@ jQuery(function ($) {
102
  PluginHelper.ImageUploader();
103
  PluginHelper.AttributeDialog();
104
  });
 
 
 
 
 
105
  });
106
  }); // end of jquery main wrapper
107
 
@@ -377,4 +382,4 @@ var PluginHelper = function ($) {
377
 
378
  /***/ })
379
  /******/ ]);
380
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2FkbWluLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDRjNzYyYmU4MTZlZDAxZWMwMTY1Iiwid2VicGFjazovLy9zcmMvanMvYmFja2VuZC5qcyIsIndlYnBhY2s6Ly8vc3JjL2pzL1BsdWdpbkhlbHBlci5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9iYWNrZW5kLnNjc3M/YmU2MSIsIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9mcm9udGVuZC5z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F0aW9uKCk7XG5cbiAgICAgICAgICAgIGxldCBmaWxlX2ZyYW1lO1xuXG4gICAgICAgICAgICBpZiAodHlwZW9mIHdwICE9PSAndW5kZWZpbmVkJyAmJiB3cC5tZWRpYSAmJiB3cC5tZWRpYS5lZGl0b3IpIHtcblxuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBtZWRpYSBmcmFtZSBhbHJlYWR5IGV4aXN0cywgcmVvcGVuIGl0LlxuICAgICAgICAgICAgICAgIGlmIChmaWxlX2ZyYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub3BlbigpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gQ3JlYXRlIHRoZSBtZWRpYSBmcmFtZS5cbiAgICAgICAgICAgICAgICBmaWxlX2ZyYW1lID0gd3AubWVkaWEuZnJhbWVzLnNlbGVjdF9pbWFnZSA9IHdwLm1lZGlhKHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUgICAgOiBXVlNQbHVnaW5PYmplY3QubWVkaWFfdGl0bGUsXG4gICAgICAgICAgICAgICAgICAgIGJ1dHRvbiAgIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA6IFdWU1BsdWdpbk9iamVjdC5idXR0b25fdGl0bGVcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlwbGUgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIFdoZW4gYW4gaW1hZ2UgaXMgc2VsZWN0ZWQsIHJ1biBhIGNhbGxiYWNrLlxuICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub24oJ3NlbGVjdCcsICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGF0dGFjaG1lbnQgPSBmaWxlX2ZyYW1lLnN0YXRlKCkuZ2V0KCdzZWxlY3Rpb24nKS5maXJzdCgpLnRvSlNPTigpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICgkLnRyaW0oYXR0YWNobWVudC5pZCkgIT09ICcnKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAodHlwZW9mKGF0dGFjaG1lbnQuc2l6ZXMudGh1bWJuYWlsKSA9PT0gJ3VuZGVmaW5lZCcpID8gYXR0YWNobWVudC5zaXplcy5mdWxsLnVybCA6IGF0dGFjaG1lbnQuc2l6ZXMudGh1bWJuYWlsLnVybDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5wcmV2KCkudmFsKGF0dGFjaG1lbnQuaWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5jbG9zZXN0KCcubWV0YS1pbWFnZS1maWVsZC13cmFwcGVyJykuZmluZCgnaW1nJykuYXR0cignc3JjJywgdXJsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykubmV4dCgpLnNob3coKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvL2ZpbGVfZnJhbWUuY2xvc2UoKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIFdoZW4gb3BlbiBzZWxlY3Qgc2VsZWN0ZWRcbiAgICAgICAgICAgICAgICBmaWxlX2ZyYW1lLm9uKCdvcGVuJywgKCkgPT4ge1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIEdyYWIgb3VyIGF0dGFjaG1lbnQgc2VsZWN0aW9uIGFuZCBjb25zdHJ1Y3QgYSBKU09OIHJlcHJlc2VudGF0aW9uIG9mIHRoZSBtb2RlbC5cbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdGlvbiAgPSBmaWxlX2ZyYW1lLnN0YXRlKCkuZ2V0KCdzZWxlY3Rpb24nKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGN1cnJlbnQgICAgPSAkKHRoaXMpLnByZXYoKS52YWwoKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGF0dGFjaG1lbnQgPSB3cC5tZWRpYS5hdHRhY2htZW50KGN1cnJlbnQpO1xuICAgICAgICAgICAgICAgICAgICBhdHRhY2htZW50LmZldGNoKCk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5hZGQoYXR0YWNobWVudCA/IFthdHRhY2htZW50XSA6IFtdKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIEZpbmFsbHksIG9wZW4gdGhlIG1vZGFsLlxuICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub3BlbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIFJlbW92ZUltYWdlKGV2ZW50KSB7XG5cbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcblxuICAgICAgICAgICAgbGV0IHBsYWNlaG9sZGVyID0gJCh0aGlzKS5jbG9zZXN0KCcubWV0YS1pbWFnZS1maWVsZC13cmFwcGVyJykuZmluZCgnaW1nJykuZGF0YSgncGxhY2Vob2xkZXInKTtcbiAgICAgICAgICAgICQodGhpcykuY2xvc2VzdCgnLm1ldGEtaW1hZ2UtZmllbGQtd3JhcHBlcicpLmZpbmQoJ2ltZycpLmF0dHIoJ3NyYycsIHBsYWNlaG9sZGVyKTtcbiAgICAgICAgICAgICQodGhpcykucHJldigpLnByZXYoKS52YWwoJycpO1xuICAgICAgICAgICAgJCh0aGlzKS5oaWRlKCk7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0aWMgU2VsZWN0V29vKHNlbGVjdG9yID0gJ3NlbGVjdC53dnMtc2VsZWN0d29vJykge1xuICAgICAgICAgICAgaWYgKCQoKS5zZWxlY3RXb28pIHtcbiAgICAgICAgICAgICAgICAkKHNlbGVjdG9yKS5zZWxlY3RXb28oe1xuICAgICAgICAgICAgICAgICAgICBhbGxvd0NsZWFyIDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIENvbG9yUGlja2VyKHNlbGVjdG9yID0gJ2lucHV0Lnd2cy1jb2xvci1waWNrZXInKSB7XG4gICAgICAgICAgICBpZiAoJCgpLndwQ29sb3JQaWNrZXIpIHtcbiAgICAgICAgICAgICAgICAkKHNlbGVjdG9yKS53cENvbG9yUGlja2VyKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0aWMgRmllbGREZXBlbmRlbmN5KHNlbGVjdG9yID0gJ1tkYXRhLWRlcGVuZHNdJykge1xuICAgICAgICAgICAgaWYgKCQoKS5Gb3JtRmllbGREZXBlbmRlbmN5KSB7XG4gICAgICAgICAgICAgICAgJChzZWxlY3RvcikuRm9ybUZpZWxkRGVwZW5kZW5jeSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIHNhdmluZ0RpYWxvZygkd3JhcHBlciwgJGRpYWxvZywgdGF4b25vbXkpIHtcblxuICAgICAgICAgICAgbGV0IGRhdGEgPSB7fTtcbiAgICAgICAgICAgIGxldCB0ZXJtID0gJyc7XG5cbiAgICAgICAgICAgIC8vIEBUT0RPOiBXZSBzaG91bGQgdXNlIGZvcm0gZGF0YSwgYmVjYXVzZSB3ZSBoYXZlIHRvIHBpY2sgYXJyYXkgYmFzZWQgZGF0YSBhbHNvIDopXG5cbiAgICAgICAgICAgICRkaWFsb2cuZmluZChgaW5wdXQsIHNlbGVjdGApLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGxldCBrZXkgICA9ICQodGhpcykuYXR0cignbmFtZScpO1xuICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9ICQodGhpcykudmFsKCk7XG4gICAgICAgICAgICAgICAgaWYgKGtleSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5ID09PSAndGFnX25hbWUnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXJtID0gdmFsdWVcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFba2V5XSA9IHZhbHVlXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS52YWwoJycpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGlmICh0ZXJtKSB7XG4gICAgICAgICAgICAgICAgJCgnLnByb2R1Y3RfYXR0cmlidXRlcycpLmJsb2NrKHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSAgICA6IG51bGwsXG4gICAgICAgICAgICAgICAgICAgIG92ZXJsYXlDU1MgOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kIDogJyNmZmYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgb3BhY2l0eSAgICA6IDAuNlxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBsZXQgYWpheF9kYXRhID0ge1xuICAgICAgICAgICAgICAgICAgICBhY3Rpb24gICA6ICd3b29jb21tZXJjZV9hZGRfbmV3X2F0dHJpYnV0ZScsXG4gICAgICAgICAgICAgICAgICAgIHRheG9ub215IDogdGF4b25vbXksXG4gICAgICAgICAgICAgICAgICAgIHRlcm0gICAgIDogdGVybSxcbiAgICAgICAgICAgICAgICAgICAgc2VjdXJpdHkgOiB3b29jb21tZXJjZV9hZG1pbl9tZXRhX2JveGVzLmFkZF9hdHRyaWJ1dGVfbm9uY2UsXG4gICAgICAgICAgICAgICAgICAgIC4uLmRhdGFcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgJC5wb3N0KHdvb2NvbW1lcmNlX2FkbWluX21ldGFfYm94ZXMuYWpheF91cmwsIGFqYXhfZGF0YSwgZnVuY3Rpb24gKHJlc3BvbnNlKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBFcnJvci5cbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hbGVydChyZXNwb25zZS5lcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocmVzcG9uc2Uuc2x1Zykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gU3VjY2Vzcy5cbiAgICAgICAgICAgICAgICAgICAgICAgICR3cmFwcGVyLmZpbmQoJ3NlbGVjdC5hdHRyaWJ1dGVfdmFsdWVzJykuYXBwZW5kKCc8b3B0aW9uIHZhbHVlPVwiJyArIHJlc3BvbnNlLnRlcm1faWQgKyAnXCIgc2VsZWN0ZWQ9XCJzZWxlY3RlZFwiPicgKyByZXNwb25zZS5uYW1lICsgJzwvb3B0aW9uPicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJHdyYXBwZXIuZmluZCgnc2VsZWN0LmF0dHJpYnV0ZV92YWx1ZXMnKS5jaGFuZ2UoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICQoJy5wcm9kdWN0X2F0dHJpYnV0ZXMnKS51bmJsb2NrKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAkKCcucHJvZHVjdF9hdHRyaWJ1dGVzJykudW5ibG9jaygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIEF0dHJpYnV0ZURpYWxvZygpIHtcblxuICAgICAgICAgICAgbGV0IHNlbGYgPSB0aGlzO1xuICAgICAgICAgICAgJCgnLnByb2R1Y3RfYXR0cmlidXRlcycpLm9uKCdjbGljaycsICdidXR0b24ud3ZzX2FkZF9uZXdfYXR0cmlidXRlJywgZnVuY3Rpb24gKGV2ZW50KSB7XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuXG4gICAgICAgICAgICAgICAgbGV0ICR3cmFwcGVyICA9ICQodGhpcykuY2xvc2VzdCgnLndvb2NvbW1lcmNlX2F0dHJpYnV0ZScpO1xuICAgICAgICAgICAgICAgIGxldCBhdHRyaWJ1dGUgPSAkd3JhcHBlci5kYXRhKCd0YXhvbm9teScpO1xuICAgICAgICAgICAgICAgIGxldCB0aXRsZSAgICAgPSAkKHRoaXMpLmRhdGEoJ2RpYWxvZ190aXRsZScpO1xuXG4gICAgICAgICAgICAgICAgJCgnLnd2cy1hdHRyaWJ1dGUtZGlhbG9nLWZvci0nICsgYXR0cmlidXRlKS5kaWFsb2coe1xuICAgICAgICAgICAgICAgICAgICB0aXRsZSAgICAgICAgIDogJycsXG4gICAgICAgICAgICAgICAgICAgIGRpYWxvZ0NsYXNzICAgOiAnd3AtZGlhbG9nIHd2cy1hdHRyaWJ1dGUtZGlhbG9nJyxcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NlcyAgICAgICA6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIFwidWktZGlhbG9nXCIgOiBcIndwLWRpYWxvZyB3dnMtYXR0cmlidXRlLWRpYWxvZ1wiXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGF1dG9PcGVuICAgICAgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgZHJhZ2dhYmxlICAgICA6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoICAgICAgICAgOiAnYXV0bycsXG4gICAgICAgICAgICAgICAgICAgIG1vZGFsICAgICAgICAgOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICByZXNpemFibGUgICAgIDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIGNsb3NlT25Fc2NhcGUgOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiAgICAgIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgbXkgOiBcImNlbnRlclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXQgOiBcImNlbnRlclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgb2YgOiB3aW5kb3dcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgb3BlbiAgICAgICAgICA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNsb3NlIGRpYWxvZyBieSBjbGlja2luZyB0aGUgb3ZlcmxheSBiZWhpbmQgaXRcbiAgICAgICAgICAgICAgICAgICAgICAgICQoJy51aS13aWRnZXQtb3ZlcmxheScpLmJpbmQoJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoJyNhdHRyaWJ1dGUtZGlhbG9nJykuZGlhbG9nKCdjbG9zZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgY3JlYXRlICAgICAgICA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHN0eWxlIGZpeCBmb3IgV29yZFByZXNzIGFkbWluXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyAkKCcudWktZGlhbG9nLXRpdGxlYmFyLWNsb3NlJykuYWRkQ2xhc3MoJ3VpLWJ1dHRvbicpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgLmRpYWxvZyhcIm9wdGlvblwiLCBcInRpdGxlXCIsIHRpdGxlKVxuICAgICAgICAgICAgICAgICAgICAuZGlhbG9nKFwib3B0aW9uXCIsIFwiYnV0dG9uc1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCAgOiBXVlNQbHVnaW5PYmplY3QuZGlhbG9nX3NhdmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5zYXZpbmdEaWFsb2coJHdyYXBwZXIsICQodGhpcyksIGF0dHJpYnV0ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmRpYWxvZyhcImNsb3NlXCIpLmRpYWxvZyhcImRlc3Ryb3lcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCAgOiBXVlNQbHVnaW5PYmplY3QuZGlhbG9nX2NhbmNlbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2sgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmRpYWxvZyhcImNsb3NlXCIpLmRpYWxvZyhcImRlc3Ryb3lcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgLmRpYWxvZygnb3BlbicpXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBQbHVnaW5IZWxwZ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E7QUFnQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUxBO0FBUUE7QUFDQTtBQUNBO0FBQ0E7QUFKQTtBQVNBO0FBQ0E7QUFyTkE7QUFDQTtBQURBO0FBQUE7QUFDQTtBQXVOQTtBQUNBO0FBQ0E7Ozs7Ozs7QUM1TkE7Ozs7OztBQ0FBOzs7Ozs7QUNBQTs7Ozs7O0FDQUE7OztBIiwic291cmNlUm9vdCI6IiJ9
1
  /*!
2
+ * WooCommerce Variation Swatches v1.0.16
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-3-28 13:17:53
6
  * Released under the GPLv3 license.
7
  */
8
  /******/ (function(modules) { // webpackBootstrap
102
  PluginHelper.ImageUploader();
103
  PluginHelper.AttributeDialog();
104
  });
105
+
106
+ $(document.body).on('wvs_pro_product_swatches_variation_loaded', function () {
107
+ PluginHelper.ColorPicker();
108
+ PluginHelper.ImageUploader();
109
+ });
110
  });
111
  }); // end of jquery main wrapper
112
 
382
 
383
  /***/ })
384
  /******/ ]);
385
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2FkbWluLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGYxOTMzOTg4MDBkNDJmY2U1ZTQyIiwid2VicGFjazovLy9zcmMvanMvYmFja2VuZC5qcyIsIndlYnBhY2s6Ly8vc3JjL2pzL1BsdWdpbkhlbHBlci5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9iYWNrZW5kLnNjc3M/YmU2MSIsIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9mcm9udGVuZC5zY3NzIiwid2VicGFjazovLy8uL3NyYy9zY3NzL3Rvb2x0aXAuc2NzcyIsIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9jdXN0b21pemUtaGVhZGluZy1jb250cm9sLnNjc3Mi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RJbWFnZShldmVudCkge1xuXG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7XG5cbiAgICAgICAgICAgIGxldCBmaWxlX2ZyYW1lO1xuXG4gICAgICAgICAgICBpZiAodHlwZW9mIHdwICE9PSAndW5kZWZpbmVkJyAmJiB3cC5tZWRpYSAmJiB3cC5tZWRpYS5lZGl0b3IpIHtcblxuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBtZWRpYSBmcmFtZSBhbHJlYWR5IGV4aXN0cywgcmVvcGVuIGl0LlxuICAgICAgICAgICAgICAgIGlmIChmaWxlX2ZyYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub3BlbigpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gQ3JlYXRlIHRoZSBtZWRpYSBmcmFtZS5cbiAgICAgICAgICAgICAgICBmaWxlX2ZyYW1lID0gd3AubWVkaWEuZnJhbWVzLnNlbGVjdF9pbWFnZSA9IHdwLm1lZGlhKHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUgICAgOiBXVlNQbHVnaW5PYmplY3QubWVkaWFfdGl0bGUsXG4gICAgICAgICAgICAgICAgICAgIGJ1dHRvbiAgIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA6IFdWU1BsdWdpbk9iamVjdC5idXR0b25fdGl0bGVcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlwbGUgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIFdoZW4gYW4gaW1hZ2UgaXMgc2VsZWN0ZWQsIHJ1biBhIGNhbGxiYWNrLlxuICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub24oJ3NlbGVjdCcsICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGF0dGFjaG1lbnQgPSBmaWxlX2ZyYW1lLnN0YXRlKCkuZ2V0KCdzZWxlY3Rpb24nKS5maXJzdCgpLnRvSlNPTigpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICgkLnRyaW0oYXR0YWNobWVudC5pZCkgIT09ICcnKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAodHlwZW9mKGF0dGFjaG1lbnQuc2l6ZXMudGh1bWJuYWlsKSA9PT0gJ3VuZGVmaW5lZCcpID8gYXR0YWNobWVudC5zaXplcy5mdWxsLnVybCA6IGF0dGFjaG1lbnQuc2l6ZXMudGh1bWJuYWlsLnVybDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5wcmV2KCkudmFsKGF0dGFjaG1lbnQuaWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5jbG9zZXN0KCcubWV0YS1pbWFnZS1maWVsZC13cmFwcGVyJykuZmluZCgnaW1nJykuYXR0cignc3JjJywgdXJsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykubmV4dCgpLnNob3coKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvL2ZpbGVfZnJhbWUuY2xvc2UoKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIFdoZW4gb3BlbiBzZWxlY3Qgc2VsZWN0ZWRcbiAgICAgICAgICAgICAgICBmaWxlX2ZyYW1lLm9uKCdvcGVuJywgKCkgPT4ge1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIEdyYWIgb3VyIGF0dGFjaG1lbnQgc2VsZWN0aW9uIGFuZCBjb25zdHJ1Y3QgYSBKU09OIHJlcHJlc2VudGF0aW9uIG9mIHRoZSBtb2RlbC5cbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdGlvbiAgPSBmaWxlX2ZyYW1lLnN0YXRlKCkuZ2V0KCdzZWxlY3Rpb24nKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGN1cnJlbnQgICAgPSAkKHRoaXMpLnByZXYoKS52YWwoKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGF0dGFjaG1lbnQgPSB3cC5tZWRpYS5hdHRhY2htZW50KGN1cnJlbnQpO1xuICAgICAgICAgICAgICAgICAgICBhdHRhY2htZW50LmZldGNoKCk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5hZGQoYXR0YWNobWVudCA/IFthdHRhY2htZW50XSA6IFtdKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIEZpbmFsbHksIG9wZW4gdGhlIG1vZGFsLlxuICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub3BlbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIFJlbW92ZUltYWdlKGV2ZW50KSB7XG5cbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcblxuICAgICAgICAgICAgbGV0IHBsYWNlaG9sZGVyID0gJCh0aGlzKS5jbG9zZXN0KCcubWV0YS1pbWFnZS1maWVsZC13cmFwcGVyJykuZmluZCgnaW1nJykuZGF0YSgncGxhY2Vob2xkZXInKTtcbiAgICAgICAgICAgICQodGhpcykuY2xvc2VzdCgnLm1ldGEtaW1hZ2UtZmllbGQtd3JhcHBlcicpLmZpbmQoJ2ltZycpLmF0dHIoJ3NyYycsIHBsYWNlaG9sZGVyKTtcbiAgICAgICAgICAgICQodGhpcykucHJldigpLnByZXYoKS52YWwoJycpO1xuICAgICAgICAgICAgJCh0aGlzKS5oaWRlKCk7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0aWMgU2VsZWN0V29vKHNlbGVjdG9yID0gJ3NlbGVjdC53dnMtc2VsZWN0d29vJykge1xuICAgICAgICAgICAgaWYgKCQoKS5zZWxlY3RXb28pIHtcbiAgICAgICAgICAgICAgICAkKHNlbGVjdG9yKS5zZWxlY3RXb28oe1xuICAgICAgICAgICAgICAgICAgICBhbGxvd0NsZWFyIDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIENvbG9yUGlja2VyKHNlbGVjdG9yID0gJ2lucHV0Lnd2cy1jb2xvci1waWNrZXInKSB7XG4gICAgICAgICAgICBpZiAoJCgpLndwQ29sb3JQaWNrZXIpIHtcbiAgICAgICAgICAgICAgICAkKHNlbGVjdG9yKS53cENvbG9yUGlja2VyKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0aWMgRmllbGREZXBlbmRlbmN5KHNlbGVjdG9yID0gJ1tkYXRhLWRlcGVuZHNdJykge1xuICAgICAgICAgICAgaWYgKCQoKS5Gb3JtRmllbGREZXBlbmRlbmN5KSB7XG4gICAgICAgICAgICAgICAgJChzZWxlY3RvcikuRm9ybUZpZWxkRGVwZW5kZW5jeSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIHNhdmluZ0RpYWxvZygkd3JhcHBlciwgJGRpYWxvZywgdGF4b25vbXkpIHtcblxuICAgICAgICAgICAgbGV0IGRhdGEgPSB7fTtcbiAgICAgICAgICAgIGxldCB0ZXJtID0gJyc7XG5cbiAgICAgICAgICAgIC8vIEBUT0RPOiBXZSBzaG91bGQgdXNlIGZvcm0gZGF0YSwgYmVjYXVzZSB3ZSBoYXZlIHRvIHBpY2sgYXJyYXkgYmFzZWQgZGF0YSBhbHNvIDopXG5cbiAgICAgICAgICAgICRkaWFsb2cuZmluZChgaW5wdXQsIHNlbGVjdGApLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGxldCBrZXkgICA9ICQodGhpcykuYXR0cignbmFtZScpO1xuICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9ICQodGhpcykudmFsKCk7XG4gICAgICAgICAgICAgICAgaWYgKGtleSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5ID09PSAndGFnX25hbWUnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXJtID0gdmFsdWVcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFba2V5XSA9IHZhbHVlXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS52YWwoJycpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGlmICh0ZXJtKSB7XG4gICAgICAgICAgICAgICAgJCgnLnByb2R1Y3RfYXR0cmlidXRlcycpLmJsb2NrKHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSAgICA6IG51bGwsXG4gICAgICAgICAgICAgICAgICAgIG92ZXJsYXlDU1MgOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kIDogJyNmZmYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgb3BhY2l0eSAgICA6IDAuNlxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBsZXQgYWpheF9kYXRhID0ge1xuICAgICAgICAgICAgICAgICAgICBhY3Rpb24gICA6ICd3b29jb21tZXJjZV9hZGRfbmV3X2F0dHJpYnV0ZScsXG4gICAgICAgICAgICAgICAgICAgIHRheG9ub215IDogdGF4b25vbXksXG4gICAgICAgICAgICAgICAgICAgIHRlcm0gICAgIDogdGVybSxcbiAgICAgICAgICAgICAgICAgICAgc2VjdXJpdHkgOiB3b29jb21tZXJjZV9hZG1pbl9tZXRhX2JveGVzLmFkZF9hdHRyaWJ1dGVfbm9uY2UsXG4gICAgICAgICAgICAgICAgICAgIC4uLmRhdGFcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgJC5wb3N0KHdvb2NvbW1lcmNlX2FkbWluX21ldGFfYm94ZXMuYWpheF91cmwsIGFqYXhfZGF0YSwgZnVuY3Rpb24gKHJlc3BvbnNlKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBFcnJvci5cbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hbGVydChyZXNwb25zZS5lcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocmVzcG9uc2Uuc2x1Zykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gU3VjY2Vzcy5cbiAgICAgICAgICAgICAgICAgICAgICAgICR3cmFwcGVyLmZpbmQoJ3NlbGVjdC5hdHRyaWJ1dGVfdmFsdWVzJykuYXBwZW5kKCc8b3B0aW9uIHZhbHVlPVwiJyArIHJlc3BvbnNlLnRlcm1faWQgKyAnXCIgc2VsZWN0ZWQ9XCJzZWxlY3RlZFwiPicgKyByZXNwb25zZS5uYW1lICsgJzwvb3B0aW9uPicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJHdyYXBwZXIuZmluZCgnc2VsZWN0LmF0dHJpYnV0ZV92YWx1ZXMnKS5jaGFuZ2UoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICQoJy5wcm9kdWN0X2F0dHJpYnV0ZXMnKS51bmJsb2NrKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAkKCcucHJvZHVjdF9hdHRyaWJ1dGVzJykudW5ibG9jaygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIEF0dHJpYnV0ZURpYWxvZygpIHtcblxuICAgICAgICAgICAgbGV0IHNlbGYgPSB0aGlzO1xuICAgICAgICAgICAgJCgnLnByb2R1Y3RfYXR0cmlidXRlcycpLm9uKCdjbGljaycsICdidXR0b24ud3ZzX2FkZF9uZXdfYXR0cmlidXRlJywgZnVuY3Rpb24gKGV2ZW50KSB7XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuXG4gICAgICAgICAgICAgICAgbGV0ICR3cmFwcGVyICA9ICQodGhpcykuY2xvc2VzdCgnLndvb2NvbW1lcmNlX2F0dHJpYnV0ZScpO1xuICAgICAgICAgICAgICAgIGxldCBhdHRyaWJ1dGUgPSAkd3JhcHBlci5kYXRhKCd0YXhvbm9teScpO1xuICAgICAgICAgICAgICAgIGxldCB0aXRsZSAgICAgPSAkKHRoaXMpLmRhdGEoJ2RpYWxvZ190aXRsZScpO1xuXG4gICAgICAgICAgICAgICAgJCgnLnd2cy1hdHRyaWJ1dGUtZGlhbG9nLWZvci0nICsgYXR0cmlidXRlKS5kaWFsb2coe1xuICAgICAgICAgICAgICAgICAgICB0aXRsZSAgICAgICAgIDogJycsXG4gICAgICAgICAgICAgICAgICAgIGRpYWxvZ0NsYXNzICAgOiAnd3AtZGlhbG9nIHd2cy1hdHRyaWJ1dGUtZGlhbG9nJyxcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NlcyAgICAgICA6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIFwidWktZGlhbG9nXCIgOiBcIndwLWRpYWxvZyB3dnMtYXR0cmlidXRlLWRpYWxvZ1wiXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGF1dG9PcGVuICAgICAgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgZHJhZ2dhYmxlICAgICA6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoICAgICAgICAgOiAnYXV0bycsXG4gICAgICAgICAgICAgICAgICAgIG1vZGFsICAgICAgICAgOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICByZXNpemFibGUgICAgIDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIGNsb3NlT25Fc2NhcGUgOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiAgICAgIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgbXkgOiBcImNlbnRlclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXQgOiBcImNlbnRlclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgb2YgOiB3aW5kb3dcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgb3BlbiAgICAgICAgICA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNsb3NlIGRpYWxvZyBieSBjbGlja2luZyB0aGUgb3ZlcmxheSBiZWhpbmQgaXRcbiAgICAgICAgICAgICAgICAgICAgICAgICQoJy51aS13aWRnZXQtb3ZlcmxheScpLmJpbmQoJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoJyNhdHRyaWJ1dGUtZGlhbG9nJykuZGlhbG9nKCdjbG9zZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgY3JlYXRlICAgICAgICA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHN0eWxlIGZpeCBmb3IgV29yZFByZXNzIGFkbWluXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyAkKCcudWktZGlhbG9nLXRpdGxlYmFyLWNsb3NlJykuYWRkQ2xhc3MoJ3VpLWJ1dHRvbicpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgLmRpYWxvZyhcIm9wdGlvblwiLCBcInRpdGxlXCIsIHRpdGxlKVxuICAgICAgICAgICAgICAgICAgICAuZGlhbG9nKFwib3B0aW9uXCIsIFwiYnV0dG9uc1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCAgOiBXVlNQbHVnaW5PYmplY3QuZGlhbG9nX3NhdmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5zYXZpbmdEaWFsb2coJHdyYXBwZXIsICQodGhpcyksIGF0dHJpYnV0ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmRpYWxvZyhcImNsb3NlXCIpLmRpYWxvZyhcImRlc3Ryb3lcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCAgOiBXVlNQbHVnaW5PYmplY3QuZGlhbG9nX2NhbmNlbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2sgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmRpYWxvZyhcImNsb3NlXCIpLmRpYWxvZyhcImRlc3Ryb3lcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICA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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBSEE7QUFLQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQTFCQTtBQWdDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBTEE7QUFRQTtBQUNBO0FBQ0E7QUFDQTtBQUpBO0FBU0E7QUFDQTtBQXJOQTtBQUNBO0FBREE7QUFBQTtBQUNBO0FBdU5BO0FBQ0E7QUFDQTs7Ozs7OztBQzVOQTs7Ozs7O0FDQUE7Ozs7OztBQ0FBOzs7Ozs7QUNBQTs7O0EiLCJzb3VyY2VSb290IjoiIn0=
assets/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var o={};t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,o){o(1),o(3),o(4),o(5),e.exports=o(6)},function(e,t,o){jQuery(function(e){Promise.resolve().then(function(){return o(2)}).then(function(t){var o=t.PluginHelper;o.SelectWoo(),o.ColorPicker(),o.FieldDependency(),o.ImageUploader(),o.AttributeDialog(),e(document.body).on("woocommerce_added_attribute",function(){o.SelectWoo(),o.ColorPicker(),o.ImageUploader(),o.AttributeDialog()})})})},function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),o.d(t,"PluginHelper",function(){return r});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},a=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),r=function(e){return function(){function t(){n(this,t)}return a(t,null,[{key:"ImageUploader",value:function(){e(document).off("click","button.wvs_upload_image_button"),e(document).on("click","button.wvs_upload_image_button",this.AddImage),e(document).on("click","button.wvs_remove_image_button",this.RemoveImage)}},{key:"AddImage",value:function(t){var o=this;t.preventDefault(),t.stopPropagation();var n=void 0;if("undefined"!=typeof wp&&wp.media&&wp.media.editor){if(n)return void n.open();n=wp.media.frames.select_image=wp.media({title:WVSPluginObject.media_title,button:{text:WVSPluginObject.button_title},multiple:!1}),n.on("select",function(){var t=n.state().get("selection").first().toJSON();if(""!==e.trim(t.id)){var i=void 0===t.sizes.thumbnail?t.sizes.full.url:t.sizes.thumbnail.url;e(o).prev().val(t.id),e(o).closest(".meta-image-field-wrapper").find("img").attr("src",i),e(o).next().show()}}),n.on("open",function(){var t=n.state().get("selection"),i=e(o).prev().val(),a=wp.media.attachment(i);a.fetch(),t.add(a?[a]:[])}),n.open()}}},{key:"RemoveImage",value:function(t){t.preventDefault(),t.stopPropagation();var o=e(this).closest(".meta-image-field-wrapper").find("img").data("placeholder");return e(this).closest(".meta-image-field-wrapper").find("img").attr("src",o),e(this).prev().prev().val(""),e(this).hide(),!1}},{key:"SelectWoo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"select.wvs-selectwoo";e().selectWoo&&e(t).selectWoo({allowClear:!0})}},{key:"ColorPicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input.wvs-color-picker";e().wpColorPicker&&e(t).wpColorPicker()}},{key:"FieldDependency",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-depends]";e().FormFieldDependency&&e(t).FormFieldDependency()}},{key:"savingDialog",value:function(t,o,n){var a={},r="";if(o.find("input, select").each(function(){var t=e(this).attr("name"),o=e(this).val();t&&("tag_name"===t?r=o:a[t]=o,e(this).val(""))}),r){e(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var l=i({action:"woocommerce_add_new_attribute",taxonomy:n,term:r,security:woocommerce_admin_meta_boxes.add_attribute_nonce},a);e.post(woocommerce_admin_meta_boxes.ajax_url,l,function(o){o.error?window.alert(o.error):o.slug&&(t.find("select.attribute_values").append('<option value="'+o.term_id+'" selected="selected">'+o.name+"</option>"),t.find("select.attribute_values").change()),e(".product_attributes").unblock()})}else e(".product_attributes").unblock()}},{key:"AttributeDialog",value:function(){var t=this;e(".product_attributes").on("click","button.wvs_add_new_attribute",function(o){o.preventDefault();var n=e(this).closest(".woocommerce_attribute"),i=n.data("taxonomy"),a=e(this).data("dialog_title");e(".wvs-attribute-dialog-for-"+i).dialog({title:"",dialogClass:"wp-dialog wvs-attribute-dialog",classes:{"ui-dialog":"wp-dialog wvs-attribute-dialog"},autoOpen:!1,draggable:!0,width:"auto",modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:window},open:function(){e(".ui-widget-overlay").bind("click",function(){e("#attribute-dialog").dialog("close")})},create:function(){}}).dialog("option","title",a).dialog("option","buttons",[{text:WVSPluginObject.dialog_save,click:function(){t.savingDialog(n,e(this),i),e(this).dialog("close").dialog("destroy")}},{text:WVSPluginObject.dialog_cancel,click:function(){e(this).dialog("close").dialog("destroy")}}]).dialog("open")})}}]),t}()}(jQuery)},function(e,t){},function(e,t){},function(e,t){},function(e,t){}]);
1
+ !function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var o={};t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,o){o(1),o(3),o(4),o(5),e.exports=o(6)},function(e,t,o){jQuery(function(e){Promise.resolve().then(function(){return o(2)}).then(function(t){var o=t.PluginHelper;o.SelectWoo(),o.ColorPicker(),o.FieldDependency(),o.ImageUploader(),o.AttributeDialog(),e(document.body).on("woocommerce_added_attribute",function(){o.SelectWoo(),o.ColorPicker(),o.ImageUploader(),o.AttributeDialog()}),e(document.body).on("wvs_pro_product_swatches_variation_loaded",function(){o.ColorPicker(),o.ImageUploader()})})})},function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),o.d(t,"PluginHelper",function(){return r});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},a=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),r=function(e){return function(){function t(){n(this,t)}return a(t,null,[{key:"ImageUploader",value:function(){e(document).off("click","button.wvs_upload_image_button"),e(document).on("click","button.wvs_upload_image_button",this.AddImage),e(document).on("click","button.wvs_remove_image_button",this.RemoveImage)}},{key:"AddImage",value:function(t){var o=this;t.preventDefault(),t.stopPropagation();var n=void 0;if("undefined"!=typeof wp&&wp.media&&wp.media.editor){if(n)return void n.open();n=wp.media.frames.select_image=wp.media({title:WVSPluginObject.media_title,button:{text:WVSPluginObject.button_title},multiple:!1}),n.on("select",function(){var t=n.state().get("selection").first().toJSON();if(""!==e.trim(t.id)){var i=void 0===t.sizes.thumbnail?t.sizes.full.url:t.sizes.thumbnail.url;e(o).prev().val(t.id),e(o).closest(".meta-image-field-wrapper").find("img").attr("src",i),e(o).next().show()}}),n.on("open",function(){var t=n.state().get("selection"),i=e(o).prev().val(),a=wp.media.attachment(i);a.fetch(),t.add(a?[a]:[])}),n.open()}}},{key:"RemoveImage",value:function(t){t.preventDefault(),t.stopPropagation();var o=e(this).closest(".meta-image-field-wrapper").find("img").data("placeholder");return e(this).closest(".meta-image-field-wrapper").find("img").attr("src",o),e(this).prev().prev().val(""),e(this).hide(),!1}},{key:"SelectWoo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"select.wvs-selectwoo";e().selectWoo&&e(t).selectWoo({allowClear:!0})}},{key:"ColorPicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input.wvs-color-picker";e().wpColorPicker&&e(t).wpColorPicker()}},{key:"FieldDependency",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-depends]";e().FormFieldDependency&&e(t).FormFieldDependency()}},{key:"savingDialog",value:function(t,o,n){var a={},r="";if(o.find("input, select").each(function(){var t=e(this).attr("name"),o=e(this).val();t&&("tag_name"===t?r=o:a[t]=o,e(this).val(""))}),r){e(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var l=i({action:"woocommerce_add_new_attribute",taxonomy:n,term:r,security:woocommerce_admin_meta_boxes.add_attribute_nonce},a);e.post(woocommerce_admin_meta_boxes.ajax_url,l,function(o){o.error?window.alert(o.error):o.slug&&(t.find("select.attribute_values").append('<option value="'+o.term_id+'" selected="selected">'+o.name+"</option>"),t.find("select.attribute_values").change()),e(".product_attributes").unblock()})}else e(".product_attributes").unblock()}},{key:"AttributeDialog",value:function(){var t=this;e(".product_attributes").on("click","button.wvs_add_new_attribute",function(o){o.preventDefault();var n=e(this).closest(".woocommerce_attribute"),i=n.data("taxonomy"),a=e(this).data("dialog_title");e(".wvs-attribute-dialog-for-"+i).dialog({title:"",dialogClass:"wp-dialog wvs-attribute-dialog",classes:{"ui-dialog":"wp-dialog wvs-attribute-dialog"},autoOpen:!1,draggable:!0,width:"auto",modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:window},open:function(){e(".ui-widget-overlay").bind("click",function(){e("#attribute-dialog").dialog("close")})},create:function(){}}).dialog("option","title",a).dialog("option","buttons",[{text:WVSPluginObject.dialog_save,click:function(){t.savingDialog(n,e(this),i),e(this).dialog("close").dialog("destroy")}},{text:WVSPluginObject.dialog_cancel,click:function(){e(this).dialog("close").dialog("destroy")}}]).dialog("open")})}}]),t}()}(jQuery)},function(e,t){},function(e,t){},function(e,t){},function(e,t){}]);
assets/js/frontend.js CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * WooCommerce Variation Swatches v1.0.15
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-3-15 15:30:38
6
  * Released under the GPLv3 license.
7
  */
8
  /******/ (function(modules) { // webpackBootstrap
@@ -142,7 +142,7 @@ var WooVariationSwatches = function ($) {
142
  _createClass(WooVariationSwatches, [{
143
  key: 'init',
144
  value: function init(is_ajax) {
145
- var _this = this;
146
 
147
  this._element.find('ul.variable-items-wrapper').each(function (i, el) {
148
 
@@ -156,7 +156,7 @@ var WooVariationSwatches = function ($) {
156
  }
157
 
158
  if (reselect_clear) {
159
- $(this).on('click', 'li:not(.selected)', function (e) {
160
  e.preventDefault();
161
  e.stopPropagation();
162
  var value = $(this).data('value');
@@ -166,7 +166,7 @@ var WooVariationSwatches = function ($) {
166
  select.trigger('touchstart');
167
  });
168
 
169
- $(this).on('click', 'li.selected', function (e) {
170
  e.preventDefault();
171
  e.stopPropagation();
172
  select.val('').trigger('change');
@@ -174,8 +174,37 @@ var WooVariationSwatches = function ($) {
174
  select.trigger('focusin');
175
  select.trigger('touchstart');
176
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  } else {
178
- $(this).on('click', 'li', function (e) {
179
  e.preventDefault();
180
  e.stopPropagation();
181
  var value = $(this).data('value');
@@ -184,12 +213,27 @@ var WooVariationSwatches = function ($) {
184
  select.trigger('focusin');
185
  select.trigger('touchstart');
186
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  }
188
  });
189
 
190
  _.delay(function () {
191
- _this._element.trigger('woo_variation_swatches_init', [_this, _this.product_variations]);
192
- $(document).trigger('woo_variation_swatches_loaded', [_this._element, _this.product_variations]);
193
  }, 1);
194
  }
195
  }, {
@@ -224,6 +268,9 @@ var WooVariationSwatches = function ($) {
224
  if (!_.isEmpty(attribute_values) && !attribute_values.includes(attribute_value)) {
225
  $(this).removeClass('selected');
226
  $(this).addClass('disabled');
 
 
 
227
  }
228
  });
229
  });
@@ -234,12 +281,14 @@ var WooVariationSwatches = function ($) {
234
  key: 'reset',
235
  value: function reset(is_ajax) {
236
  this._element.on('reset_data', function (event) {
237
- var isAjaxVariation = !$(this).data('product_variations');
238
  $(this).find('ul.variable-items-wrapper').each(function () {
239
  var li = $(this).find('li');
240
  li.each(function () {
241
  if (!is_ajax) {
242
  $(this).removeClass('selected disabled');
 
 
 
243
  }
244
  });
245
  });
@@ -278,6 +327,9 @@ var WooVariationSwatches = function ($) {
278
  $(this).removeClass('selected disabled');
279
  if (value === selected) {
280
  $(this).addClass('selected');
 
 
 
281
  }
282
  });
283
  }, 1);
@@ -318,9 +370,15 @@ var WooVariationSwatches = function ($) {
318
  $(this).removeClass('disabled');
319
  if (value === selected) {
320
  $(this).addClass('selected');
 
 
 
321
  }
322
  } else {
323
  $(this).addClass('disabled');
 
 
 
324
  }
325
  });
326
  }, 1);
@@ -360,4 +418,4 @@ var WooVariationSwatches = function ($) {
360
  /***/ })
361
 
362
  /******/ });
363
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2Zyb250ZW5kLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDRjNzYyYmU4MTZlZDAxZWMwMTY1Iiwid2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mJvZHkpLm9uKCdwb3N0LWxvYWQnLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAkKCcudmFyaWF0aW9uc19mb3JtJykud2NfdmFyaWF0aW9uX2Zvcm0oKTtcbiAgICAgICAgfSk7XG5cbiAgICB9KTtcbn0pOyAgLy8gZW5kIG9mIGpxdWVyeSBtYWluIHdyYXBwZXJcblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gc3JjL2pzL2Zyb250ZW5kLmpzIiwiLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gV29vQ29tbWVyY2UgVmFyaWF0aW9uIENoYW5nZVxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBXb29WYXJpYXRpb25Td2F0Y2hlcyA9ICgoJCkgPT4ge1xuXG4gICAgY29uc3QgRGVmYXVsdCA9IHt9O1xuXG4gICAgY2xhc3MgV29vVmFyaWF0aW9uU3dhdGNoZXMge1xuXG4gICAgICAgIGNvbnN0cnVjdG9yKGVsZW1lbnQsIGNvbmZpZykge1xuXG4gICAgICAgICAgICAvLyBBc3NpZ25cbiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQgICAgICAgICAgID0gJChlbGVtZW50KTtcbiAgICAgICAgICAgIHRoaXMuX2NvbmZpZyAgICAgICAgICAgID0gJC5leHRlbmQoe30sIERlZmF1bHQsIGNvbmZpZyk7XG4gICAgICAgICAgICB0aGlzLl9nZW5lcmF0ZWQgICAgICAgICA9IHt9O1xuICAgICAgICAgICAgdGhpcy5wcm9kdWN0X3ZhcmlhdGlvbnMgPSB0aGlzLl9lbGVtZW50LmRhdGEoJ3Byb2R1Y3RfdmFyaWF0aW9ucycpO1xuICAgICAgICAgICAgdGhpcy5pc19hamF4X3ZhcmlhdGlvbiAgPSAhdGhpcy5wcm9kdWN0X3ZhcmlhdGlvbnM7XG5cbiAgICAgICAgICAgIC8vIENhbGxcbiAgICAgICAgICAgIHRoaXMuaW5pdCh0aGlzLmlzX2FqYXhfdmFyaWF0aW9uKTtcbiAgICAgICAgICAgIHRoaXMubG9hZGVkKHRoaXMuaXNfYWpheF92YXJpYXRpb24pO1xuICAgICAgICAgICAgdGhpcy51cGRhdGUodGhpcy5pc19hamF4X3ZhcmlhdGlvbik7XG4gICAgICAgICAgICB0aGlzLnJlc2V0KHRoaXMuaXNfYWpheF92YXJpYXRpb24pO1xuXG4gICAgICAgICAgICAvLyBUcmlnZ2VyXG4gICAgICAgICAgICAkKGRvY3VtZW50KS50cmlnZ2VyKCd3b29fdmFyaWF0aW9uX3N3YXRjaGVzJywgW3RoaXMuX2VsZW1lbnRdKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXRpYyBfalF1ZXJ5SW50ZXJmYWNlKGNvbmZpZykge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgbmV3IFdvb1ZhcmlhdGlvblN3YXRjaGVzKHRoaXMsIGNvbmZpZylcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cblxuICAgICAgICBpbml0KGlzX2FqYXgpIHtcblxuICAgICAgICAgICAgdGhpcy5fZWxlbWVudC5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoaSwgZWwpIHtcblxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3QgICAgICAgICA9ICQodGhpcykuc2libGluZ3MoJ3NlbGVjdC53b28tdmFyaWF0aW9uLXJhdy1zZWxlY3QnKTtcbiAgICAgICAgICAgICAgICBsZXQgbGkgICAgICAgICAgICAgPSAkKHRoaXMpLmZpbmQoJ2xpJyk7XG4gICAgICAgICAgICAgICAgbGV0IHJlc2VsZWN0X2NsZWFyID0gJCh0aGlzKS5oYXNDbGFzcygncmVzZWxlY3QtY2xlYXInKTtcblxuICAgICAgICAgICAgICAgIC8vIEZvciBBdmFkYSBGSVhcbiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0Lmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0ID0gJCh0aGlzKS5wYXJlbnQoKS5maW5kKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0Jyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHJlc2VsZWN0X2NsZWFyKSB7XG4gICAgICAgICAgICAgICAgICAgICQodGhpcykub24oJ2NsaWNrJywgJ2xpOm5vdCguc2VsZWN0ZWQpJywgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSAkKHRoaXMpLmRhdGEoJ3ZhbHVlJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3QudmFsKHZhbHVlKS50cmlnZ2VyKCdjaGFuZ2UnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCdjbGljaycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ2ZvY3VzaW4nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCd0b3VjaHN0YXJ0Jyk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICQodGhpcykub24oJ2NsaWNrJywgJ2xpLnNlbGVjdGVkJywgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3QudmFsKCcnKS50cmlnZ2VyKCdjaGFuZ2UnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCdjbGljaycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ2ZvY3VzaW4nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCd0b3VjaHN0YXJ0Jyk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5vbignY2xpY2snLCAnbGknLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9ICQodGhpcykuZGF0YSgndmFsdWUnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdC52YWwodmFsdWUpLnRyaWdnZXIoJ2NoYW5nZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ2NsaWNrJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3QudHJpZ2dlcignZm9jdXNpbicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ3RvdWNoc3RhcnQnKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIF8uZGVsYXkoKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQudHJpZ2dlcignd29vX3ZhcmlhdGlvbl9zd2F0Y2hlc19pbml0JywgW3RoaXMsIHRoaXMucHJvZHVjdF92YXJpYXRpb25zXSlcbiAgICAgICAgICAgICAgICAkKGRvY3VtZW50KS50cmlnZ2VyKCd3b29fdmFyaWF0aW9uX3N3YXRjaGVzX2xvYWRlZCcsIFt0aGlzLl9lbGVtZW50LCB0aGlzLnByb2R1Y3RfdmFyaWF0aW9uc10pXG4gICAgICAgICAgICB9LCAxKVxuICAgICAgICB9XG5cbiAgICAgICAgbG9hZGVkKGlzX2FqYXgpIHtcbiAgICAgICAgICAgIGlmICghaXNfYWpheCkge1xuICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQub24oJ3dvb192YXJpYXRpb25fc3dhdGNoZXNfaW5pdCcsIGZ1bmN0aW9uIChldmVudCwgb2JqZWN0LCBwcm9kdWN0X3ZhcmlhdGlvbnMpIHtcblxuICAgICAgICAgICAgICAgICAgICBvYmplY3QuX2dlbmVyYXRlZCA9IHByb2R1Y3RfdmFyaWF0aW9ucy5yZWR1Y2UoKG9iaiwgdmFyaWF0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh2YXJpYXRpb24uYXR0cmlidXRlcykubWFwKChhdHRyaWJ1dGVfbmFtZSkgPT4ge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFvYmpbYXR0cmlidXRlX25hbWVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ialthdHRyaWJ1dGVfbmFtZV0gPSBbXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YXJpYXRpb24uYXR0cmlidXRlc1thdHRyaWJ1dGVfbmFtZV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW2F0dHJpYnV0ZV9uYW1lXS5wdXNoKHZhcmlhdGlvbi5hdHRyaWJ1dGVzW2F0dHJpYnV0ZV9uYW1lXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9iajtcbiAgICAgICAgICAgICAgICAgICAgfSwge30pO1xuXG4gICAgICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgndWwudmFyaWFibGUtaXRlbXMtd3JhcHBlcicpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpICAgICAgICAgICAgICAgPSAkKHRoaXMpLmZpbmQoJ2xpJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXR0cmlidXRlICAgICAgICA9ICQodGhpcykuZGF0YSgnYXR0cmlidXRlX25hbWUnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdHRyaWJ1dGVfdmFsdWVzID0gb2JqZWN0Ll9nZW5lcmF0ZWRbYXR0cmlidXRlXTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgbGkuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF0dHJpYnV0ZV92YWx1ZSA9ICQodGhpcykuYXR0cignZGF0YS12YWx1ZScpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFfLmlzRW1wdHkoYXR0cmlidXRlX3ZhbHVlcykgJiYgIWF0dHJpYnV0ZV92YWx1ZXMuaW5jbHVkZXMoYXR0cmlidXRlX3ZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnJlbW92ZUNsYXNzKCdzZWxlY3RlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmFkZENsYXNzKCdkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJlc2V0KGlzX2FqYXgpIHtcbiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQub24oJ3Jlc2V0X2RhdGEnLCBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICBsZXQgaXNBamF4VmFyaWF0aW9uID0gISQodGhpcykuZGF0YSgncHJvZHVjdF92YXJpYXRpb25zJyk7XG4gICAgICAgICAgICAgICAgJCh0aGlzKS5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBsaSA9ICQodGhpcykuZmluZCgnbGknKTtcbiAgICAgICAgICAgICAgICAgICAgbGkuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWlzX2FqYXgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnJlbW92ZUNsYXNzKCdzZWxlY3RlZCBkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgdXBkYXRlKGlzX2FqYXgpIHtcbiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQub24oJ3dvb2NvbW1lcmNlX3ZhcmlhdGlvbl9oYXNfY2hhbmdlZCcsIGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgICAgIGlmIChpc19hamF4KSB7XG4gICAgICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgndWwudmFyaWFibGUtaXRlbXMtd3JhcHBlcicpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkID0gJycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucyAgPSAkKHRoaXMpLnNpYmxpbmdzKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uJyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCAgPSAkKHRoaXMpLnNpYmxpbmdzKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uOnNlbGVjdGVkJyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXEgICAgICAgPSAkKHRoaXMpLnNpYmxpbmdzKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uJykuZXEoMSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGkgICAgICAgPSAkKHRoaXMpLmZpbmQoJ2xpJyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0cyAgPSBbXTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gRm9yIEF2YWRhIEZJWFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMubGVuZ3RoIDwgMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMgPSAkKHRoaXMpLnBhcmVudCgpLmZpbmQoJ3NlbGVjdC53b28tdmFyaWF0aW9uLXJhdy1zZWxlY3QnKS5maW5kKCdvcHRpb24nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gJCh0aGlzKS5wYXJlbnQoKS5maW5kKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uOnNlbGVjdGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXEgICAgICA9ICQodGhpcykucGFyZW50KCkuZmluZCgnc2VsZWN0Lndvby12YXJpYXRpb24tcmF3LXNlbGVjdCcpLmZpbmQoJ29wdGlvbicpLmVxKDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkKHRoaXMpLnZhbCgpICE9PSAnJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RzLnB1c2goJCh0aGlzKS52YWwoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkID0gY3VycmVudCA/IGN1cnJlbnQudmFsKCkgOiBlcS52YWwoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgXy5kZWxheShmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGkuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9ICQodGhpcykuYXR0cignZGF0YS12YWx1ZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnJlbW92ZUNsYXNzKCdzZWxlY3RlZCBkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUgPT09IHNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmFkZENsYXNzKCdzZWxlY3RlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCAxKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIC8vIFdpdGhPdXQgQWpheCBVcGRhdGVcbiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQub24oJ3dvb2NvbW1lcmNlX3VwZGF0ZV92YXJpYXRpb25fdmFsdWVzJywgZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgJCh0aGlzKS5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkID0gJycsXG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zICA9ICQodGhpcykuc2libGluZ3MoJ3NlbGVjdC53b28tdmFyaWF0aW9uLXJhdy1zZWxlY3QnKS5maW5kKCdvcHRpb24nKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgID0gJCh0aGlzKS5zaWJsaW5ncygnc2VsZWN0Lndvby12YXJpYXRpb24tcmF3LXNlbGVjdCcpLmZpbmQoJ29wdGlvbjpzZWxlY3RlZCcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXEgICAgICAgPSAkKHRoaXMpLnNpYmxpbmdzKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uJykuZXEoMSksXG4gICAgICAgICAgICAgICAgICAgICAgICBsaSAgICAgICA9ICQodGhpcykuZmluZCgnbGknKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdHMgID0gW107XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gRm9yIEF2YWRhIEZJWFxuICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5sZW5ndGggPCAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zID0gJCh0aGlzKS5wYXJlbnQoKS5maW5kKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gJCh0aGlzKS5wYXJlbnQoKS5maW5kKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uOnNlbGVjdGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcSAgICAgID0gJCh0aGlzKS5wYXJlbnQoKS5maW5kKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uJykuZXEoMSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCQodGhpcykudmFsKCkgIT09ICcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0cy5wdXNoKCQodGhpcykudmFsKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkID0gY3VycmVudCA/IGN1cnJlbnQudmFsKCkgOiBlcS52YWwoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgXy5kZWxheShmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaS5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSAkKHRoaXMpLmF0dHIoJ2RhdGEtdmFsdWUnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnJlbW92ZUNsYXNzKCdzZWxlY3RlZCBkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChfLmNvbnRhaW5zKHNlbGVjdHMsIHZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnJlbW92ZUNsYXNzKCdkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUgPT09IHNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmFkZENsYXNzKCdzZWxlY3RlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmFkZENsYXNzKCdkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9LCAxKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXG4gICAgICogalF1ZXJ5XG4gICAgICogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXG4gICAgICovXG5cbiAgICAkLmZuWydXb29WYXJpYXRpb25Td2F0Y2hlcyddID0gV29vVmFyaWF0aW9uU3dhdGNoZXMuX2pRdWVyeUludGVyZmFjZTtcbiAgICAkLmZuWydXb29WYXJpYXRpb25Td2F0Y2hlcyddLkNvbnN0cnVjdG9yID0gV29vVmFyaWF0aW9uU3dhdGNoZXM7XG4gICAgJC5mblsnV29vVmFyaWF0aW9uU3dhdGNoZXMnXS5ub0NvbmZsaWN0ICA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgJC5mblsnV29vVmFyaWF0aW9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DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQU1BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBdE5BO0FBQUE7QUFBQTtBQTBCQTtBQUNBO0FBQ0E7QUFDQTtBQTdCQTtBQUNBO0FBREE7QUFBQTtBQUNBO0FBd05BOzs7Ozs7QUFNQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBOzs7O0EiLCJzb3VyY2VSb290IjoiIn0=
1
  /*!
2
+ * WooCommerce Variation Swatches v1.0.16
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-3-28 13:17:53
6
  * Released under the GPLv3 license.
7
  */
8
  /******/ (function(modules) { // webpackBootstrap
142
  _createClass(WooVariationSwatches, [{
143
  key: 'init',
144
  value: function init(is_ajax) {
145
+ var _this2 = this;
146
 
147
  this._element.find('ul.variable-items-wrapper').each(function (i, el) {
148
 
156
  }
157
 
158
  if (reselect_clear) {
159
+ $(this).on('click', 'li:not(.selected):not(.radio-variable-item)', function (e) {
160
  e.preventDefault();
161
  e.stopPropagation();
162
  var value = $(this).data('value');
166
  select.trigger('touchstart');
167
  });
168
 
169
+ $(this).on('click', 'li.selected:not(.radio-variable-item)', function (e) {
170
  e.preventDefault();
171
  e.stopPropagation();
172
  select.val('').trigger('change');
174
  select.trigger('focusin');
175
  select.trigger('touchstart');
176
  });
177
+
178
+ // RADIO
179
+ $(this).on('click', 'input.wvs-radio-variable-item:radio', function (e) {
180
+ e.preventDefault();
181
+ e.stopPropagation();
182
+ $(this).trigger('change');
183
+ });
184
+
185
+ $(this).on('change', 'input.wvs-radio-variable-item:radio', function (e) {
186
+ var _this = this;
187
+
188
+ e.preventDefault();
189
+ e.stopPropagation();
190
+
191
+ var value = $(this).val();
192
+
193
+ if ($(this).parent('.radio-variable-item').hasClass('selected')) {
194
+ select.val('').trigger('change');
195
+ _.delay(function () {
196
+ $(_this).prop('checked', false);
197
+ }, 1);
198
+ } else {
199
+ select.val(value).trigger('change');
200
+ }
201
+
202
+ select.trigger('click');
203
+ select.trigger('focusin');
204
+ select.trigger('touchstart');
205
+ });
206
  } else {
207
+ $(this).on('click', 'li:not(.radio-variable-item)', function (e) {
208
  e.preventDefault();
209
  e.stopPropagation();
210
  var value = $(this).data('value');
213
  select.trigger('focusin');
214
  select.trigger('touchstart');
215
  });
216
+
217
+ // Radio
218
+ $(this).on('change', 'input.wvs-radio-variable-item:radio', function (e) {
219
+ e.preventDefault();
220
+ e.stopPropagation();
221
+ var value = $(this).val();
222
+
223
+ select.val(value).trigger('change');
224
+ select.trigger('click');
225
+ select.trigger('focusin');
226
+ select.trigger('touchstart');
227
+
228
+ // Radio
229
+ $(this).parent('li.radio-variable-item').removeClass('selected disabled').addClass('selected');
230
+ });
231
  }
232
  });
233
 
234
  _.delay(function () {
235
+ _this2._element.trigger('woo_variation_swatches_init', [_this2, _this2.product_variations]);
236
+ $(document).trigger('woo_variation_swatches_loaded', [_this2._element, _this2.product_variations]);
237
  }, 1);
238
  }
239
  }, {
268
  if (!_.isEmpty(attribute_values) && !attribute_values.includes(attribute_value)) {
269
  $(this).removeClass('selected');
270
  $(this).addClass('disabled');
271
+ if ($(this).hasClass('radio-variable-item')) {
272
+ $(this).find('input.wvs-radio-variable-item:radio').prop('disabled', true).prop('checked', false);
273
+ }
274
  }
275
  });
276
  });
281
  key: 'reset',
282
  value: function reset(is_ajax) {
283
  this._element.on('reset_data', function (event) {
 
284
  $(this).find('ul.variable-items-wrapper').each(function () {
285
  var li = $(this).find('li');
286
  li.each(function () {
287
  if (!is_ajax) {
288
  $(this).removeClass('selected disabled');
289
+ if ($(this).hasClass('radio-variable-item')) {
290
+ $(this).find('input.wvs-radio-variable-item:radio').prop('disabled', false).prop('checked', false);
291
+ }
292
  }
293
  });
294
  });
327
  $(this).removeClass('selected disabled');
328
  if (value === selected) {
329
  $(this).addClass('selected');
330
+ if ($(this).hasClass('radio-variable-item')) {
331
+ $(this).find('input.wvs-radio-variable-item:radio').prop('disabled', false).prop('checked', true);
332
+ }
333
  }
334
  });
335
  }, 1);
370
  $(this).removeClass('disabled');
371
  if (value === selected) {
372
  $(this).addClass('selected');
373
+ if ($(this).hasClass('radio-variable-item')) {
374
+ $(this).find('input.wvs-radio-variable-item:radio').prop('disabled', false).prop('checked', true);
375
+ }
376
  }
377
  } else {
378
  $(this).addClass('disabled');
379
+ if ($(this).hasClass('radio-variable-item')) {
380
+ $(this).find('input.wvs-radio-variable-item:radio').prop('disabled', true).prop('checked', false);
381
+ }
382
  }
383
  });
384
  }, 1);
418
  /***/ })
419
 
420
  /******/ });
421
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2Zyb250ZW5kLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGYxOTMzOTg4MDBkNDJmY2U1ZTQyIiwid2VicGFjazovLy9zcmMvanMvZnJvbnRlbmQuanMiLCJ3ZWJwYWNrOi8vL3NyYy9qcy9Xb29WYXJpYXRpb25Td2F0Y2hlcy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyIgXHQvLyBUaGUgbW9kdWxlIGNhY2hlXG4gXHR2YXIgaW5z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GpxdWVyeSBtYWluIHdyYXBwZXJcblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gc3JjL2pzL2Zyb250ZW5kLmpzIiwiLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gV29vQ29tbWVyY2UgVmFyaWF0aW9uIENoYW5nZVxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBXb29WYXJpYXRpb25Td2F0Y2hlcyA9ICgoJCkgPT4ge1xuXG4gICAgY29uc3QgRGVmYXVsdCA9IHt9O1xuXG4gICAgY2xhc3MgV29vVmFyaWF0aW9uU3dhdGNoZXMge1xuXG4gICAgICAgIGNvbnN0cnVjdG9yKGVsZW1lbnQsIGNvbmZpZykge1xuXG4gICAgICAgICAgICAvLyBBc3NpZ25cbiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQgICAgICAgICAgID0gJChlbGVtZW50KTtcbiAgICAgICAgICAgIHRoaXMuX2NvbmZpZyAgICAgICAgICAgID0gJC5leHRlbmQoe30sIERlZmF1bHQsIGNvbmZpZyk7XG4gICAgICAgICAgICB0aGlzLl9nZW5lcmF0ZWQgICAgICAgICA9IHt9O1xuICAgICAgICAgICAgdGhpcy5wcm9kdWN0X3ZhcmlhdGlvbnMgPSB0aGlzLl9lbGVtZW50LmRhdGEoJ3Byb2R1Y3RfdmFyaWF0aW9ucycpO1xuICAgICAgICAgICAgdGhpcy5pc19hamF4X3ZhcmlhdGlvbiAgPSAhdGhpcy5wcm9kdWN0X3ZhcmlhdGlvbnM7XG5cbiAgICAgICAgICAgIC8vIENhbGxcbiAgICAgICAgICAgIHRoaXMuaW5pdCh0aGlzLmlzX2FqYXhfdmFyaWF0aW9uKTtcbiAgICAgICAgICAgIHRoaXMubG9hZGVkKHRoaXMuaXNfYWpheF92YXJpYXRpb24pO1xuICAgICAgICAgICAgdGhpcy51cGRhdGUodGhpcy5pc19hamF4X3ZhcmlhdGlvbik7XG4gICAgICAgICAgICB0aGlzLnJlc2V0KHRoaXMuaXNfYWpheF92YXJpYXRpb24pO1xuXG4gICAgICAgICAgICAvLyBUcmlnZ2VyXG4gICAgICAgICAgICAkKGRvY3VtZW50KS50cmlnZ2VyKCd3b29fdmFyaWF0aW9uX3N3YXRjaGVzJywgW3RoaXMuX2VsZW1lbnRdKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXRpYyBfalF1ZXJ5SW50ZXJmYWNlKGNvbmZpZykge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgbmV3IFdvb1ZhcmlhdGlvblN3YXRjaGVzKHRoaXMsIGNvbmZpZylcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cblxuICAgICAgICBpbml0KGlzX2FqYXgpIHtcblxuICAgICAgICAgICAgdGhpcy5fZWxlbWVudC5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoaSwgZWwpIHtcblxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3QgICAgICAgICA9ICQodGhpcykuc2libGluZ3MoJ3NlbGVjdC53b28tdmFyaWF0aW9uLXJhdy1zZWxlY3QnKTtcbiAgICAgICAgICAgICAgICBsZXQgbGkgICAgICAgICAgICAgPSAkKHRoaXMpLmZpbmQoJ2xpJyk7XG4gICAgICAgICAgICAgICAgbGV0IHJlc2VsZWN0X2NsZWFyID0gJCh0aGlzKS5oYXNDbGFzcygncmVzZWxlY3QtY2xlYXInKTtcblxuICAgICAgICAgICAgICAgIC8vIEZvciBBdmFkYSBGSVhcbiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0Lmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0ID0gJCh0aGlzKS5wYXJlbnQoKS5maW5kKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0Jyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHJlc2VsZWN0X2NsZWFyKSB7XG4gICAgICAgICAgICAgICAgICAgICQodGhpcykub24oJ2NsaWNrJywgJ2xpOm5vdCguc2VsZWN0ZWQpOm5vdCgucmFkaW8tdmFyaWFibGUtaXRlbSknLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9ICQodGhpcykuZGF0YSgndmFsdWUnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdC52YWwodmFsdWUpLnRyaWdnZXIoJ2NoYW5nZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ2NsaWNrJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3QudHJpZ2dlcignZm9jdXNpbicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ3RvdWNoc3RhcnQnKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5vbignY2xpY2snLCAnbGkuc2VsZWN0ZWQ6bm90KC5yYWRpby12YXJpYWJsZS1pdGVtKScsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnZhbCgnJykudHJpZ2dlcignY2hhbmdlJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3QudHJpZ2dlcignY2xpY2snKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCdmb2N1c2luJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3QudHJpZ2dlcigndG91Y2hzdGFydCcpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBSQURJT1xuICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLm9uKCdjbGljaycsICdpbnB1dC53dnMtcmFkaW8tdmFyaWFibGUtaXRlbTpyYWRpbycsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS50cmlnZ2VyKCdjaGFuZ2UnKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5vbignY2hhbmdlJywgJ2lucHV0Lnd2cy1yYWRpby12YXJpYWJsZS1pdGVtOnJhZGlvJywgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9ICQodGhpcykudmFsKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkKHRoaXMpLnBhcmVudCgnLnJhZGlvLXZhcmlhYmxlLWl0ZW0nKS5oYXNDbGFzcygnc2VsZWN0ZWQnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdC52YWwoJycpLnRyaWdnZXIoJ2NoYW5nZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF8uZGVsYXkoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnByb3AoJ2NoZWNrZWQnLCBmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnZhbCh2YWx1ZSkudHJpZ2dlcignY2hhbmdlJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCdjbGljaycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ2ZvY3VzaW4nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCd0b3VjaHN0YXJ0Jyk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5vbignY2xpY2snLCAnbGk6bm90KC5yYWRpby12YXJpYWJsZS1pdGVtKScsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gJCh0aGlzKS5kYXRhKCd2YWx1ZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnZhbCh2YWx1ZSkudHJpZ2dlcignY2hhbmdlJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3QudHJpZ2dlcignY2xpY2snKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCdmb2N1c2luJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3QudHJpZ2dlcigndG91Y2hzdGFydCcpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBSYWRpb1xuICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLm9uKCdjaGFuZ2UnLCAnaW5wdXQud3ZzLXJhZGlvLXZhcmlhYmxlLWl0ZW06cmFkaW8nLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9ICQodGhpcykudmFsKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdC52YWwodmFsdWUpLnRyaWdnZXIoJ2NoYW5nZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ2NsaWNrJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3QudHJpZ2dlcignZm9jdXNpbicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ3RvdWNoc3RhcnQnKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gUmFkaW9cbiAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucGFyZW50KCdsaS5yYWRpby12YXJpYWJsZS1pdGVtJykucmVtb3ZlQ2xhc3MoJ3NlbGVjdGVkIGRpc2FibGVkJykuYWRkQ2xhc3MoJ3NlbGVjdGVkJylcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIF8uZGVsYXkoKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQudHJpZ2dlcignd29vX3ZhcmlhdGlvbl9zd2F0Y2hlc19pbml0JywgW3RoaXMsIHRoaXMucHJvZHVjdF92YXJpYXRpb25zXSlcbiAgICAgICAgICAgICAgICAkKGRvY3VtZW50KS50cmlnZ2VyKCd3b29fdmFyaWF0aW9uX3N3YXRjaGVzX2xvYWRlZCcsIFt0aGlzLl9lbGVtZW50LCB0aGlzLnByb2R1Y3RfdmFyaWF0aW9uc10pXG4gICAgICAgICAgICB9LCAxKVxuICAgICAgICB9XG5cbiAgICAgICAgbG9hZGVkKGlzX2FqYXgpIHtcbiAgICAgICAgICAgIGlmICghaXNfYWpheCkge1xuICAgICAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQub24oJ3dvb192YXJpYXRpb25fc3dhdGNoZXNfaW5pdCcsIGZ1bmN0aW9uIChldmVudCwgb2JqZWN0LCBwcm9kdWN0X3ZhcmlhdGlvbnMpIHtcblxuICAgICAgICAgICAgICAgICAgICBvYmplY3QuX2dlbmVyYXRlZCA9IHByb2R1Y3RfdmFyaWF0aW9ucy5yZWR1Y2UoKG9iaiwgdmFyaWF0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh2YXJpYXRpb24uYXR0cmlidXRlcykubWFwKChhdHRyaWJ1dGVfbmFtZSkgPT4ge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFvYmpbYXR0cmlidXRlX25hbWVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ialthdHRyaWJ1dGVfbmFtZV0gPSBbXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YXJpYXRpb24uYXR0cmlidXRlc1thdHRyaWJ1dGVfbmFtZV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW2F0dHJpYnV0ZV9uYW1lXS5wdXNoKHZhcmlhdGlvbi5hdHRyaWJ1dGVzW2F0dHJpYnV0ZV9uYW1lXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9iajtcbiAgICAgICAgICAgICAgICAgICAgfSwge30pO1xuXG4gICAgICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgndWwudmFyaWFibGUtaXRlbXMtd3JhcHBlcicpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpICAgICAgICAgICAgICAgPSAkKHRoaXMpLmZpbmQoJ2xpJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXR0cmlidXRlICAgICAgICA9ICQodGhpcykuZGF0YSgnYXR0cmlidXRlX25hbWUnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdHRyaWJ1dGVfdmFsdWVzID0gb2JqZWN0Ll9nZW5lcmF0ZWRbYXR0cmlidXRlXTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgbGkuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF0dHJpYnV0ZV92YWx1ZSA9ICQodGhpcykuYXR0cignZGF0YS12YWx1ZScpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFfLmlzRW1wdHkoYXR0cmlidXRlX3ZhbHVlcykgJiYgIWF0dHJpYnV0ZV92YWx1ZXMuaW5jbHVkZXMoYXR0cmlidXRlX3ZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnJlbW92ZUNsYXNzKCdzZWxlY3RlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmFkZENsYXNzKCdkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoJCh0aGlzKS5oYXNDbGFzcygncmFkaW8tdmFyaWFibGUtaXRlbScpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmZpbmQoJ2lucHV0Lnd2cy1yYWRpby12YXJpYWJsZS1pdGVtOnJhZGlvJykucHJvcCgnZGlzYWJsZWQnLCB0cnVlKS5wcm9wKCdjaGVja2VkJywgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmVzZXQoaXNfYWpheCkge1xuICAgICAgICAgICAgdGhpcy5fZWxlbWVudC5vbigncmVzZXRfZGF0YScsIGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgndWwudmFyaWFibGUtaXRlbXMtd3JhcHBlcicpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgbGkgPSAkKHRoaXMpLmZpbmQoJ2xpJyk7XG4gICAgICAgICAgICAgICAgICAgIGxpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpc19hamF4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5yZW1vdmVDbGFzcygnc2VsZWN0ZWQgZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoJCh0aGlzKS5oYXNDbGFzcygncmFkaW8tdmFyaWFibGUtaXRlbScpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgnaW5wdXQud3ZzLXJhZGlvLXZhcmlhYmxlLWl0ZW06cmFkaW8nKS5wcm9wKCdkaXNhYmxlZCcsIGZhbHNlKS5wcm9wKCdjaGVja2VkJywgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHVwZGF0ZShpc19hamF4KSB7XG4gICAgICAgICAgICB0aGlzLl9lbGVtZW50Lm9uKCd3b29jb21tZXJjZV92YXJpYXRpb25faGFzX2NoYW5nZWQnLCBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNfYWpheCkge1xuICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmZpbmQoJ3VsLnZhcmlhYmxlLWl0ZW1zLXdyYXBwZXInKS5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzZWxlY3RlZCA9ICcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMgID0gJCh0aGlzKS5zaWJsaW5ncygnc2VsZWN0Lndvby12YXJpYXRpb24tcmF3LXNlbGVjdCcpLmZpbmQoJ29wdGlvbicpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgID0gJCh0aGlzKS5zaWJsaW5ncygnc2VsZWN0Lndvby12YXJpYXRpb24tcmF3LXNlbGVjdCcpLmZpbmQoJ29wdGlvbjpzZWxlY3RlZCcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVxICAgICAgID0gJCh0aGlzKS5zaWJsaW5ncygnc2VsZWN0Lndvby12YXJpYXRpb24tcmF3LXNlbGVjdCcpLmZpbmQoJ29wdGlvbicpLmVxKDEpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpICAgICAgID0gJCh0aGlzKS5maW5kKCdsaScpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdHMgID0gW107XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZvciBBdmFkYSBGSVhcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zID0gJCh0aGlzKS5wYXJlbnQoKS5maW5kKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9ICQodGhpcykucGFyZW50KCkuZmluZCgnc2VsZWN0Lndvby12YXJpYXRpb24tcmF3LXNlbGVjdCcpLmZpbmQoJ29wdGlvbjpzZWxlY3RlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVxICAgICAgPSAkKHRoaXMpLnBhcmVudCgpLmZpbmQoJ3NlbGVjdC53b28tdmFyaWF0aW9uLXJhdy1zZWxlY3QnKS5maW5kKCdvcHRpb24nKS5lcSgxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoJCh0aGlzKS52YWwoKSAhPT0gJycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0cy5wdXNoKCQodGhpcykudmFsKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCA9IGN1cnJlbnQgPyBjdXJyZW50LnZhbCgpIDogZXEudmFsKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIF8uZGVsYXkoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSAkKHRoaXMpLmF0dHIoJ2RhdGEtdmFsdWUnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5yZW1vdmVDbGFzcygnc2VsZWN0ZWQgZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlID09PSBzZWxlY3RlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5hZGRDbGFzcygnc2VsZWN0ZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkKHRoaXMpLmhhc0NsYXNzKCdyYWRpby12YXJpYWJsZS1pdGVtJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmZpbmQoJ2lucHV0Lnd2cy1yYWRpby12YXJpYWJsZS1pdGVtOnJhZGlvJykucHJvcCgnZGlzYWJsZWQnLCBmYWxzZSkucHJvcCgnY2hlY2tlZCcsIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCAxKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIC8vIFdpdGhPdXQgQWpheCBVcGRhdGVcbiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQub24oJ3dvb2NvbW1lcmNlX3VwZGF0ZV92YXJpYXRpb25fdmFsdWVzJywgZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgJCh0aGlzKS5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkID0gJycsXG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zICA9ICQodGhpcykuc2libGluZ3MoJ3NlbGVjdC53b28tdmFyaWF0aW9uLXJhdy1zZWxlY3QnKS5maW5kKCdvcHRpb24nKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgID0gJCh0aGlzKS5zaWJsaW5ncygnc2VsZWN0Lndvby12YXJpYXRpb24tcmF3LXNlbGVjdCcpLmZpbmQoJ29wdGlvbjpzZWxlY3RlZCcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXEgICAgICAgPSAkKHRoaXMpLnNpYmxpbmdzKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uJykuZXEoMSksXG4gICAgICAgICAgICAgICAgICAgICAgICBsaSAgICAgICA9ICQodGhpcykuZmluZCgnbGknKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdHMgID0gW107XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gRm9yIEF2YWRhIEZJWFxuICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5sZW5ndGggPCAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zID0gJCh0aGlzKS5wYXJlbnQoKS5maW5kKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gJCh0aGlzKS5wYXJlbnQoKS5maW5kKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uOnNlbGVjdGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcSAgICAgID0gJCh0aGlzKS5wYXJlbnQoKS5maW5kKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uJykuZXEoMSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCQodGhpcykudmFsKCkgIT09ICcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0cy5wdXNoKCQodGhpcykudmFsKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkID0gY3VycmVudCA/IGN1cnJlbnQudmFsKCkgOiBlcS52YWwoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgXy5kZWxheShmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaS5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSAkKHRoaXMpLmF0dHIoJ2RhdGEtdmFsdWUnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnJlbW92ZUNsYXNzKCdzZWxlY3RlZCBkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChfLmNvbnRhaW5zKHNlbGVjdHMsIHZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnJlbW92ZUNsYXNzKCdkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUgPT09IHNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmFkZENsYXNzKCdzZWxlY3RlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCQodGhpcykuaGFzQ2xhc3MoJ3JhZGlvLXZhcmlhYmxlLWl0ZW0nKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgnaW5wdXQud3ZzLXJhZGlvLXZhcmlhYmxlLWl0ZW06cmFkaW8nKS5wcm9wKCdkaXNhYmxlZCcsIGZhbHNlKS5wcm9wKCdjaGVja2VkJywgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykuYWRkQ2xhc3MoJ2Rpc2FibGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkKHRoaXMpLmhhc0NsYXNzKCdyYWRpby12YXJpYWJsZS1pdGVtJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgnaW5wdXQud3ZzLXJhZGlvLXZhcmlhYmxlLWl0ZW06cmFkaW8nKS5wcm9wKCdkaXNhYmxlZCcsIHRydWUpLnByb3AoJ2NoZWNrZWQnLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSwgMSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuICAgICAqIGpRdWVyeVxuICAgICAqIC0tLS0tLS0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7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBL1FBO0FBQUE7QUFBQTtBQTBCQTtBQUNBO0FBQ0E7QUFDQTtBQTdCQTtBQUNBO0FBREE7QUFBQTtBQUNBO0FBaVJBOzs7Ozs7QUFNQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBOzs7O0EiLCJzb3VyY2VSb290IjoiIn0=
assets/js/frontend.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){function e(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var i={};e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=7)}({7:function(t,e,i){t.exports=i(8)},8:function(t,e,i){jQuery(function(t){Promise.resolve().then(function(){return i(9)}).then(function(){t(document).on("wc_variation_form",".variations_form",function(){t(this).WooVariationSwatches()}),t(document.body).on("post-load",function(){t(".variations_form").wc_variation_form()})})})},9:function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),o=function(t){var e={},i=function(){function i(a,o){n(this,i),this._element=t(a),this._config=t.extend({},e,o),this._generated={},this.product_variations=this._element.data("product_variations"),this.is_ajax_variation=!this.product_variations,this.init(this.is_ajax_variation),this.loaded(this.is_ajax_variation),this.update(this.is_ajax_variation),this.reset(this.is_ajax_variation),t(document).trigger("woo_variation_swatches",[this._element])}return a(i,[{key:"init",value:function(e){var i=this;this._element.find("ul.variable-items-wrapper").each(function(e,i){var n=t(this).siblings("select.woo-variation-raw-select"),a=(t(this).find("li"),t(this).hasClass("reselect-clear"));n.length<1&&(n=t(this).parent().find("select.woo-variation-raw-select")),a?(t(this).on("click","li:not(.selected)",function(e){e.preventDefault(),e.stopPropagation();var i=t(this).data("value");n.val(i).trigger("change"),n.trigger("click"),n.trigger("focusin"),n.trigger("touchstart")}),t(this).on("click","li.selected",function(t){t.preventDefault(),t.stopPropagation(),n.val("").trigger("change"),n.trigger("click"),n.trigger("focusin"),n.trigger("touchstart")})):t(this).on("click","li",function(e){e.preventDefault(),e.stopPropagation();var i=t(this).data("value");n.val(i).trigger("change"),n.trigger("click"),n.trigger("focusin"),n.trigger("touchstart")})}),_.delay(function(){i._element.trigger("woo_variation_swatches_init",[i,i.product_variations]),t(document).trigger("woo_variation_swatches_loaded",[i._element,i.product_variations])},1)}},{key:"loaded",value:function(e){e||this._element.on("woo_variation_swatches_init",function(e,i,n){i._generated=n.reduce(function(t,e){return Object.keys(e.attributes).map(function(i){t[i]||(t[i]=[]),e.attributes[i]&&t[i].push(e.attributes[i])}),t},{}),t(this).find("ul.variable-items-wrapper").each(function(){var e=t(this).find("li"),n=t(this).data("attribute_name"),a=i._generated[n];e.each(function(){var e=t(this).attr("data-value");_.isEmpty(a)||a.includes(e)||(t(this).removeClass("selected"),t(this).addClass("disabled"))})})})}},{key:"reset",value:function(e){this._element.on("reset_data",function(i){t(this).data("product_variations");t(this).find("ul.variable-items-wrapper").each(function(){t(this).find("li").each(function(){e||t(this).removeClass("selected disabled")})})})}},{key:"update",value:function(e){this._element.on("woocommerce_variation_has_changed",function(i){e&&t(this).find("ul.variable-items-wrapper").each(function(){var e="",i=t(this).siblings("select.woo-variation-raw-select").find("option"),n=t(this).siblings("select.woo-variation-raw-select").find("option:selected"),a=t(this).siblings("select.woo-variation-raw-select").find("option").eq(1),o=t(this).find("li"),r=[];i.length<1&&(i=t(this).parent().find("select.woo-variation-raw-select").find("option"),n=t(this).parent().find("select.woo-variation-raw-select").find("option:selected"),a=t(this).parent().find("select.woo-variation-raw-select").find("option").eq(1)),i.each(function(){""!==t(this).val()&&(r.push(t(this).val()),e=n?n.val():a.val())}),_.delay(function(){o.each(function(){var i=t(this).attr("data-value");t(this).removeClass("selected disabled"),i===e&&t(this).addClass("selected")})},1)})}),this._element.on("woocommerce_update_variation_values",function(e){t(this).find("ul.variable-items-wrapper").each(function(){var e="",i=t(this).siblings("select.woo-variation-raw-select").find("option"),n=t(this).siblings("select.woo-variation-raw-select").find("option:selected"),a=t(this).siblings("select.woo-variation-raw-select").find("option").eq(1),o=t(this).find("li"),r=[];i.length<1&&(i=t(this).parent().find("select.woo-variation-raw-select").find("option"),n=t(this).parent().find("select.woo-variation-raw-select").find("option:selected"),a=t(this).parent().find("select.woo-variation-raw-select").find("option").eq(1)),i.each(function(){""!==t(this).val()&&(r.push(t(this).val()),e=n?n.val():a.val())}),_.delay(function(){o.each(function(){var i=t(this).attr("data-value");t(this).removeClass("selected disabled"),_.contains(r,i)?(t(this).removeClass("disabled"),i===e&&t(this).addClass("selected")):t(this).addClass("disabled")})},1)})})}}],[{key:"_jQueryInterface",value:function(t){return this.each(function(){new i(this,t)})}}]),i}();return t.fn.WooVariationSwatches=i._jQueryInterface,t.fn.WooVariationSwatches.Constructor=i,t.fn.WooVariationSwatches.noConflict=function(){return t.fn.WooVariationSwatches=t.fn.WooVariationSwatches,i._jQueryInterface},i}(jQuery);e.default=o}});
1
+ !function(t){function i(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,i),n.l=!0,n.exports}var e={};i.m=t,i.c=e,i.d=function(t,e,a){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:a})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="",i(i.s=7)}({7:function(t,i,e){t.exports=e(8)},8:function(t,i,e){jQuery(function(t){Promise.resolve().then(function(){return e(9)}).then(function(){t(document).on("wc_variation_form",".variations_form",function(){t(this).WooVariationSwatches()}),t(document.body).on("post-load",function(){t(".variations_form").wc_variation_form()})})})},9:function(t,i,e){"use strict";function a(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var n=function(){function t(t,i){for(var e=0;e<i.length;e++){var a=i[e];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(i,e,a){return e&&t(i.prototype,e),a&&t(i,a),i}}(),r=function(t){var i={},e=function(){function e(n,r){a(this,e),this._element=t(n),this._config=t.extend({},i,r),this._generated={},this.product_variations=this._element.data("product_variations"),this.is_ajax_variation=!this.product_variations,this.init(this.is_ajax_variation),this.loaded(this.is_ajax_variation),this.update(this.is_ajax_variation),this.reset(this.is_ajax_variation),t(document).trigger("woo_variation_swatches",[this._element])}return n(e,[{key:"init",value:function(i){var e=this;this._element.find("ul.variable-items-wrapper").each(function(i,e){var a=t(this).siblings("select.woo-variation-raw-select"),n=(t(this).find("li"),t(this).hasClass("reselect-clear"));a.length<1&&(a=t(this).parent().find("select.woo-variation-raw-select")),n?(t(this).on("click","li:not(.selected):not(.radio-variable-item)",function(i){i.preventDefault(),i.stopPropagation();var e=t(this).data("value");a.val(e).trigger("change"),a.trigger("click"),a.trigger("focusin"),a.trigger("touchstart")}),t(this).on("click","li.selected:not(.radio-variable-item)",function(t){t.preventDefault(),t.stopPropagation(),a.val("").trigger("change"),a.trigger("click"),a.trigger("focusin"),a.trigger("touchstart")}),t(this).on("click","input.wvs-radio-variable-item:radio",function(i){i.preventDefault(),i.stopPropagation(),t(this).trigger("change")}),t(this).on("change","input.wvs-radio-variable-item:radio",function(i){var e=this;i.preventDefault(),i.stopPropagation();var n=t(this).val();t(this).parent(".radio-variable-item").hasClass("selected")?(a.val("").trigger("change"),_.delay(function(){t(e).prop("checked",!1)},1)):a.val(n).trigger("change"),a.trigger("click"),a.trigger("focusin"),a.trigger("touchstart")})):(t(this).on("click","li:not(.radio-variable-item)",function(i){i.preventDefault(),i.stopPropagation();var e=t(this).data("value");a.val(e).trigger("change"),a.trigger("click"),a.trigger("focusin"),a.trigger("touchstart")}),t(this).on("change","input.wvs-radio-variable-item:radio",function(i){i.preventDefault(),i.stopPropagation();var e=t(this).val();a.val(e).trigger("change"),a.trigger("click"),a.trigger("focusin"),a.trigger("touchstart"),t(this).parent("li.radio-variable-item").removeClass("selected disabled").addClass("selected")}))}),_.delay(function(){e._element.trigger("woo_variation_swatches_init",[e,e.product_variations]),t(document).trigger("woo_variation_swatches_loaded",[e._element,e.product_variations])},1)}},{key:"loaded",value:function(i){i||this._element.on("woo_variation_swatches_init",function(i,e,a){e._generated=a.reduce(function(t,i){return Object.keys(i.attributes).map(function(e){t[e]||(t[e]=[]),i.attributes[e]&&t[e].push(i.attributes[e])}),t},{}),t(this).find("ul.variable-items-wrapper").each(function(){var i=t(this).find("li"),a=t(this).data("attribute_name"),n=e._generated[a];i.each(function(){var i=t(this).attr("data-value");_.isEmpty(n)||n.includes(i)||(t(this).removeClass("selected"),t(this).addClass("disabled"),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!0).prop("checked",!1))})})})}},{key:"reset",value:function(i){this._element.on("reset_data",function(e){t(this).find("ul.variable-items-wrapper").each(function(){t(this).find("li").each(function(){i||(t(this).removeClass("selected disabled"),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!1).prop("checked",!1))})})})}},{key:"update",value:function(i){this._element.on("woocommerce_variation_has_changed",function(e){i&&t(this).find("ul.variable-items-wrapper").each(function(){var i="",e=t(this).siblings("select.woo-variation-raw-select").find("option"),a=t(this).siblings("select.woo-variation-raw-select").find("option:selected"),n=t(this).siblings("select.woo-variation-raw-select").find("option").eq(1),r=t(this).find("li"),o=[];e.length<1&&(e=t(this).parent().find("select.woo-variation-raw-select").find("option"),a=t(this).parent().find("select.woo-variation-raw-select").find("option:selected"),n=t(this).parent().find("select.woo-variation-raw-select").find("option").eq(1)),e.each(function(){""!==t(this).val()&&(o.push(t(this).val()),i=a?a.val():n.val())}),_.delay(function(){r.each(function(){var e=t(this).attr("data-value");t(this).removeClass("selected disabled"),e===i&&(t(this).addClass("selected"),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!1).prop("checked",!0))})},1)})}),this._element.on("woocommerce_update_variation_values",function(i){t(this).find("ul.variable-items-wrapper").each(function(){var i="",e=t(this).siblings("select.woo-variation-raw-select").find("option"),a=t(this).siblings("select.woo-variation-raw-select").find("option:selected"),n=t(this).siblings("select.woo-variation-raw-select").find("option").eq(1),r=t(this).find("li"),o=[];e.length<1&&(e=t(this).parent().find("select.woo-variation-raw-select").find("option"),a=t(this).parent().find("select.woo-variation-raw-select").find("option:selected"),n=t(this).parent().find("select.woo-variation-raw-select").find("option").eq(1)),e.each(function(){""!==t(this).val()&&(o.push(t(this).val()),i=a?a.val():n.val())}),_.delay(function(){r.each(function(){var e=t(this).attr("data-value");t(this).removeClass("selected disabled"),_.contains(o,e)?(t(this).removeClass("disabled"),e===i&&(t(this).addClass("selected"),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!1).prop("checked",!0))):(t(this).addClass("disabled"),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!0).prop("checked",!1))})},1)})})}}],[{key:"_jQueryInterface",value:function(t){return this.each(function(){new e(this,t)})}}]),e}();return t.fn.WooVariationSwatches=e._jQueryInterface,t.fn.WooVariationSwatches.Constructor=e,t.fn.WooVariationSwatches.noConflict=function(){return t.fn.WooVariationSwatches=t.fn.WooVariationSwatches,e._jQueryInterface},e}(jQuery);i.default=r}});
assets/js/wp-color-picker-alpha.js ADDED
@@ -0,0 +1,470 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**!
2
+ * wp-color-picker-alpha
3
+ *
4
+ * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
5
+ * Only run in input and is defined data alpha in true
6
+ *
7
+ * Version: 2.1.3
8
+ * https://github.com/kallookoo/wp-color-picker-alpha
9
+ * Licensed under the GPLv2 license.
10
+ */
11
+ (function ($) {
12
+ // Prevent double-init.
13
+ if ($.wp.wpColorPicker.prototype._hasAlpha) {
14
+ return;
15
+ }
16
+
17
+ // Variable for some backgrounds ( grid )
18
+ var image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==',
19
+
20
+ // html stuff for wpColorPicker copy of the original color-picker.js
21
+ _after = '<div class="wp-picker-holder" />',
22
+ _wrap = '<div class="wp-picker-container" />',
23
+ _button = '<input type="button" class="button button-small" />',
24
+
25
+ // Prevent CSS issues in < WordPress 4.9
26
+ _deprecated = wpColorPickerL10n.current !== undefined;
27
+ // Declare some global variables when is deprecated or not
28
+ if (_deprecated) {
29
+ var _before = '<a tabindex="0" class="wp-color-result" />';
30
+ } else {
31
+ var _before = '<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>',
32
+ _wrappingLabel = '<label></label>',
33
+ _wrappingLabelText = '<span class="screen-reader-text"></span>';
34
+ }
35
+ /**
36
+ * Overwrite Color
37
+ * for enable support rbga
38
+ */
39
+ Color.fn.toString = function () {
40
+ if (this._alpha < 1) return this.toCSS('rgba', this._alpha).replace(/\s+/g, '');
41
+
42
+ var hex = parseInt(this._color, 10).toString(16);
43
+
44
+ if (this.error) return '';
45
+
46
+ if (hex.length < 6) hex = ('00000' + hex).substr(-6);
47
+
48
+ return '#' + hex;
49
+ };
50
+
51
+ /**
52
+ * Overwrite wpColorPicker
53
+ */
54
+ $.widget('wp.wpColorPicker', $.wp.wpColorPicker, {
55
+ _hasAlpha: true,
56
+ /**
57
+ * @summary Creates the color picker.
58
+ *
59
+ * Creates the color picker, sets default values, css classes and wraps it all in HTML.
60
+ *
61
+ * @since 3.5.0
62
+ *
63
+ * @access private
64
+ *
65
+ * @returns {void}
66
+ */
67
+ _create: function _create() {
68
+ // Return early if Iris support is missing.
69
+ if (!$.support.iris) {
70
+ return;
71
+ }
72
+
73
+ var self = this,
74
+ el = self.element;
75
+
76
+ // Override default options with options bound to the element.
77
+ $.extend(self.options, el.data());
78
+
79
+ // Create a color picker which only allows adjustments to the hue.
80
+ if (self.options.type === 'hue') {
81
+ return self._createHueOnly();
82
+ }
83
+
84
+ // Bind the close event.
85
+ self.close = $.proxy(self.close, self);
86
+
87
+ self.initialValue = el.val();
88
+
89
+ // Add a CSS class to the input field.
90
+ el.addClass('wp-color-picker');
91
+
92
+ if (_deprecated) {
93
+ el.hide().wrap(_wrap);
94
+ self.wrap = el.parent();
95
+ self.toggler = $(_before).insertBefore(el).css({ backgroundColor: self.initialValue }).attr('title', wpColorPickerL10n.pick).attr('data-current', wpColorPickerL10n.current);
96
+ self.pickerContainer = $(_after).insertAfter(el);
97
+ self.button = $(_button).addClass('hidden');
98
+ } else {
99
+ /*
100
+ * Check if there's already a wrapping label, e.g. in the Customizer.
101
+ * If there's no label, add a default one to match the Customizer template.
102
+ */
103
+ if (!el.parent('label').length) {
104
+ // Wrap the input field in the default label.
105
+ el.wrap(_wrappingLabel);
106
+ // Insert the default label text.
107
+ self.wrappingLabelText = $(_wrappingLabelText).insertBefore(el).text(wpColorPickerL10n.defaultLabel);
108
+ }
109
+
110
+ /*
111
+ * At this point, either it's the standalone version or the Customizer
112
+ * one, we have a wrapping label to use as hook in the DOM, let's store it.
113
+ */
114
+ self.wrappingLabel = el.parent();
115
+
116
+ // Wrap the label in the main wrapper.
117
+ self.wrappingLabel.wrap(_wrap);
118
+ // Store a reference to the main wrapper.
119
+ self.wrap = self.wrappingLabel.parent();
120
+ // Set up the toggle button and insert it before the wrapping label.
121
+ self.toggler = $(_before).insertBefore(self.wrappingLabel).css({ backgroundColor: self.initialValue });
122
+ // Set the toggle button span element text.
123
+ self.toggler.find('.wp-color-result-text').text(wpColorPickerL10n.pick);
124
+ // Set up the Iris container and insert it after the wrapping label.
125
+ self.pickerContainer = $(_after).insertAfter(self.wrappingLabel);
126
+ // Store a reference to the Clear/Default button.
127
+ self.button = $(_button);
128
+ }
129
+
130
+ // Set up the Clear/Default button.
131
+ if (self.options.defaultColor) {
132
+ self.button.addClass('wp-picker-default').val(wpColorPickerL10n.defaultString);
133
+ if (!_deprecated) {
134
+ self.button.attr('aria-label', wpColorPickerL10n.defaultAriaLabel);
135
+ }
136
+ } else {
137
+ self.button.addClass('wp-picker-clear').val(wpColorPickerL10n.clear);
138
+ if (!_deprecated) {
139
+ self.button.attr('aria-label', wpColorPickerL10n.clearAriaLabel);
140
+ }
141
+ }
142
+
143
+ if (_deprecated) {
144
+ el.wrap('<span class="wp-picker-input-wrap" />').after(self.button);
145
+ } else {
146
+ // Wrap the wrapping label in its wrapper and append the Clear/Default button.
147
+ self.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(self.button);
148
+
149
+ /*
150
+ * The input wrapper now contains the label+input+Clear/Default button.
151
+ * Store a reference to the input wrapper: we'll use this to toggle
152
+ * the controls visibility.
153
+ */
154
+ self.inputWrapper = el.closest('.wp-picker-input-wrap');
155
+ }
156
+
157
+ el.iris({
158
+ target: self.pickerContainer,
159
+ hide: self.options.hide,
160
+ width: self.options.width,
161
+ mode: self.options.mode,
162
+ palettes: self.options.palettes,
163
+ /**
164
+ * @summary Handles the onChange event if one has been defined in the options.
165
+ *
166
+ * Handles the onChange event if one has been defined in the options and additionally
167
+ * sets the background color for the toggler element.
168
+ *
169
+ * @since 3.5.0
170
+ *
171
+ * @param {Event} event The event that's being called.
172
+ * @param {HTMLElement} ui The HTMLElement containing the color picker.
173
+ *
174
+ * @returns {void}
175
+ */
176
+ change: function change(event, ui) {
177
+ if (self.options.alpha) {
178
+ self.toggler.css({ 'background-image': 'url(' + image + ')' });
179
+ if (_deprecated) {
180
+ self.toggler.html('<span class="color-alpha" />');
181
+ } else {
182
+ self.toggler.css({
183
+ 'position': 'relative'
184
+ });
185
+ if (self.toggler.find('span.color-alpha').length == 0) {
186
+ self.toggler.append('<span class="color-alpha" />');
187
+ }
188
+ }
189
+
190
+ self.toggler.find('span.color-alpha').css({
191
+ 'width': '30px',
192
+ 'height': '24px',
193
+ 'position': 'absolute',
194
+ 'top': 0,
195
+ 'left': 0,
196
+ 'border-top-left-radius': '2px',
197
+ 'border-bottom-left-radius': '2px',
198
+ 'background': ui.color.toString()
199
+ });
200
+ } else {
201
+ self.toggler.css({ backgroundColor: ui.color.toString() });
202
+ }
203
+
204
+ if ($.isFunction(self.options.change)) {
205
+ self.options.change.call(this, event, ui);
206
+ }
207
+ }
208
+ });
209
+
210
+ el.val(self.initialValue);
211
+ self._addListeners();
212
+
213
+ // Force the color picker to always be closed on initial load.
214
+ if (!self.options.hide) {
215
+ self.toggler.click();
216
+ }
217
+ },
218
+ /**
219
+ * @summary Binds event listeners to the color picker.
220
+ *
221
+ * @since 3.5.0
222
+ *
223
+ * @access private
224
+ *
225
+ * @returns {void}
226
+ */
227
+ _addListeners: function _addListeners() {
228
+ var self = this;
229
+
230
+ /**
231
+ * @summary Prevent any clicks inside this widget from leaking to the top and closing it.
232
+ *
233
+ * @since 3.5.0
234
+ *
235
+ * @param {Event} event The event that's being called.
236
+ *
237
+ * @returs {void}
238
+ */
239
+ self.wrap.on('click.wpcolorpicker', function (event) {
240
+ event.stopPropagation();
241
+ });
242
+
243
+ /**
244
+ * @summary Open or close the color picker depending on the class.
245
+ *
246
+ * @since 3.5
247
+ */
248
+ self.toggler.click(function () {
249
+ if (self.toggler.hasClass('wp-picker-open')) {
250
+ self.close();
251
+ } else {
252
+ self.open();
253
+ }
254
+ });
255
+
256
+ /**
257
+ * @summary Checks if value is empty when changing the color in the color picker.
258
+ *
259
+ * Checks if value is empty when changing the color in the color picker.
260
+ * If so, the background color is cleared.
261
+ *
262
+ * @since 3.5.0
263
+ *
264
+ * @param {Event} event The event that's being called.
265
+ *
266
+ * @returns {void}
267
+ */
268
+ self.element.on('change', function (event) {
269
+ // Empty or Error = clear
270
+ if ($(this).val() === '' || self.element.hasClass('iris-error')) {
271
+ if (self.options.alpha) {
272
+ if (_deprecated) {
273
+ self.toggler.removeAttr('style');
274
+ }
275
+ self.toggler.find('span.color-alpha').css('backgroundColor', '');
276
+ } else {
277
+ self.toggler.css('backgroundColor', '');
278
+ }
279
+
280
+ // fire clear callback if we have one
281
+ if ($.isFunction(self.options.clear)) self.options.clear.call(this, event);
282
+ }
283
+ });
284
+
285
+ /**
286
+ * @summary Enables the user to clear or revert the color in the color picker.
287
+ *
288
+ * Enables the user to either clear the color in the color picker or revert back to the default color.
289
+ *
290
+ * @since 3.5.0
291
+ *
292
+ * @param {Event} event The event that's being called.
293
+ *
294
+ * @returns {void}
295
+ */
296
+ self.button.on('click', function (event) {
297
+ if ($(this).hasClass('wp-picker-clear')) {
298
+ self.element.val('');
299
+ if (self.options.alpha) {
300
+ if (_deprecated) {
301
+ self.toggler.removeAttr('style');
302
+ }
303
+ self.toggler.find('span.color-alpha').css('backgroundColor', '');
304
+ } else {
305
+ self.toggler.css('backgroundColor', '');
306
+ }
307
+
308
+ if ($.isFunction(self.options.clear)) self.options.clear.call(this, event);
309
+ } else if ($(this).hasClass('wp-picker-default')) {
310
+ self.element.val(self.options.defaultColor).change();
311
+ }
312
+ });
313
+ }
314
+ });
315
+
316
+ /**
317
+ * Overwrite iris
318
+ */
319
+ $.widget('a8c.iris', $.a8c.iris, {
320
+ _create: function _create() {
321
+ this._super();
322
+
323
+ // Global option for check is mode rbga is enabled
324
+ this.options.alpha = this.element.data('alpha') || false;
325
+
326
+ // Is not input disabled
327
+ if (!this.element.is(':input')) this.options.alpha = false;
328
+
329
+ if (typeof this.options.alpha !== 'undefined' && this.options.alpha) {
330
+ var self = this,
331
+ el = self.element,
332
+ _html = '<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>',
333
+ aContainer = $(_html).appendTo(self.picker.find('.iris-picker-inner')),
334
+ aSlider = aContainer.find('.iris-slider-offset-alpha'),
335
+ controls = {
336
+ aContainer: aContainer,
337
+ aSlider: aSlider
338
+ };
339
+
340
+ if (typeof el.data('custom-width') !== 'undefined') {
341
+ self.options.customWidth = parseInt(el.data('custom-width')) || 0;
342
+ } else {
343
+ self.options.customWidth = 15; // TO Make it same width
344
+ }
345
+
346
+ // Set default width for input reset
347
+ self.options.defaultWidth = el.width();
348
+
349
+ // Update width for input
350
+ if (self._color._alpha < 1 || self._color.toString().indexOf('rgb') != -1) el.width(parseInt(self.options.defaultWidth + self.options.customWidth));
351
+
352
+ // Push new controls
353
+ $.each(controls, function (k, v) {
354
+ self.controls[k] = v;
355
+ });
356
+
357
+ // Change size strip and add margin for sliders
358
+ self.controls.square.css({ 'margin-right': '0' });
359
+ var emptyWidth = self.picker.width() - self.controls.square.width() - 20,
360
+ stripsMargin = emptyWidth / 6,
361
+ stripsWidth = emptyWidth / 2 - stripsMargin;
362
+
363
+ $.each(['aContainer', 'strip'], function (k, v) {
364
+ self.controls[v].width(stripsWidth).css({ 'margin-left': stripsMargin + 'px' });
365
+ });
366
+
367
+ // Add new slider
368
+ self._initControls();
369
+
370
+ // For updated widget
371
+ self._change();
372
+ }
373
+ },
374
+ _initControls: function _initControls() {
375
+ this._super();
376
+
377
+ if (this.options.alpha) {
378
+ var self = this,
379
+ controls = self.controls;
380
+
381
+ controls.aSlider.slider({
382
+ orientation: 'vertical',
383
+ min: 0,
384
+ max: 100,
385
+ step: 1,
386
+ value: parseInt(self._color._alpha * 100),
387
+ slide: function slide(event, ui) {
388
+ // Update alpha value
389
+ self._color._alpha = parseFloat(ui.value / 100);
390
+ self._change.apply(self, arguments);
391
+ }
392
+ });
393
+ }
394
+ },
395
+ _change: function _change() {
396
+ this._super();
397
+
398
+ var self = this,
399
+ el = self.element;
400
+
401
+ if (this.options.alpha) {
402
+ var controls = self.controls,
403
+ alpha = parseInt(self._color._alpha * 100),
404
+ color = self._color.toRgb(),
405
+ gradient = ['rgb(' + color.r + ',' + color.g + ',' + color.b + ') 0%', 'rgba(' + color.r + ',' + color.g + ',' + color.b + ', 0) 100%'],
406
+ defaultWidth = self.options.defaultWidth,
407
+ customWidth = self.options.customWidth,
408
+ target = self.picker.closest('.wp-picker-container').find('.wp-color-result');
409
+
410
+ // Generate background slider alpha, only for CSS3 old browser fuck!! :)
411
+ controls.aContainer.css({ 'background': 'linear-gradient(to bottom, ' + gradient.join(', ') + '), url(' + image + ')' });
412
+
413
+ if (target.hasClass('wp-picker-open')) {
414
+ // Update alpha value
415
+ controls.aSlider.slider('value', alpha);
416
+
417
+ /**
418
+ * Disabled change opacity in default slider Saturation ( only is alpha enabled )
419
+ * and change input width for view all value
420
+ */
421
+ if (self._color._alpha < 1) {
422
+ controls.strip.attr('style', controls.strip.attr('style').replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g, 'rgb($1$3$5)'));
423
+ el.width(parseInt(defaultWidth + customWidth));
424
+ } else {
425
+ el.width(defaultWidth);
426
+ }
427
+ }
428
+ }
429
+
430
+ var reset = el.data('reset-alpha') || false;
431
+
432
+ if (reset) {
433
+ self.picker.find('.iris-palette-container').on('click.palette', '.iris-palette', function () {
434
+ self._color._alpha = 1;
435
+ self.active = 'external';
436
+ self._change();
437
+ });
438
+ }
439
+ },
440
+ _addInputListeners: function _addInputListeners(input) {
441
+ var self = this,
442
+ debounceTimeout = 100,
443
+ callback = function callback(event) {
444
+ var color = new Color(input.val()),
445
+ val = input.val();
446
+
447
+ input.removeClass('iris-error');
448
+ // we gave a bad color
449
+ if (color.error) {
450
+ // don't error on an empty input
451
+ if (val !== '') input.addClass('iris-error');
452
+ } else {
453
+ if (color.toString() !== self._color.toString()) {
454
+ // let's not do this on keyup for hex shortcodes
455
+ if (!(event.type === 'keyup' && val.match(/^[0-9a-fA-F]{3}$/))) self._setOption('color', color.toString());
456
+ }
457
+ }
458
+ };
459
+
460
+ input.on('change', callback).on('keyup', self._debounce(callback, debounceTimeout));
461
+
462
+ // If we initialized hidden, show on first focus. The rest is up to you.
463
+ if (self.options.hide) {
464
+ input.on('focus', function () {
465
+ self.show();
466
+ });
467
+ }
468
+ }
469
+ });
470
+ })(jQuery);
assets/js/wp-color-picker-alpha.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(t){if(!t.wp.wpColorPicker.prototype._hasAlpha){var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",r='<div class="wp-picker-holder" />',a='<div class="wp-picker-container" />',e='<input type="button" class="button button-small" />',i=void 0!==wpColorPickerL10n.current;if(i)var n='<a tabindex="0" class="wp-color-result" />';else var n='<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>',l="<label></label>",s='<span class="screen-reader-text"></span>';Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);return this.error?"":(t.length<6&&(t=("00000"+t).substr(-6)),"#"+t)},t.widget("wp.wpColorPicker",t.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(t.support.iris){var p=this,c=p.element;if(t.extend(p.options,c.data()),"hue"===p.options.type)return p._createHueOnly();p.close=t.proxy(p.close,p),p.initialValue=c.val(),c.addClass("wp-color-picker"),i?(c.hide().wrap(a),p.wrap=c.parent(),p.toggler=t(n).insertBefore(c).css({backgroundColor:p.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),p.pickerContainer=t(r).insertAfter(c),p.button=t(e).addClass("hidden")):(c.parent("label").length||(c.wrap(l),p.wrappingLabelText=t(s).insertBefore(c).text(wpColorPickerL10n.defaultLabel)),p.wrappingLabel=c.parent(),p.wrappingLabel.wrap(a),p.wrap=p.wrappingLabel.parent(),p.toggler=t(n).insertBefore(p.wrappingLabel).css({backgroundColor:p.initialValue}),p.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick),p.pickerContainer=t(r).insertAfter(p.wrappingLabel),p.button=t(e)),p.options.defaultColor?(p.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString),i||p.button.attr("aria-label",wpColorPickerL10n.defaultAriaLabel)):(p.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),i||p.button.attr("aria-label",wpColorPickerL10n.clearAriaLabel)),i?c.wrap('<span class="wp-picker-input-wrap" />').after(p.button):(p.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(p.button),p.inputWrapper=c.closest(".wp-picker-input-wrap")),c.iris({target:p.pickerContainer,hide:p.options.hide,width:p.options.width,mode:p.options.mode,palettes:p.options.palettes,change:function(r,a){p.options.alpha?(p.toggler.css({"background-image":"url("+o+")"}),i?p.toggler.html('<span class="color-alpha" />'):(p.toggler.css({position:"relative"}),0==p.toggler.find("span.color-alpha").length&&p.toggler.append('<span class="color-alpha" />')),p.toggler.find("span.color-alpha").css({width:"30px",height:"24px",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:a.color.toString()})):p.toggler.css({backgroundColor:a.color.toString()}),t.isFunction(p.options.change)&&p.options.change.call(this,r,a)}}),c.val(p.initialValue),p._addListeners(),p.options.hide||p.toggler.click()}},_addListeners:function(){var o=this;o.wrap.on("click.wpcolorpicker",function(t){t.stopPropagation()}),o.toggler.click(function(){o.toggler.hasClass("wp-picker-open")?o.close():o.open()}),o.element.on("change",function(r){(""===t(this).val()||o.element.hasClass("iris-error"))&&(o.options.alpha?(i&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,r))}),o.button.on("click",function(r){t(this).hasClass("wp-picker-clear")?(o.element.val(""),o.options.alpha?(i&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,r)):t(this).hasClass("wp-picker-default")&&o.element.val(o.options.defaultColor).change()})}}),t.widget("a8c.iris",t.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha){var o=this,r=o.element,a=t('<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>').appendTo(o.picker.find(".iris-picker-inner")),e=a.find(".iris-slider-offset-alpha"),i={aContainer:a,aSlider:e};void 0!==r.data("custom-width")?o.options.customWidth=parseInt(r.data("custom-width"))||0:o.options.customWidth=15,o.options.defaultWidth=r.width(),(o._color._alpha<1||-1!=o._color.toString().indexOf("rgb"))&&r.width(parseInt(o.options.defaultWidth+o.options.customWidth)),t.each(i,function(t,r){o.controls[t]=r}),o.controls.square.css({"margin-right":"0"});var n=o.picker.width()-o.controls.square.width()-20,l=n/6,s=n/2-l;t.each(["aContainer","strip"],function(t,r){o.controls[r].width(s).css({"margin-left":l+"px"})}),o._initControls(),o._change()}},_initControls:function(){if(this._super(),this.options.alpha){var t=this;t.controls.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,r){t._color._alpha=parseFloat(r.value/100),t._change.apply(t,arguments)}})}},_change:function(){this._super();var t=this,r=t.element;if(this.options.alpha){var a=t.controls,e=parseInt(100*t._color._alpha),i=t._color.toRgb(),n=["rgb("+i.r+","+i.g+","+i.b+") 0%","rgba("+i.r+","+i.g+","+i.b+", 0) 100%"],l=t.options.defaultWidth,s=t.options.customWidth,p=t.picker.closest(".wp-picker-container").find(".wp-color-result");a.aContainer.css({background:"linear-gradient(to bottom, "+n.join(", ")+"), url("+o+")"}),p.hasClass("wp-picker-open")&&(a.aSlider.slider("value",e),t._color._alpha<1?(a.strip.attr("style",a.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),r.width(parseInt(l+s))):r.width(l))}(r.data("reset-alpha")||!1)&&t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){t._color._alpha=1,t.active="external",t._change()})},_addInputListeners:function(t){var o=this,r=function(r){var a=new Color(t.val()),e=t.val();t.removeClass("iris-error"),a.error?""!==e&&t.addClass("iris-error"):a.toString()!==o._color.toString()&&("keyup"===r.type&&e.match(/^[0-9a-fA-F]{3}$/)||o._setOption("color",a.toString()))};t.on("change",r).on("keyup",o._debounce(r,100)),o.options.hide&&t.on("focus",function(){o.show()})}})}}(jQuery);
assets/js/wvs-customize-alpha-color-control.js ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global wp*/
2
+ var WVS_Customize_Alpha_Color_Control = {
3
+ ready: function ready() {
4
+
5
+ var control = this,
6
+ updating = false,
7
+ picker = void 0;
8
+
9
+ picker = this.container.find('.wvs-color-picker');
10
+ picker.val(control.setting()).wpColorPicker({
11
+ change: function change() {
12
+ updating = true;
13
+ control.setting.set(picker.wpColorPicker('color'));
14
+ updating = false;
15
+ },
16
+ clear: function clear() {
17
+ updating = true;
18
+ control.setting.set('');
19
+ updating = false;
20
+ }
21
+ });
22
+
23
+ control.setting.bind(function (value) {
24
+ // Bail if the update came from the control itself.
25
+ if (updating) {
26
+ return;
27
+ }
28
+ picker.val(value);
29
+ picker.wpColorPicker('color', value);
30
+ });
31
+
32
+ // Collapse color picker when hitting Esc instead of collapsing the current section.
33
+ control.container.on('keydown', function (event) {
34
+ var pickerContainer = void 0;
35
+ if (27 !== event.which) {
36
+ // Esc.
37
+ return;
38
+ }
39
+ pickerContainer = control.container.find('.wp-picker-container');
40
+ if (pickerContainer.hasClass('wp-picker-active')) {
41
+ picker.wpColorPicker('close');
42
+ control.container.find('.wp-color-result').focus();
43
+ event.stopPropagation(); // Prevent section from being collapsed.
44
+ }
45
+ });
46
+ }
47
+ };
48
+
49
+ wp.customize.controlConstructor['wvs-alpha-color'] = wp.customize.Control.extend(WVS_Customize_Alpha_Color_Control);
assets/js/wvs-customize-alpha-color-control.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var WVS_Customize_Alpha_Color_Control={ready:function(){var o=this,n=!1,t=void 0;t=this.container.find(".wvs-color-picker"),t.val(o.setting()).wpColorPicker({change:function(){n=!0,o.setting.set(t.wpColorPicker("color")),n=!1},clear:function(){n=!0,o.setting.set(""),n=!1}}),o.setting.bind(function(o){n||(t.val(o),t.wpColorPicker("color",o))}),o.container.on("keydown",function(n){var i=void 0;27===n.which&&(i=o.container.find(".wp-picker-container"),i.hasClass("wp-picker-active")&&(t.wpColorPicker("close"),o.container.find(".wp-color-result").focus(),n.stopPropagation()))})}};wp.customize.controlConstructor["wvs-alpha-color"]=wp.customize.Control.extend(WVS_Customize_Alpha_Color_Control);
includes/class-wvs-customize-alpha-color-control.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined( 'ABSPATH' ) or die( 'Keep Silent' );
3
+
4
+ /* $wp_customize->add_control( new WVS_Customize_Alpha_Color_Control( $wp_customize, 'id', array(
5
+ 'label' => esc_html__( 'Label', 'textdomain' ),
6
+ 'description' => esc_html__( 'Description', 'textdomain' ),
7
+ 'section' => 'section'
8
+ ) ) );*/
9
+
10
+ if ( ! class_exists( 'WVS_Customize_Alpha_Color_Control' ) ):
11
+ class WVS_Customize_Alpha_Color_Control extends WP_Customize_Control {
12
+
13
+ public $type = 'wvs-alpha-color';
14
+
15
+ public function __construct( $manager, $id, $args = array() ) {
16
+ parent::__construct( $manager, $id, $args );
17
+ }
18
+
19
+ public function enqueue() {
20
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
21
+ wp_enqueue_script( 'wvs-customize-alpha-color-control', woo_variation_swatches()->assets_uri( "/js/wvs-customize-alpha-color-control{$suffix}.js" ), array( 'wp-color-picker-alpha' ), '', TRUE );
22
+ }
23
+
24
+ protected function render_content() {
25
+ ?>
26
+ <?php if ( ! empty( $this->label ) ) : ?>
27
+ <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
28
+ <?php endif; ?>
29
+
30
+ <?php if ( ! empty( $this->description ) ) : ?>
31
+ <span class="description customize-control-description"><?php echo wp_kses_post( $this->description ); ?></span>
32
+ <?php endif; ?>
33
+
34
+ <div class="customize-control-content">
35
+ <label>
36
+ <input <?php $this->link(); ?> class="color-picker-hex wvs-color-picker" data-alpha="true" type="text" value="<?php echo $this->value() ?>" data-default-color="<?php echo $this->value() ?>"/>
37
+ </label>
38
+ </div>
39
+ <?php
40
+ }
41
+ }
42
+ endif;
includes/class-wvs-customizer.php CHANGED
@@ -24,6 +24,7 @@
24
 
25
  public function includes() {
26
  require_once $this->_plugin_class->include_path( 'class-wvs-customize-heading.php' );
 
27
  }
28
 
29
  public function add_panel( $wp_customize ) {
@@ -79,6 +80,10 @@
79
  break;
80
  }
81
 
 
 
 
 
82
  $wp_customize->add_setting( $setting_id, $setting_options );
83
 
84
  // Add Control
@@ -96,14 +101,19 @@
96
  break;
97
  }
98
 
99
- $wp_customize->add_control( $setting_id, $control_options );
100
-
 
 
 
 
 
101
  }
102
  }
103
  }
104
  }
105
 
106
- function sanitize_checkbox( $value ) {
107
  $filter = filter_var( $value, FILTER_VALIDATE_BOOLEAN );
108
 
109
  return is_null( $filter ) ? 0 : $filter;
24
 
25
  public function includes() {
26
  require_once $this->_plugin_class->include_path( 'class-wvs-customize-heading.php' );
27
+ require_once $this->_plugin_class->include_path( 'class-wvs-customize-alpha-color-control.php' );
28
  }
29
 
30
  public function add_panel( $wp_customize ) {
80
  break;
81
  }
82
 
83
+ if ( isset( $field[ 'customize_sanitize_callback' ] ) && is_callable( $field[ 'customize_sanitize_callback' ] ) ) {
84
+ $setting_options[ 'sanitize_callback' ] = $field[ 'customize_sanitize_callback' ];
85
+ }
86
+
87
  $wp_customize->add_setting( $setting_id, $setting_options );
88
 
89
  // Add Control
101
  break;
102
  }
103
 
104
+ if ( isset( $field[ 'customize_control_class' ] ) && class_exists( $field[ 'customize_control_class' ] ) ) {
105
+ $class = $field[ 'customize_control_class' ];
106
+ unset( $control_options[ 'type' ] );
107
+ $wp_customize->add_control( new $class( $wp_customize, $setting_id, $control_options ) );
108
+ } else {
109
+ $wp_customize->add_control( $setting_id, $control_options );
110
+ }
111
  }
112
  }
113
  }
114
  }
115
 
116
+ public function sanitize_checkbox( $value ) {
117
  $filter = filter_var( $value, FILTER_VALIDATE_BOOLEAN );
118
 
119
  return is_null( $filter ) ? 0 : $filter;
includes/class-wvs-settings-api.php CHANGED
@@ -65,6 +65,7 @@
65
  var target = $(this).data('target');
66
  $(this).addClass('nav-tab-active').siblings().removeClass('nav-tab-active');
67
  $('#' + target).show().siblings().hide();
 
68
  });
69
  });
70
  </script>
@@ -102,6 +103,22 @@
102
  )
103
  );
104
  $wp_admin_bar->add_menu( $args );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  }
106
 
107
  public function plugin_action_links( $links ) {
@@ -248,6 +265,10 @@
248
  $this->number_field_callback( $field );
249
  break;
250
 
 
 
 
 
251
  case 'post_select':
252
  $this->post_select_field_callback( $field );
253
  break;
@@ -330,6 +351,16 @@
330
  echo $html;
331
  }
332
 
 
 
 
 
 
 
 
 
 
 
333
  public function number_field_callback( $args ) {
334
  $value = esc_attr( $this->get_option( $args[ 'id' ] ) );
335
  $size = isset( $args[ 'size' ] ) && ! is_null( $args[ 'size' ] ) ? $args[ 'size' ] : 'small';
@@ -368,7 +399,7 @@
368
  if ( ! isset( $tab[ 'active' ] ) ) {
369
  $tab[ 'active' ] = FALSE;
370
  }
371
- $is_active = $tab[ 'active' ];
372
  ?>
373
 
374
  <div id="<?php echo $tab[ 'id' ] ?>"
@@ -382,6 +413,7 @@
382
  <?php endforeach; ?>
383
  </div>
384
  <?php
 
385
  submit_button();
386
  ?>
387
  </form>
@@ -389,18 +421,35 @@
389
  <?php
390
  }
391
 
 
 
 
 
392
  public function options_tabs() {
393
  ?>
394
  <h2 class="nav-tab-wrapper wp-clearfix">
395
  <?php foreach ( $this->fields as $tabs ): ?>
396
- <a data-target="<?php echo $tabs[ 'id' ] ?>"
397
- class="wvs-setting-nav-tab nav-tab <?php echo ( isset( $tabs[ 'active' ] ) and $tabs[ 'active' ] ) ? 'nav-tab-active' : '' ?> "
398
- href="#<?php echo $tabs[ 'id' ] ?>"><?php echo $tabs[ 'title' ] ?></a>
399
  <?php endforeach; ?>
400
  </h2>
401
  <?php
402
  }
403
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
404
  private function do_settings_sections( $page ) {
405
  global $wp_settings_sections, $wp_settings_fields;
406
 
65
  var target = $(this).data('target');
66
  $(this).addClass('nav-tab-active').siblings().removeClass('nav-tab-active');
67
  $('#' + target).show().siblings().hide();
68
+ $('#_last_active_tab').val(target)
69
  });
70
  });
71
  </script>
103
  )
104
  );
105
  $wp_admin_bar->add_menu( $args );
106
+
107
+ if ( ! is_admin() && class_exists( 'WooCommerce' ) && ( is_singular( 'product' ) || is_shop() ) ) {
108
+ $wp_admin_bar->add_menu( array(
109
+ 'id' => 'wvs-clear-transient',
110
+ 'title' => esc_html__( 'Clear transient', 'woo-variation-swatches' ),
111
+ 'href' => esc_url( remove_query_arg( array( 'variation_id', 'remove_item', 'add-to-cart', 'added-to-cart' ), add_query_arg( 'wvs_clear_transient', '' ) ) ),
112
+ 'parent' => $this->settings_name,
113
+ 'meta' => array(
114
+ 'class' => sprintf( '%s-admin-toolbar-cache', $this->slug )
115
+ )
116
+ ) );
117
+
118
+
119
+ }
120
+
121
+ do_action( 'wvs_admin_bar_menu', $wp_admin_bar, $this->settings_name );
122
  }
123
 
124
  public function plugin_action_links( $links ) {
265
  $this->number_field_callback( $field );
266
  break;
267
 
268
+ case 'color':
269
+ $this->color_field_callback( $field );
270
+ break;
271
+
272
  case 'post_select':
273
  $this->post_select_field_callback( $field );
274
  break;
351
  echo $html;
352
  }
353
 
354
+ public function color_field_callback( $args ) {
355
+ $value = esc_attr( $this->get_option( $args[ 'id' ] ) );
356
+ // $size = isset( $args[ 'size' ] ) && ! is_null( $args[ 'size' ] ) ? $args[ 'size' ] : 'regular';
357
+ $alpha = isset( $args[ 'alpha' ] ) && $args[ 'alpha' ] === TRUE ? ' data-alpha="true"' : '';
358
+ $html = sprintf( '<input type="text" %1$s class="wvs-color-picker" id="%2$s-field" name="%4$s[%2$s]" value="%3$s" data-default-color="%3$s" />', $alpha, $args[ 'id' ], $value, $this->settings_name );
359
+ $html .= $this->get_field_description( $args );
360
+
361
+ echo $html;
362
+ }
363
+
364
  public function number_field_callback( $args ) {
365
  $value = esc_attr( $this->get_option( $args[ 'id' ] ) );
366
  $size = isset( $args[ 'size' ] ) && ! is_null( $args[ 'size' ] ) ? $args[ 'size' ] : 'small';
399
  if ( ! isset( $tab[ 'active' ] ) ) {
400
  $tab[ 'active' ] = FALSE;
401
  }
402
+ $is_active = ( $this->get_last_active_tab() == $tab[ 'id' ] );
403
  ?>
404
 
405
  <div id="<?php echo $tab[ 'id' ] ?>"
413
  <?php endforeach; ?>
414
  </div>
415
  <?php
416
+ $this->last_tab_input();
417
  submit_button();
418
  ?>
419
  </form>
421
  <?php
422
  }
423
 
424
+ private function last_tab_input() {
425
+ printf( '<input type="hidden" id="_last_active_tab" name="%s[_last_active_tab]" value="%s">', $this->settings_name, $this->get_last_active_tab() );
426
+ }
427
+
428
  public function options_tabs() {
429
  ?>
430
  <h2 class="nav-tab-wrapper wp-clearfix">
431
  <?php foreach ( $this->fields as $tabs ): ?>
432
+ <a data-target="<?php echo $tabs[ 'id' ] ?>" class="wvs-setting-nav-tab nav-tab <?php echo ( $this->get_last_active_tab() == $tabs[ 'id' ] ) ? 'nav-tab-active' : '' ?> " href="#<?php echo $tabs[ 'id' ] ?>"><?php echo $tabs[ 'title' ] ?></a>
 
 
433
  <?php endforeach; ?>
434
  </h2>
435
  <?php
436
  }
437
 
438
+ private function get_last_active_tab() {
439
+ $last_tab = trim( $this->get_option( '_last_active_tab' ) );
440
+
441
+ $default_tab = '';
442
+ foreach ( $this->fields as $tabs ) {
443
+ if ( isset( $tabs[ 'active' ] ) && $tabs[ 'active' ] ) {
444
+ $default_tab = $tabs[ 'id' ];
445
+ break;
446
+ }
447
+ }
448
+
449
+ return ! empty( $last_tab ) ? $last_tab : $default_tab;
450
+
451
+ }
452
+
453
  private function do_settings_sections( $page ) {
454
  global $wp_settings_sections, $wp_settings_fields;
455
 
includes/class-wvs-term-meta.php CHANGED
@@ -47,7 +47,6 @@
47
  $attribute = wvs_get_wc_attribute_taxonomy( $this->taxonomy );
48
  $fields = wvs_taxonomy_meta_fields( $attribute->attribute_type );
49
  $available_types = wvs_available_attributes_types( $attribute->attribute_type );
50
-
51
  if ( is_callable( $available_types[ 'preview' ] ) ) {
52
  call_user_func( $available_types[ 'preview' ], $term_id, $attribute, $fields );
53
  }
@@ -163,7 +162,7 @@
163
  case 'color':
164
  ob_start();
165
  ?>
166
- <input name="<?php echo $field[ 'id' ] ?>" id="<?php echo $field[ 'id' ] ?>" type="text" class="wvs-color-picker" value="<?php echo $field[ 'value' ] ?>" size="<?php echo $field[ 'size' ] ?>" <?php echo $field[ 'required' ] . $field[ 'placeholder' ] ?>>
167
  <?php
168
  echo ob_get_clean();
169
  break;
@@ -232,6 +231,11 @@
232
  }
233
 
234
  private static function field_start( $field, $term ) {
 
 
 
 
 
235
 
236
  $depends = empty( $field[ 'dependency' ] ) ? '' : "data-depends='" . wp_json_encode( $field[ 'dependency' ] ) . "'";
237
 
47
  $attribute = wvs_get_wc_attribute_taxonomy( $this->taxonomy );
48
  $fields = wvs_taxonomy_meta_fields( $attribute->attribute_type );
49
  $available_types = wvs_available_attributes_types( $attribute->attribute_type );
 
50
  if ( is_callable( $available_types[ 'preview' ] ) ) {
51
  call_user_func( $available_types[ 'preview' ], $term_id, $attribute, $fields );
52
  }
162
  case 'color':
163
  ob_start();
164
  ?>
165
+ <input name="<?php echo $field[ 'id' ] ?>" id="<?php echo $field[ 'id' ] ?>" type="text" class="wvs-color-picker" value="<?php echo $field[ 'value' ] ?>" data-default-color="<?php echo $field[ 'value' ] ?>" size="<?php echo $field[ 'size' ] ?>" <?php echo $field[ 'required' ] . $field[ 'placeholder' ] ?>>
166
  <?php
167
  echo ob_get_clean();
168
  break;
231
  }
232
 
233
  private static function field_start( $field, $term ) {
234
+ // Example:
235
+ // http://emranahmed.github.io/Form-Field-Dependency/
236
+ /*'dependency' => array(
237
+ array( '#show_tooltip' => array( 'type' => 'equal', 'value' => 'yes' ) )
238
+ )*/
239
 
240
  $depends = empty( $field[ 'dependency' ] ) ? '' : "data-depends='" . wp_json_encode( $field[ 'dependency' ] ) . "'";
241
 
includes/functions.php CHANGED
@@ -2,6 +2,20 @@
2
 
3
  defined( 'ABSPATH' ) or die( 'Keep Quit' );
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  //-------------------------------------------------------------------------------
6
  // Available Product Attribute Types
7
  //-------------------------------------------------------------------------------
@@ -103,11 +117,11 @@
103
 
104
  do_action( 'before_wvs_settings', woo_variation_swatches() );
105
 
106
- woo_variation_swatches()->add_setting( 'general', esc_html__( 'General', 'woo-variation-swatches' ), array(
107
  array(
108
- 'title' => esc_html__( 'Display Section', 'woo-variation-swatches' ),
109
- 'desc' => esc_html__( 'Simply change some visual styles', 'woo-variation-swatches' ),
110
- 'fields' => apply_filters( 'wvs_general_setting_fields', array(
111
  array(
112
  'id' => 'tooltip',
113
  'type' => 'checkbox',
@@ -122,6 +136,26 @@
122
  'desc' => esc_html__( 'Enable / Disable plugin default stylesheet', 'woo-variation-swatches' ),
123
  'default' => TRUE
124
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  array(
126
  'id' => 'clear_on_reselect',
127
  'type' => 'checkbox',
@@ -138,33 +172,17 @@
138
  'min' => 1,
139
  'max' => 100,
140
  ),
141
- array(
142
- 'id' => 'style',
143
- 'type' => 'radio',
144
- 'title' => esc_html__( 'Shape style', 'woo-variation-swatches' ),
145
- 'desc' => esc_html__( 'Attribute Shape Style', 'woo-variation-swatches' ),
146
- 'options' => array(
147
- 'rounded' => esc_html__( 'Rounded Shape', 'woo-variation-swatches' ),
148
- 'squared' => esc_html__( 'Squared Shape', 'woo-variation-swatches' )
149
- ),
150
- 'default' => 'rounded'
151
- ),
152
  array(
153
  'id' => 'attribute_image_size',
154
  'type' => 'select',
155
  'title' => esc_html__( 'Attribute image size', 'woo-variation-swatches' ),
156
  'desc' => has_filter( 'wvs_product_attribute_image_size' ) ? __( '<span style="color: red">Attribute image size changed by <code>wvs_product_attribute_image_size</code> hook. So this option will not apply any effect.</span>', 'woo-variation-swatches' ) : esc_html__( 'Choose attribute image size', 'woo-variation-swatches' ),
157
- 'options' => array_reduce( get_intermediate_image_sizes(), function ( $carry, $item ) {
158
- $carry[ $item ] = ucwords( str_ireplace( array( '-', '_' ), ' ', $item ) );
159
-
160
- return $carry;
161
- }, array() ),
162
-
163
  'default' => 'thumbnail'
164
  ),
165
  ) )
166
  )
167
- ), apply_filters( 'wvs_general_setting_default_active', TRUE ) );
168
 
169
  do_action( 'after_wvs_settings', woo_variation_swatches() );
170
  }
@@ -216,7 +234,7 @@
216
  function wvs_add_product_taxonomy_meta() {
217
 
218
  $fields = wvs_taxonomy_meta_fields();
219
- $meta_added_for = apply_filters( 'wvs_product_taxonomy_meta_for', array( 'color', 'image' ) );
220
 
221
  if ( function_exists( 'wc_get_attribute_taxonomies' ) ):
222
 
@@ -327,7 +345,86 @@
327
  function wvs_wc_product_has_attribute_type( $type, $attribute_name ) {
328
  $attribute = wvs_get_wc_attribute_taxonomy( $attribute_name );
329
 
330
- return isset( $attribute->attribute_type ) && ( $attribute->attribute_type == $type );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331
  }
332
  endif;
333
 
@@ -346,14 +443,16 @@
346
  'name' => '',
347
  'id' => '',
348
  'class' => '',
 
349
  'show_option_none' => esc_html__( 'Choose an option', 'woo-variation-swatches' )
350
  ) );
351
 
 
352
  $options = $args[ 'options' ];
353
  $product = $args[ 'product' ];
354
  $attribute = $args[ 'attribute' ];
355
  $name = $args[ 'name' ] ? $args[ 'name' ] : wc_variation_attribute_name( $attribute );
356
- $id = $args[ 'id' ] ? $args[ 'id' ] : sanitize_title( $attribute ) . $product->get_id();
357
  $class = $args[ 'class' ];
358
  $show_option_none = $args[ 'show_option_none' ] ? TRUE : FALSE;
359
  $show_option_none_text = $args[ 'show_option_none' ] ? $args[ 'show_option_none' ] : esc_html__( 'Choose an option', 'woocommerce' ); // We'll do our best to hide the placeholder, but we'll need to show something when resetting options.
@@ -365,7 +464,6 @@
365
 
366
  if ( $product && taxonomy_exists( $attribute ) ) {
367
  echo '<select id="' . esc_attr( $id ) . '" class="' . esc_attr( $class ) . ' hide woo-variation-raw-select" style="display:none" name="' . esc_attr( $name ) . '" data-attribute_name="' . esc_attr( wc_variation_attribute_name( $attribute ) ) . '" data-show_option_none="' . ( $show_option_none ? 'yes' : 'no' ) . '">';
368
-
369
  } else {
370
  echo '<select id="' . esc_attr( $id ) . '" class="' . esc_attr( $class ) . '" name="' . esc_attr( $name ) . '" data-attribute_name="' . esc_attr( wc_variation_attribute_name( $attribute ) ) . '" data-show_option_none="' . ( $show_option_none ? 'yes' : 'no' ) . '">';
371
  }
@@ -395,26 +493,10 @@
395
 
396
  echo '</select>';
397
 
398
- $clear_on_reselect = woo_variation_swatches()->get_option( 'clear_on_reselect' ) ? 'reselect-clear' : '';
399
- printf( '<ul class="list-inline variable-items-wrapper color-variable-wrapper %s" data-attribute_name="%s">', $clear_on_reselect, esc_attr( wc_variation_attribute_name( $attribute ) ) );
 
400
 
401
- if ( ! empty( $options ) ) {
402
- if ( $product && taxonomy_exists( $attribute ) ) {
403
- $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
404
-
405
- foreach ( $terms as $term ) {
406
- if ( in_array( $term->slug, $options ) ) {
407
- $get_term_meta = sanitize_hex_color( get_term_meta( $term->term_id, 'product_attribute_color', TRUE ) );
408
- $selected_class = ( sanitize_title( $args[ 'selected' ] ) == $term->slug ) ? 'selected' : '';
409
- $tooltip = apply_filters( 'wvs_color_variable_item_tooltip', $term->name, $term, $args );
410
- ?>
411
- <li data-wvstooltip="<?php echo esc_attr( $tooltip ) ?>" class="variable-item color-variable-item color-variable-item-<?php echo $term->slug ?> <?php echo $selected_class ?>" title="<?php echo esc_html( $term->name ) ?>" data-value="<?php echo esc_attr( $term->slug ) ?>"><span style="background-color:<?php echo esc_attr( $get_term_meta ) ?>;"></span></li>
412
- <?php
413
- }
414
- }
415
- }
416
- }
417
- echo '</ul>';
418
  }
419
  endif;
420
 
@@ -433,14 +515,16 @@
433
  'name' => '',
434
  'id' => '',
435
  'class' => '',
 
436
  'show_option_none' => esc_html__( 'Choose an option', 'woo-variation-swatches' )
437
  ) );
438
 
 
439
  $options = $args[ 'options' ];
440
  $product = $args[ 'product' ];
441
  $attribute = $args[ 'attribute' ];
442
  $name = $args[ 'name' ] ? $args[ 'name' ] : wc_variation_attribute_name( $attribute );
443
- $id = $args[ 'id' ] ? $args[ 'id' ] : sanitize_title( $attribute ) . $product->get_id();
444
  $class = $args[ 'class' ];
445
  $show_option_none = $args[ 'show_option_none' ] ? TRUE : FALSE;
446
  $show_option_none_text = $args[ 'show_option_none' ] ? $args[ 'show_option_none' ] : esc_html__( 'Choose an option', 'woocommerce' ); // We'll do our best to hide the placeholder, but we'll need to show something when resetting options.
@@ -483,29 +567,9 @@
483
 
484
  echo '</select>';
485
 
486
- $clear_on_reselect = woo_variation_swatches()->get_option( 'clear_on_reselect' ) ? 'reselect-clear' : '';
487
- printf( '<ul class="list-inline variable-items-wrapper image-variable-wrapper %s" data-attribute_name="%s">', $clear_on_reselect, esc_attr( wc_variation_attribute_name( $attribute ) ) );
488
 
489
- if ( ! empty( $options ) ) {
490
- if ( $product && taxonomy_exists( $attribute ) ) {
491
- $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
492
-
493
- foreach ( $terms as $term ) {
494
- if ( in_array( $term->slug, $options ) ) {
495
- $attachment_id = absint( get_term_meta( $term->term_id, 'product_attribute_image', TRUE ) );
496
- $image_size = woo_variation_swatches()->get_option( 'attribute_image_size' );
497
- $image = wp_get_attachment_image_url( $attachment_id, apply_filters( 'wvs_product_attribute_image_size', $image_size ) );
498
- $selected_class = ( sanitize_title( $args[ 'selected' ] ) == $term->slug ) ? 'selected' : '';
499
- $tooltip = apply_filters( 'wvs_image_variable_item_tooltip', $term->name, $term, $args );
500
-
501
- ?>
502
- <li data-wvstooltip="<?php echo esc_attr( $tooltip ) ?>" class="variable-item image-variable-item image-variable-item-<?php echo $term->slug ?> <?php echo $selected_class ?>" title="<?php echo esc_html( $term->name ) ?>" data-value="<?php echo esc_attr( $term->slug ) ?>"><img alt="<?php echo esc_html( $term->name ) ?>" src="<?php echo esc_url( $image ) ?>"></li>
503
- <?php
504
- }
505
- }
506
- }
507
- }
508
- echo '</ul>';
509
  }
510
  endif;
511
 
@@ -524,14 +588,16 @@
524
  'name' => '',
525
  'id' => '',
526
  'class' => '',
 
527
  'show_option_none' => esc_html__( 'Choose an option', 'woo-variation-swatches' )
528
  ) );
529
 
 
530
  $options = $args[ 'options' ];
531
  $product = $args[ 'product' ];
532
  $attribute = $args[ 'attribute' ];
533
  $name = $args[ 'name' ] ? $args[ 'name' ] : wc_variation_attribute_name( $attribute );
534
- $id = $args[ 'id' ] ? $args[ 'id' ] : sanitize_title( $attribute ) . $product->get_id();
535
  $class = $args[ 'class' ];
536
  $show_option_none = $args[ 'show_option_none' ] ? TRUE : FALSE;
537
  $show_option_none_text = $args[ 'show_option_none' ] ? $args[ 'show_option_none' ] : esc_html__( 'Choose an option', 'woocommerce' ); // We'll do our best to hide the placeholder, but we'll need to show something when resetting options.
@@ -572,25 +638,80 @@
572
 
573
  echo '</select>';
574
 
575
- $clear_on_reselect = woo_variation_swatches()->get_option( 'clear_on_reselect' ) ? 'reselect-clear' : '';
576
- printf( '<ul class="list-inline variable-items-wrapper button-variable-wrapper %s" data-attribute_name="%s">', $clear_on_reselect, esc_attr( wc_variation_attribute_name( $attribute ) ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
577
 
578
  if ( ! empty( $options ) ) {
579
  if ( $product && taxonomy_exists( $attribute ) ) {
 
580
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
581
 
582
  foreach ( $terms as $term ) {
583
  if ( in_array( $term->slug, $options ) ) {
584
- $selected_class = ( sanitize_title( $args[ 'selected' ] ) == $term->slug ) ? 'selected' : '';
585
- $tooltip = apply_filters( 'wvs_button_variable_item_tooltip', $term->name, $term, $args );
586
- ?>
587
- <li data-wvstooltip="<?php echo esc_attr( $tooltip ) ?>" class="variable-item button-variable-item button-variable-item-<?php echo $term->slug ?> <?php echo $selected_class ?>" title="<?php echo esc_html( $term->name ) ?>" data-value="<?php echo esc_attr( $term->slug ) ?>"><span><?php echo esc_html( $term->name ) ?></span></li>
588
- <?php
589
  }
590
  }
 
 
 
 
 
 
591
  }
592
  }
593
- echo '</ul>';
 
 
 
 
 
594
  }
595
  endif;
596
 
@@ -608,16 +729,15 @@
608
 
609
  foreach ( $available_type_keys as $type ) {
610
  if ( wvs_wc_product_has_attribute_type( $type, $args[ 'attribute' ] ) ) {
611
- $output_callback = $available_types[ $type ][ 'output' ];
612
- $output_callback( array(
613
- 'options' => $args[ 'options' ],
614
- 'attribute' => $args[ 'attribute' ],
615
- 'product' => $args[ 'product' ],
616
- 'selected' => $args[ 'selected' ]
617
- ) );
618
-
619
- // print_r( $args); die;
620
-
621
  $default = FALSE;
622
  }
623
  }
@@ -626,7 +746,9 @@
626
  echo $html;
627
  }
628
 
629
- return ob_get_clean();
 
 
630
  }
631
  endif;
632
 
2
 
3
  defined( 'ABSPATH' ) or die( 'Keep Quit' );
4
 
5
+ //-------------------------------------------------------------------------------
6
+ // Get All Image Sizes
7
+ //-------------------------------------------------------------------------------
8
+
9
+ if ( ! function_exists( 'wvs_get_all_image_sizes' ) ):
10
+ function wvs_get_all_image_sizes() {
11
+ return apply_filters( 'wvs_get_all_image_sizes', array_reduce( get_intermediate_image_sizes(), function ( $carry, $item ) {
12
+ $carry[ $item ] = ucwords( str_ireplace( array( '-', '_' ), ' ', $item ) );
13
+
14
+ return $carry;
15
+ }, array() ) );
16
+ }
17
+ endif;
18
+
19
  //-------------------------------------------------------------------------------
20
  // Available Product Attribute Types
21
  //-------------------------------------------------------------------------------
117
 
118
  do_action( 'before_wvs_settings', woo_variation_swatches() );
119
 
120
+ woo_variation_swatches()->add_setting( 'simple', esc_html__( 'Simple', 'woo-variation-swatches' ), array(
121
  array(
122
+ 'title' => esc_html__( 'Visual Section', 'woo-variation-swatches' ),
123
+ 'desc' => esc_html__( 'Simple change some visual styles', 'woo-variation-swatches' ),
124
+ 'fields' => apply_filters( 'wvs_simple_setting_fields', array(
125
  array(
126
  'id' => 'tooltip',
127
  'type' => 'checkbox',
136
  'desc' => esc_html__( 'Enable / Disable plugin default stylesheet', 'woo-variation-swatches' ),
137
  'default' => TRUE
138
  ),
139
+ array(
140
+ 'id' => 'style',
141
+ 'type' => 'radio',
142
+ 'title' => esc_html__( 'Shape style', 'woo-variation-swatches' ),
143
+ 'desc' => esc_html__( 'Attribute Shape Style', 'woo-variation-swatches' ),
144
+ 'options' => array(
145
+ 'rounded' => esc_html__( 'Rounded Shape', 'woo-variation-swatches' ),
146
+ 'squared' => esc_html__( 'Squared Shape', 'woo-variation-swatches' )
147
+ ),
148
+ 'default' => 'rounded'
149
+ ),
150
+ ) )
151
+ )
152
+ ), apply_filters( 'wvs_simple_setting_default_active', TRUE ) );
153
+
154
+ woo_variation_swatches()->add_setting( 'advanced', esc_html__( 'Advanced', 'woo-variation-swatches' ), array(
155
+ array(
156
+ 'title' => esc_html__( 'Visual Section', 'woo-variation-swatches' ),
157
+ 'desc' => esc_html__( 'Advanced change some visual styles', 'woo-variation-swatches' ),
158
+ 'fields' => apply_filters( 'wvs_advanced_setting_fields', array(
159
  array(
160
  'id' => 'clear_on_reselect',
161
  'type' => 'checkbox',
172
  'min' => 1,
173
  'max' => 100,
174
  ),
 
 
 
 
 
 
 
 
 
 
 
175
  array(
176
  'id' => 'attribute_image_size',
177
  'type' => 'select',
178
  'title' => esc_html__( 'Attribute image size', 'woo-variation-swatches' ),
179
  'desc' => has_filter( 'wvs_product_attribute_image_size' ) ? __( '<span style="color: red">Attribute image size changed by <code>wvs_product_attribute_image_size</code> hook. So this option will not apply any effect.</span>', 'woo-variation-swatches' ) : esc_html__( 'Choose attribute image size', 'woo-variation-swatches' ),
180
+ 'options' => wvs_get_all_image_sizes(),
 
 
 
 
 
181
  'default' => 'thumbnail'
182
  ),
183
  ) )
184
  )
185
+ ), apply_filters( 'wvs_advanced_setting_default_active', FALSE ) );
186
 
187
  do_action( 'after_wvs_settings', woo_variation_swatches() );
188
  }
234
  function wvs_add_product_taxonomy_meta() {
235
 
236
  $fields = wvs_taxonomy_meta_fields();
237
+ $meta_added_for = apply_filters( 'wvs_product_taxonomy_meta_for', array_keys( $fields ) );
238
 
239
  if ( function_exists( 'wc_get_attribute_taxonomies' ) ):
240
 
345
  function wvs_wc_product_has_attribute_type( $type, $attribute_name ) {
346
  $attribute = wvs_get_wc_attribute_taxonomy( $attribute_name );
347
 
348
+ return apply_filters( 'wvs_wc_product_has_attribute_type', ( isset( $attribute->attribute_type ) && ( $attribute->attribute_type == $type ) ), $type, $attribute_name, $attribute );
349
+ }
350
+ endif;
351
+
352
+ //-------------------------------------------------------------------------------
353
+ // Variation attribute options wrapper
354
+ //-------------------------------------------------------------------------------
355
+ if ( ! function_exists( 'wvs_variable_items_wrapper' ) ):
356
+ function wvs_variable_items_wrapper( $contents, $type, $args, $saved_attribute = array() ) {
357
+
358
+ $attribute = $args[ 'attribute' ];
359
+
360
+ $css_classes = apply_filters( 'wvs_variable_items_wrapper_class', array( "{$type}-variable-wrapper" ), $type, $args, $saved_attribute );
361
+
362
+ $clear_on_reselect = woo_variation_swatches()->get_option( 'clear_on_reselect' ) ? 'reselect-clear' : '';
363
+
364
+ array_push( $css_classes, $clear_on_reselect );
365
+
366
+ $data = sprintf( '<ul class="list-inline variable-items-wrapper %s" data-attribute_name="%s">%s</ul>', implode( ' ', $css_classes ), esc_attr( wc_variation_attribute_name( $attribute ) ), $contents );
367
+
368
+ return apply_filters( 'wvs_variable_items_wrapper', $data, $contents, $type, $args, $saved_attribute );
369
+ }
370
+ endif;
371
+
372
+ //-------------------------------------------------------------------------------
373
+ // Variation variable item
374
+ //-------------------------------------------------------------------------------
375
+ if ( ! function_exists( 'wvs_variable_item' ) ):
376
+ function wvs_variable_item( $type, $options, $args, $saved_attribute = array() ) {
377
+
378
+ $product = $args[ 'product' ];
379
+ $attribute = $args[ 'attribute' ];
380
+ $data = '';
381
+
382
+ if ( ! empty( $options ) ) {
383
+ if ( $product && taxonomy_exists( $attribute ) ) {
384
+ $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
385
+ $name = uniqid( wc_variation_attribute_name( $attribute ) );
386
+ foreach ( $terms as $term ) {
387
+ if ( in_array( $term->slug, $options ) ) {
388
+ $selected_class = ( sanitize_title( $args[ 'selected' ] ) == $term->slug ) ? 'selected' : '';
389
+ $tooltip = trim( apply_filters( 'wvs_color_variable_item_tooltip', $term->name, $term, $args ) );
390
+
391
+ $tooltip_html_attr = ! empty( $tooltip ) ? sprintf( 'data-wvstooltip="%s"', esc_attr( $tooltip ) ) : '';
392
+
393
+ $data .= sprintf( '<li %1$s class="variable-item %2$s-variable-item %2$s-variable-item-%3$s %4$s" title="%5$s" data-value="%3$s">', $tooltip_html_attr, esc_attr( $type ), esc_attr( $term->slug ), esc_attr( $selected_class ), esc_html( $term->name ) );
394
+
395
+ switch ( $type ):
396
+ case 'color':
397
+ $color = sanitize_hex_color( get_term_meta( $term->term_id, 'product_attribute_color', TRUE ) );
398
+ $data .= sprintf( '<span style="background-color:%s;"></span>', esc_attr( $color ) );
399
+ break;
400
+
401
+ case 'image':
402
+ $attachment_id = absint( get_term_meta( $term->term_id, 'product_attribute_image', TRUE ) );
403
+ $image_size = woo_variation_swatches()->get_option( 'attribute_image_size' );
404
+ $image_url = wp_get_attachment_image_url( $attachment_id, apply_filters( 'wvs_product_attribute_image_size', $image_size ) );
405
+ $data .= sprintf( '<img alt="%s" src="%s" />', esc_attr( $term->name ), esc_url( $image_url ) );
406
+ break;
407
+
408
+ case 'button':
409
+ $data .= sprintf( '<span>%s</span>', esc_html( $term->name ) );
410
+ break;
411
+
412
+ case 'radio':
413
+ $id = uniqid( $term->slug );
414
+ $data .= sprintf( '<input name="%1$s" id="%2$s" class="wvs-radio-variable-item" %3$s type="radio" value="%4$s" data-value="%4$s" /><label for="%2$s">%5$s</label>', $name, $id, checked( sanitize_title( $args[ 'selected' ] ), $term->slug, TRUE ), esc_attr( $term->slug ), esc_html( $term->name ) );
415
+ break;
416
+
417
+ default:
418
+ $data .= apply_filters( 'wvs_variable_default_item_content', '', $term, $args, $saved_attribute );
419
+ break;
420
+ endswitch;
421
+ $data .= '</li>';
422
+ }
423
+ }
424
+ }
425
+ }
426
+
427
+ return apply_filters( 'wvs_variable_item', $data, $type, $options, $args, $saved_attribute );
428
  }
429
  endif;
430
 
443
  'name' => '',
444
  'id' => '',
445
  'class' => '',
446
+ 'type' => '',
447
  'show_option_none' => esc_html__( 'Choose an option', 'woo-variation-swatches' )
448
  ) );
449
 
450
+ $type = $args[ 'type' ];
451
  $options = $args[ 'options' ];
452
  $product = $args[ 'product' ];
453
  $attribute = $args[ 'attribute' ];
454
  $name = $args[ 'name' ] ? $args[ 'name' ] : wc_variation_attribute_name( $attribute );
455
+ $id = $args[ 'id' ] ? $args[ 'id' ] : sanitize_title( $attribute );
456
  $class = $args[ 'class' ];
457
  $show_option_none = $args[ 'show_option_none' ] ? TRUE : FALSE;
458
  $show_option_none_text = $args[ 'show_option_none' ] ? $args[ 'show_option_none' ] : esc_html__( 'Choose an option', 'woocommerce' ); // We'll do our best to hide the placeholder, but we'll need to show something when resetting options.
464
 
465
  if ( $product && taxonomy_exists( $attribute ) ) {
466
  echo '<select id="' . esc_attr( $id ) . '" class="' . esc_attr( $class ) . ' hide woo-variation-raw-select" style="display:none" name="' . esc_attr( $name ) . '" data-attribute_name="' . esc_attr( wc_variation_attribute_name( $attribute ) ) . '" data-show_option_none="' . ( $show_option_none ? 'yes' : 'no' ) . '">';
 
467
  } else {
468
  echo '<select id="' . esc_attr( $id ) . '" class="' . esc_attr( $class ) . '" name="' . esc_attr( $name ) . '" data-attribute_name="' . esc_attr( wc_variation_attribute_name( $attribute ) ) . '" data-show_option_none="' . ( $show_option_none ? 'yes' : 'no' ) . '">';
469
  }
493
 
494
  echo '</select>';
495
 
496
+ $content = wvs_variable_item( $type, $options, $args );
497
+
498
+ echo wvs_variable_items_wrapper( $content, $type, $args );
499
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
500
  }
501
  endif;
502
 
515
  'name' => '',
516
  'id' => '',
517
  'class' => '',
518
+ 'type' => '',
519
  'show_option_none' => esc_html__( 'Choose an option', 'woo-variation-swatches' )
520
  ) );
521
 
522
+ $type = $args[ 'type' ];
523
  $options = $args[ 'options' ];
524
  $product = $args[ 'product' ];
525
  $attribute = $args[ 'attribute' ];
526
  $name = $args[ 'name' ] ? $args[ 'name' ] : wc_variation_attribute_name( $attribute );
527
+ $id = $args[ 'id' ] ? $args[ 'id' ] : sanitize_title( $attribute );
528
  $class = $args[ 'class' ];
529
  $show_option_none = $args[ 'show_option_none' ] ? TRUE : FALSE;
530
  $show_option_none_text = $args[ 'show_option_none' ] ? $args[ 'show_option_none' ] : esc_html__( 'Choose an option', 'woocommerce' ); // We'll do our best to hide the placeholder, but we'll need to show something when resetting options.
567
 
568
  echo '</select>';
569
 
570
+ $content = wvs_variable_item( $type, $options, $args );
 
571
 
572
+ echo wvs_variable_items_wrapper( $content, $type, $args );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
573
  }
574
  endif;
575
 
588
  'name' => '',
589
  'id' => '',
590
  'class' => '',
591
+ 'type' => '',
592
  'show_option_none' => esc_html__( 'Choose an option', 'woo-variation-swatches' )
593
  ) );
594
 
595
+ $type = $args[ 'type' ];
596
  $options = $args[ 'options' ];
597
  $product = $args[ 'product' ];
598
  $attribute = $args[ 'attribute' ];
599
  $name = $args[ 'name' ] ? $args[ 'name' ] : wc_variation_attribute_name( $attribute );
600
+ $id = $args[ 'id' ] ? $args[ 'id' ] : sanitize_title( $attribute );
601
  $class = $args[ 'class' ];
602
  $show_option_none = $args[ 'show_option_none' ] ? TRUE : FALSE;
603
  $show_option_none_text = $args[ 'show_option_none' ] ? $args[ 'show_option_none' ] : esc_html__( 'Choose an option', 'woocommerce' ); // We'll do our best to hide the placeholder, but we'll need to show something when resetting options.
638
 
639
  echo '</select>';
640
 
641
+ $content = wvs_variable_item( $type, $options, $args );
642
+
643
+ echo wvs_variable_items_wrapper( $content, $type, $args );
644
+ }
645
+ endif;
646
+
647
+ //-------------------------------------------------------------------------------
648
+ // Radio Variation Attribute Options
649
+ //-------------------------------------------------------------------------------
650
+
651
+ if ( ! function_exists( 'wvs_radio_variation_attribute_options' ) ) :
652
+ function wvs_radio_variation_attribute_options( $args = array() ) {
653
+
654
+ $args = wp_parse_args( $args, array(
655
+ 'options' => FALSE,
656
+ 'attribute' => FALSE,
657
+ 'product' => FALSE,
658
+ 'selected' => FALSE,
659
+ 'name' => '',
660
+ 'id' => '',
661
+ 'class' => '',
662
+ 'type' => '',
663
+ 'show_option_none' => esc_html__( 'Choose an option', 'woo-variation-swatches' )
664
+ ) );
665
+
666
+ $type = $args[ 'type' ];
667
+ $options = $args[ 'options' ];
668
+ $product = $args[ 'product' ];
669
+ $attribute = $args[ 'attribute' ];
670
+ $name = $args[ 'name' ] ? $args[ 'name' ] : wc_variation_attribute_name( $attribute );
671
+ $id = $args[ 'id' ] ? $args[ 'id' ] : sanitize_title( $attribute );
672
+ $class = $args[ 'class' ];
673
+ $show_option_none = $args[ 'show_option_none' ] ? TRUE : FALSE;
674
+ $show_option_none_text = $args[ 'show_option_none' ] ? $args[ 'show_option_none' ] : esc_html__( 'Choose an option', 'woocommerce' ); // We'll do our best to hide the placeholder, but we'll need to show something when resetting options.
675
+
676
+ if ( empty( $options ) && ! empty( $product ) && ! empty( $attribute ) ) {
677
+ $attributes = $product->get_variation_attributes();
678
+ $options = $attributes[ $attribute ];
679
+ }
680
+
681
+ if ( $product && taxonomy_exists( $attribute ) ) {
682
+ echo '<select id="' . esc_attr( $id ) . '" class="' . esc_attr( $class ) . ' hide woo-variation-raw-select" style="display:none" name="' . esc_attr( $name ) . '" data-attribute_name="' . esc_attr( wc_variation_attribute_name( $attribute ) ) . '" data-show_option_none="' . ( $show_option_none ? 'yes' : 'no' ) . '">';
683
+ } else {
684
+ echo '<select id="' . esc_attr( $id ) . '" class="' . esc_attr( $class ) . '" name="' . esc_attr( $name ) . '" data-attribute_name="' . esc_attr( wc_variation_attribute_name( $attribute ) ) . '" data-show_option_none="' . ( $show_option_none ? 'yes' : 'no' ) . '">';
685
+ }
686
+
687
+ if ( $args[ 'show_option_none' ] ) {
688
+ echo '<option value="">' . esc_html( $show_option_none_text ) . '</option>';
689
+ }
690
 
691
  if ( ! empty( $options ) ) {
692
  if ( $product && taxonomy_exists( $attribute ) ) {
693
+ // Get terms if this is a taxonomy - ordered. We need the names too.
694
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
695
 
696
  foreach ( $terms as $term ) {
697
  if ( in_array( $term->slug, $options ) ) {
698
+ echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, FALSE ) . '>' . apply_filters( 'woocommerce_variation_option_name', $term->name ) . '</option>';
 
 
 
 
699
  }
700
  }
701
+ } else {
702
+ foreach ( $options as $option ) {
703
+ // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
704
+ $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), FALSE ) : selected( $args[ 'selected' ], $option, FALSE );
705
+ echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option ) ) . '</option>';
706
+ }
707
  }
708
  }
709
+
710
+ echo '</select>';
711
+
712
+ $content = wvs_variable_item( $type, $options, $args );
713
+
714
+ echo wvs_variable_items_wrapper( $content, $type, $args );
715
  }
716
  endif;
717
 
729
 
730
  foreach ( $available_type_keys as $type ) {
731
  if ( wvs_wc_product_has_attribute_type( $type, $args[ 'attribute' ] ) ) {
732
+ $output_callback = apply_filters( 'wvs_variation_attribute_options_callback', $available_types[ $type ][ 'output' ], $available_types, $type, $args, $html );
733
+ $output_callback( apply_filters( 'wvs_variation_attribute_options_args', array(
734
+ 'options' => $args[ 'options' ],
735
+ 'attribute' => $args[ 'attribute' ],
736
+ 'product' => $args[ 'product' ],
737
+ 'selected' => $args[ 'selected' ],
738
+ 'type' => $type,
739
+ 'is_archive' => ( isset( $args[ 'is_archive' ] ) && $args[ 'is_archive' ] )
740
+ ) ) );
 
741
  $default = FALSE;
742
  }
743
  }
746
  echo $html;
747
  }
748
 
749
+ $data = ob_get_clean();
750
+
751
+ return apply_filters( 'wvs_variation_attribute_options_html', $data, $args );
752
  }
753
  endif;
754
 
includes/hooks.php CHANGED
@@ -9,6 +9,6 @@
9
 
10
  add_action( 'woocommerce_product_option_terms', 'wvs_product_option_terms', 10, 2 );
11
 
12
- add_filter( 'woocommerce_ajax_variation_threshold', 'wvs_ajax_variation_threshold', 20 );
13
 
14
  add_filter( 'woocommerce_dropdown_variation_attribute_options_html', 'wvs_variation_attribute_options_html', 200, 2 );
9
 
10
  add_action( 'woocommerce_product_option_terms', 'wvs_product_option_terms', 10, 2 );
11
 
12
+ add_filter( 'woocommerce_ajax_variation_threshold', 'wvs_ajax_variation_threshold', 8 );
13
 
14
  add_filter( 'woocommerce_dropdown_variation_attribute_options_html', 'wvs_variation_attribute_options_html', 200, 2 );
languages/woo-variation-swatches.pot CHANGED
@@ -16,202 +16,214 @@ msgstr ""
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
 
19
- #: ../includes/class-wvs-customizer.php:33
20
  msgid "WooCommerce Variation Swatches"
21
  msgstr ""
22
 
23
- #: ../includes/class-wvs-settings-api.php:80
24
  msgid "WooCommerce Variation Swatches Settings"
25
  msgstr ""
26
 
27
- #: ../includes/class-wvs-settings-api.php:81, ../includes/class-wvs-settings-api.php:94
28
  msgid "Swatches Settings"
29
  msgstr ""
30
 
31
- #: ../includes/class-wvs-settings-api.php:114
 
 
 
 
32
  msgid "Settings"
33
  msgstr ""
34
 
35
- #: ../includes/class-wvs-term-meta.php:217
36
  msgid "Upload / Add image"
37
  msgstr ""
38
 
39
- #: ../includes/class-wvs-term-meta.php:218
40
  msgid "Remove image"
41
  msgstr ""
42
 
43
- #: ../includes/functions.php:14, ../includes/functions.php:184
44
  msgid "Color"
45
  msgstr ""
46
 
47
- #: ../includes/functions.php:20, ../includes/functions.php:193
48
  msgid "Image"
49
  msgstr ""
50
 
51
- #: ../includes/functions.php:26
52
  msgid "Button"
53
  msgstr ""
54
 
55
- #: ../includes/functions.php:106
56
- msgid "General"
57
  msgstr ""
58
 
59
- #: ../includes/functions.php:108
60
- msgid "Display Section"
61
  msgstr ""
62
 
63
- #: ../includes/functions.php:109
64
- msgid "Simply change some visual styles"
65
  msgstr ""
66
 
67
- #: ../includes/functions.php:114
68
  msgid "Enable Tooltip"
69
  msgstr ""
70
 
71
- #: ../includes/functions.php:115
72
  msgid "Enable / Disable plugin default tooltip on each product attribute."
73
  msgstr ""
74
 
75
- #: ../includes/functions.php:121
76
  msgid "Enable Stylesheet"
77
  msgstr ""
78
 
79
- #: ../includes/functions.php:122
80
  msgid "Enable / Disable plugin default stylesheet"
81
  msgstr ""
82
 
83
- #: ../includes/functions.php:128
84
- msgid "Clear on Reselect"
85
  msgstr ""
86
 
87
- #: ../includes/functions.php:129
88
- msgid "Clear selected attribute on select again"
89
  msgstr ""
90
 
91
- #: ../includes/functions.php:135
92
- msgid "Ajax variation threshold"
93
  msgstr ""
94
 
95
- #: ../includes/functions.php:136
96
- msgid "Control the number of enable ajax variation threshold, If you set <code>1</code> all product variation will be load via ajax. Default value is <code>30</code>"
97
  msgstr ""
98
 
99
- #: ../includes/functions.php:144
100
- msgid "Shape style"
101
  msgstr ""
102
 
103
- #: ../includes/functions.php:145
104
- msgid "Attribute Shape Style"
105
  msgstr ""
106
 
107
- #: ../includes/functions.php:147
108
- msgid "Rounded Shape"
109
  msgstr ""
110
 
111
- #: ../includes/functions.php:148
112
- msgid "Squared Shape"
113
  msgstr ""
114
 
115
- #: ../includes/functions.php:155
 
 
 
 
 
 
 
 
116
  msgid "Attribute image size"
117
  msgstr ""
118
 
119
- #: ../includes/functions.php:156
120
  msgid "<span style=\"color: red\">Attribute image size changed by <code>wvs_product_attribute_image_size</code> hook. So this option will not apply any effect.</span>"
121
  msgstr ""
122
 
123
- #: ../includes/functions.php:156
124
  msgid "Choose attribute image size"
125
  msgstr ""
126
 
127
- #: ../includes/functions.php:185
128
  msgid "Choose a color"
129
  msgstr ""
130
 
131
- #: ../includes/functions.php:194, ../woo-variation-swatches.php:154
132
  msgid "Choose an Image"
133
  msgstr ""
134
 
135
- #: ../includes/functions.php:255
136
  msgid "Select terms"
137
  msgstr ""
138
 
139
- #: ../includes/functions.php:266
140
  msgid "Select all"
141
  msgstr ""
142
 
143
- #: ../includes/functions.php:267
144
  msgid "Select none"
145
  msgstr ""
146
 
147
- #: ../includes/functions.php:272
148
  msgid "Add new %s"
149
  msgstr ""
150
 
151
- #: ../includes/functions.php:272, ../includes/functions.php:274
152
  msgid "Add new"
153
  msgstr ""
154
 
155
- #: ../includes/functions.php:349, ../includes/functions.php:436, ../includes/functions.php:527
156
  msgid "Choose an option"
157
  msgstr ""
158
 
159
- #: ../woo-variation-swatches.php:155
160
  msgid "Add Attribute"
161
  msgstr ""
162
 
163
- #: ../woo-variation-swatches.php:156
164
  msgid "Add"
165
  msgstr ""
166
 
167
- #: ../woo-variation-swatches.php:157
168
  msgid "Cancel"
169
  msgstr ""
170
 
171
- #: ../woo-variation-swatches.php:158
172
  msgid "Use Image"
173
  msgstr ""
174
 
175
- #: ../woo-variation-swatches.php:159
176
  msgid "Add Media"
177
  msgstr ""
178
 
179
- #: ../woo-variation-swatches.php:214
180
  msgid "View Documentation"
181
  msgstr ""
182
 
183
- #: ../woo-variation-swatches.php:214
184
  msgid "Documentation"
185
  msgstr ""
186
 
187
- #: ../woo-variation-swatches.php:215, ../woo-variation-swatches.php:215
188
  msgid "Support"
189
  msgstr ""
190
 
191
- #: ../woo-variation-swatches.php:216
192
  msgid "Review"
193
  msgstr ""
194
 
195
- #: ../woo-variation-swatches.php:216
196
  msgid "Please Rate Us"
197
  msgstr ""
198
 
199
- #: ../woo-variation-swatches.php:246
200
  msgid "Please check PHP version requirement."
201
  msgstr ""
202
 
203
- #: ../woo-variation-swatches.php:248
204
  msgid "It's required to use latest version of PHP to use <strong>WooCommerce Variation Swatches</strong>."
205
  msgstr ""
206
 
207
- #: ../woo-variation-swatches.php:258
208
  msgid "WooCommerce"
209
  msgstr ""
210
 
211
- #: ../woo-variation-swatches.php:260
212
  msgid "<strong>WooCommerce Variation Swatches</strong> is an add-on of "
213
  msgstr ""
214
 
215
- #: ../woo-variation-swatches.php:356
216
  msgid "WooCommerce Variation Swatches Plugin try to load \"%s\" but template \"%s\" was not found."
217
  msgstr ""
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
 
19
+ #: ../includes/class-wvs-customizer.php:34
20
  msgid "WooCommerce Variation Swatches"
21
  msgstr ""
22
 
23
+ #: ../includes/class-wvs-settings-api.php:81
24
  msgid "WooCommerce Variation Swatches Settings"
25
  msgstr ""
26
 
27
+ #: ../includes/class-wvs-settings-api.php:82, ../includes/class-wvs-settings-api.php:95
28
  msgid "Swatches Settings"
29
  msgstr ""
30
 
31
+ #: ../includes/class-wvs-settings-api.php:110
32
+ msgid "Clear transient"
33
+ msgstr ""
34
+
35
+ #: ../includes/class-wvs-settings-api.php:131
36
  msgid "Settings"
37
  msgstr ""
38
 
39
+ #: ../includes/class-wvs-term-meta.php:216
40
  msgid "Upload / Add image"
41
  msgstr ""
42
 
43
+ #: ../includes/class-wvs-term-meta.php:217
44
  msgid "Remove image"
45
  msgstr ""
46
 
47
+ #: ../includes/functions.php:28, ../includes/functions.php:202
48
  msgid "Color"
49
  msgstr ""
50
 
51
+ #: ../includes/functions.php:34, ../includes/functions.php:211
52
  msgid "Image"
53
  msgstr ""
54
 
55
+ #: ../includes/functions.php:40
56
  msgid "Button"
57
  msgstr ""
58
 
59
+ #: ../includes/functions.php:120
60
+ msgid "Simple"
61
  msgstr ""
62
 
63
+ #: ../includes/functions.php:122, ../includes/functions.php:156
64
+ msgid "Visual Section"
65
  msgstr ""
66
 
67
+ #: ../includes/functions.php:123
68
+ msgid "Simple change some visual styles"
69
  msgstr ""
70
 
71
+ #: ../includes/functions.php:128
72
  msgid "Enable Tooltip"
73
  msgstr ""
74
 
75
+ #: ../includes/functions.php:129
76
  msgid "Enable / Disable plugin default tooltip on each product attribute."
77
  msgstr ""
78
 
79
+ #: ../includes/functions.php:135
80
  msgid "Enable Stylesheet"
81
  msgstr ""
82
 
83
+ #: ../includes/functions.php:136
84
  msgid "Enable / Disable plugin default stylesheet"
85
  msgstr ""
86
 
87
+ #: ../includes/functions.php:142
88
+ msgid "Shape style"
89
  msgstr ""
90
 
91
+ #: ../includes/functions.php:143
92
+ msgid "Attribute Shape Style"
93
  msgstr ""
94
 
95
+ #: ../includes/functions.php:145
96
+ msgid "Rounded Shape"
97
  msgstr ""
98
 
99
+ #: ../includes/functions.php:146
100
+ msgid "Squared Shape"
101
  msgstr ""
102
 
103
+ #: ../includes/functions.php:154
104
+ msgid "Advanced"
105
  msgstr ""
106
 
107
+ #: ../includes/functions.php:157
108
+ msgid "Advanced change some visual styles"
109
  msgstr ""
110
 
111
+ #: ../includes/functions.php:162
112
+ msgid "Clear on Reselect"
113
  msgstr ""
114
 
115
+ #: ../includes/functions.php:163
116
+ msgid "Clear selected attribute on select again"
117
  msgstr ""
118
 
119
+ #: ../includes/functions.php:169
120
+ msgid "Ajax variation threshold"
121
+ msgstr ""
122
+
123
+ #: ../includes/functions.php:170
124
+ msgid "Control the number of enable ajax variation threshold, If you set <code>1</code> all product variation will be load via ajax. Default value is <code>30</code>"
125
+ msgstr ""
126
+
127
+ #: ../includes/functions.php:178
128
  msgid "Attribute image size"
129
  msgstr ""
130
 
131
+ #: ../includes/functions.php:179
132
  msgid "<span style=\"color: red\">Attribute image size changed by <code>wvs_product_attribute_image_size</code> hook. So this option will not apply any effect.</span>"
133
  msgstr ""
134
 
135
+ #: ../includes/functions.php:179
136
  msgid "Choose attribute image size"
137
  msgstr ""
138
 
139
+ #: ../includes/functions.php:203
140
  msgid "Choose a color"
141
  msgstr ""
142
 
143
+ #: ../includes/functions.php:212, ../woo-variation-swatches.php:157
144
  msgid "Choose an Image"
145
  msgstr ""
146
 
147
+ #: ../includes/functions.php:273
148
  msgid "Select terms"
149
  msgstr ""
150
 
151
+ #: ../includes/functions.php:284
152
  msgid "Select all"
153
  msgstr ""
154
 
155
+ #: ../includes/functions.php:285
156
  msgid "Select none"
157
  msgstr ""
158
 
159
+ #: ../includes/functions.php:290
160
  msgid "Add new %s"
161
  msgstr ""
162
 
163
+ #: ../includes/functions.php:290, ../includes/functions.php:292
164
  msgid "Add new"
165
  msgstr ""
166
 
167
+ #: ../includes/functions.php:447, ../includes/functions.php:519, ../includes/functions.php:592, ../includes/functions.php:663
168
  msgid "Choose an option"
169
  msgstr ""
170
 
171
+ #: ../woo-variation-swatches.php:158
172
  msgid "Add Attribute"
173
  msgstr ""
174
 
175
+ #: ../woo-variation-swatches.php:159
176
  msgid "Add"
177
  msgstr ""
178
 
179
+ #: ../woo-variation-swatches.php:160
180
  msgid "Cancel"
181
  msgstr ""
182
 
183
+ #: ../woo-variation-swatches.php:161
184
  msgid "Use Image"
185
  msgstr ""
186
 
187
+ #: ../woo-variation-swatches.php:162
188
  msgid "Add Media"
189
  msgstr ""
190
 
191
+ #: ../woo-variation-swatches.php:217
192
  msgid "View Documentation"
193
  msgstr ""
194
 
195
+ #: ../woo-variation-swatches.php:217
196
  msgid "Documentation"
197
  msgstr ""
198
 
199
+ #: ../woo-variation-swatches.php:218, ../woo-variation-swatches.php:218
200
  msgid "Support"
201
  msgstr ""
202
 
203
+ #: ../woo-variation-swatches.php:219
204
  msgid "Review"
205
  msgstr ""
206
 
207
+ #: ../woo-variation-swatches.php:219
208
  msgid "Please Rate Us"
209
  msgstr ""
210
 
211
+ #: ../woo-variation-swatches.php:249
212
  msgid "Please check PHP version requirement."
213
  msgstr ""
214
 
215
+ #: ../woo-variation-swatches.php:251
216
  msgid "It's required to use latest version of PHP to use <strong>WooCommerce Variation Swatches</strong>."
217
  msgstr ""
218
 
219
+ #: ../woo-variation-swatches.php:263
220
  msgid "WooCommerce"
221
  msgstr ""
222
 
223
+ #: ../woo-variation-swatches.php:271
224
  msgid "<strong>WooCommerce Variation Swatches</strong> is an add-on of "
225
  msgstr ""
226
 
227
+ #: ../woo-variation-swatches.php:372
228
  msgid "WooCommerce Variation Swatches Plugin try to load \"%s\" but template \"%s\" was not found."
229
  msgstr ""
package.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "package": "WooCommerce Variation Swatches",
3
  "name": "woo-variation-swatches",
4
- "version": "1.0.15",
5
  "author": "Emran Ahmed <emran.bd.08@gmail.com>",
6
  "contact": "emran.bd.08@gmail.com",
7
  "license": "GNU General Public License v3",
1
  {
2
  "package": "WooCommerce Variation Swatches",
3
  "name": "woo-variation-swatches",
4
+ "version": "1.0.16",
5
  "author": "Emran Ahmed <emran.bd.08@gmail.com>",
6
  "contact": "emran.bd.08@gmail.com",
7
  "license": "GNU General Public License v3",
webpack.mix.js CHANGED
@@ -61,7 +61,7 @@ if (Mix.inProduction()) {
61
  }
62
 
63
  mix.banner({
64
- banner : "WooCommerce Variation Swatches v1.0.15 \n\nAuthor: Emran Ahmed ( emran.bd.08@gmail.com ) \nDate: " + new Date().toLocaleString() + "\nReleased under the GPLv3 license."
65
  });
66
 
67
  mix.notification({
@@ -76,6 +76,8 @@ if (!Mix.inProduction()) {
76
  mix.js(`src/js/backend.js`, `assets/js/admin${min}.js`);
77
  mix.js(`src/js/frontend.js`, `assets/js/frontend${min}.js`);
78
  mix.babel(`src/js/FormFieldDependency.js`, `assets/js/form-field-dependency${min}.js`);
 
 
79
  mix.sass(`src/scss/backend.scss`, `assets/css/admin${min}.css`);
80
  mix.sass(`src/scss/frontend.scss`, `assets/css/frontend${min}.css`);
81
  mix.sass(`src/scss/tooltip.scss`, `assets/css/frontend-tooltip${min}.css`);
61
  }
62
 
63
  mix.banner({
64
+ banner : "WooCommerce Variation Swatches v1.0.16 \n\nAuthor: Emran Ahmed ( emran.bd.08@gmail.com ) \nDate: " + new Date().toLocaleString() + "\nReleased under the GPLv3 license."
65
  });
66
 
67
  mix.notification({
76
  mix.js(`src/js/backend.js`, `assets/js/admin${min}.js`);
77
  mix.js(`src/js/frontend.js`, `assets/js/frontend${min}.js`);
78
  mix.babel(`src/js/FormFieldDependency.js`, `assets/js/form-field-dependency${min}.js`);
79
+ mix.babel(`src/js/wp-color-picker-alpha.js`, `assets/js/wp-color-picker-alpha${min}.js`);
80
+ mix.babel(`src/js/wvs-customize-alpha-color-control.js`, `assets/js/wvs-customize-alpha-color-control${min}.js`);
81
  mix.sass(`src/scss/backend.scss`, `assets/css/admin${min}.css`);
82
  mix.sass(`src/scss/frontend.scss`, `assets/css/frontend${min}.css`);
83
  mix.sass(`src/scss/tooltip.scss`, `assets/css/frontend-tooltip${min}.css`);
woo-variation-swatches.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://wordpress.org/plugins/woo-variation-swatches/
5
  * Description: WooCommerce Product Variation Swatches
6
  * Author: Emran Ahmed
7
- * Version: 1.0.15
8
  * Domain Path: /languages
9
  * Requires at least: 4.8
10
  * Tested up to: 4.9
@@ -20,7 +20,7 @@
20
 
21
  final class Woo_Variation_Swatches {
22
 
23
- protected $_version = '1.0.15';
24
 
25
  protected static $_instance = NULL;
26
  private $_settings_api;
@@ -142,6 +142,9 @@
142
 
143
  wp_enqueue_script( 'jquery-ui-dialog' );
144
 
 
 
 
145
  wp_enqueue_script( 'form-field-dependency', $this->assets_uri( "/js/form-field-dependency{$suffix}.js" ), array( 'jquery' ), $this->version(), TRUE );
146
  wp_enqueue_script( 'woo-variation-swatches-admin', $this->assets_uri( "/js/admin{$suffix}.js" ), array( 'jquery' ), $this->version(), TRUE );
147
  wp_enqueue_style( 'woo-variation-swatches-admin', $this->assets_uri( "/css/admin{$suffix}.css" ), array(), $this->version() );
@@ -252,14 +255,22 @@
252
  }
253
 
254
  public function wc_requirement_notice() {
 
255
  if ( ! $this->is_wc_active() ) {
 
256
  $class = 'notice notice-error';
257
 
258
  $text = esc_html__( 'WooCommerce', 'woo-variation-swatches' );
259
- $link = esc_url( 'https://wordpress.org/plugins/woocommerce/' );
 
 
 
 
 
 
260
  $message = wp_kses( __( "<strong>WooCommerce Variation Swatches</strong> is an add-on of ", 'woo-variation-swatches' ), array( 'strong' => array() ) );
261
 
262
- printf( '<div class="%1$s"><p>%2$s <a target="_blank" href="%3$s"><strong>%4$s</strong></a></p></div>', $class, $message, $link, $text );
263
  }
264
  }
265
 
@@ -268,7 +279,12 @@
268
  }
269
 
270
  public function is_wc_active() {
271
- return in_array( 'woocommerce/woocommerce.php', get_option( 'active_plugins' ) );
 
 
 
 
 
272
  }
273
 
274
  public function basename() {
4
  * Plugin URI: https://wordpress.org/plugins/woo-variation-swatches/
5
  * Description: WooCommerce Product Variation Swatches
6
  * Author: Emran Ahmed
7
+ * Version: 1.0.16
8
  * Domain Path: /languages
9
  * Requires at least: 4.8
10
  * Tested up to: 4.9
20
 
21
  final class Woo_Variation_Swatches {
22
 
23
+ protected $_version = '1.0.16';
24
 
25
  protected static $_instance = NULL;
26
  private $_settings_api;
142
 
143
  wp_enqueue_script( 'jquery-ui-dialog' );
144
 
145
+ wp_enqueue_style( 'wp-color-picker' );
146
+ wp_enqueue_script( 'wp-color-picker-alpha', $this->assets_uri( "/js/wp-color-picker-alpha{$suffix}.js" ), array( 'wp-color-picker' ), '2.1.3', TRUE );
147
+
148
  wp_enqueue_script( 'form-field-dependency', $this->assets_uri( "/js/form-field-dependency{$suffix}.js" ), array( 'jquery' ), $this->version(), TRUE );
149
  wp_enqueue_script( 'woo-variation-swatches-admin', $this->assets_uri( "/js/admin{$suffix}.js" ), array( 'jquery' ), $this->version(), TRUE );
150
  wp_enqueue_style( 'woo-variation-swatches-admin', $this->assets_uri( "/css/admin{$suffix}.css" ), array(), $this->version() );
255
  }
256
 
257
  public function wc_requirement_notice() {
258
+
259
  if ( ! $this->is_wc_active() ) {
260
+
261
  $class = 'notice notice-error';
262
 
263
  $text = esc_html__( 'WooCommerce', 'woo-variation-swatches' );
264
+ $link = esc_url( add_query_arg( array(
265
+ 'tab' => 'plugin-information',
266
+ 'plugin' => 'woocommerce',
267
+ 'TB_iframe' => 'true',
268
+ 'width' => '640',
269
+ 'height' => '500',
270
+ ), admin_url( 'plugin-install.php' ) ) );
271
  $message = wp_kses( __( "<strong>WooCommerce Variation Swatches</strong> is an add-on of ", 'woo-variation-swatches' ), array( 'strong' => array() ) );
272
 
273
+ printf( '<div class="%1$s"><p>%2$s <a class="thickbox open-plugin-details-modal" href="%3$s"><strong>%4$s</strong></a></p></div>', $class, $message, $link, $text );
274
  }
275
  }
276
 
279
  }
280
 
281
  public function is_wc_active() {
282
+
283
+ if ( ! function_exists( 'is_plugin_active' ) ) {
284
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
285
+ }
286
+
287
+ return is_plugin_active( 'woocommerce/woocommerce.php' );
288
  }
289
 
290
  public function basename() {