@pubinfo/module-rbac 2.1.10-beta.2 → 2.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/ComponentSelect-A7uGTuHW.js +3498 -0
  2. package/dist/{DynamicRoutesForm-DP_sq_Uu.js → DynamicRoutesForm-DSzy_bh5.js} +43 -42
  3. package/dist/HCheckList-ODQHidN8.js +37 -0
  4. package/dist/HoverCard-CmJCoa2b.js +44 -0
  5. package/dist/{IconSelect-CiLpc63Z.js → IconSelect-DouEg3xY.js} +89 -88
  6. package/dist/ImportExport-DisdLoY8.js +342 -0
  7. package/dist/{LayoutForm-Cp4bBrYl.js → LayoutForm-Bdfs5WeK.js} +35 -34
  8. package/dist/{MetaForm-CVSgktB_.js → MetaForm-CcDwS8vh.js} +6128 -6143
  9. package/dist/{OrgAndPosition-ClASobEv.js → OrgAndPosition-jDX7m0HD.js} +61 -60
  10. package/dist/{ResourceEdit-w8qh1MFO.js → ResourceEdit-0BYZRye_.js} +128 -127
  11. package/dist/{ResourceRelation-ChEwIbWM.js → ResourceRelation-CU-QpUhP.js} +25 -25
  12. package/dist/{ResourceRelation-D_j898zp.js → ResourceRelation-roz0a8Td.js} +35 -34
  13. package/dist/{RoleRelation-DzyVn5dk.js → RoleRelation-BQQFaum0.js} +28 -27
  14. package/dist/{RoleSelector-Cd6_RUsc.js → RoleSelector-gkar_UGG.js} +89 -89
  15. package/dist/{TenantEdit-BOvXk7BZ.js → TenantEdit-BsahDUlf.js} +94 -93
  16. package/dist/{UserAuthorization-DLeivbs7.js → UserAuthorization-2Fl4IGw7.js} +81 -80
  17. package/dist/{UserEdit-YKS1FVW_.js → UserEdit-CX3Qau8T.js} +102 -101
  18. package/dist/{animation_item-BU-LInxP.js → animation_item-DBOz2rcX.js} +20 -22
  19. package/dist/{blackWhiteList-CNQltBqC.js → blackWhiteList-DbG7JH8n.js} +69 -69
  20. package/dist/blackWhiteList.css +1 -1
  21. package/dist/breadcrumb_setting-DTR6CPZQ.js +108 -0
  22. package/dist/{browserType-Dn_hQtAN.js → browserType-B8A1Osvk.js} +11 -10
  23. package/dist/chunk-DiMWNkAf.js +18 -0
  24. package/dist/cloneDeep-CSOSavu3.js +6 -0
  25. package/dist/components/GroupSelector/index.vue.d.ts +7 -1
  26. package/dist/components/ResourceIcones/Select.vue.d.ts +2 -1
  27. package/dist/components/ResourceSelector/index.vue.d.ts +7 -1
  28. package/dist/components/RoleSelector/RoleSearch.vue.d.ts +9 -1
  29. package/dist/components/RoleSelector/RoleSelector.vue.d.ts +7 -1
  30. package/dist/{createAndEditDataPermission-CaOBJgoV.js → createAndEditDataPermission-8_KNLzJT.js} +49 -48
  31. package/dist/createAndEditDataPermission.css +1 -1
  32. package/dist/{data-permission-ZRQ-Aoib.js → data-permission-LpuDLDm0.js} +41 -41
  33. package/dist/{dayjs.min-sGDSMYRj.js → dayjs.min-Cb7gQFd4.js} +1 -1
  34. package/dist/{dictionary-CtGgtPfc.js → dictionary-CEaxjqZe.js} +46 -46
  35. package/dist/drawerBlackWhiteList-DXLdWurZ.js +120 -0
  36. package/dist/drawerDictionary-DYJTAZr6.js +126 -0
  37. package/dist/drawerDictionaryItem-BChXD2-q.js +138 -0
  38. package/dist/{drawerGroup-DEuiiDPP.js → drawerGroup-CdnZkZxi.js} +67 -66
  39. package/dist/drawerOrganization-CwtSFUj0.js +247 -0
  40. package/dist/drawerPosition-CfyfeQCN.js +166 -0
  41. package/dist/drawerRegion-DAwY_29K.js +183 -0
  42. package/dist/drawerRole-B7uCfHk-.js +154 -0
  43. package/dist/{drawerRole-Dv61PBZR.js → drawerRole-DK6DrinO.js} +77 -76
  44. package/dist/{drawerRole-DNDyOvXw.js → drawerRole-DrzMHL0O.js} +69 -68
  45. package/dist/{group-BbkZjv5e.js → group-CaOhkh72.js} +48 -48
  46. package/dist/group.css +1 -1
  47. package/dist/index.css +1 -1
  48. package/dist/index.js +613 -689
  49. package/dist/isEmpty-BjEzPyCa.js +12 -0
  50. package/dist/{itemlist-By-FV6pN.js → itemlist-CFwRUV2Y.js} +44 -44
  51. package/dist/json-asset-03f0a035.json +1 -0
  52. package/dist/json-asset-0ee63e7f.json +1 -0
  53. package/dist/json-asset-10eef4fe.json +1 -0
  54. package/dist/json-asset-13f452f1.json +1 -0
  55. package/dist/json-asset-14b7b290.json +1 -0
  56. package/dist/json-asset-15b8cef1.json +1 -0
  57. package/dist/json-asset-15f77960.json +1 -0
  58. package/dist/json-asset-1ae9b726.json +1 -0
  59. package/dist/json-asset-1b02359f.json +1 -0
  60. package/dist/json-asset-1ef286cd.json +1 -0
  61. package/dist/json-asset-23cfd18c.json +1 -0
  62. package/dist/json-asset-265a0a5d.json +1 -0
  63. package/dist/json-asset-28d57c49.json +1 -0
  64. package/dist/json-asset-2b54ed10.json +1 -0
  65. package/dist/json-asset-2bb6f642.json +1 -0
  66. package/dist/json-asset-2cdc07bd.json +1 -0
  67. package/dist/json-asset-31c58607.json +1 -0
  68. package/dist/json-asset-32884f23.json +1 -0
  69. package/dist/json-asset-32fca43a.json +1 -0
  70. package/dist/json-asset-3a75445b.json +1 -0
  71. package/dist/json-asset-3f27d67c.json +1 -0
  72. package/dist/json-asset-4189453f.json +1 -0
  73. package/dist/json-asset-4702b37c.json +1 -0
  74. package/dist/json-asset-520a5c68.json +1 -0
  75. package/dist/json-asset-56bea508.json +1 -0
  76. package/dist/json-asset-57c732a3.json +1 -0
  77. package/dist/json-asset-5be4a28f.json +1 -0
  78. package/dist/json-asset-5e6d7cfa.json +1 -0
  79. package/dist/json-asset-64e176c9.json +1 -0
  80. package/dist/json-asset-6583dca6.json +1 -0
  81. package/dist/json-asset-66c640c6.json +1 -0
  82. package/dist/json-asset-68393156.json +1 -0
  83. package/dist/json-asset-688465aa.json +1 -0
  84. package/dist/json-asset-6bf334f4.json +1 -0
  85. package/dist/json-asset-7b4f72ce.json +1 -0
  86. package/dist/json-asset-837ec087.json +1 -0
  87. package/dist/json-asset-838ac1ba.json +1 -0
  88. package/dist/json-asset-8465c2cf.json +1 -0
  89. package/dist/json-asset-9e9f04a4.json +1 -0
  90. package/dist/json-asset-a13964cb.json +1 -0
  91. package/dist/json-asset-ab93a057.json +1 -0
  92. package/dist/json-asset-abe308fc.json +1 -0
  93. package/dist/json-asset-b24f2cd3.json +1 -0
  94. package/dist/json-asset-bf00eaed.json +1 -0
  95. package/dist/json-asset-cb22efd7.json +1 -0
  96. package/dist/json-asset-cb953f20.json +1 -0
  97. package/dist/json-asset-cc209e34.json +1 -0
  98. package/dist/json-asset-cfdffceb.json +1 -0
  99. package/dist/json-asset-d33c0299.json +1 -0
  100. package/dist/json-asset-d430c8ca.json +1 -0
  101. package/dist/json-asset-d8cfa560.json +1 -0
  102. package/dist/json-asset-da91beb6.json +1 -0
  103. package/dist/json-asset-e2bdf85c.json +1 -0
  104. package/dist/json-asset-e34ad826.json +1 -0
  105. package/dist/json-asset-e80720aa.json +1 -0
  106. package/dist/json-asset-e894bc92.json +1 -0
  107. package/dist/json-asset-f28020f2.json +1 -0
  108. package/dist/json-asset-f71ebbf4.json +1 -0
  109. package/dist/json-asset-fb1f4917.json +1 -0
  110. package/dist/json-asset-ff2e97c4.json +1 -0
  111. package/dist/{layout_setting-BUAgQ1Bk.js → layout_setting-79srmFgJ.js} +11 -11
  112. package/dist/layout_setting.css +1 -1
  113. package/dist/{log-vjU7aBPR.js → log-BYris9iT.js} +6 -6
  114. package/dist/{loginHistoryDetail-C7GT2yME.js → loginHistoryDetail-CZnfmbbM.js} +24 -23
  115. package/dist/{login_history-D08W00Qu.js → login_history-BiwaLpxA.js} +33 -33
  116. package/dist/login_history.css +1 -1
  117. package/dist/menu_setting-C2GciMXz.js +155 -0
  118. package/dist/not-data-Bml86wdH.js +3 -0
  119. package/dist/{operateHistoryDetail-BaNJRfwy.js → operateHistoryDetail-HId-EZzy.js} +27 -26
  120. package/dist/{operate_history-kJwIuPg2.js → operate_history-sPd9IHMV.js} +33 -33
  121. package/dist/operate_history.css +1 -1
  122. package/dist/{organization-Cmj3DUXl.js → organization-Dv3FbKke.js} +1438 -1444
  123. package/dist/organization.css +1 -1
  124. package/dist/other_setting-oVuhA70c.js +213 -0
  125. package/dist/other_setting.css +1 -1
  126. package/dist/page_animation_setting-D0CtzyOZ.js +108 -0
  127. package/dist/page_animation_setting.css +1 -1
  128. package/dist/{page_w_setting-CD_HtSUv.js → page_w_setting-Q--ct16C.js} +11 -11
  129. package/dist/page_w_setting.css +1 -1
  130. package/dist/{position-CLpbgKGj.js → position-CCZ2MSMP.js} +41 -41
  131. package/dist/{region-Dd9pt_Si.js → region-D3mjqB8H.js} +62 -62
  132. package/dist/{resource-C7dXB0EE.js → resource-DaQ7CvM_.js} +69 -69
  133. package/dist/{role-JGtvRObt.js → role-4UgEw3nH.js} +49 -49
  134. package/dist/{role_group-CKOb_m63.js → role_group-hkRlCnyl.js} +41 -41
  135. package/dist/{safe_setting-G_ZP-jWQ.js → safe_setting-4fv3qNRZ.js} +85 -85
  136. package/dist/{setItem-yKhjmUh0.js → setItem-Vkcwkj-O.js} +33 -32
  137. package/dist/setItem.css +1 -1
  138. package/dist/tabbar_setting-DhrW4Jj5.js +139 -0
  139. package/dist/{tenant-BBiCJkU_.js → tenant-lWfGw2u1.js} +48 -48
  140. package/dist/{theme_setting-vhNDLlkc.js → theme_setting-CEb7UYQO.js} +47 -47
  141. package/dist/theme_setting.css +1 -1
  142. package/dist/toolbar_setting-znESrYgi.js +140 -0
  143. package/dist/useAppAndResource-B7FmNfKG.js +52 -0
  144. package/dist/{user-DvCyUhZW.js → user-BkUpcQC8.js} +96 -96
  145. package/dist/{vanilla-picker-DcG96G63.js → vanilla-picker-Byb6q187.js} +239 -239
  146. package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +5 -1
  147. package/dist/views/components/setItem.vue.d.ts +5 -1
  148. package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +5 -1
  149. package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +5 -1
  150. package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +5 -1
  151. package/dist/views/group/components/drawerGroup.vue.d.ts +5 -1
  152. package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +8 -1
  153. package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +8 -1
  154. package/dist/views/organization/components/drawerOrganization.vue.d.ts +5 -1
  155. package/dist/views/organization/components/drawerRole.vue.d.ts +5 -1
  156. package/dist/views/other_setting/interface.d.ts +1 -2
  157. package/dist/views/position/components/drawerPosition.vue.d.ts +5 -1
  158. package/dist/views/region/components/drawerRegion.vue.d.ts +5 -1
  159. package/dist/views/resource/components/ImportExport.vue.d.ts +5 -1
  160. package/dist/views/resource/components/ResourceEdit.vue.d.ts +5 -1
  161. package/dist/views/role/components/drawerRole.vue.d.ts +5 -1
  162. package/dist/views/role_group/components/drawerRole.vue.d.ts +5 -1
  163. package/dist/views/tenant/components/TenantEdit.vue.d.ts +5 -1
  164. package/dist/views/user/components/UserAuthorization.vue.d.ts +5 -1
  165. package/dist/views/user/components/UserEdit.vue.d.ts +5 -1
  166. package/dist/watermark_setting-DYirSIAn.js +191 -0
  167. package/dist/watermark_setting.css +1 -1
  168. package/package.json +13 -13
  169. package/src/views/other_setting/index.vue +2 -2
  170. package/src/views/other_setting/interface.ts +1 -1
  171. package/dist/ComponentSelect-D0OCk6H1.js +0 -3572
  172. package/dist/ComponentSelect-WO-3S5rH.js +0 -2
  173. package/dist/DynamicRoutesForm-DjZ3eVLW.js +0 -4
  174. package/dist/HCheckList-B5Qk_HBI.js +0 -2
  175. package/dist/HCheckList-DLBewmPw.js +0 -36
  176. package/dist/HoverCard-69ZIOivd.js +0 -2
  177. package/dist/HoverCard-BDFcxxvk.js +0 -43
  178. package/dist/IconSelect-C_Gj5G4I.js +0 -3
  179. package/dist/ImportExport-CL5uPlby.js +0 -342
  180. package/dist/ImportExport-CPy2rvv7.js +0 -4
  181. package/dist/LayoutForm-QFjwakyQ.js +0 -4
  182. package/dist/MetaForm-Bb-um1Zo.js +0 -4
  183. package/dist/OrgAndPosition-DoiGY5xb.js +0 -2
  184. package/dist/ResourceEdit-BTaNdwC_.js +0 -10
  185. package/dist/ResourceRelation-BIOzTOKA.js +0 -2
  186. package/dist/RoleRelation-CyTcqRfZ.js +0 -2
  187. package/dist/TenantEdit-BlMmL6q5.js +0 -2
  188. package/dist/UserAuthorization-qGr1Sdat.js +0 -3
  189. package/dist/UserEdit-CwfyqNWf.js +0 -3
  190. package/dist/animation_item-GzGItm3s.js +0 -2
  191. package/dist/breadcrumb_setting-Ds-XJRR1.js +0 -108
  192. package/dist/browserType-BXTT4j6i.js +0 -2
  193. package/dist/chunk-Cpsc_9al.js +0 -18
  194. package/dist/cloneDeep-DDAtsK42.js +0 -7
  195. package/dist/createAndEditDataPermission-CChlLDUm.js +0 -5
  196. package/dist/drawerBlackWhiteList-BqIDyn2Q.js +0 -2
  197. package/dist/drawerBlackWhiteList-CkbZ_9PZ.js +0 -119
  198. package/dist/drawerDictionary-D911w7pC.js +0 -2
  199. package/dist/drawerDictionary-dMHs-6Cw.js +0 -125
  200. package/dist/drawerDictionaryItem-CbTa_qL-.js +0 -137
  201. package/dist/drawerDictionaryItem-DLUI5Yuc.js +0 -2
  202. package/dist/drawerGroup-CEEDMBg9.js +0 -3
  203. package/dist/drawerOrganization-CqEMD3gE.js +0 -246
  204. package/dist/drawerOrganization-mks5NMd9.js +0 -2
  205. package/dist/drawerPosition-Bd0s7qze.js +0 -165
  206. package/dist/drawerPosition-DwlTrlGA.js +0 -2
  207. package/dist/drawerRegion-DUbQAZuV.js +0 -182
  208. package/dist/drawerRegion-DwVzsZfT.js +0 -2
  209. package/dist/drawerRole-BNrbcSmr.js +0 -3
  210. package/dist/drawerRole-BxUIekjh.js +0 -3
  211. package/dist/drawerRole-CyA2oFht.js +0 -4
  212. package/dist/drawerRole-D5X7oHB_.js +0 -153
  213. package/dist/isEmpty-BvRqbmpu.js +0 -13
  214. package/dist/loginHistoryDetail-CkH5UUGU.js +0 -3
  215. package/dist/menu_setting-5Jet091Q.js +0 -155
  216. package/dist/not-data-Cx--tk_h.js +0 -2
  217. package/dist/not-data-tyTawN37.js +0 -2
  218. package/dist/operateHistoryDetail-CeVPJzD6.js +0 -3
  219. package/dist/other_setting-DQ70WnZK.js +0 -213
  220. package/dist/page_animation_setting-Lp6cMuFM.js +0 -108
  221. package/dist/routeSystem-DXMoWhFo.js +0 -2
  222. package/dist/setItem-Qa7UapHO.js +0 -4
  223. package/dist/tabbar_setting-B3kMhRNm.js +0 -139
  224. package/dist/toolbar_setting-DNBdxeGP.js +0 -140
  225. package/dist/useAppAndResource-CPL2VpOJ.js +0 -52
  226. package/dist/watermark_setting-CXp4Og0Y.js +0 -191
@@ -1,42 +1,42 @@
1
- var classCallCheck = function(e, n) {
2
- if (!(e instanceof n)) throw TypeError("Cannot call a class as a function");
1
+ var classCallCheck = function(e, t) {
2
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
3
3
  }, createClass = function() {
4
- function e(e, n) {
5
- for (var r = 0; r < n.length; r++) {
6
- var i = n[r];
7
- i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);
4
+ function e(e, t) {
5
+ for (var n = 0; n < t.length; n++) {
6
+ var r = t[n];
7
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
8
8
  }
9
9
  }
10
- return function(n, r, i) {
11
- return r && e(n.prototype, r), i && e(n, i), n;
10
+ return function(t, n, r) {
11
+ return n && e(t.prototype, n), r && e(t, r), t;
12
12
  };
13
13
  }(), slicedToArray = function() {
14
- function e(e, n) {
15
- var r = [], i = !0, a = !1, o = void 0;
14
+ function e(e, t) {
15
+ var n = [], r = !0, i = !1, a = void 0;
16
16
  try {
17
- for (var s = e[Symbol.iterator](), c; !(i = (c = s.next()).done) && (r.push(c.value), !(n && r.length === n)); i = !0);
17
+ for (var o = e[Symbol.iterator](), s; !(r = (s = o.next()).done) && (n.push(s.value), !(t && n.length === t)); r = !0);
18
18
  } catch (e) {
19
- a = !0, o = e;
19
+ i = !0, a = e;
20
20
  } finally {
21
21
  try {
22
- !i && s.return && s.return();
22
+ !r && o.return && o.return();
23
23
  } finally {
24
- if (a) throw o;
24
+ if (i) throw a;
25
25
  }
26
26
  }
27
- return r;
27
+ return n;
28
28
  }
29
- return function(n, r) {
30
- if (Array.isArray(n)) return n;
31
- if (Symbol.iterator in Object(n)) return e(n, r);
29
+ return function(t, n) {
30
+ if (Array.isArray(t)) return t;
31
+ if (Symbol.iterator in Object(t)) return e(t, n);
32
32
  throw TypeError("Invalid attempt to destructure non-iterable instance");
33
33
  };
34
34
  }();
35
35
  String.prototype.startsWith = String.prototype.startsWith || function(e) {
36
36
  return this.indexOf(e) === 0;
37
- }, String.prototype.padStart = String.prototype.padStart || function(e, n) {
38
- for (var r = this; r.length < e;) r = n + r;
39
- return r;
37
+ }, String.prototype.padStart = String.prototype.padStart || function(e, t) {
38
+ for (var n = this; n.length < e;) n = t + n;
39
+ return n;
40
40
  };
41
41
  var colorNames = {
42
42
  cb: "0f8ff",
@@ -182,77 +182,77 @@ var colorNames = {
182
182
  wgrn: "9acd32"
183
183
  };
184
184
  function printNum(e) {
185
- var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
186
- return (n > 0 ? e.toFixed(n).replace(/0+$/, "").replace(/\.$/, "") : e.toString()) || "0";
185
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
186
+ return (t > 0 ? e.toFixed(t).replace(/0+$/, "").replace(/\.$/, "") : e.toString()) || "0";
187
187
  }
188
188
  var Color = function() {
189
- function o(n, i, a, s) {
190
- classCallCheck(this, o);
191
- var c = this;
192
- function l(e) {
189
+ function a(t, r, i, o) {
190
+ classCallCheck(this, a);
191
+ var s = this;
192
+ function c(e) {
193
193
  if (e.startsWith("hsl")) {
194
- var n = slicedToArray(e.match(/([\-\d\.e]+)/g).map(Number), 4), i = n[0], a = n[1], s = n[2], l = n[3];
195
- l === void 0 && (l = 1), i /= 360, a /= 100, s /= 100, c.hsla = [
194
+ var t = slicedToArray(e.match(/([\-\d\.e]+)/g).map(Number), 4), r = t[0], i = t[1], o = t[2], c = t[3];
195
+ c === void 0 && (c = 1), r /= 360, i /= 100, o /= 100, s.hsla = [
196
+ r,
196
197
  i,
197
- a,
198
- s,
199
- l
198
+ o,
199
+ c
200
200
  ];
201
201
  } else if (e.startsWith("rgb")) {
202
- var u = slicedToArray(e.match(/([\-\d\.e]+)/g).map(Number), 4), d = u[0], f = u[1], p = u[2], m = u[3];
203
- m === void 0 && (m = 1), c.rgba = [
202
+ var l = slicedToArray(e.match(/([\-\d\.e]+)/g).map(Number), 4), u = l[0], d = l[1], f = l[2], p = l[3];
203
+ p === void 0 && (p = 1), s.rgba = [
204
+ u,
204
205
  d,
205
206
  f,
206
- p,
207
- m
207
+ p
208
208
  ];
209
- } else e.startsWith("#") ? c.rgba = o.hexToRgb(e) : c.rgba = o.nameToRgb(e) || o.hexToRgb(e);
209
+ } else e.startsWith("#") ? s.rgba = a.hexToRgb(e) : s.rgba = a.nameToRgb(e) || a.hexToRgb(e);
210
210
  }
211
- if (n !== void 0) if (Array.isArray(n)) this.rgba = n;
212
- else if (a === void 0) {
213
- var u = n && "" + n;
214
- u && l(u.toLowerCase());
211
+ if (t !== void 0) if (Array.isArray(t)) this.rgba = t;
212
+ else if (i === void 0) {
213
+ var l = t && "" + t;
214
+ l && c(l.toLowerCase());
215
215
  } else this.rgba = [
216
- n,
216
+ t,
217
+ r,
217
218
  i,
218
- a,
219
- s === void 0 ? 1 : s
219
+ o === void 0 ? 1 : o
220
220
  ];
221
221
  }
222
- return createClass(o, [
222
+ return createClass(a, [
223
223
  {
224
224
  key: "printRGB",
225
225
  value: function(e) {
226
- var n = (e ? this.rgba : this.rgba.slice(0, 3)).map(function(e, n) {
227
- return printNum(e, n === 3 ? 3 : 0);
226
+ var t = (e ? this.rgba : this.rgba.slice(0, 3)).map(function(e, t) {
227
+ return printNum(e, t === 3 ? 3 : 0);
228
228
  });
229
- return e ? "rgba(" + n + ")" : "rgb(" + n + ")";
229
+ return e ? "rgba(" + t + ")" : "rgb(" + t + ")";
230
230
  }
231
231
  },
232
232
  {
233
233
  key: "printHSL",
234
234
  value: function(e) {
235
- var n = [
235
+ var t = [
236
236
  360,
237
237
  100,
238
238
  100,
239
239
  1
240
- ], r = [
240
+ ], n = [
241
241
  "",
242
242
  "%",
243
243
  "%",
244
244
  ""
245
- ], i = (e ? this.hsla : this.hsla.slice(0, 3)).map(function(e, i) {
246
- return printNum(e * n[i], i === 3 ? 3 : 1) + r[i];
245
+ ], r = (e ? this.hsla : this.hsla.slice(0, 3)).map(function(e, r) {
246
+ return printNum(e * t[r], r === 3 ? 3 : 1) + n[r];
247
247
  });
248
- return e ? "hsla(" + i + ")" : "hsl(" + i + ")";
248
+ return e ? "hsla(" + r + ")" : "hsl(" + r + ")";
249
249
  }
250
250
  },
251
251
  {
252
252
  key: "printHex",
253
253
  value: function(e) {
254
- var n = this.hex;
255
- return e ? n : n.substring(0, 7);
254
+ var t = this.hex;
255
+ return e ? t : t.substring(0, 7);
256
256
  }
257
257
  },
258
258
  {
@@ -260,7 +260,7 @@ var Color = function() {
260
260
  get: function() {
261
261
  if (this._rgba) return this._rgba;
262
262
  if (!this._hsla) throw Error("No color is set");
263
- return this._rgba = o.hslToRgb(this._hsla);
263
+ return this._rgba = a.hslToRgb(this._hsla);
264
264
  },
265
265
  set: function(e) {
266
266
  e.length === 3 && (e[3] = 1), this._rgba = e, this._hsla = null;
@@ -283,7 +283,7 @@ var Color = function() {
283
283
  get: function() {
284
284
  if (this._hsla) return this._hsla;
285
285
  if (!this._rgba) throw Error("No color is set");
286
- return this._hsla = o.rgbToHsl(this._rgba);
286
+ return this._hsla = a.rgbToHsl(this._rgba);
287
287
  },
288
288
  set: function(e) {
289
289
  e.length === 3 && (e[3] = 1), this._hsla = e, this._rgba = null;
@@ -304,106 +304,106 @@ var Color = function() {
304
304
  {
305
305
  key: "hex",
306
306
  get: function() {
307
- return "#" + this.rgba.map(function(e, n) {
308
- return n < 3 ? e.toString(16) : Math.round(e * 255).toString(16);
307
+ return "#" + this.rgba.map(function(e, t) {
308
+ return t < 3 ? e.toString(16) : Math.round(e * 255).toString(16);
309
309
  }).map(function(e) {
310
310
  return e.padStart(2, "0");
311
311
  }).join("");
312
312
  },
313
313
  set: function(e) {
314
- this.rgba = o.hexToRgb(e);
314
+ this.rgba = a.hexToRgb(e);
315
315
  }
316
316
  }
317
317
  ], [
318
318
  {
319
319
  key: "hexToRgb",
320
320
  value: function(e) {
321
- var n = (e.startsWith("#") ? e.slice(1) : e).replace(/^(\w{3})$/, "$1F").replace(/^(\w)(\w)(\w)(\w)$/, "$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/, "$1FF");
322
- if (!n.match(/^([0-9a-fA-F]{8})$/)) throw Error("Unknown hex color; " + e);
323
- var r = n.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(e) {
321
+ var t = (e.startsWith("#") ? e.slice(1) : e).replace(/^(\w{3})$/, "$1F").replace(/^(\w)(\w)(\w)(\w)$/, "$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/, "$1FF");
322
+ if (!t.match(/^([0-9a-fA-F]{8})$/)) throw Error("Unknown hex color; " + e);
323
+ var n = t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(e) {
324
324
  return parseInt(e, 16);
325
325
  });
326
- return r[3] /= 255, r;
326
+ return n[3] /= 255, n;
327
327
  }
328
328
  },
329
329
  {
330
330
  key: "nameToRgb",
331
331
  value: function(e) {
332
- var n = colorNames[e.toLowerCase().replace("at", "T").replace(/[aeiouyldf]/g, "").replace("ght", "L").replace("rk", "D").slice(-5, 4)];
333
- return n === void 0 ? n : o.hexToRgb(n.replace(/\-/g, "00").padStart(6, "f"));
332
+ var t = colorNames[e.toLowerCase().replace("at", "T").replace(/[aeiouyldf]/g, "").replace("ght", "L").replace("rk", "D").slice(-5, 4)];
333
+ return t === void 0 ? t : a.hexToRgb(t.replace(/\-/g, "00").padStart(6, "f"));
334
334
  }
335
335
  },
336
336
  {
337
337
  key: "rgbToHsl",
338
338
  value: function(e) {
339
- var n = slicedToArray(e, 4), i = n[0], a = n[1], o = n[2], s = n[3];
340
- i /= 255, a /= 255, o /= 255;
341
- var c = Math.max(i, a, o), l = Math.min(i, a, o), u = void 0, d = void 0, f = (c + l) / 2;
342
- if (c === l) u = d = 0;
339
+ var t = slicedToArray(e, 4), r = t[0], i = t[1], a = t[2], o = t[3];
340
+ r /= 255, i /= 255, a /= 255;
341
+ var s = Math.max(r, i, a), c = Math.min(r, i, a), l = void 0, u = void 0, d = (s + c) / 2;
342
+ if (s === c) l = u = 0;
343
343
  else {
344
- var p = c - l;
345
- switch (d = f > .5 ? p / (2 - c - l) : p / (c + l), c) {
344
+ var f = s - c;
345
+ switch (u = d > .5 ? f / (2 - s - c) : f / (s + c), s) {
346
+ case r:
347
+ l = (i - a) / f + (i < a ? 6 : 0);
348
+ break;
346
349
  case i:
347
- u = (a - o) / p + (a < o ? 6 : 0);
350
+ l = (a - r) / f + 2;
348
351
  break;
349
352
  case a:
350
- u = (o - i) / p + 2;
351
- break;
352
- case o:
353
- u = (i - a) / p + 4;
353
+ l = (r - i) / f + 4;
354
354
  break;
355
355
  }
356
- u /= 6;
356
+ l /= 6;
357
357
  }
358
358
  return [
359
+ l,
359
360
  u,
360
361
  d,
361
- f,
362
- s
362
+ o
363
363
  ];
364
364
  }
365
365
  },
366
366
  {
367
367
  key: "hslToRgb",
368
368
  value: function(e) {
369
- var n = slicedToArray(e, 4), i = n[0], a = n[1], o = n[2], s = n[3], c = void 0, l = void 0, u = void 0;
370
- if (a === 0) c = l = u = o;
369
+ var t = slicedToArray(e, 4), r = t[0], i = t[1], a = t[2], o = t[3], s = void 0, c = void 0, l = void 0;
370
+ if (i === 0) s = c = l = a;
371
371
  else {
372
- var d = function(e, n, r) {
373
- return r < 0 && (r += 1), r > 1 && --r, r < 1 / 6 ? e + (n - e) * 6 * r : r < 1 / 2 ? n : r < 2 / 3 ? e + (n - e) * (2 / 3 - r) * 6 : e;
374
- }, f = o < .5 ? o * (1 + a) : o + a - o * a, p = 2 * o - f;
375
- c = d(p, f, i + 1 / 3), l = d(p, f, i), u = d(p, f, i - 1 / 3);
372
+ var u = function(e, t, n) {
373
+ return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
374
+ }, d = a < .5 ? a * (1 + i) : a + i - a * i, f = 2 * a - d;
375
+ s = u(f, d, r + 1 / 3), c = u(f, d, r), l = u(f, d, r - 1 / 3);
376
376
  }
377
- var m = [
377
+ var p = [
378
+ s * 255,
378
379
  c * 255,
379
- l * 255,
380
- u * 255
380
+ l * 255
381
381
  ].map(Math.round);
382
- return m[3] = s, m;
382
+ return p[3] = o, p;
383
383
  }
384
384
  }
385
- ]), o;
385
+ ]), a;
386
386
  }(), EventBucket = function() {
387
- function r() {
388
- classCallCheck(this, r), this._events = [];
387
+ function n() {
388
+ classCallCheck(this, n), this._events = [];
389
389
  }
390
- return createClass(r, [
390
+ return createClass(n, [
391
391
  {
392
392
  key: "add",
393
- value: function(e, n, r) {
394
- e.addEventListener(n, r, !1), this._events.push({
393
+ value: function(e, t, n) {
394
+ e.addEventListener(t, n, !1), this._events.push({
395
395
  target: e,
396
- type: n,
397
- handler: r
396
+ type: t,
397
+ handler: n
398
398
  });
399
399
  }
400
400
  },
401
401
  {
402
402
  key: "remove",
403
- value: function(e, n, i) {
404
- this._events = this._events.filter(function(a) {
405
- var o = !0;
406
- return e && e !== a.target && (o = !1), n && n !== a.type && (o = !1), i && i !== a.handler && (o = !1), o && r._doRemove(a.target, a.type, a.handler), !o;
403
+ value: function(e, t, r) {
404
+ this._events = this._events.filter(function(i) {
405
+ var a = !0;
406
+ return e && e !== i.target && (a = !1), t && t !== i.type && (a = !1), r && r !== i.handler && (a = !1), a && n._doRemove(i.target, i.type, i.handler), !a;
407
407
  });
408
408
  }
409
409
  },
@@ -411,66 +411,66 @@ var Color = function() {
411
411
  key: "destroy",
412
412
  value: function() {
413
413
  this._events.forEach(function(e) {
414
- return r._doRemove(e.target, e.type, e.handler);
414
+ return n._doRemove(e.target, e.type, e.handler);
415
415
  }), this._events = [];
416
416
  }
417
417
  }
418
418
  ], [{
419
419
  key: "_doRemove",
420
- value: function(e, n, r) {
421
- e.removeEventListener(n, r, !1);
420
+ value: function(e, t, n) {
421
+ e.removeEventListener(t, n, !1);
422
422
  }
423
- }]), r;
423
+ }]), n;
424
424
  }();
425
425
  function parseHTML(e) {
426
- var n = document.createElement("div");
427
- return n.innerHTML = e, n.firstElementChild;
426
+ var t = document.createElement("div");
427
+ return t.innerHTML = e, t.firstElementChild;
428
428
  }
429
- function dragTrack(e, n, r) {
430
- var i = !1;
431
- function a(e, n, r) {
432
- return Math.max(n, Math.min(e, r));
429
+ function dragTrack(e, t, n) {
430
+ var r = !1;
431
+ function i(e, t, n) {
432
+ return Math.max(t, Math.min(e, n));
433
433
  }
434
- function o(e, o, s) {
435
- if (s && (i = !0), i) {
434
+ function a(e, a, o) {
435
+ if (o && (r = !0), r) {
436
436
  e.preventDefault();
437
- var c = n.getBoundingClientRect(), l = c.width, u = c.height, d = o.clientX, f = o.clientY, p = a(d - c.left, 0, l), m = a(f - c.top, 0, u);
438
- r(p / l, m / u);
437
+ var s = t.getBoundingClientRect(), c = s.width, l = s.height, u = a.clientX, d = a.clientY, f = i(u - s.left, 0, c), p = i(d - s.top, 0, l);
438
+ n(f / c, p / l);
439
439
  }
440
440
  }
441
- function s(e, n) {
442
- (e.buttons === void 0 ? e.which : e.buttons) === 1 ? o(e, e, n) : i = !1;
441
+ function o(e, t) {
442
+ (e.buttons === void 0 ? e.which : e.buttons) === 1 ? a(e, e, t) : r = !1;
443
443
  }
444
- function c(e, n) {
445
- e.touches.length === 1 ? o(e, e.touches[0], n) : i = !1;
444
+ function s(e, t) {
445
+ e.touches.length === 1 ? a(e, e.touches[0], t) : r = !1;
446
446
  }
447
- e.add(n, "mousedown", function(e) {
447
+ e.add(t, "mousedown", function(e) {
448
+ o(e, !0);
449
+ }), e.add(t, "touchstart", function(e) {
448
450
  s(e, !0);
449
- }), e.add(n, "touchstart", function(e) {
450
- c(e, !0);
451
- }), e.add(window, "mousemove", s), e.add(n, "touchmove", c), e.add(window, "mouseup", function(e) {
452
- i = !1;
453
- }), e.add(n, "touchend", function(e) {
454
- i = !1;
455
- }), e.add(n, "touchcancel", function(e) {
456
- i = !1;
451
+ }), e.add(window, "mousemove", o), e.add(t, "touchmove", s), e.add(window, "mouseup", function(e) {
452
+ r = !1;
453
+ }), e.add(t, "touchend", function(e) {
454
+ r = !1;
455
+ }), e.add(t, "touchcancel", function(e) {
456
+ r = !1;
457
457
  });
458
458
  }
459
459
  var BG_TRANSP = "linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em", HUES = 360, EVENT_KEY = "keydown", EVENT_CLICK_OUTSIDE = "mousedown", EVENT_TAB_MOVE = "focusin";
460
- function $(e, n) {
461
- return (n || document).querySelector(e);
460
+ function $(e, t) {
461
+ return (t || document).querySelector(e);
462
462
  }
463
463
  function stopEvent(e) {
464
464
  e.preventDefault(), e.stopPropagation();
465
465
  }
466
- function onKey(e, n, r, i, a) {
467
- e.add(n, EVENT_KEY, function(e) {
468
- r.indexOf(e.key) >= 0 && (a && stopEvent(e), i(e));
466
+ function onKey(e, t, n, r, i) {
467
+ e.add(t, EVENT_KEY, function(e) {
468
+ n.indexOf(e.key) >= 0 && (i && stopEvent(e), r(e));
469
469
  });
470
470
  }
471
471
  var Picker = function() {
472
- function r(n) {
473
- classCallCheck(this, r), this.settings = {
472
+ function n(t) {
473
+ classCallCheck(this, n), this.settings = {
474
474
  popup: "right",
475
475
  layout: "default",
476
476
  alpha: !0,
@@ -478,35 +478,35 @@ var Picker = function() {
478
478
  editorFormat: "hex",
479
479
  cancelButton: !1,
480
480
  defaultColor: "#0cf"
481
- }, this._events = new EventBucket(), this.onChange = null, this.onDone = null, this.onOpen = null, this.onClose = null, this.setOptions(n);
481
+ }, this._events = new EventBucket(), this.onChange = null, this.onDone = null, this.onOpen = null, this.onClose = null, this.setOptions(t);
482
482
  }
483
- return createClass(r, [
483
+ return createClass(n, [
484
484
  {
485
485
  key: "setOptions",
486
486
  value: function(e) {
487
- var n = this;
487
+ var t = this;
488
488
  if (!e) return;
489
- var r = this.settings;
490
- function i(e, n, r) {
491
- for (var i in e) r && r.indexOf(i) >= 0 || (n[i] = e[i]);
489
+ var n = this.settings;
490
+ function r(e, t, n) {
491
+ for (var r in e) n && n.indexOf(r) >= 0 || (t[r] = e[r]);
492
492
  }
493
- if (e instanceof HTMLElement) r.parent = e;
493
+ if (e instanceof HTMLElement) n.parent = e;
494
494
  else {
495
- r.parent && e.parent && r.parent !== e.parent && (this._events.remove(r.parent), this._popupInited = !1), i(e, r), e.onChange && (this.onChange = e.onChange), e.onDone && (this.onDone = e.onDone), e.onOpen && (this.onOpen = e.onOpen), e.onClose && (this.onClose = e.onClose);
496
- var a = e.color || e.colour;
497
- a && this._setColor(a);
495
+ n.parent && e.parent && n.parent !== e.parent && (this._events.remove(n.parent), this._popupInited = !1), r(e, n), e.onChange && (this.onChange = e.onChange), e.onDone && (this.onDone = e.onDone), e.onOpen && (this.onOpen = e.onOpen), e.onClose && (this.onClose = e.onClose);
496
+ var i = e.color || e.colour;
497
+ i && this._setColor(i);
498
498
  }
499
- var o = r.parent;
500
- if (o && r.popup && !this._popupInited) {
501
- var s = function(e) {
502
- return n.openHandler(e);
499
+ var a = n.parent;
500
+ if (a && n.popup && !this._popupInited) {
501
+ var o = function(e) {
502
+ return t.openHandler(e);
503
503
  };
504
- this._events.add(o, "click", s), onKey(this._events, o, [
504
+ this._events.add(a, "click", o), onKey(this._events, a, [
505
505
  " ",
506
506
  "Spacebar",
507
507
  "Enter"
508
- ], s), this._popupInited = !0;
509
- } else e.parent && !r.popup && this.show();
508
+ ], o), this._popupInited = !0;
509
+ } else e.parent && !n.popup && this.show();
510
510
  }
511
511
  },
512
512
  {
@@ -514,9 +514,9 @@ var Picker = function() {
514
514
  value: function(e) {
515
515
  if (this.show()) {
516
516
  e && e.preventDefault(), this.settings.parent.style.pointerEvents = "none";
517
- var n = e && e.type === EVENT_KEY ? this._domEdit : this.domElement;
517
+ var t = e && e.type === EVENT_KEY ? this._domEdit : this.domElement;
518
518
  setTimeout(function() {
519
- return n.focus();
519
+ return t.focus();
520
520
  }, 100), this.onOpen && this.onOpen(this.colour);
521
521
  }
522
522
  }
@@ -524,51 +524,51 @@ var Picker = function() {
524
524
  {
525
525
  key: "closeHandler",
526
526
  value: function(e) {
527
- var n = e && e.type, r = !1;
528
- if (!e) r = !0;
529
- else if (n === EVENT_CLICK_OUTSIDE || n === EVENT_TAB_MOVE) {
530
- var i = (this.__containedEvent || 0) + 100;
531
- e.timeStamp > i && (r = !0);
532
- } else stopEvent(e), r = !0;
533
- r && this.hide() && (this.settings.parent.style.pointerEvents = "", n !== EVENT_CLICK_OUTSIDE && this.settings.parent.focus(), this.onClose && this.onClose(this.colour));
527
+ var t = e && e.type, n = !1;
528
+ if (!e) n = !0;
529
+ else if (t === EVENT_CLICK_OUTSIDE || t === EVENT_TAB_MOVE) {
530
+ var r = (this.__containedEvent || 0) + 100;
531
+ e.timeStamp > r && (n = !0);
532
+ } else stopEvent(e), n = !0;
533
+ n && this.hide() && (this.settings.parent.style.pointerEvents = "", t !== EVENT_CLICK_OUTSIDE && this.settings.parent.focus(), this.onClose && this.onClose(this.colour));
534
534
  }
535
535
  },
536
536
  {
537
537
  key: "movePopup",
538
- value: function(e, n) {
539
- this.closeHandler(), this.setOptions(e), n && this.openHandler();
538
+ value: function(e, t) {
539
+ this.closeHandler(), this.setOptions(e), t && this.openHandler();
540
540
  }
541
541
  },
542
542
  {
543
543
  key: "setColor",
544
- value: function(e, n) {
545
- this._setColor(e, { silent: n });
544
+ value: function(e, t) {
545
+ this._setColor(e, { silent: t });
546
546
  }
547
547
  },
548
548
  {
549
549
  key: "_setColor",
550
- value: function(e, n) {
550
+ value: function(e, t) {
551
551
  if (typeof e == "string" && (e = e.trim()), e) {
552
- n ||= {};
553
- var r = void 0;
552
+ t ||= {};
553
+ var n = void 0;
554
554
  try {
555
- r = new Color(e);
555
+ n = new Color(e);
556
556
  } catch (e) {
557
- if (n.failSilently) return;
557
+ if (t.failSilently) return;
558
558
  throw e;
559
559
  }
560
560
  if (!this.settings.alpha) {
561
- var i = r.hsla;
562
- i[3] = 1, r.hsla = i;
561
+ var r = n.hsla;
562
+ r[3] = 1, n.hsla = r;
563
563
  }
564
- this.colour = this.color = r, this._setHSLA(null, null, null, null, n);
564
+ this.colour = this.color = n, this._setHSLA(null, null, null, null, t);
565
565
  }
566
566
  }
567
567
  },
568
568
  {
569
569
  key: "setColour",
570
- value: function(e, n) {
571
- this.setColor(e, n);
570
+ value: function(e, t) {
571
+ this.setColor(e, t);
572
572
  }
573
573
  },
574
574
  {
@@ -579,9 +579,9 @@ var Picker = function() {
579
579
  var e = this._toggleDOM(!0);
580
580
  return this._setPosition(), e;
581
581
  }
582
- var n = parseHTML(this.settings.template || "<div class=\"picker_wrapper\" tabindex=\"-1\"><div class=\"picker_arrow\"></div><div class=\"picker_hue picker_slider\"><div class=\"picker_selector\"></div></div><div class=\"picker_sl\"><div class=\"picker_selector\"></div></div><div class=\"picker_alpha picker_slider\"><div class=\"picker_selector\"></div></div><div class=\"picker_editor\"><input aria-label=\"Type a color name or hex value\"/></div><div class=\"picker_sample\"></div><div class=\"picker_done\"><button>Ok</button></div><div class=\"picker_cancel\"><button>Cancel</button></div></div>");
583
- return this.domElement = n, this._domH = $(".picker_hue", n), this._domSL = $(".picker_sl", n), this._domA = $(".picker_alpha", n), this._domEdit = $(".picker_editor input", n), this._domSample = $(".picker_sample", n), this._domOkay = $(".picker_done button", n), this._domCancel = $(".picker_cancel button", n), n.classList.add("layout_" + this.settings.layout), this.settings.alpha || n.classList.add("no_alpha"), this.settings.editor || n.classList.add("no_editor"), this.settings.cancelButton || n.classList.add("no_cancel"), this._ifPopup(function() {
584
- return n.classList.add("popup");
582
+ var t = parseHTML(this.settings.template || "<div class=\"picker_wrapper\" tabindex=\"-1\"><div class=\"picker_arrow\"></div><div class=\"picker_hue picker_slider\"><div class=\"picker_selector\"></div></div><div class=\"picker_sl\"><div class=\"picker_selector\"></div></div><div class=\"picker_alpha picker_slider\"><div class=\"picker_selector\"></div></div><div class=\"picker_editor\"><input aria-label=\"Type a color name or hex value\"/></div><div class=\"picker_sample\"></div><div class=\"picker_done\"><button>Ok</button></div><div class=\"picker_cancel\"><button>Cancel</button></div></div>");
583
+ return this.domElement = t, this._domH = $(".picker_hue", t), this._domSL = $(".picker_sl", t), this._domA = $(".picker_alpha", t), this._domEdit = $(".picker_editor input", t), this._domSample = $(".picker_sample", t), this._domOkay = $(".picker_done button", t), this._domCancel = $(".picker_cancel button", t), t.classList.add("layout_" + this.settings.layout), this.settings.alpha || t.classList.add("no_alpha"), this.settings.editor || t.classList.add("no_editor"), this.settings.cancelButton || t.classList.add("no_cancel"), this._ifPopup(function() {
584
+ return t.classList.add("popup");
585
585
  }), this._setPosition(), this.colour ? this._updateUI() : this._setColor(this.settings.defaultColor), this._bindEvents(), !0;
586
586
  }
587
587
  },
@@ -600,77 +600,77 @@ var Picker = function() {
600
600
  {
601
601
  key: "_bindEvents",
602
602
  value: function() {
603
- var e = this, n = this, r = this.domElement, i = this._events;
604
- function a(e, n, r) {
605
- i.add(e, n, r);
603
+ var e = this, t = this, n = this.domElement, r = this._events;
604
+ function i(e, t, n) {
605
+ r.add(e, t, n);
606
606
  }
607
- a(r, "click", function(e) {
607
+ i(n, "click", function(e) {
608
608
  return e.preventDefault();
609
- }), dragTrack(i, this._domH, function(e, r) {
610
- return n._setHSLA(e);
611
- }), dragTrack(i, this._domSL, function(e, r) {
612
- return n._setHSLA(null, e, 1 - r);
613
- }), this.settings.alpha && dragTrack(i, this._domA, function(e, r) {
614
- return n._setHSLA(null, null, null, 1 - r);
609
+ }), dragTrack(r, this._domH, function(e, n) {
610
+ return t._setHSLA(e);
611
+ }), dragTrack(r, this._domSL, function(e, n) {
612
+ return t._setHSLA(null, e, 1 - n);
613
+ }), this.settings.alpha && dragTrack(r, this._domA, function(e, n) {
614
+ return t._setHSLA(null, null, null, 1 - n);
615
615
  });
616
- var o = this._domEdit;
617
- a(o, "input", function(e) {
618
- n._setColor(this.value, {
616
+ var a = this._domEdit;
617
+ i(a, "input", function(e) {
618
+ t._setColor(this.value, {
619
619
  fromEditor: !0,
620
620
  failSilently: !0
621
621
  });
622
- }), a(o, "focus", function(e) {
623
- var n = this;
624
- n.selectionStart === n.selectionEnd && n.select();
622
+ }), i(a, "focus", function(e) {
623
+ var t = this;
624
+ t.selectionStart === t.selectionEnd && t.select();
625
625
  }), this._ifPopup(function() {
626
- var n = function(n) {
627
- return e.closeHandler(n);
626
+ var t = function(t) {
627
+ return e.closeHandler(t);
628
628
  };
629
- a(window, EVENT_CLICK_OUTSIDE, n), a(window, EVENT_TAB_MOVE, n), onKey(i, r, ["Esc", "Escape"], n);
630
- var o = function(n) {
631
- e.__containedEvent = n.timeStamp;
629
+ i(window, EVENT_CLICK_OUTSIDE, t), i(window, EVENT_TAB_MOVE, t), onKey(r, n, ["Esc", "Escape"], t);
630
+ var a = function(t) {
631
+ e.__containedEvent = t.timeStamp;
632
632
  };
633
- a(r, EVENT_CLICK_OUTSIDE, o), a(r, EVENT_TAB_MOVE, o), a(e._domCancel, "click", n);
633
+ i(n, EVENT_CLICK_OUTSIDE, a), i(n, EVENT_TAB_MOVE, a), i(e._domCancel, "click", t);
634
634
  });
635
- var s = function(n) {
635
+ var o = function(t) {
636
636
  e._ifPopup(function() {
637
- return e.closeHandler(n);
637
+ return e.closeHandler(t);
638
638
  }), e.onDone && e.onDone(e.colour);
639
639
  };
640
- a(this._domOkay, "click", s), onKey(i, r, ["Enter"], s);
640
+ i(this._domOkay, "click", o), onKey(r, n, ["Enter"], o);
641
641
  }
642
642
  },
643
643
  {
644
644
  key: "_setPosition",
645
645
  value: function() {
646
- var e = this.settings.parent, n = this.domElement;
647
- e !== n.parentNode && e.appendChild(n), this._ifPopup(function(r) {
646
+ var e = this.settings.parent, t = this.domElement;
647
+ e !== t.parentNode && e.appendChild(t), this._ifPopup(function(n) {
648
648
  getComputedStyle(e).position === "static" && (e.style.position = "relative");
649
- var i = r === !0 ? "popup_right" : "popup_" + r;
649
+ var r = n === !0 ? "popup_right" : "popup_" + n;
650
650
  [
651
651
  "popup_top",
652
652
  "popup_bottom",
653
653
  "popup_left",
654
654
  "popup_right"
655
655
  ].forEach(function(e) {
656
- e === i ? n.classList.add(e) : n.classList.remove(e);
657
- }), n.classList.add(i);
656
+ e === r ? t.classList.add(e) : t.classList.remove(e);
657
+ }), t.classList.add(r);
658
658
  });
659
659
  }
660
660
  },
661
661
  {
662
662
  key: "_setHSLA",
663
- value: function(e, n, r, i, a) {
664
- a ||= {};
665
- var o = this.colour, s = o.hsla;
663
+ value: function(e, t, n, r, i) {
664
+ i ||= {};
665
+ var a = this.colour, o = a.hsla;
666
666
  [
667
667
  e,
668
+ t,
668
669
  n,
669
- r,
670
- i
671
- ].forEach(function(e, n) {
672
- (e || e === 0) && (s[n] = e);
673
- }), o.hsla = s, this._updateUI(a), this.onChange && !a.silent && this.onChange(o);
670
+ r
671
+ ].forEach(function(e, t) {
672
+ (e || e === 0) && (o[t] = e);
673
+ }), a.hsla = o, this._updateUI(i), this.onChange && !i.silent && this.onChange(a);
674
674
  }
675
675
  },
676
676
  {
@@ -678,47 +678,47 @@ var Picker = function() {
678
678
  value: function(e) {
679
679
  if (!this.domElement) return;
680
680
  e ||= {};
681
- var n = this.colour, r = n.hsla, i = "hsl(" + r[0] * HUES + ", 100%, 50%)", a = n.hslString, o = n.hslaString, s = this._domH, c = this._domSL, l = this._domA, f = $(".picker_selector", s), p = $(".picker_selector", c), m = $(".picker_selector", l);
682
- function h(e, n, r) {
683
- n.style.left = r * 100 + "%";
681
+ var t = this.colour, n = t.hsla, r = "hsl(" + n[0] * HUES + ", 100%, 50%)", i = t.hslString, a = t.hslaString, o = this._domH, s = this._domSL, c = this._domA, d = $(".picker_selector", o), f = $(".picker_selector", s), p = $(".picker_selector", c);
682
+ function m(e, t, n) {
683
+ t.style.left = n * 100 + "%";
684
684
  }
685
- function g(e, n, r) {
686
- n.style.top = r * 100 + "%";
685
+ function h(e, t, n) {
686
+ t.style.top = n * 100 + "%";
687
687
  }
688
- h(s, f, r[0]), this._domSL.style.backgroundColor = this._domH.style.color = i, h(c, p, r[1]), g(c, p, 1 - r[2]), c.style.color = a, g(l, m, 1 - r[3]);
689
- var _ = a, v = "linear-gradient(" + [_, _.replace("hsl", "hsla").replace(")", ", 0)")] + ")";
690
- if (this._domA.style.background = v + ", " + BG_TRANSP, !e.fromEditor) {
691
- var y = this.settings.editorFormat, b = this.settings.alpha, x = void 0;
692
- switch (y) {
688
+ m(o, d, n[0]), this._domSL.style.backgroundColor = this._domH.style.color = r, m(s, f, n[1]), h(s, f, 1 - n[2]), s.style.color = i, h(c, p, 1 - n[3]);
689
+ var g = i, _ = "linear-gradient(" + [g, g.replace("hsl", "hsla").replace(")", ", 0)")] + ")";
690
+ if (this._domA.style.background = _ + ", " + BG_TRANSP, !e.fromEditor) {
691
+ var v = this.settings.editorFormat, y = this.settings.alpha, b = void 0;
692
+ switch (v) {
693
693
  case "rgb":
694
- x = n.printRGB(b);
694
+ b = t.printRGB(y);
695
695
  break;
696
696
  case "hsl":
697
- x = n.printHSL(b);
697
+ b = t.printHSL(y);
698
698
  break;
699
- default: x = n.printHex(b);
699
+ default: b = t.printHex(y);
700
700
  }
701
- this._domEdit.value = x;
701
+ this._domEdit.value = b;
702
702
  }
703
- this._domSample.style.color = o;
703
+ this._domSample.style.color = a;
704
704
  }
705
705
  },
706
706
  {
707
707
  key: "_ifPopup",
708
- value: function(e, n) {
709
- this.settings.parent && this.settings.popup ? e && e(this.settings.popup) : n && n();
708
+ value: function(e, t) {
709
+ this.settings.parent && this.settings.popup ? e && e(this.settings.popup) : t && t();
710
710
  }
711
711
  },
712
712
  {
713
713
  key: "_toggleDOM",
714
714
  value: function(e) {
715
- var n = this.domElement;
716
- if (!n) return !1;
717
- var r = e ? "" : "none", i = n.style.display !== r;
718
- return i && (n.style.display = r), i;
715
+ var t = this.domElement;
716
+ if (!t) return !1;
717
+ var n = e ? "" : "none", r = t.style.display !== n;
718
+ return r && (t.style.display = n), r;
719
719
  }
720
720
  }
721
- ]), r;
721
+ ]), n;
722
722
  }(), style = document.createElement("style");
723
723
  style.textContent = ".picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:\"\";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:\"\";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:\"\";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:\"\";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}", document.documentElement.firstElementChild.appendChild(style), Picker.StyleElement = style;
724
724
  export { Picker as default };