btxui 1.1.22 → 1.1.26

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.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, reactive, onBeforeMount, renderSlot, watch, onMounted, openBlock, createBlock, normalizeClass, withCtx, createElementVNode, normalizeStyle, getCurrentInstance, resolveDynamicComponent, withModifiers, createElementBlock, nextTick, createVNode, resolveComponent, Fragment, createCommentVNode, watchEffect, withDirectives, toDisplayString, vShow, vModelDynamic, vModelText, mergeProps, createTextVNode, renderList, createSlots, render, KeepAlive, inject, unref, normalizeProps, guardReactiveProps, provide } from "vue";
1
+ import { defineComponent, ref, computed, reactive, onBeforeMount, renderSlot, watch, onMounted, openBlock, createBlock, normalizeClass, withCtx, createElementVNode, normalizeStyle, getCurrentInstance, resolveDynamicComponent, withModifiers, createElementBlock, nextTick, createVNode, resolveComponent, Fragment, createCommentVNode, watchEffect, withDirectives, toDisplayString, vShow, vModelDynamic, createTextVNode, vModelText, mergeProps, renderList, createSlots, render, KeepAlive, inject, unref, normalizeProps, guardReactiveProps, provide } from "vue";
2
2
  const theme = {
3
3
  // 预置主题色
4
4
  colors: {
@@ -23,6 +23,11 @@ const theme = {
23
23
  };
24
24
  const prestyles = {
25
25
  //预置样式-----------------------------------------------------------------------------------
26
+ // 预置字号
27
+ "lg": `font-size: 1.3rem;`,
28
+ "md": `font-size: 1.15rem;`,
29
+ "sm": `font-size: 1rem;`,
30
+ "xs": `font-size: .85rem;`,
26
31
  // 文本对齐
27
32
  "pcenter": `text-align: center;`,
28
33
  "pright": `text-align: right;`,
@@ -109,6 +114,7 @@ const prestyles = {
109
114
  "bsize-max": `background-size: 100% 100%;`,
110
115
  "bsize-max-h": `background-size: auto 100%;`,
111
116
  "bsize-max-w": `background-size: 100% auto;`,
117
+ "no-rw": `max-width: none;`,
112
118
  // 背景 - 布局 - 九宫格
113
119
  "bpos-1": `background-position: left top;`,
114
120
  "bpos-2": `background-position: center top;`,
@@ -205,6 +211,9 @@ const prestyles = {
205
211
  "ani-mode-backwards": `animation-fill-mode: backwards;`,
206
212
  "ani-mode-both": `animation-fill-mode: both;`,
207
213
  "ani-loop": `animation-timing-function: linear; animation-iteration-count: infinite;`,
214
+ // 鼠标光标
215
+ "cursor-grab": `cursor: grab;`,
216
+ "cursor-grabbing": `cursor: grabbing;`,
208
217
  // 二段赋值-----------------------------------------------------------------------------------
209
218
  // 文字颜色
210
219
  "color": {
@@ -246,6 +255,11 @@ const prestyles = {
246
255
  "grow": {
247
256
  pro: "flex-grow"
248
257
  },
258
+ // 弹性布局项目间距
259
+ "gap": {
260
+ pro: "gap",
261
+ unit: "rem"
262
+ },
249
263
  // 自收缩比率
250
264
  "basis": {
251
265
  pro: "flex-basis"
@@ -932,8 +946,19 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
932
946
  touchDuration: {},
933
947
  eventProxy: { type: Boolean }
934
948
  },
935
- emits: ["on_click", "on_enter", "on_move", "on_leave", "on_dblclick", "on_longTouch", "on_transend"],
936
- setup(__props, { emit }) {
949
+ emits: [
950
+ "on_click",
951
+ "on_mousedown",
952
+ "on_wheel",
953
+ "on_mouseup",
954
+ "on_enter",
955
+ "on_move",
956
+ "on_leave",
957
+ "on_dblclick",
958
+ "on_longTouch",
959
+ "on_transend"
960
+ ],
961
+ setup(__props, { expose: __expose, emit }) {
937
962
  const props = __props;
938
963
  const { proxy } = getCurrentInstance();
939
964
  const $anchor = ref();
@@ -1003,10 +1028,16 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1003
1028
  clearTimeout(t);
1004
1029
  }
1005
1030
  };
1031
+ const wheel = (e) => {
1032
+ emit("on_wheel", e);
1033
+ };
1006
1034
  onMounted(() => {
1007
1035
  if (props.download)
1008
1036
  $anchor.value.download = props.download;
1009
1037
  });
1038
+ __expose({
1039
+ $el: $anchor
1040
+ });
1010
1041
  return (_ctx, _cache) => {
1011
1042
  return openBlock(), createBlock(_sfc_main$y, {
1012
1043
  class: normalizeClass(_ctx.class),
@@ -1020,15 +1051,18 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1020
1051
  style: normalizeStyle(`user-select: none; cursor: ${cursor.value};`),
1021
1052
  ref_key: "$anchor",
1022
1053
  ref: $anchor,
1023
- onMouseenter: enter,
1024
- onTouchstart: enter,
1025
- onMousemove: move,
1026
- onTouchmove: move,
1027
- onMouseleave: leave,
1054
+ onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.$emit("on_mousedown", $event), ["prevent"])),
1055
+ onMouseup: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.$emit("on_mouseup", $event), ["prevent"])),
1056
+ onMouseenter: withModifiers(enter, ["prevent"]),
1057
+ onMousemove: withModifiers(move, ["prevent"]),
1058
+ onMouseleave: withModifiers(leave, ["prevent"]),
1059
+ onTouchstart: withModifiers(enter, ["prevent"]),
1060
+ onTouchmove: withModifiers(move, ["prevent"]),
1028
1061
  onTouchend: leave,
1029
1062
  onClick: click,
1030
1063
  onDblclick: withModifiers(dblclick, ["stop"]),
1031
- onTransitionend: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("on_transend", $event)),
1064
+ onWheel: wheel,
1065
+ onTransitionend: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("on_transend", $event)),
1032
1066
  target: target.value,
1033
1067
  class: normalizeClass(scope.className),
1034
1068
  hover: _ctx.hover ? true : "",
@@ -1040,7 +1074,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1040
1074
  renderSlot(_ctx.$slots, "default")
1041
1075
  ]),
1042
1076
  _: 2
1043
- }, 1064, ["style", "onDblclick", "target", "class", "hover", "state", "active", "href"]))
1077
+ }, 1064, ["style", "onMouseenter", "onMousemove", "onMouseleave", "onTouchstart", "onTouchmove", "onDblclick", "target", "class", "hover", "state", "active", "href"]))
1044
1078
  ]),
1045
1079
  _: 3
1046
1080
  }, 8, ["class", "states", "hover", "active", "cname"]);
@@ -1061,7 +1095,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1061
1095
  cname: {}
1062
1096
  },
1063
1097
  emits: ["on_load"],
1064
- setup(__props, { emit }) {
1098
+ setup(__props, { expose: __expose, emit }) {
1065
1099
  const props = __props;
1066
1100
  const img = computed(() => props.img);
1067
1101
  const src = ref("");
@@ -1082,6 +1116,9 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1082
1116
  onMounted(() => {
1083
1117
  setSrc();
1084
1118
  });
1119
+ __expose({
1120
+ $el: $img
1121
+ });
1085
1122
  return (_ctx, _cache) => {
1086
1123
  return openBlock(), createBlock(_sfc_main$y, {
1087
1124
  class: normalizeClass(_ctx.class),
@@ -1095,7 +1132,10 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1095
1132
  src: src.value,
1096
1133
  class: normalizeClass(`${scope.className} ani-fade-in`),
1097
1134
  state: _ctx.state,
1098
- style: normalizeStyle({ display: "block", ...scope.matrixStyle }),
1135
+ style: normalizeStyle({
1136
+ display: "block",
1137
+ ...scope.matrixStyle
1138
+ }),
1099
1139
  alt: _ctx.alt,
1100
1140
  ref_key: "$img",
1101
1141
  ref: $img
@@ -1237,7 +1277,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1237
1277
  rule: {},
1238
1278
  cname: {},
1239
1279
  aspectHeight: { type: Boolean },
1240
- hideClear: { type: Boolean }
1280
+ hideClear: { type: Boolean },
1281
+ step: {},
1282
+ max: {},
1283
+ min: {}
1241
1284
  },
1242
1285
  emits: ["update:text", "on_focus", "on_blur", "on_change", "multiline"],
1243
1286
  setup(__props, { expose: __expose, emit }) {
@@ -1294,7 +1337,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1294
1337
  const origHeight = ref();
1295
1338
  const input = () => {
1296
1339
  var _a;
1297
- emit("update:text", (_a = val.value) == null ? void 0 : _a.trim());
1340
+ emit("update:text", (_a = val.value) == null ? void 0 : _a.toString().trim());
1298
1341
  };
1299
1342
  const input2 = () => {
1300
1343
  const text = $input.value.innerText.trim();
@@ -1309,6 +1352,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1309
1352
  };
1310
1353
  const focusState = ref(false);
1311
1354
  const blurEvent = (e) => {
1355
+ props.type === "number" && val.value && adjustNum(parseFloat(val.value));
1312
1356
  focusState.value = false;
1313
1357
  emit("on_blur", check(), e);
1314
1358
  };
@@ -1337,6 +1381,17 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1337
1381
  input();
1338
1382
  }
1339
1383
  };
1384
+ const adjustNum = (num) => {
1385
+ if (props.min)
1386
+ num = Math.max(num, props.min);
1387
+ if (props.max)
1388
+ num = Math.min(num, props.max);
1389
+ val.value = num.toString();
1390
+ input();
1391
+ };
1392
+ const update = (step) => {
1393
+ adjustNum((val.value ? parseFloat(val.value) : 0) + step * (props.step || 1));
1394
+ };
1340
1395
  __expose({
1341
1396
  check,
1342
1397
  focus: function() {
@@ -1353,9 +1408,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1353
1408
  });
1354
1409
  });
1355
1410
  return (_ctx, _cache) => {
1356
- const _component_b_icon = resolveComponent("b-icon");
1357
1411
  const _component_b_hot = resolveComponent("b-hot");
1358
1412
  const _component_b_view = resolveComponent("b-view");
1413
+ const _component_b_icon = resolveComponent("b-icon");
1359
1414
  return openBlock(), createBlock(_sfc_main$y, {
1360
1415
  class: normalizeClass(_ctx.class),
1361
1416
  focus: _ctx.focus,
@@ -1409,10 +1464,45 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1409
1464
  }, null, 42, _hoisted_2$2)), [
1410
1465
  [vModelDynamic, val.value]
1411
1466
  ]),
1412
- !_ctx.readonly && !_ctx.aspectHeight && !_ctx.hideClear ? (openBlock(), createBlock(_component_b_hot, {
1467
+ _ctx.type === "number" ? (openBlock(), createBlock(_component_b_view, {
1413
1468
  key: 3,
1469
+ class: "trans-fast abs r-6-px gap-2-px flex-4",
1470
+ states: {
1471
+ show: "alpha-1 z-1 visible",
1472
+ hide: "alpha-0"
1473
+ },
1474
+ state: focusState.value ? "show" : "hide"
1475
+ }, {
1476
+ default: withCtx(() => [
1477
+ createVNode(_component_b_hot, {
1478
+ onOn_click: _cache[3] || (_cache[3] = ($event) => update(1)),
1479
+ class: "flex-5 h-1d8 w-1d8 bg-color-neutral solid line-neutral thick-1 round-sm",
1480
+ active: "dark-sm",
1481
+ hover: "alpha-d8"
1482
+ }, {
1483
+ default: withCtx(() => [
1484
+ createTextVNode(" + ")
1485
+ ]),
1486
+ _: 1
1487
+ }),
1488
+ createVNode(_component_b_hot, {
1489
+ onOn_click: _cache[4] || (_cache[4] = ($event) => update(-1)),
1490
+ class: "flex-5 h-1d8 w-1d8 bg-color-neutral solid line-neutral thick-1 round-sm",
1491
+ active: "dark-sm",
1492
+ hover: "alpha-d8"
1493
+ }, {
1494
+ default: withCtx(() => [
1495
+ createTextVNode(" - ")
1496
+ ]),
1497
+ _: 1
1498
+ })
1499
+ ]),
1500
+ _: 1
1501
+ }, 8, ["state"])) : createCommentVNode("", true),
1502
+ !_ctx.readonly && !_ctx.aspectHeight && !_ctx.hideClear && _ctx.type !== "number" ? (openBlock(), createBlock(_component_b_hot, {
1503
+ key: 4,
1414
1504
  onOn_click: clear,
1415
- class: "abs r-1 trans-fast",
1505
+ class: "trans-fast abs r-1",
1416
1506
  states: {
1417
1507
  show: "alpha-1 z-1 visible",
1418
1508
  hide: "alpha-0"
@@ -1952,7 +2042,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1952
2042
  btnRound: { type: Boolean },
1953
2043
  btnWidth: {},
1954
2044
  hotData: {},
1955
- iconData: {}
2045
+ iconData: {},
2046
+ size: {}
1956
2047
  },
1957
2048
  setup(__props) {
1958
2049
  const props = __props;
@@ -1990,9 +2081,21 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1990
2081
  bg: setBg("active", "Ce7e7e7")
1991
2082
  };
1992
2083
  });
2084
+ const size = computed(() => {
2085
+ switch (props.size) {
2086
+ case "lg":
2087
+ return `pad-v-d65 lg bolder-550`;
2088
+ case "sm":
2089
+ return `pad-v-d17 sm`;
2090
+ case "xs":
2091
+ return `pad-v-d04 xs`;
2092
+ default:
2093
+ return `pad-v-d37 md bolder-470`;
2094
+ }
2095
+ });
1993
2096
  return (_ctx, _cache) => {
1994
2097
  return openBlock(), createBlock(_sfc_main$v, mergeProps(_ctx.hotData, {
1995
- class: `flex-5 pad-h-1d4 pad-v-d4 thick-1 ellipsis ${_ctx.btnRound ? "round-lg" : "round-sm"} ${_ctx.btnWidth ? "lw-" + _ctx.btnWidth : ""} ${normal.value.bg} ${normal.value.text} ${normal.value.line} solid`,
2098
+ class: `flex-5 pad-h-1d4 ${size.value} thick-1 ellipsis ${_ctx.btnRound ? "round-lg" : "round-sm"} ${_ctx.btnWidth ? "lw-" + _ctx.btnWidth : ""} ${normal.value.bg} ${normal.value.text} ${normal.value.line} solid`,
1996
2099
  hover: `${hover.value.text} ${hover.value.bg} ${hover.value.line}`,
1997
2100
  active: `${active.value.text} ${active.value.bg} ${active.value.line}`
1998
2101
  }), {
@@ -3046,46 +3149,282 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3046
3149
  setup(__props, { emit }) {
3047
3150
  const props = __props;
3048
3151
  const size = computed(() => props.compress ? 1024 * 1024 * 20 : props.size);
3049
- const imgUpload = async (files, checkResult) => {
3152
+ const imgUpload = (files, checkResult) => {
3050
3153
  if (checkResult.success) {
3051
3154
  let file = files[0];
3052
3155
  const fileReader = new FileReader();
3053
3156
  fileReader.readAsDataURL(files[0]);
3054
- fileReader.onload = (e) => {
3055
- var _a;
3056
- emit("update:preview", (_a = e.target) == null ? void 0 : _a.result);
3157
+ fileReader.onload = async (e) => {
3158
+ var _a, _b;
3159
+ if (props == null ? void 0 : props.compress) {
3160
+ if (props.compress.clip) {
3161
+ openCrop((_a = e.target) == null ? void 0 : _a.result, file);
3162
+ return;
3163
+ }
3164
+ file = await compress(file, props.compress);
3165
+ }
3166
+ emit("update:preview", (_b = e.target) == null ? void 0 : _b.result);
3167
+ emit("on_upload", file);
3168
+ };
3169
+ }
3170
+ };
3171
+ const showCrop = ref(false);
3172
+ const cropSrc = ref("");
3173
+ const $cropImage = ref();
3174
+ const $cropArea = ref();
3175
+ const scale = ref(1);
3176
+ const offset = ref({ x: 0, y: 0 });
3177
+ const dragging = ref(false);
3178
+ const lastPos = ref({ x: 0, y: 0 });
3179
+ const pinchData = ref({
3180
+ startDistance: 0,
3181
+ // 初始两指距离
3182
+ startScale: 1,
3183
+ // 初始缩放
3184
+ origin: { x: 0, y: 0 },
3185
+ // 缩放中心点
3186
+ startOffset: { x: 0, y: 0 }
3187
+ // 初始偏移
3188
+ });
3189
+ const currentFile = ref(null);
3190
+ const imgNatural = ref({ w: 0, h: 0 });
3191
+ const outputWidth = computed(() => {
3192
+ var _a;
3193
+ return ((_a = props.compress) == null ? void 0 : _a.width) || 0;
3194
+ });
3195
+ const outputHeight = computed(() => {
3196
+ var _a;
3197
+ return ((_a = props.compress) == null ? void 0 : _a.height) || 0;
3198
+ });
3199
+ const setImg = () => {
3200
+ const w = imgNatural.value.w * scale.value;
3201
+ const h = imgNatural.value.h * scale.value;
3202
+ nextTick(() => {
3203
+ if (!$cropImage.value)
3204
+ return;
3205
+ $cropImage.value.$el.style.width = w ? w + "px" : "auto";
3206
+ $cropImage.value.$el.style.height = h ? h + "px" : "auto";
3207
+ $cropImage.value.$el.style.top = offset.value.y + "px";
3208
+ $cropImage.value.$el.style.left = offset.value.x + "px";
3209
+ });
3210
+ };
3211
+ const onWheel = (e) => {
3212
+ const delta = e.deltaY < 0 ? 1.1 : 0.9;
3213
+ scale.value = Math.max(0.1, Math.min(5, scale.value * delta));
3214
+ setImg();
3215
+ };
3216
+ const startDrag = (e) => {
3217
+ dragging.value = true;
3218
+ lastPos.value = { x: e.clientX, y: e.clientY };
3219
+ $cropImage.value.$el.style.cursor = "grabbing";
3220
+ };
3221
+ const dragMove = (e) => {
3222
+ if (!dragging.value)
3223
+ return;
3224
+ const { clientX, clientY } = e;
3225
+ const dx = clientX - lastPos.value.x;
3226
+ const dy = clientY - lastPos.value.y;
3227
+ offset.value.x += dx;
3228
+ offset.value.y += dy;
3229
+ lastPos.value = { x: clientX, y: clientY };
3230
+ setImg();
3231
+ };
3232
+ const onDrag = (e) => {
3233
+ (e == null ? void 0 : e.touches) ? onTouchMove(e) : dragMove(e);
3234
+ };
3235
+ const endDrag = () => {
3236
+ dragging.value = false;
3237
+ $cropImage.value.$el.style.cursor = "grab";
3238
+ };
3239
+ const onTouchStart = (e) => {
3240
+ if (!(e == null ? void 0 : e.touches))
3241
+ return;
3242
+ if (e.touches.length === 1) {
3243
+ const t = e.touches[0];
3244
+ startDrag({ clientX: t.clientX, clientY: t.clientY });
3245
+ } else if (e.touches.length === 2 && $cropArea.value) {
3246
+ const [t1, t2] = e.touches;
3247
+ const dist = Math.hypot(t2.clientX - t1.clientX, t2.clientY - t1.clientY);
3248
+ pinchData.value.startDistance = dist;
3249
+ pinchData.value.startScale = scale.value;
3250
+ pinchData.value.startOffset = { ...offset.value };
3251
+ const rect = $cropArea.value.getBoundingClientRect();
3252
+ const midX = (t1.clientX + t2.clientX) / 2 - rect.left;
3253
+ const midY = (t1.clientY + t2.clientY) / 2 - rect.top;
3254
+ pinchData.value.origin = { x: midX, y: midY };
3255
+ }
3256
+ };
3257
+ const onTouchMove = (e) => {
3258
+ if (e.touches.length === 1 && dragging.value) {
3259
+ const t = e.touches[0];
3260
+ dragMove({ clientX: t.clientX, clientY: t.clientY });
3261
+ } else if (e.touches.length === 2) {
3262
+ const [t1, t2] = e.touches;
3263
+ const dist = Math.hypot(t2.clientX - t1.clientX, t2.clientY - t1.clientY);
3264
+ const S0 = pinchData.value.startScale;
3265
+ const newScale = S0 * dist / pinchData.value.startDistance;
3266
+ const S1 = Math.max(0.1, Math.min(5, newScale));
3267
+ const C = pinchData.value.origin;
3268
+ const O0 = pinchData.value.startOffset;
3269
+ offset.value = {
3270
+ x: O0.x + (1 - S1 / S0) * (C.x - O0.x),
3271
+ y: O0.y + (1 - S1 / S0) * (C.y - O0.y)
3057
3272
  };
3058
- if (props.compress)
3059
- file = await compress(files[0], props.compress);
3060
- emit("on_upload", file, checkResult);
3273
+ scale.value = S1;
3274
+ setImg();
3061
3275
  }
3062
3276
  };
3277
+ const openCrop = (dataUrl, file) => {
3278
+ currentFile.value = file;
3279
+ scale.value = 1;
3280
+ offset.value = { x: 0, y: 0 };
3281
+ showCrop.value = true;
3282
+ nextTick(() => {
3283
+ cropSrc.value = dataUrl;
3284
+ });
3285
+ };
3286
+ const onImgLoad = () => {
3287
+ nextTick(() => {
3288
+ const img = $cropImage.value.$el;
3289
+ const area = $cropArea.value.$el;
3290
+ if (img && area) {
3291
+ imgNatural.value = { w: img.naturalWidth, h: img.naturalHeight };
3292
+ const cw = area.clientWidth;
3293
+ const ch = area.clientHeight;
3294
+ if (cw === 0 || ch === 0) {
3295
+ setTimeout(onImgLoad, 50);
3296
+ return;
3297
+ }
3298
+ const iw = img.naturalWidth;
3299
+ const ih = img.naturalHeight;
3300
+ const scaleX = cw / iw;
3301
+ const scaleY = ch / ih;
3302
+ scale.value = Math.max(scaleX, scaleY);
3303
+ setImg();
3304
+ }
3305
+ });
3306
+ };
3307
+ const confirmCrop = async () => {
3308
+ var _a;
3309
+ const $img = $cropImage.value.$el;
3310
+ if (!$img || !$cropArea.value.$el)
3311
+ return;
3312
+ const file = currentFile.value;
3313
+ const cw = $cropArea.value.$el.clientWidth;
3314
+ const ch = $cropArea.value.$el.clientHeight;
3315
+ const sx = -offset.value.x / scale.value;
3316
+ const sy = -offset.value.y / scale.value;
3317
+ const sW = cw / scale.value;
3318
+ const sH = ch / scale.value;
3319
+ const sWidth = outputWidth.value || cw;
3320
+ const sHeight = outputHeight.value || ch;
3321
+ const canvas = document.createElement("canvas");
3322
+ canvas.width = sWidth;
3323
+ canvas.height = sHeight;
3324
+ const ctx = canvas.getContext("2d");
3325
+ ctx == null ? void 0 : ctx.drawImage($img, sx, sy, sW, sH, 0, 0, sWidth, sHeight);
3326
+ canvas.toBlob((blob) => {
3327
+ if (blob) {
3328
+ const croppedFile = new File([blob], file.name, { type: blob.type });
3329
+ const reader = new FileReader();
3330
+ reader.onload = () => {
3331
+ const val = reader.result;
3332
+ emit("on_upload", croppedFile);
3333
+ emit("update:preview", val);
3334
+ };
3335
+ reader.readAsDataURL(blob);
3336
+ }
3337
+ }, file.type, (_a = props.compress) == null ? void 0 : _a.quality);
3338
+ showCrop.value = false;
3339
+ };
3340
+ const cancelCrop = () => {
3341
+ showCrop.value = false;
3342
+ currentFile.value = null;
3343
+ cropSrc.value = "";
3344
+ };
3063
3345
  return (_ctx, _cache) => {
3064
3346
  const _component_b_view = resolveComponent("b-view");
3065
3347
  const _component_b_icon = resolveComponent("b-icon");
3066
- return openBlock(), createBlock(_sfc_main$b, {
3067
- onOn_upload: imgUpload,
3068
- size: size.value,
3069
- multiple: _ctx.multiple,
3070
- camera: _ctx.camera,
3071
- type: ["image/jpeg", "image/png", "image/gif"]
3072
- }, {
3073
- default: withCtx(() => {
3074
- var _a, _b, _c, _d, _e, _f;
3075
- return [
3076
- _ctx.preview ? (openBlock(), createBlock(_component_b_view, {
3077
- key: 0,
3078
- class: normalizeClass(`w-${((_a = _ctx.cover) == null ? void 0 : _a.width) || 7} h-${((_b = _ctx.cover) == null ? void 0 : _b.height) || 7} bsize-${_ctx.bsize || "cover"} bpos-2 round-sm bg-color-neutral`),
3079
- "bg-img": _ctx.preview
3080
- }, null, 8, ["class", "bg-img"])) : (openBlock(), createBlock(_component_b_icon, {
3081
- key: 1,
3082
- icon: "add",
3083
- class: normalizeClass(`flex-5 w-${((_c = _ctx.cover) == null ? void 0 : _c.width) || 7} h-${((_d = _ctx.cover) == null ? void 0 : _d.height) || 7} ${((_e = _ctx.cover) == null ? void 0 : _e.color) ? "color-" + ((_f = _ctx.cover) == null ? void 0 : _f.color) : ""} round-sm bg-color-neutral`)
3084
- }, null, 8, ["class"]))
3085
- ];
3086
- }),
3087
- _: 1
3088
- }, 8, ["size", "multiple", "camera"]);
3348
+ const _component_b_img = resolveComponent("b-img");
3349
+ const _component_b_hot = resolveComponent("b-hot");
3350
+ const _component_btn_wid = resolveComponent("btn-wid");
3351
+ return openBlock(), createElementBlock(Fragment, null, [
3352
+ createVNode(_sfc_main$b, {
3353
+ onOn_upload: imgUpload,
3354
+ size: size.value,
3355
+ multiple: _ctx.multiple,
3356
+ camera: _ctx.camera,
3357
+ type: ["image/jpeg", "image/png", "image/gif"]
3358
+ }, {
3359
+ default: withCtx(() => {
3360
+ var _a, _b, _c, _d, _e, _f;
3361
+ return [
3362
+ _ctx.preview ? (openBlock(), createBlock(_component_b_view, {
3363
+ key: 0,
3364
+ class: normalizeClass(`w-${((_a = _ctx.cover) == null ? void 0 : _a.width) || 7} h-${((_b = _ctx.cover) == null ? void 0 : _b.height) || 7} bsize-${_ctx.bsize || "cover"} bpos-2 round-sm bg-color-neutral`),
3365
+ "bg-img": _ctx.preview
3366
+ }, null, 8, ["class", "bg-img"])) : (openBlock(), createBlock(_component_b_icon, {
3367
+ key: 1,
3368
+ icon: "add",
3369
+ class: normalizeClass(`flex-5 w-${((_c = _ctx.cover) == null ? void 0 : _c.width) || 7} h-${((_d = _ctx.cover) == null ? void 0 : _d.height) || 7} ${((_e = _ctx.cover) == null ? void 0 : _e.color) ? "color-" + ((_f = _ctx.cover) == null ? void 0 : _f.color) : ""} round-sm bg-color-neutral`)
3370
+ }, null, 8, ["class"]))
3371
+ ];
3372
+ }),
3373
+ _: 1
3374
+ }, 8, ["size", "multiple", "camera"]),
3375
+ showCrop.value ? (openBlock(), createBlock(_component_b_view, {
3376
+ key: 0,
3377
+ class: "max-fixed color-light bg-color-rgba_0_0_0_d7 flex-5 z-10 flex-column"
3378
+ }, {
3379
+ default: withCtx(() => {
3380
+ var _a, _b;
3381
+ return [
3382
+ createVNode(_component_b_view, { class: "mrg-b-1" }, {
3383
+ default: withCtx(() => [
3384
+ createTextVNode("拖动/触摸移动,滚轮或捏合缩放")
3385
+ ]),
3386
+ _: 1
3387
+ }),
3388
+ createVNode(_component_b_hot, {
3389
+ class: normalizeClass(`bg-color-dgray show rel line-outside over-hide round-md line-Cffffff44 solid thick-7-px w-${(_a = _ctx.compress) == null ? void 0 : _a.width}-px h-${(_b = _ctx.compress) == null ? void 0 : _b.height}-px`),
3390
+ ref_key: "$cropArea",
3391
+ ref: $cropArea,
3392
+ onOn_wheel: onWheel,
3393
+ onOn_mousedown: startDrag,
3394
+ onOn_move: onDrag,
3395
+ onOn_mouseup: endDrag,
3396
+ onOn_enter: onTouchStart,
3397
+ onOn_leave: endDrag
3398
+ }, {
3399
+ default: withCtx(() => [
3400
+ createVNode(_component_b_img, {
3401
+ class: "abs t-0 l-0 no-rw select-none cursor-grab",
3402
+ ref_key: "$cropImage",
3403
+ ref: $cropImage,
3404
+ img: cropSrc.value,
3405
+ onOn_load: onImgLoad
3406
+ }, null, 8, ["img"])
3407
+ ]),
3408
+ _: 1
3409
+ }, 8, ["class"]),
3410
+ createVNode(_component_b_view, { class: "mrg-t-2 flex gap-1" }, {
3411
+ default: withCtx(() => [
3412
+ createVNode(_component_btn_wid, {
3413
+ onOn_click: confirmCrop,
3414
+ "btn-text": "确认"
3415
+ }),
3416
+ createVNode(_component_btn_wid, {
3417
+ onOn_click: cancelCrop,
3418
+ "btn-text": "取消"
3419
+ })
3420
+ ]),
3421
+ _: 1
3422
+ })
3423
+ ];
3424
+ }),
3425
+ _: 1
3426
+ })) : createCommentVNode("", true)
3427
+ ], 64);
3089
3428
  };
3090
3429
  }
3091
3430
  });
@@ -3165,7 +3504,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3165
3504
  key: 1,
3166
3505
  class: normalizeClass(`flex-column rel flex-5 color-${((_b = (_a3 = _ctx.colors) == null ? void 0 : _a3.text) == null ? void 0 : _b.normal) || "mgray"}`),
3167
3506
  cname: ((_d = (_c = _ctx.colors) == null ? void 0 : _c.text) == null ? void 0 : _d.act) || "light",
3168
- state: curRoute.value === nav.hotData.link ? "act" : "",
3507
+ state: curRoute.value.search(nav.hotData.link) === 0 ? "act" : "",
3169
3508
  states: {
3170
3509
  act: `color-${((_f = (_e = _ctx.colors) == null ? void 0 : _e.text) == null ? void 0 : _f.act) || "light"}`
3171
3510
  }
@@ -3186,7 +3525,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3186
3525
  }, 1024)) : createCommentVNode("", true),
3187
3526
  createVNode(_sfc_main$p, mergeProps(nav.iconData, {
3188
3527
  cname: nav.act,
3189
- state: curRoute.value === nav.hotData.link ? "act" : "",
3528
+ state: curRoute.value.search(nav.hotData.link) === 0 ? "act" : "",
3190
3529
  states: {
3191
3530
  act: nav.act ?? ""
3192
3531
  },
package/dist/index.js.gz CHANGED
Binary file
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).btxui={},e.vue)}(this,(function(e,t){"use strict";const o={colors:{none:"transparent",main:"#051c24",sub:"#b4967a",light:"#fff",lgray:"#eee",mgray:"#a7a7a7",dgray:"#373737",dark:"#111",blue:"#4085f3",green:"#02b9a1",yellow:"#fdba00",red:"#ec4334",neutral:"rgba(134,134,134,.17)"},append(e){this.colors={...this.colors,...e}}},a={pcenter:"text-align: center;",pright:"text-align: right;",pleft:"text-align: left;",pjustify:"text-align: justify;",pindent:"text-indent: 2em;",bold:"font-weight: bold;",show:"display: block;",hide:"display: none;","no-wrap":"flex-wrap: nowrap; white-space: nowrap;","flex-wrap":"flex-wrap: wrap;",flex:"display: flex; justify-content: flex-start; align-items: stretch; flex-wrap: wrap; align-content: flex-start;","flex-column":"display: flex; flex-direction: column;","flex-between":"display: flex; justify-content: space-between; align-items: center;","flex-around":"display: flex; justify-content: space-around; align-items: center;","flex-baseline":"display: flex; align-items: baseline;","no-shrink":"flex-shrink: 0;","col-1":"flex-basis: 8.333%;","col-2":"flex-basis: 16.667%;","col-3":"flex-basis: 25%;","col-4":"flex-basis: 33.333%;","col-5":"flex-basis: 41.667%;","col-6":"flex-basis: 50%;","col-7":"flex-basis: 58.333%;","col-8":"flex-basis: 66.667%;","col-9":"flex-basis: 75%;","col-10":"flex-basis: 83.333%;","col-11":"flex-basis: 91.667%;","col-12":"flex-basis: 100%;","offset-1":"margin-left: 8.333%;","offset-2":"margin-left: 16.667%;","offset-3":"margin-left: 25%;","offset-4":"margin-left: 33.333%;","offset-5":"margin-left: 41.667%;","offset-6":"margin-left: 50%;","offset-7":"margin-left: 58.333%;","offset-8":"margin-left: 66.667%;","offset-9":"margin-left: 75%;","offset-10":"margin-left: 83.333%;","offset-11":"margin-left: 91.667%;","offset-12":"margin-left: 100%;","flex-1":"display: flex; justify-content: flex-start; align-items: flex-start;","flex-2":"display: flex; justify-content: center; align-items: flex-start;","flex-3":"display: flex; justify-content: flex-end; align-items: flex-start;","flex-4":"display: flex; justify-content: flex-start; align-items: center","flex-5":"display: flex; justify-content: center; align-items: center;","flex-6":"display: flex; justify-content: flex-end; align-items: center;","flex-7":"display: flex; justify-content: flex-start; align-items: flex-end;","flex-8":"display: flex; justify-content: center; align-items: flex-end;","flex-9":"display: flex; justify-content: flex-end; align-items: flex-end;","max-h":"height: 100%;","max-w":"width: 100%; !important",max:"height: 100%; width: 100%;","max-fixed":"height: 100%; width: 100%; position: fixed; left: 0; top: 0;","max-screen":"height: 100vh; width: 100%;",item:{breakInside:"avoid",mozPageBreakInside:"avoid",webkitColumnBreakInside:"avoid"},fixed:"position: fixed;",rel:"position: relative;",abs:"position: absolute;","over-hide":"overflow: hidden;","over-show":"overflow: visible;","over-scroll":"overflow: auto;",brepeat:"background-repeat: repeat;","brepeat-x":"background-repeat: repeat-x;","brepeat-y":"background-repeat: repeat-y;","bsize-cover":"background-size: cover;","bsize-contain":"background-size: contain;","bsize-max":"background-size: 100% 100%;","bsize-max-h":"background-size: auto 100%;","bsize-max-w":"background-size: 100% auto;","bpos-1":"background-position: left top;","bpos-2":"background-position: center top;","bpos-3":"background-position: right top;","bpos-4":"background-position: left center;","bpos-5":"background-position: center center;","bpos-6":"background-position: right center;","bpos-7":"background-position: left bottom;","bpos-8":"background-position: center bottom;","bpos-9":"background-position: right bottom;","bg-fixed":"background-attachment: scroll;",round:"border-radius: 50%;","round-max":"border-radius: 999px;","round-lg":"border-radius: 24px;","round-md":"border-radius: 10px;","round-sm":"border-radius: 4px;","round-none":"border-radius: 0px;","round-t":"border-bottom-right-radius: 0; border-bottom-left-radius: 0;","round-b":"border-top-right-radius: 0; border-top-left-radius: 0;","round-l":"border-top-right-radius: 0; border-bottom-right-radius: 0;","round-r":"border-top-left-radius: 0; border-bottom-left-radius: 0;","round-1":"border-top-right-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0;","round-2":"border-top-left-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0;","round-3":"border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-right-radius: 0;","round-4":"border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-left-radius: 0;",solid:"border-style: solid;",dashed:"border-style: dashed;","solid-l":"border-left-style: solid;","solid-r":"border-right-style: solid;","solid-t":"border-top-style: solid;","solid-b":"border-bottom-style: solid;","solid-l-none":"border-left-style: none;","solid-r-none":"border-right-style: none;","solid-t-none":"border-top-style: none;","solid-b-none":"border-bottom-style: none;","dashed-l":"border-left-style: dashed;","dashed-r":"border-right-style: dashed;","dashed-t":"border-top-style: dashed;","dashed-b":"border-bottom-style: dashed;","line-outside":"background-clip: padding-box;",shadow:"box-shadow: 0 4px 17px;","shadow-sm":"box-shadow: 0 2px 4px;","shadow-lg":"box-shadow: 0 14px 40px;","shadow-relief":"box-shadow: 1px 1px 0 rgba(0,0,0,.7) inset, 1px 1px 0 rgba(255,255,255,.4);",trans:"transition: all .7s;","trans-fast":"transition: all .4s;","trans-slow":"transition: all 1.4s;","trans-no":"transition: none;","blur-no":"filter: blur(0px);","blur-sm":"filter: blur(2px);","blur-md":"filter: blur(7px);","blur-lg":"filter: blur(17px);","dark-no":"filter: brightness(100%);","dark-sm":"filter: brightness(80%);","dark-md":"filter: brightness(50%);","dark-lg":"filter: brightness(20%);","light-sm":"filter: brightness(120%);","light-md":"filter: brightness(150%);","light-lg":"filter: brightness(200%);","gray-no":"filter: grayscale(0%);","gray-sm":"filter: grayscale(40%);","gray-md":"filter: grayscale(70%);","gray-lg":"filter: grayscale(100%);","bg-none":"pointer-events: none;","bg-use":"pointer-events: auto;","touch-none":"touchAction: none;",ellipsis:"overflow: hidden; text-overflow: ellipsis; white-space: nowrap;","text-line":"textShadow: 1px 0 0 rgba(200, 200, 200, .5), -1px 0 0 rgba(200, 200, 200, .5), 0 1px 0 rgba(200, 200, 200, .5), 0 -1px 0 rgba(200, 200, 200, .5);","alpha-0":"opacity: 0; visibility: hidden; z-index: -1",visible:"visibility: visible;","select-none":"-webkit-touch-callout:none; -webkit-user-select:none; -khtml-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none;","objfit-fill":"object-fit: fill;","objfit-cover":"object-fit: cover;","objfit-contain":"object-fit: contain;","objfit-none":"object-fit: none;","objfit-scaledown":"object-fit: scale-down;",lighten:"mix-blend-mode: lighten;",ani:"animation-duration: 0.7s;","ani-fast":"animation-duration: 0.3s;","ani-slow":"animation-duration: 1.4s;","ani-mode-forwards":"animation-fill-mode: forwards;","ani-mode-backwards":"animation-fill-mode: backwards;","ani-mode-both":"animation-fill-mode: both;","ani-loop":"animation-timing-function: linear; animation-iteration-count: infinite;",color:{pro:"color"},bg:{pro:"background"},alpha:{pro:"opacity"},font:{pro:"font-family"},lh:{pro:"line-height"},z:{pro:"z-index"},line:{pro:"border-color"},origin:{pro:"transform-origin"},order:{pro:"order"},grow:{pro:"flex-grow"},basis:{pro:"flex-basis"},column:{pro:"columnCount"},bsize:{pro:"background-size",unit:"%"},bpos:{pro:"background-position",unit:"%"},ratio:{pro:"aspect-ratio"},lspace:{pro:"letter-spacing",unit:"rem"},bolder:{pro:"font-weight"},w:{pro:"width",unit:"rem"},h:{pro:"height",unit:"rem"},rw:{pro:"max-width",unit:"rem"},lw:{pro:"min-width",unit:"rem"},th:{pro:"max-height",unit:"rem"},bh:{pro:"min-height",unit:"rem"},pad:{pro:"padding",unit:"rem"},mrg:{pro:"margin",unit:"rem"},fsize:{pro:"font-size",unit:"rem"},l:{pro:"left",unit:"rem"},r:{pro:"right",unit:"rem"},t:{pro:"top",unit:"rem"},b:{pro:"bottom",unit:"rem"},thick:{pro:"border-width",unit:"px"},delay:{pro:"transition-delay",unit:"s"}};var l,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={};l={get exports(){return r},set exports(e){r=e}},function(e){function t(e,t){var o=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(o>>16)<<16|65535&o}function o(e,o,a,l,n,r){return t((s=t(t(o,e),t(l,r)))<<(c=n)|s>>>32-c,a);var s,c}function a(e,t,a,l,n,r,s){return o(t&a|~t&l,e,t,n,r,s)}function n(e,t,a,l,n,r,s){return o(t&l|a&~l,e,t,n,r,s)}function r(e,t,a,l,n,r,s){return o(t^a^l,e,t,n,r,s)}function s(e,t,a,l,n,r,s){return o(a^(t|~l),e,t,n,r,s)}function c(e,o){var l,c,i,d,u;e[o>>5]|=128<<o%32,e[14+(o+64>>>9<<4)]=o;var p=1732584193,m=-271733879,f=-1732584194,v=271733878;for(l=0;l<e.length;l+=16)c=p,i=m,d=f,u=v,p=a(p,m,f,v,e[l],7,-680876936),v=a(v,p,m,f,e[l+1],12,-389564586),f=a(f,v,p,m,e[l+2],17,606105819),m=a(m,f,v,p,e[l+3],22,-1044525330),p=a(p,m,f,v,e[l+4],7,-176418897),v=a(v,p,m,f,e[l+5],12,1200080426),f=a(f,v,p,m,e[l+6],17,-1473231341),m=a(m,f,v,p,e[l+7],22,-45705983),p=a(p,m,f,v,e[l+8],7,1770035416),v=a(v,p,m,f,e[l+9],12,-1958414417),f=a(f,v,p,m,e[l+10],17,-42063),m=a(m,f,v,p,e[l+11],22,-1990404162),p=a(p,m,f,v,e[l+12],7,1804603682),v=a(v,p,m,f,e[l+13],12,-40341101),f=a(f,v,p,m,e[l+14],17,-1502002290),p=n(p,m=a(m,f,v,p,e[l+15],22,1236535329),f,v,e[l+1],5,-165796510),v=n(v,p,m,f,e[l+6],9,-1069501632),f=n(f,v,p,m,e[l+11],14,643717713),m=n(m,f,v,p,e[l],20,-373897302),p=n(p,m,f,v,e[l+5],5,-701558691),v=n(v,p,m,f,e[l+10],9,38016083),f=n(f,v,p,m,e[l+15],14,-660478335),m=n(m,f,v,p,e[l+4],20,-405537848),p=n(p,m,f,v,e[l+9],5,568446438),v=n(v,p,m,f,e[l+14],9,-1019803690),f=n(f,v,p,m,e[l+3],14,-187363961),m=n(m,f,v,p,e[l+8],20,1163531501),p=n(p,m,f,v,e[l+13],5,-1444681467),v=n(v,p,m,f,e[l+2],9,-51403784),f=n(f,v,p,m,e[l+7],14,1735328473),p=r(p,m=n(m,f,v,p,e[l+12],20,-1926607734),f,v,e[l+5],4,-378558),v=r(v,p,m,f,e[l+8],11,-2022574463),f=r(f,v,p,m,e[l+11],16,1839030562),m=r(m,f,v,p,e[l+14],23,-35309556),p=r(p,m,f,v,e[l+1],4,-1530992060),v=r(v,p,m,f,e[l+4],11,1272893353),f=r(f,v,p,m,e[l+7],16,-155497632),m=r(m,f,v,p,e[l+10],23,-1094730640),p=r(p,m,f,v,e[l+13],4,681279174),v=r(v,p,m,f,e[l],11,-358537222),f=r(f,v,p,m,e[l+3],16,-722521979),m=r(m,f,v,p,e[l+6],23,76029189),p=r(p,m,f,v,e[l+9],4,-640364487),v=r(v,p,m,f,e[l+12],11,-421815835),f=r(f,v,p,m,e[l+15],16,530742520),p=s(p,m=r(m,f,v,p,e[l+2],23,-995338651),f,v,e[l],6,-198630844),v=s(v,p,m,f,e[l+7],10,1126891415),f=s(f,v,p,m,e[l+14],15,-1416354905),m=s(m,f,v,p,e[l+5],21,-57434055),p=s(p,m,f,v,e[l+12],6,1700485571),v=s(v,p,m,f,e[l+3],10,-1894986606),f=s(f,v,p,m,e[l+10],15,-1051523),m=s(m,f,v,p,e[l+1],21,-2054922799),p=s(p,m,f,v,e[l+8],6,1873313359),v=s(v,p,m,f,e[l+15],10,-30611744),f=s(f,v,p,m,e[l+6],15,-1560198380),m=s(m,f,v,p,e[l+13],21,1309151649),p=s(p,m,f,v,e[l+4],6,-145523070),v=s(v,p,m,f,e[l+11],10,-1120210379),f=s(f,v,p,m,e[l+2],15,718787259),m=s(m,f,v,p,e[l+9],21,-343485551),p=t(p,c),m=t(m,i),f=t(f,d),v=t(v,u);return[p,m,f,v]}function i(e){var t,o="",a=32*e.length;for(t=0;t<a;t+=8)o+=String.fromCharCode(e[t>>5]>>>t%32&255);return o}function d(e){var t,o=[];for(o[(e.length>>2)-1]=void 0,t=0;t<o.length;t+=1)o[t]=0;var a=8*e.length;for(t=0;t<a;t+=8)o[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return o}function u(e){var t,o,a="0123456789abcdef",l="";for(o=0;o<e.length;o+=1)t=e.charCodeAt(o),l+=a.charAt(t>>>4&15)+a.charAt(15&t);return l}function p(e){return unescape(encodeURIComponent(e))}function m(e){return function(e){return i(c(d(e),8*e.length))}(p(e))}function f(e,t){return function(e,t){var o,a,l=d(e),n=[],r=[];for(n[15]=r[15]=void 0,l.length>16&&(l=c(l,8*e.length)),o=0;o<16;o+=1)n[o]=909522486^l[o],r[o]=1549556828^l[o];return a=c(n.concat(d(t)),512+8*t.length),i(c(r.concat(a),640))}(p(e),p(t))}function v(e,t,o){return t?o?f(t,e):u(f(t,e)):o?m(e):u(m(e))}l.exports?l.exports=v:e.md5=v}(n);const s=r,c="BTXUIGlobal",i=t.defineComponent({__name:"b-style",props:{class:{},focus:{},hover:{},active:{},states:{},matrix:{},extraClass:{},cname:{}},setup(e){const l=e,n=t.ref(),r=t.ref(""),i=t.computed((()=>{const e=[];for(let t of n.value.sheet.rules)e.push(t.selectorText.substr(1));return e})),d=t.reactive({}),u=e=>{if(!isNaN(1*e)||"auto"===e)return e;let t=e.toString();return"f"===t[0]&&(t=`-${t.substr(1)}`),/^-?\d*d\d+$/.test(t)&&(t=1*t.replace("d",".")),!isNaN(t)&&t},p=e=>{if(o.colors[e])return o.colors[e];if(e&&0===e.search("C"))return`#${e.substr(1)}`;if(e&&0===e.search("rgb")){const t=e.split("_");return`${t[0]}(${t[1]},${t[2]},${t[3]}${t[4]?","+u(t[4]):""})`}return!1},m=e=>{if(!e)return!1;if(0===e.search("_"))return e.substr(1);const t=u(e);if(!1!==t)return t;const o=p(e);if(!1!==o)return o;const a=(e=>{if(e&&0===e.search("linear")){const t=e.split("_"),[o,a,...l]=t;return`${o}-gradient(${a}deg,${l.map((e=>p(e))).join(",")})`}return!1})(e);return!1!==a&&a},f=(e,t,o)=>{let a=t??o;return"auto"===e&&(a=""),"P"===a&&(a="%"),a??""},v=e=>{if(!e)return"";return e.trim().split(" ").reduce(((e,t)=>{const o=(e=>{let t=a[e];if(t)return t;const o=e.split("-"),l={l:["left"],t:["top"],r:["right"],b:["bottom"],v:["top","bottom"],h:["left","right"],x:["x"],y:["y"]};let[n,r,s,c]=o;if(t=a[n],t){let e=m(r);if(e)return`${t.pro}: ${e}${f(e,s,t.unit)}`;if(e=m(s),e){const o=l[r];if(o){let a="";return o.forEach((o=>{a+=`${t.pro}-${o}: ${e}${f(e,c,t.unit)};`})),a}return`${t.pro}-${r}: ${e}${f(e,c,t.unit)}`}}})(t);return o||(console.warn(`combineStyles without ${t} rule!`),e+=""),e+=`${o};`}),"").replace(/;+/g,";")},h=(e,t)=>{if(!i.value.includes(e)){const o=v(t);if(!o)return;i.value.push(e),d[e]=o}},g=(e,t,o)=>{h(`${e}[state="${t}"]`,o)},x=t.reactive({res:{},str:""}),b=e=>{l.states&&(Object.keys(l.states).forEach((t=>{if(l.states){const o=l.states[t];if("string"==typeof o)g(e,t,o);else{const{class:a,ani:l}=o;g(e,t,a),((e,t)=>{x.res[e]=t})(t,l)}}})),x.str=0===Object.keys(x.res).length?"":JSON.stringify(x.res))},k=t.ref();return t.onBeforeMount((()=>{l.matrix&&(()=>{var e,t,o,a,n,r,s,c;const i=(null==(e=l.matrix)?void 0:e.translate)?`translate(${null==(t=l.matrix)?void 0:t.translate})`:"",d=(null==(o=l.matrix)?void 0:o.scale)?`scale(${null==(a=l.matrix)?void 0:a.scale})`:"",u=(null==(n=l.matrix)?void 0:n.rotate)?`rotate(${null==(r=l.matrix)?void 0:r.rotate})`:"",p=(null==(s=l.matrix)?void 0:s.skew)?`skew(${null==(c=l.matrix)?void 0:c.skew})`:"";k.value=l.matrix?{transform:`${i} ${d} ${u} ${p}`}:{}})(),(()=>{let e=document.head.querySelector(`#${c}`);e||(e=document.createElement("style"),e.setAttribute("type","text/css"),e.setAttribute("id",c),document.head.appendChild(e)),n.value=e})();const e=l.class??`style-${Math.round(1e4*Math.random())}`;(e=>{e&&e.split(" ").forEach((e=>{h(e,e)}))})(e);const t=((e,t)=>{const o=e.split(" ").sort(),a=`B-${s(o.join("&")+t)}`;return r.value=`${e} ${a}`,i.value.includes(a)||i.value.push(a),a})(e,l.cname??"");(e=>{l.focus&&h(e,l.focus)})(`${t}[focus-state='true']:focus`),(e=>{l.hover&&h(e,l.hover)})(`${t}[hover='true']:hover`),(e=>{l.active&&h(e,l.active)})(`${t}[active='true']:active`),b(t),(e=>{if(!l.extraClass)return;const{selector:t,value:o}=l.extraClass;h(`${e}${t}*`,o)})(t),Object.keys(d).forEach((e=>{n.value.sheet.addRule(`.${e}`,d[e])}))})),(e,o)=>t.renderSlot(e.$slots,"className",{aniStates:x.str||null,className:r.value,matrixStyle:k.value})}}),d=["data-ani-states","state"],u=t.defineComponent({__name:"b-view",props:{class:{},state:{},states:{},bgImg:{},matrix:{},cname:{},prevent:{type:Boolean},aniEndClear:{type:Boolean}},emits:["on_aniEnd"],setup(e,{emit:o}){const a=e,l=t.ref(),n=t.computed((()=>a.state));let r,s="";t.watch(n,(()=>{c()}));const c=()=>{if(!l.value.dataset.aniStates)return;const e=JSON.parse(l.value.dataset.aniStates),t=n.value;t&&e[t]&&(s&&l.value.classList.remove(s),s=e[t],l.value.classList.add(s),r=e[t])},u=e=>{a.aniEndClear||l.value.classList.remove(r),o("on_aniEnd",e)},p=t.computed((()=>a.bgImg?{backgroundImage:`url(${a.bgImg})`}:{}));return t.onMounted((()=>{a.prevent&&(l.value.ontouchstart=l.value.ontouchend=e=>{e.preventDefault()}),c()})),(e,o)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),cname:e.cname,states:e.states,matrix:e.matrix},{className:t.withCtx((o=>[t.createElementVNode("div",{ref_key:"$el",ref:l,onAnimationend:u,class:t.normalizeClass(o.className),"data-ani-states":o.aniStates,state:n.value,style:t.normalizeStyle({...p.value,...o.matrixStyle})},[t.renderSlot(e.$slots,"default")],46,d)])),_:3},8,["class","cname","states","matrix"]))}}),p=["state"],m=t.defineComponent({__name:"b-text",props:{class:{},state:{},states:{},cname:{}},setup:e=>(e,o)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),states:e.states,cname:e.cname},{className:t.withCtx((o=>[t.createElementVNode("span",{class:t.normalizeClass(o.className),state:e.state},[t.renderSlot(e.$slots,"default")],10,p)])),_:3},8,["class","states","cname"]))}),f=t.defineComponent({__name:"b-hot",props:{link:{},class:{},state:{},states:{},hover:{},active:{},forbid:{type:Boolean},download:{},anchor:{},cname:{},replace:{type:Boolean},touchDuration:{},eventProxy:{type:Boolean}},emits:["on_click","on_enter","on_move","on_leave","on_dblclick","on_longTouch","on_transend"],setup(e,{emit:o}){const a=e,{proxy:l}=t.getCurrentInstance(),n=t.ref(),r=t.ref("");let s;const c=t.computed((()=>{const e=a.link;return a.forbid||!e?"javascript: void 0;":0===e.search("http")?(r.value="_blank",e):(0===e.search(/^(tel|mailto):/)||"/"===e[0]&&(s=e),e)})),d=t.computed((()=>a.forbid?"":"pointer")),u=e=>{if(a.anchor){const e=document.querySelector(a.anchor);e&&e.scrollIntoView({behavior:"smooth"})}s&&(e.preventDefault(),l.$router[a.replace?"replace":"push"](s)),"_blank"===r.value&&a.replace&&location.replace(c.value),!a.forbid&&o("on_click",e)},p=e=>{!a.forbid&&o("on_dblclick",e)};let m,f=t.ref(0),v=!1;const h=e=>{o("on_enter",e),"touchstart"===e.type&&(f.value=Date.now(),m=setInterval((()=>{Date.now()-f.value>(a.touchDuration||1e3)&&(v=!0,o("on_longTouch",e),clearTimeout(m))}),100))},g=e=>{o("on_move",e)},x=e=>{o("on_leave",e),"touchend"===e.type&&(v&&(e.preventDefault(),v=!1),clearTimeout(m))};return t.onMounted((()=>{a.download&&(n.value.download=a.download)})),(e,o)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),states:e.states,hover:e.hover,active:e.active,cname:e.cname},{className:t.withCtx((a=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.eventProxy?"div":"a"),{style:t.normalizeStyle(`user-select: none; cursor: ${d.value};`),ref_key:"$anchor",ref:n,onMouseenter:h,onTouchstart:h,onMousemove:g,onTouchmove:g,onMouseleave:x,onTouchend:x,onClick:u,onDblclick:t.withModifiers(p,["stop"]),onTransitionend:o[0]||(o[0]=t=>e.$emit("on_transend",t)),target:r.value,class:t.normalizeClass(a.className),hover:!!e.hover||"",state:e.state,active:!!e.active||"",href:c.value},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:2},1064,["style","onDblclick","target","class","hover","state","active","href"]))])),_:3},8,["class","states","hover","active","cname"]))}}),v=["src","state","alt"],h=t.defineComponent({__name:"b-img",props:{img:{},class:{},state:{},states:{},defaultSrc:{},alt:{},matrix:{},cname:{}},emits:["on_load"],setup(e,{emit:o}){const a=e,l=t.computed((()=>a.img)),n=t.ref(""),r=t.ref(),s=()=>{a.defaultSrc&&(n.value=a.defaultSrc);const e=new Image;e.onload=()=>{n.value=a.img,t.nextTick((()=>{o("on_load",r.value)}))},e.src=a.img};return t.watch(l,s),t.onMounted((()=>{s()})),(e,o)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),cname:e.cname,states:e.states,matrix:e.matrix},{className:t.withCtx((o=>[n.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:n.value,class:t.normalizeClass(`${o.className} ani-fade-in`),state:e.state,style:t.normalizeStyle({display:"block",...o.matrixStyle}),alt:e.alt,ref_key:"$img",ref:r},null,14,v)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(`bg-color-neutral ${o.className} ani-fade-in`)},null,2))])),_:1},8,["class","cname","states","matrix"]))}}),g=t.defineComponent({__name:"ani-success",setup:e=>(e,o)=>(t.openBlock(),t.createBlock(u,{class:"flex-5",matrix:{translate:"0,9px",rotate:"45deg"}},{default:t.withCtx((()=>[t.createVNode(m,{class:"ani-success-part1 w-1 h-3-px bg-color-green round-sm"}),t.createVNode(m,{class:"ani-success-part2 w-1d7 h-3-px bg-color-green round-sm rel t-1-px l-f1-px"})])),_:1}))}),x=(e,t)=>{const o=e.__vccOpts||e;for(const[a,l]of t)o[a]=l;return o};const b=x({},[["render",function(e,o){const a=t.resolveComponent("b-text"),l=t.resolveComponent("b-view");return t.openBlock(),t.createBlock(l,{class:"flex-5"},{default:t.withCtx((()=>[t.createVNode(a,{class:"ani-fail-part1 w-3-px h-1d7 rel l-2-px bg-color-red round-sm"}),t.createVNode(a,{class:"ani-fail-part2 w-3-px h-1d7 rel r-1-px bg-color-red round-sm"})])),_:1})}]]);const k=x({},[["render",function(e,o){const a=t.resolveComponent("b-text"),l=t.resolveComponent("b-view");return t.openBlock(),t.createBlock(l,{class:"flex-5",matrix:{rotate:"90deg"}},{default:t.withCtx((()=>[t.createVNode(a,{class:"ani-notic-part1 w-3-px h-3-px bg-color-blue round"}),t.createVNode(a,{class:"ani-notic-part2 w-1d3 h-3-px mrg-l-4-px bg-color-blue round-sm"})])),_:1})}]]);const y=x({},[["render",function(e,o){const a=t.resolveComponent("b-view");return t.openBlock(),t.createBlock(a,{class:"flex-5"},{default:t.withCtx((()=>[t.createVNode(a,{class:"ani-loading rel w-2d2 h-2d2 round"})])),_:1})}]]),w=["state"],C=t.defineComponent({__name:"b-icon",props:{icon:{},class:{},state:{},states:{},cname:{}},setup(e){const o=e;return(e,a)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),states:e.states,cname:e.cname},{className:t.withCtx((a=>[0===e.icon.search("ani_")?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},["ani_success"===e.icon?(t.openBlock(),t.createBlock(g,{key:"success"})):t.createCommentVNode("",!0),"ani_fail"===e.icon?(t.openBlock(),t.createBlock(b,{key:"fail"})):t.createCommentVNode("",!0),"ani_notic"===e.icon?(t.openBlock(),t.createBlock(k,{key:"notic"})):t.createCommentVNode("",!0),"ani_loading"===e.icon?(t.openBlock(),t.createBlock(y,{key:"loading"})):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),e.icon.search("/")>-1?(t.openBlock(),t.createBlock(u,{key:1,"bg-img":e.icon,states:e.states,class:t.normalizeClass(e.class),state:e.state},null,8,["bg-img","states","class","state"])):(t.openBlock(),t.createElementBlock("i",{key:2,class:t.normalizeClass(`ico-${o.icon} ${a.className}`),state:e.state},null,10,w))])),_:1},8,["class","states","cname"]))}}),_=["contenteditable","focus-state","state"],B=["type","name","focus-state","state","placeholder","maxlength","readonly"],$=t.defineComponent({__name:"b-input",props:{type:{},name:{},class:{},state:{},states:{},text:{},placeholder:{},maxlength:{},readonly:{type:Boolean},focus:{},rule:{},cname:{},aspectHeight:{type:Boolean},hideClear:{type:Boolean}},emits:["update:text","on_focus","on_blur","on_change","multiline"],setup(e,{expose:o,emit:a}){const l=e,n={required:{regexp:/[\w\.\-_\u4e00-\u9fa5]+/,notic:"输入内容为空!"},tel:{regexp:/^1[3-9]\d{9}$/,notic:"手机号格式有误!"},email:{regexp:/^[\w\.]+@(\w+\.)+(com|net|org|wiki|cn|cc)$/,notic:"邮箱格式有误!"},url:{regexp:/^((http|https):\/\/)?(wwww\.)?(\w+\.)+(com|net|org|wiki|cn|cc)$/,notic:"url 格式有误!"},uname:{regexp:/^[\w_]+$/,notic:"请输入英文字母、数字或下划线!"},zh:{regexp:/^[\u4e00-\u9fa5]+$/,notic:"请输入中文字符!"},uid:{regexp:/^\d{15}(\d{2}[0-9x])?$/i,notic:"身份证号输入有误!"}},r=t.ref(l.text),s=t.ref(l.text),c=t.ref(),d=()=>{if(!c.value)return;const e=parseInt(getComputedStyle(c.value).height.split("px")[0]);a("multiline",e>u.value,Math.ceil(e/u.value),e)};t.watchEffect((()=>{var e,o;r.value=l.text,l.text!==(null==(o=null==(e=null==c?void 0:c.value)?void 0:e.innerText)?void 0:o.trim())&&(s.value=l.text,t.nextTick(d)),""===l.text&&(s.value="")}));const u=t.ref(),p=()=>{var e;a("update:text",null==(e=r.value)?void 0:e.trim())},m=()=>{const e=c.value.innerText.trim(),t=e.substring(0,l.maxlength);l.maxlength&&e.length>l.maxlength&&(c.value.innerText=t),a("update:text",t),d()},f=e=>{a("on_change",x(),e)},v=t.ref(!1),h=e=>{v.value=!1,a("on_blur",x(),e)},g=e=>{v.value=!0,a("on_focus",e)},x=()=>{if(l.rule){const e=n[l.rule.type],t=e?e.regexp:l.rule.type;return{name:l.name,notic:l.rule.notic?l.rule.notic:e?e.notic:`${l.name}格式有误!`,pass:t.test(r.value)}}return!0},b=()=>{l.aspectHeight?(s.value=c.value.innerText="",m()):(r.value="",p())};return o({check:x,focus:function(){c.value.focus()},blur:function(){c.value.blur()},clear:b}),t.onMounted((()=>{t.nextTick((()=>{u.value=parseInt(getComputedStyle(c.value).height.split("px")[0].split(".")[0])}))})),(e,o)=>{const a=t.resolveComponent("b-icon"),l=t.resolveComponent("b-hot"),n=t.resolveComponent("b-view");return t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),focus:e.focus,states:e.states,cname:e.cname},{className:t.withCtx((i=>[t.createVNode(n,{class:"flex-4 rel"},{default:t.withCtx((()=>{var n;return[e.aspectHeight?t.withDirectives((t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(i.className),style:{"pointer-events":"none",position:"absolute",background:"none",border:"none",opacity:".4","font-size":".9em"}},t.toDisplayString(e.placeholder),3)),[[t.vShow,!e.text]]):t.createCommentVNode("",!0),e.aspectHeight?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(i.className),contenteditable:!e.readonly,onFocus:o[0]||(o[0]=e=>g(e)),onBlur:h,onChange:f,onInput:m,ref_key:"$input",ref:c,"focus-state":e.focus?"true":"",style:{outline:"none",width:"100%"},state:e.state,autocomplete:"off"},t.toDisplayString(s.value),43,_)):t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:2,class:t.normalizeClass(i.className),onFocus:o[1]||(o[1]=e=>g(e)),onBlur:h,onChange:f,onInput:p,"onUpdate:modelValue":o[2]||(o[2]=e=>r.value=e),type:e.type,ref_key:"$input",ref:c,name:e.name,"focus-state":e.focus?"true":"",state:e.state,placeholder:e.placeholder,maxlength:e.maxlength,readonly:e.readonly,autocomplete:"off"},null,42,B)),[[t.vModelDynamic,r.value]]),e.readonly||e.aspectHeight||e.hideClear?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(l,{key:3,onOn_click:b,class:"abs r-1 trans-fast",states:{show:"alpha-1 z-1 visible",hide:"alpha-0"},state:0!=(null==(n=r.value)?void 0:n.length)&&v.value?"show":"hide"},{default:t.withCtx((()=>[e.$slots.cancel?t.renderSlot(e.$slots,"cancel",{key:0}):(t.openBlock(),t.createBlock(a,{key:1,class:"flex-5 h-1d8 w-1d8 bg-color-neutral round",icon:"fail"}))])),_:3},8,["state"]))]})),_:2},1024)])),_:3},8,["class","focus","states","cname"])}}}),N=["name","focus","state","placeholder","maxlength","readonly","rows"],V=t.defineComponent({__name:"b-textarea",props:{text:{},name:{},class:{},state:{},states:{},rows:{},placeholder:{},maxlength:{},readonly:{type:Boolean},focus:{},cname:{}},emits:["on_focus","on_blur","on_change","update:text"],setup(e,{emit:o}){const a=e,l=t.ref(a.text),n=()=>{o("update:text",l.value.replace(/[\n\r]/g,"<br>"))};return(e,o)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),focus:e.focus,states:e.states,cname:e.cname},{className:t.withCtx((a=>[t.withDirectives(t.createElementVNode("textarea",{class:t.normalizeClass(a.className),onFocus:o[0]||(o[0]=t=>e.$emit("on_focus",t)),onBlur:o[1]||(o[1]=t=>e.$emit("on_blur",t)),onChange:o[2]||(o[2]=t=>e.$emit("on_change",t)),onInput:n,"onUpdate:modelValue":o[3]||(o[3]=e=>l.value=e),name:e.name,focus:!!e.focus||"",state:e.state,placeholder:e.placeholder,maxlength:e.maxlength,readonly:e.readonly,rows:e.rows||7},null,42,N),[[t.vModelText,l.value]])])),_:1},8,["class","focus","states","cname"]))}}),S=["poster","muted","src","autoplay","controls","loop"],z=["poster","muted","src","autoplay","controls","loop"],T=t.defineComponent({__name:"b-video",props:{video:{},class:{},autoPlay:{type:Boolean},loop:{type:Boolean},cname:{},fullScreen:{type:Boolean},poster:{},customControls:{type:Boolean},muted:{type:Boolean}},emits:["on_play"],setup(e,{expose:o,emit:a}){const l=t.ref(),n=t.ref(0);t.onMounted((()=>{t.nextTick((()=>{const e=l.value.clientHeight/200;n.value=Math.max(1,.8*e)}))}));const r=t.ref(!1),s=t.ref(!1),c=t.computed((()=>!r.value||s.value)),d=()=>{r.value=!r.value,l.value[r.value?"play":"pause"]()},u=()=>{r.value=!0,a("on_play")},p=()=>{l.value.pause()};return o({play:()=>{l.value.play(),l.value.addEventListener("loadedmetadata",(()=>{l.value.play()}))},pause:p,stop:()=>{p(),l.value.currentTime=0}}),(e,o)=>{const a=t.resolveComponent("b-icon"),p=t.resolveComponent("b-view"),m=t.resolveComponent("b-hot");return t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),cname:e.cname},{className:t.withCtx((i=>[t.createElementVNode("div",{class:t.normalizeClass(`${i.className} over-hide rel`)},[e.customControls?(t.openBlock(),t.createBlock(m,{key:0,class:"max abs flex-5 z-2 bg-color-rgba_0_0_0_d1 trans-fast",onOn_click:d,onOn_enter:o[0]||(o[0]=e=>s.value=!0),onOn_leave:o[1]||(o[1]=e=>s.value=!1),state:c.value,states:{true:"alpha-1 visible",false:"alpha-d01"}},{default:t.withCtx((()=>[n.value?(t.openBlock(),t.createBlock(p,{key:0,class:"h-5 ratio-1 flex-5 round fsize-22-px bg-color-rgba_0_0_0_d8 color-light",matrix:{scale:n.value}},{default:t.withCtx((()=>[r.value?(t.openBlock(),t.createBlock(a,{key:1,icon:"pause"})):(t.openBlock(),t.createBlock(a,{key:0,icon:"play"}))])),_:1},8,["matrix"])):t.createCommentVNode("",!0)])),_:1},8,["state"])):t.createCommentVNode("",!0),e.fullScreen?(t.openBlock(),t.createElementBlock("video",{key:1,ref_key:"$video",ref:l,onPlaying:u,onDurationchange:u,class:t.normalizeClass(i.className),poster:e.poster,muted:e.muted,src:e.video,autoplay:e.autoPlay,controls:!e.customControls,loop:e.loop},null,42,S)):(t.openBlock(),t.createElementBlock("video",{key:2,ref_key:"$video",ref:l,onPlaying:u,onDurationchange:u,"webkit-playsinline":"",playsinline:"","x5-video-player-type":"h5-page",class:t.normalizeClass(i.className),poster:e.poster,muted:e.muted,src:e.video,autoplay:e.autoPlay,controls:!e.customControls,loop:e.loop},null,42,z))],2)])),_:1},8,["class","cname"])}}}),D=["state"],E=t.defineComponent({__name:"b-list",props:{scroll:{},class:{},state:{},states:{},scrollType:{},cname:{}},emits:["on_scroll","on_to_top","on_to_bottom"],setup(e,{expose:o,emit:a}){const l=e,n=t.ref(),r=t.computed((()=>l.scrollType?`${l.scrollType}-scroll`:"thin-scroll")),s=(e,t=!1)=>{n.value.scrollTo({top:e,behavior:t?"smooth":"auto"})};let c={x:0,y:0};return o({reset:()=>{n.value.scrollTop=0},toTop:e=>{s(0,e)},toEnd:e=>{s(99999,e)}}),t.onMounted((()=>{n.value.onscroll=e=>{const t=e.target.scrollTop,o=e.target.scrollLeft,l=o-c.x,n=t-c.y;let r;Math.abs(l)>=Math.abs(n)?(e.stopPropagation(),r=l>=0?"l2r":"r2l"):r=n>=0?"t2b":"b2t",c.x=o,c.y=t,a("on_scroll",{dir:r,left:o,top:t}),0===t&&a("on_to_top",e),t>=e.target.scrollHeight-e.target.clientHeight-2&&a("on_to_bottom",e)}})),(e,o)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),states:e.states,cname:e.cname},{className:t.withCtx((a=>[t.createElementVNode("div",{class:t.normalizeClass(a.className),state:e.state},[t.createElementVNode("div",{ref_key:"$list",ref:n,class:t.normalizeClass(r.value),style:t.normalizeStyle(`overflow-x: ${e.scroll.x}; overflow-y: ${e.scroll.y}; width: 100%; height: 100%;`),onTouchmove:o[0]||(o[0]=t.withModifiers((()=>{}),["stop"]))},[t.renderSlot(e.$slots,"default")],38)],10,D)])),_:3},8,["class","states","cname"]))}}),O=["state","draggable"],P=t.defineComponent({__name:"b-drag",props:{class:{},dataInfo:{},dragStart:{},dragOver:{},freeDrag:{type:Boolean},cname:{}},emits:["on_drag_start","on_drag_end","on_drag_over","on_drag_leave","on_drop","on_move"],setup(e,{emit:o}){const a=e,l=t.ref(),n=t.ref(""),r=t.ref(!1),s=t.ref(!1),c=t.reactive({x:0,y:0}),d=e=>{o("on_drag_start",e),n.value="dragStart",e.dataTransfer.setData("info",JSON.stringify(a.dataInfo))},u=e=>{e.preventDefault(),r.value=!0},p=e=>{o("on_drag_end",e),r.value=!1,n.value=""},m=e=>{e.preventDefault(),o("on_drag_over",e),n.value="dragOver"},f=e=>{o("on_drag_leave",e),n.value=""},v=e=>{o("on_drop",e.dataTransfer.getData("info"),e),n.value=""};let h;const g=t.reactive({x:0,y:0}),x=t.reactive({width:0,height:0}),b=e=>{e.preventDefault(),h||(h=l.value.offsetParent,h.onmousemove=k,h.ontouchmove=k,h.onmouseleave=y,h.onmouseup=y,h.ontouchend=y,Array.prototype.forEach.call(h.children,(e=>{e!==l.value&&(e.style.pointerEvents="none")})),x.width=l.value.offsetWidth,x.height=l.value.offsetHeight),n.value="dragStart",s.value=!0,g.x=e.offsetX,g.y=e.offsetY,l.value.style.pointerEvents="none"},k=e=>{if(!s.value)return;const t=e.offsetX-g.x,a=e.offsetY-g.y;c.x=Math.max(0,t),c.y=Math.max(0,a),c.x=Math.min(c.x+x.width,h.offsetWidth)-x.width,c.y=Math.min(c.y+x.height,h.offsetHeight)-x.height,o("on_move",c,e)},y=()=>{s.value&&(n.value="",s.value=!1,g.x=0,g.y=0,l.value.style.pointerEvents="auto")};return t.onMounted((()=>{(()=>{const e=l.value;a.freeDrag?(e.onmousedown=b,e.ontouchstart=b):(e.ondragstart=d,e.ondrag=u,e.ondragend=p,e.ondragover=m,e.ondragleave=f,e.ondrop=v)})()})),(e,o)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),states:{dragStart:e.dragStart,dragOver:e.dragOver},cname:e.cname},{className:t.withCtx((o=>[t.createElementVNode("div",{style:t.normalizeStyle({cursor:e.dragOver?"default":"move",visibility:r.value?"hidden":"visible",position:e.freeDrag?"absolute":"relative",left:0,top:0,transform:`translate(${c.x}px, ${c.y}px)`}),ref_key:"$el",ref:l,class:t.normalizeClass(o.className),state:n.value,draggable:!!e.dragStart},[t.renderSlot(e.$slots,"default")],14,O)])),_:3},8,["class","states","cname"]))}}),M=["src"],j=t.defineComponent({__name:"b-webview",props:{src:{},class:{},cname:{}},setup:e=>(e,o)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),cname:e.cname},{className:t.withCtx((o=>[t.createElementVNode("iframe",{class:t.normalizeClass(o.className),frameborder:"0",src:e.src},null,10,M)])),_:1},8,["class","cname"]))}),F=t.defineComponent({__name:"b-row",props:{class:{},gap:{},viewData:{}},setup(e){const o=e,a=t.computed((()=>{if(!o.gap)return["0","0"];const e=o.gap;return(Array.isArray(e)&&2===e.length?e:[e,e]).map((e=>(e/2).toString().replace(".","d")))})),l=t.ref(`${o.class??""} flex pad-h-${a.value[0]} pad-v-${a.value[1]}`);return(e,o)=>(t.openBlock(),t.createBlock(u,t.mergeProps({class:l.value},e.viewData,{extraClass:{selector:">",value:`pad-h-${a.value[0]} pad-v-${a.value[1]}`}}),{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},16,["class","extraClass"]))}}),I=t.defineComponent({__name:"b-col",props:{span:{},offset:{},class:{},viewData:{}},setup(e){const o=e,a=t.ref(`${o.class??""} ${o.span?"col-"+o.span:""} ${o.offset?"offset-"+o.offset:""}`);return(e,o)=>(t.openBlock(),t.createBlock(u,t.mergeProps({class:a.value},e.viewData),{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},16,["class"]))}}),A=t.defineComponent({__name:"btn-wid",props:{btnText:{},btnColor:{},btnRound:{type:Boolean},btnWidth:{},hotData:{},iconData:{}},setup(e){const o=e,a=(e,t)=>{const a=o.btnColor;if(a){const o=a[e].bg;return 0===(null==o?void 0:o.search("linear"))?`bg-image-${o}`:`bg-color-${o||t}`}return`bg-color-${t}`},l=t.computed((()=>{var e,t,l,n;return{text:`color-${(null==(t=null==(e=null==o?void 0:o.btnColor)?void 0:e.normal)?void 0:t.text)||"C777"}`,line:`line-${(null==(n=null==(l=null==o?void 0:o.btnColor)?void 0:l.normal)?void 0:n.line)||"none"}`,bg:a("normal","lgray")}})),n=t.computed((()=>{var e,t,l,n;return{text:`color-${(null==(t=null==(e=null==o?void 0:o.btnColor)?void 0:e.hover)?void 0:t.text)||"dgray"}`,line:`line-${(null==(n=null==(l=null==o?void 0:o.btnColor)?void 0:l.hover)?void 0:n.line)||"none"}`,bg:a("hover","Ce7e7e7")}})),r=t.computed((()=>{var e,t,l,n;return{text:`color-${(null==(t=null==(e=null==o?void 0:o.btnColor)?void 0:e.active)?void 0:t.text)||"dgray"}`,line:`line-${(null==(n=null==(l=null==o?void 0:o.btnColor)?void 0:l.active)?void 0:n.line)||"Cd7d7d7"}`,bg:a("active","Ce7e7e7")}}));return(e,o)=>(t.openBlock(),t.createBlock(f,t.mergeProps(e.hotData,{class:`flex-5 pad-h-1d4 pad-v-d4 thick-1 ellipsis ${e.btnRound?"round-lg":"round-sm"} ${e.btnWidth?"lw-"+e.btnWidth:""} ${l.value.bg} ${l.value.text} ${l.value.line} solid`,hover:`${n.value.text} ${n.value.bg} ${n.value.line}`,active:`${r.value.text} ${r.value.bg} ${r.value.line}`}),{default:t.withCtx((()=>[e.iconData?(t.openBlock(),t.createBlock(C,t.mergeProps({key:0},e.iconData,{class:"mrg-r-d7"}),null,16)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.btnText),1)])),_:1},16,["class","hover","active"]))}}),L=t.defineComponent({__name:"checkbox-wid",props:{selected:{type:Boolean},value:{},class:{},actClass:{},actColor:{},label:{}},emits:["update:selected","change"],setup(e,{emit:o}){const a=e,l=t.ref(a.class??"flex-4 bg-color-neutral round-sm pad-4-px"),n=t.ref(`color-blue ${a.actClass??""}`),r=t.computed((()=>{const e=a.label;return e?Array.isArray(e)?e:[e,e]:null})),s=t.computed((()=>a.selected)),c=()=>{const e=!s.value;o("update:selected",e),o("change",a.value,e)};return(e,o)=>(t.openBlock(),t.createBlock(f,{class:t.normalizeClass(l.value),hover:"alpha-d9",state:s.value?"act":"",states:{act:n.value},cname:l.value+n.value,onOn_click:c},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default",{state:s.value?"act":""},(()=>{var o,a;return[t.createVNode(u,{class:"w-24-px h-24-px bg-color-neutral round-sm flex-5",state:s.value?"act":"",cname:l.value+n.value,states:{act:`bg-color-${e.actColor?(null==(o=e.actColor)?void 0:o.bg)??"blue":"blue"} color-${e.actColor?(null==(a=e.actColor)?void 0:a.icon)??"light":"light"}`}},{default:t.withCtx((()=>[t.createVNode(C,{icon:"success",class:"alpha-d3",state:s.value?"act":"",states:{act:"alpha-1"}},null,8,["state"])])),_:1},8,["state","cname","states"])]})),r.value?(t.openBlock(),t.createBlock(u,{key:0,class:"pad-h-1 ellipsis"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(s.value?r.value[1]:r.value[0]),1)])),_:1})):t.createCommentVNode("",!0)])),_:3},8,["class","state","states","cname"]))}}),H=t.defineComponent({__name:"checkbox-group-wid",props:{options:{},selected:{},class:{},title:{},span:{}},emits:["update:selected","change"],setup(e,{emit:o}){const a=e,l=t.computed((()=>a.options.map((e=>{var t;return{...e,checkboxData:{...null==e?void 0:e.checkboxData,class:(null==(t=null==e?void 0:e.checkboxData)?void 0:t.class)??"bg-color-none mrg-r-1d5 flex-4 pad-4-px"},selected:a.selected.includes(e.value)}})))),n=(e,t)=>{const l=[...a.selected];t&&!l.includes(e)&&l.push(e),!t&&l.includes(e)&&l.splice(l.findIndex((t=>t===e)),1),o("update:selected",l),o("change",l.map((e=>{var t;return{label:null==(t=a.options.find((t=>t.value===e)))?void 0:t.label,value:e}})))};return(e,o)=>{const a=t.resolveComponent("b-col"),r=t.resolveComponent("b-row");return t.openBlock(),t.createBlock(u,{class:t.normalizeClass(e.class)},{default:t.withCtx((()=>[e.title?(t.openBlock(),t.createBlock(u,{key:0,class:"mrg-b-1"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.title),1)])),_:1})):t.createCommentVNode("",!0),t.createVNode(r,null,{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,((o,l)=>(t.openBlock(),t.createBlock(a,{class:"flex-4",span:e.span,key:l},{default:t.withCtx((()=>[t.createVNode(L,t.mergeProps({onChange:n,label:o.label,value:o.value},o.checkboxData,{selected:o.selected,"onUpdate:selected":e=>o.selected=e}),t.createSlots({_:2},[e.$slots.default?{name:"default",fn:t.withCtx((o=>[t.renderSlot(e.$slots,"default",{state:o.state})])),key:"0"}:void 0,e.$slots[o.value]?{name:"default",fn:t.withCtx((a=>[t.renderSlot(e.$slots,o.value,{state:a.state})])),key:"1"}:void 0]),1040,["label","value","selected","onUpdate:selected"])])),_:2},1032,["span"])))),128))])),_:3})])),_:3},8,["class"])}}}),U=t.defineComponent({__name:"radio-group-wid",props:{options:{},selected:{},class:{},title:{},span:{},regular:{type:Boolean}},emits:["update:selected","change"],setup(e,{emit:o}){const a=e,l=t.computed((()=>[a.selected])),n=e=>{const t=e.map((e=>e.value));2===t.length&&(o("update:selected",t[1]),o("change",t))},r=t.ref([]);return t.onMounted((()=>{var e;r.value=Object.keys((null==(e=t.getCurrentInstance())?void 0:e.slots)??[])})),(e,o)=>{const a=t.resolveComponent("b-view");return t.openBlock(),t.createBlock(H,{span:e.span,title:e.title,class:t.normalizeClass(e.class),selected:l.value,options:e.options,onChange:n},t.createSlots({_:2},[e.regular?{name:"default",fn:t.withCtx((e=>[t.createVNode(a,{class:"h-24-px w-24-px round-lg pad-d5 bg-color-neutral"},{default:t.withCtx((()=>[t.createVNode(a,{class:"max round-lg bg-color-C99999944",state:e.state,states:{act:"bg-color-blue"}},null,8,["state"])])),_:2},1024)])),key:"0"}:void 0,t.renderList(r.value,(o=>({name:o,fn:t.withCtx((a=>[t.renderSlot(e.$slots,o,{state:a.state})]))})))]),1032,["span","title","class","selected","options"])}}}),R=["state"],W=["innerHTML"],X=["innerHTML"],q=t.defineComponent({__name:"tabs-wid",props:{options:{},selected:{},title:{},color:{},tabStyle:{},smooth:{type:Boolean},noDataNotic:{}},emits:["update:selected","change"],setup(e,{emit:o}){const a=e,l=t.reactive({}),n=t.computed((()=>a.color??"blue")),r=t.reactive({}),s=t.ref(!1),c=t.computed((()=>a.options.map(((e,t)=>{const{label:o,value:c,cont:i}=e;let d=e.checkboxData;return l[c]=i,r[c]=t,d||(s.value=!0,d={class:"round-none solid-b line-neutral thick-1 bg-color-none rel pad-4-px pad-b-1",actClass:`color-${n.value}`},"grid"===a.tabStyle&&(s.value=!1,d={class:"round-none thick-1 solid line-neutral bg-color-none pad-d5",actClass:`line-${n.value} color-${n.value}`}),"card"===a.tabStyle&&(d={class:"round-sm round-t thick-1 solid line-neutral bg-color-neutral pad-d5 rel mrg-r-4-px",actClass:`bg-color-none solid-b-none t-f1-px color-${n.value}`})),{label:o,value:c,checkboxData:d}})))),i=t.computed((()=>a.options.findIndex((e=>e.cont))>-1)),d=t.computed((()=>a.selected)),p=t.ref(""),m=e=>{const[t,a]=e;p.value=r[a]>r[t]?"right-to-left":"left-to-right",o("update:selected",a),o("change",{cur:a,old:t,dir:r[a]>r[t]?1:0,aniClass:`ani-${p.value}`})},f=t.ref([]);return t.onBeforeMount((()=>{var e;f.value=Object.keys((null==(e=t.getCurrentInstance())?void 0:e.slots)??[])})),(e,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(u,{class:"flex-7"},{default:t.withCtx((()=>[t.createVNode(U,{options:c.value,title:e.title,selected:d.value,onChange:m},t.createSlots({_:2},[0===f.value.length&&"grid"===e.tabStyle?{name:"default",fn:t.withCtx((e=>[t.createElementVNode("span",{state:e},null,8,R)])),key:"0"}:0===f.value.length&&"card"===e.tabStyle?{name:"default",fn:t.withCtx((e=>[t.createVNode(u,{class:"w-4-px b-f1-px h-1-px bg-color-neutral r-f5-px abs"})])),key:"1"}:0===f.value.length?{name:"default",fn:t.withCtx((e=>[t.createVNode(u,{class:t.normalizeClass("max-w l-0 b-f1-px round-sm h-2-px bg-color-none abs"),state:e.state,states:{act:`bg-color-${n.value}`}},null,8,["state","states"])])),key:"2"}:void 0,t.renderList(f.value,(o=>({name:o,fn:t.withCtx((a=>[t.renderSlot(e.$slots,o,{state:a.state})]))})))]),1032,["options","title","selected"]),s.value?(t.openBlock(),t.createBlock(u,{key:0,class:"grow-1 h-1-px bg-color-neutral"})):t.createCommentVNode("",!0)])),_:3}),i.value?(t.openBlock(),t.createBlock(u,{key:0,class:"pad-v-1d5 over-hide"},{default:t.withCtx((()=>[d.value?(t.openBlock(),t.createBlock(u,{key:0},{default:t.withCtx((()=>[t.createElementVNode("div",{innerHTML:l[d.value],class:t.normalizeClass(e.smooth?`ani-fast ani-${p.value}`:""),onAnimationend:o[0]||(o[0]=e=>p.value="")},null,42,W)])),_:1})):(t.openBlock(),t.createBlock(u,{key:1,class:"alpha-d5"},{default:t.withCtx((()=>[t.createElementVNode("div",{innerHTML:e.noDataNotic??"暂未选择标签"},null,8,X)])),_:1}))])),_:1})):t.createCommentVNode("",!0)],64))}}),Y=["multiple"],J=t.defineComponent({__name:"upload-wid",props:{type:{},size:{},multiple:{type:Boolean},btnData:{},camera:{type:Boolean}},emits:["on_upload"],setup(e,{emit:o}){const a=e,l=t.ref(),n=t.computed((()=>({btnText:"上传",...a.btnData})));let r;const s=e=>{r=[];const t=e.currentTarget.files;for(let o of t){let t=!0;(c(o,a.type)||i(o,a.size||2097152))&&(e.currentTarget.value=null,t=!1),r.push({file:o,pass:t})}r.success=r.every((e=>e.pass)),o("on_upload",r.reduce(((e,t)=>(t.pass&&e.push(t.file),e)),[]),r)},c=(e,t)=>!(!t||t.includes(e.type))&&(console.error(`${e.name} 文件格式有误!`),!0),i=(e,t)=>e.size>t&&(console.error(`${e.name} 文件尺寸有误!`),!0);return(e,o)=>{const a=t.resolveComponent("b-hot");return t.openBlock(),t.createBlock(u,{class:"flex"},{default:t.withCtx((()=>[e.$slots.default?(t.openBlock(),t.createBlock(a,{key:0,onOn_click:o[0]||(o[0]=e=>l.value.click())},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3})):(t.openBlock(),t.createBlock(A,t.mergeProps({key:1,onOn_click:o[1]||(o[1]=e=>l.value.click())},n.value),null,16)),e.camera?(t.openBlock(),t.createElementBlock("input",{key:2,type:"file",style:{display:"none"},ref_key:"$uploader",ref:l,onChange:s,capture:"user",accept:"image/*"},null,544)):(t.openBlock(),t.createElementBlock("input",{key:3,type:"file",style:{display:"none"},ref_key:"$uploader",ref:l,onChange:s,multiple:e.multiple},null,40,Y))])),_:3})}}}),G=t.defineComponent({__name:"modal-wid",props:{visiable:{type:Boolean},matteColor:{},matteCloseForbid:{type:Boolean},closeEnable:{type:Boolean},roundEnable:{type:Boolean},pannelColor:{},dir:{},aniName:{}},emits:["update:visiable","opened","closed"],setup(e,{emit:o}){const a=e,l=t.computed((()=>a.dir||"bottom")),n=t.computed((()=>{let e,t;switch(l.value){case"left":e="flex-4",t="max-h round-r";break;case"right":e="flex-6",t="max-h round-l";break;case"top":e="flex-2",t="max-w round-b";break;case"bottom":e="flex-8",t="max-w round-t";break;case"center":e="flex-5",t=""}return{layout:e,pannal:t}})),r=t.computed((()=>{const[e,t]=a.aniName??["",""];return{left:{ani:e||"ani-left-to-right"},right:{ani:e||"ani-right-to-left"},top:{ani:e||"ani-top-to-bottom"},bottom:{ani:e||"ani-bottom-to-top"},center:{ani:e||"ani-scale-fade-in"},leftBack:{ani:t||"ani-left-to-right-reverse"},rightBack:{ani:t||"ani-right-to-left-reverse"},topBack:{ani:t||"ani-top-to-bottom-reverse"},bottomBack:{ani:t||"ani-bottom-to-top-reverse"},centerBack:{ani:t||"ani-scale-fade-out"}}})),s=t.ref(""),c=t.ref(!1);t.watchEffect((()=>{a.visiable?(c.value=!0,s.value=l.value):s.value=`${l.value}Back`}));const i=e=>{-1===s.value.indexOf("Back")&&o("opened",e)},d=e=>{"0"===getComputedStyle(e.target).opacity&&"visibility"===e.propertyName&&(c.value=!1,o("closed",e))},p=()=>{o("update:visiable",!1)};return(e,o)=>(t.openBlock(),t.createBlock(u,{class:t.normalizeClass(`fixed t-0 l-0 max z-9 ${n.value.layout}`),state:c.value.toString(),states:{true:"alpha-1 visible",false:"alpha-0"}},{default:t.withCtx((()=>[t.createVNode(f,{onOn_transend:d,onOn_click:o[0]||(o[0]=t=>!e.matteCloseForbid&&p()),state:e.visiable.toString(),states:{true:"alpha-1 visible",false:"alpha-0"},class:t.normalizeClass(`abs trans-fast max t-0 l-0 bg-color-${e.matteColor||"C000000cc"}`)},null,8,["state","class"]),t.createVNode(u,{class:t.normalizeClass(`${n.value.pannal} rel ani-mode-both ani-fast`),state:s.value,"ani-end-clear":!0,onOn_aniEnd:i,states:r.value},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"custom",{},(()=>[t.createVNode(u,{class:t.normalizeClass(`bg-color-${e.pannelColor||"light"} rel pad-2 ${e.roundEnable?"round-md":""} ${n.value.pannal}`)},{default:t.withCtx((()=>[e.closeEnable?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(f,{key:0,class:"abs r-1 t-d7 color-mgray",onOn_click:p},{default:t.withCtx((()=>[t.createVNode(C,{icon:"fail",class:"fsize-2 lh-1d4"})])),_:1})),t.renderSlot(e.$slots,"default")])),_:3},8,["class"])]))])),_:3},8,["class","state","states"])])),_:3},8,["class","state"]))}}),K=t.defineComponent({__name:"toast-wid",props:{text:{},duration:{},icon:{},matteColor:{},extra:{}},emits:["close"],setup(e,{expose:o,emit:a}){const l=e;let n,r=!1;const s=t.ref(!1),c=()=>{r=!0},i=()=>{s.value=!1,!r&&a("close")},d=()=>{clearTimeout(n),a("close")};return o({show:()=>{s.value=!0,0!==l.duration&&(n=setTimeout((()=>{i()}),l.duration||2e3))},close:i}),(e,o)=>(t.openBlock(),t.createBlock(G,{visiable:s.value,"onUpdate:visiable":o[0]||(o[0]=e=>s.value=e),"matte-close-forbid":!0,onClosed:d,onOpened:c,"ani-name":["ani-fade-in","ani-fade-out"],dir:"center","matte-color":e.matteColor||"C00000044"},{custom:t.withCtx((()=>[t.renderSlot(e.$slots,"default",{},(()=>[t.createVNode(u,{class:"round-md pad-v-1d2 pad-h-1d7 color-light fsize-1d27 bg-color-C000000ee flex-column lw-10 pcenter"},{default:t.withCtx((()=>{var o;return[e.icon?(t.openBlock(),t.createBlock(u,{key:0,class:"mrg-b-1d2 fsize-3d2",states:{loading:{class:"ani-loop ani-slow",ani:"ani-rotate"}},state:(null==(o=e.extra)?void 0:o.type)??""},{default:t.withCtx((()=>[t.createVNode(C,{icon:e.icon},null,8,["icon"])])),_:1},8,["state"])):t.createCommentVNode("",!0),t.createVNode(m,null,{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.text),1)])),_:1})]})),_:1})]))])),_:3},8,["visiable","matte-color"]))}}),Q=t.defineComponent({__name:"confirm-wid",props:{notic:{},type:{},theme:{},text:{},matteColor:{},ok:{type:Function},cancel:{type:Function}},emits:["ok","cancel","close"],setup(e,{expose:o,emit:a}){const l=e,n=t.ref(!1),r=()=>{a("close")},s=t.computed((()=>{const{availWidth:e,availHeight:t}=window.screen;return e/t>1?"lw-24 rw-37":"lw-74-vw"})),c=t.computed((()=>({bg:"light",text:"dark",line:"lgray",ok:"blue",cancel:"mgray",...null==l?void 0:l.theme}))),i=()=>{var e;a("ok"),null==(e=l.ok)||e.call(l),n.value=!1},d=()=>{var e;a("cancel"),null==(e=l.cancel)||e.call(l),n.value=!1};return o({show:()=>{n.value=!0}}),(e,o)=>(t.openBlock(),t.createBlock(G,{visiable:n.value,"onUpdate:visiable":o[0]||(o[0]=e=>n.value=e),"matte-close-forbid":!0,onClosed:r,dir:"center","ani-name":["ani-fade-in","ani-fade-out"],"matte-color":e.matteColor},{custom:t.withCtx((()=>[t.createVNode(u,{class:t.normalizeClass(`bg-color-${c.value.bg} round-md ${s.value} pcenter`)},{default:t.withCtx((()=>[t.createVNode(u,{class:t.normalizeClass(`color-${c.value.text} pad-3d4 fsize-1d4 bolder-470`)},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.notic),1)])),_:1},8,["class"]),t.createVNode(u,{class:t.normalizeClass(`flex solid-t bolder-470 line-${c.value.line} thick-d4 fsize-1d44`)},{default:t.withCtx((()=>["confirm"===e.type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(f,{class:t.normalizeClass(`color-${c.value.cancel} solid-r thick-d4 line-${c.value.line} round-md round-3 flex-5 pad-v-1d4 w-50-P`),active:"bg-color-neutral",onOn_click:d},{default:t.withCtx((()=>{var o;return[t.createTextVNode(t.toDisplayString((null==(o=e.text)?void 0:o.cancel)||"取消"),1)]})),_:1},8,["class"]),t.createVNode(f,{class:t.normalizeClass(`color-${c.value.ok} round-md round-4 flex-5 pad-v-1d4 w-50-P`),active:"bg-color-neutral",onOn_click:i},{default:t.withCtx((()=>{var o;return[t.createTextVNode(t.toDisplayString((null==(o=e.text)?void 0:o.ok)||"确定"),1)]})),_:1},8,["class"])],64)):(t.openBlock(),t.createBlock(f,{key:1,class:t.normalizeClass(`color-${c.value.ok} round-b round-md flex-5 pad-v-1d4 grow-1`),active:"bg-color-neutral",onOn_click:i},{default:t.withCtx((()=>{var o;return[t.createTextVNode(t.toDisplayString((null==(o=e.text)?void 0:o.ok)||"确定"),1)]})),_:1},8,["class"]))])),_:1},8,["class"])])),_:1},8,["class"])])),_:1},8,["visiable","matte-color"]))}}),Z=(e,o=2e3,a="",l={})=>{const n=document.createElement("div");n.setAttribute("id","BTXUI-toast"),document.body.appendChild(n);const r=t.createVNode(K,{text:e,duration:o,icon:a,extra:l,onClose:()=>{t.render(null,n),document.body.removeChild(n)}});return t.render(r,n),new Promise((e=>{t.nextTick((()=>{setTimeout((()=>{var t,o;null==(o=null==(t=r.component)?void 0:t.exposed)||o.show(),e(r)}),40)}))}))};let ee;const te=e=>{var t,o;null==(o=null==(t=e.component)?void 0:t.exposed)||o.close()};let oe={theme:{},matte:""};const ae=(e,o,a,l,n={ok:"",cancel:""})=>{var r,s;const c=document.createElement("div");c.setAttribute("id","BTXUI-confirm"),document.body.appendChild(c);const i=t.createVNode(Q,{type:e,notic:o,ok:a,cancel:l,theme:oe.theme,matteColor:oe.matte,text:n,onClose:()=>{t.render(null,c),document.body.removeChild(c)}});return t.render(i,c),setTimeout(null==(s=null==(r=i.component)?void 0:r.exposed)?void 0:s.show,40),i},le=e=>{const t=document.createElement("input");return t.type="file",(null==e?void 0:e.camera)&&(t.capture="user",t.accept="image/*"),document.body.appendChild(t),new Promise((e=>{t.onchange=t=>{const o=t.target;o.files&&e(o.files)},t.click(),document.body.removeChild(t)}))},ne=(e,t)=>new Promise(((o,a)=>{const l=new FileReader;l.readAsDataURL(e),l.onload=function(){const n=new Image;n.src=l.result,n.onload=function(){const a=document.createElement("canvas"),l=a.getContext("2d"),{naturalHeight:r,naturalWidth:s}=n,c=s/r;a.width=(null==t?void 0:t.width)||s,a.height=(null==t?void 0:t.height)||a.width/c,l.drawImage(n,0,0,a.width,a.height),a.toBlob((t=>{o(new File([t],e.name,{type:t.type,lastModified:(new Date).getTime()}))}),e.type,(null==t?void 0:t.quality)||.7)},n.onerror=a},l.onerror=a})),re=t.defineComponent({__name:"img-upload-wid",props:{preview:{},cover:{},size:{},multiple:{type:Boolean},bsize:{},compress:{},camera:{type:Boolean}},emits:["update:preview","on_upload"],setup(e,{emit:o}){const a=e,l=t.computed((()=>a.compress?20971520:a.size)),n=async(e,t)=>{if(t.success){let l=e[0];const n=new FileReader;n.readAsDataURL(e[0]),n.onload=e=>{var t;o("update:preview",null==(t=e.target)?void 0:t.result)},a.compress&&(l=await ne(e[0],a.compress)),o("on_upload",l,t)}};return(e,o)=>{const a=t.resolveComponent("b-view"),r=t.resolveComponent("b-icon");return t.openBlock(),t.createBlock(J,{onOn_upload:n,size:l.value,multiple:e.multiple,camera:e.camera,type:["image/jpeg","image/png","image/gif"]},{default:t.withCtx((()=>{var o,l,n,s,c,i;return[e.preview?(t.openBlock(),t.createBlock(a,{key:0,class:t.normalizeClass(`w-${(null==(o=e.cover)?void 0:o.width)||7} h-${(null==(l=e.cover)?void 0:l.height)||7} bsize-${e.bsize||"cover"} bpos-2 round-sm bg-color-neutral`),"bg-img":e.preview},null,8,["class","bg-img"])):(t.openBlock(),t.createBlock(r,{key:1,icon:"add",class:t.normalizeClass(`flex-5 w-${(null==(n=e.cover)?void 0:n.width)||7} h-${(null==(s=e.cover)?void 0:s.height)||7} ${(null==(c=e.cover)?void 0:c.color)?"color-"+(null==(i=e.cover)?void 0:i.color):""} round-sm bg-color-neutral`)},null,8,["class"]))]})),_:1},8,["size","multiple","camera"])}}}),se=t.defineComponent({__name:"app-wid",props:{path:{},spread:{},iconTransAni:{type:Boolean},center:{},colors:{},round:{type:Boolean},keepAlive:{type:Boolean}},emits:["on_toggle"],setup(e){const o=e,a=t.computed((()=>o.path)),l=t.computed((()=>{const e=[...o.spread];return o.center&&e.splice(Math.floor(e.length/2),0,t.reactive({...o.center,main:!0})),e}));return(e,o)=>{var n;const r=t.resolveComponent("router-view");return t.openBlock(),t.createBlock(u,{class:t.normalizeClass(`max fixed flex-column color-light select-none bg-color-${(null==(n=e.colors)?void 0:n.bg)||"none"}`)},{default:t.withCtx((()=>{var o;return[t.createVNode(u,{class:"rel grow-1"},{default:t.withCtx((()=>[t.createVNode(E,{scroll:{y:"auto",x:"hidden"},class:"abs max"},{default:t.withCtx((()=>[e.keepAlive?(t.openBlock(),t.createBlock(t.KeepAlive,{key:0},[t.createVNode(r)],1024)):(t.openBlock(),t.createBlock(r,{key:1}))])),_:1})])),_:1}),t.createVNode(u,{class:t.normalizeClass(`pcenter pad-t-d5 flex-1 ${e.round?"round-md round-t":""} bg-color-${(null==(o=e.colors)?void 0:o.bar)||"dark"} solid-t line-neutral thick-d4 app-nav-bar`)},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,((o,l)=>(t.openBlock(),t.createBlock(f,t.mergeProps({key:l},o.hotData,{class:"grow-1",onOn_click:t=>e.$emit("on_toggle",o)}),{default:t.withCtx((()=>{var l,n,r,s,c,i;return[o.main?(t.openBlock(),t.createBlock(u,{key:0,class:"rel w-5 mrg-h-auto"},{default:t.withCtx((()=>{var a,l,n,r;return[t.createVNode(C,t.mergeProps(o.iconData,{class:`abs flex-5 solid t-f1d4 thick-2 w-5 h-5 round fsize-1d7 line-${(null==(l=null==(a=e.colors)?void 0:a.center)?void 0:l.line)||"neutral"} bg-color-${(null==(r=null==(n=e.colors)?void 0:n.center)?void 0:r.bg)||"dgray"}`}),null,16,["class"])]})),_:2},1024)):(t.openBlock(),t.createBlock(u,{key:1,class:t.normalizeClass(`flex-column rel flex-5 color-${(null==(n=null==(l=e.colors)?void 0:l.text)?void 0:n.normal)||"mgray"}`),cname:(null==(s=null==(r=e.colors)?void 0:r.text)?void 0:s.act)||"light",state:a.value===o.hotData.link?"act":"",states:{act:`color-${(null==(i=null==(c=e.colors)?void 0:c.text)?void 0:i.act)||"light"}`}},{default:t.withCtx((()=>[1===o.unread?(t.openBlock(),t.createBlock(u,{key:0,class:"round w-d7 h-d7 r-9d2-vw t-d2 bg-color-red abs"})):t.createCommentVNode("",!0),o.unread>1?(t.openBlock(),t.createBlock(u,{key:1,class:"flex-5 round w-1d5 h-1d5 bold r-7d7-vw t-fd5 bg-color-red abs color-Cfff"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(o.unread),1)])),_:2},1024)):t.createCommentVNode("",!0),t.createVNode(C,t.mergeProps(o.iconData,{cname:o.act,state:a.value===o.hotData.link?"act":"",states:{act:o.act??""},class:`w-2d7 h-2d7 ${e.iconTransAni?"trans-fast":""} fsize-1d7`}),null,16,["cname","state","states","class"]),o.text?(t.openBlock(),t.createBlock(m,{key:2,class:"fsize-d83"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(o.text),1)])),_:2},1024)):t.createCommentVNode("",!0)])),_:2},1032,["class","cname","state","states"]))]})),_:2},1040,["onOn_click"])))),128))])),_:1},8,["class"])]})),_:1},8,["class"])}}}),ce=t.defineComponent({__name:"datetime-modal-wid",props:{datetime:{},format:{},btnData:{},modalData:{}},emits:["update:datetime","getData"],setup(e,{expose:o,emit:a}){const l=e,n=t.ref(!1),r=t.reactive({roundEnable:!0,...l.modalData,dir:""});t.onMounted((()=>{const{availWidth:e,availHeight:t}=window.screen;r.dir=e/t>1?"center":"bottom"}));const s=t.ref(l.datetime),c=e=>{d(),a("update:datetime",s.value),a("getData",e)},i=()=>{n.value=!0},d=()=>{n.value=!1};return o({show:i,hide:d}),(e,o)=>{const a=t.resolveComponent("b-hot"),l=t.resolveComponent("datetime-wid");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(a,{onOn_click:i},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3}),r.dir?(t.openBlock(),t.createBlock(G,t.mergeProps({key:0,visiable:n.value,"onUpdate:visiable":o[1]||(o[1]=e=>n.value=e)},r),{default:t.withCtx((()=>[t.createVNode(u,{class:"pad-t-1 lw-24"},{default:t.withCtx((()=>[t.createVNode(l,{onGetData:c,datetime:s.value,"onUpdate:datetime":o[0]||(o[0]=e=>s.value=e),format:e.format,"btn-data":e.btnData},null,8,["datetime","format","btn-data"])])),_:1})])),_:1},16,["visiable"])):t.createCommentVNode("",!0)],64)}}}),ie=t.defineComponent({__name:"datetime-wid",props:{datetime:{},format:{},btnData:{}},emits:["update:datetime","getData"],setup(e,{emit:o}){const a=e,l=t.computed((()=>({btnText:"确定",...a.btnData}))),n=e=>e.toString().padStart(2,"0"),r=t.computed((()=>a.datetime)),s=t.reactive({y:{val:0,show:!1},m:{val:0,show:!1},d:{val:0,show:!1},h:{val:0,show:!1},i:{val:0,show:!1},s:{val:0,show:!1}});t.watch(r,(e=>{(e=>{const t=new Date(e);s.y.val=t.getFullYear(),s.m.val=t.getMonth()+1,s.d.val=t.getDate(),s.h.val=t.getHours(),s.i.val=t.getMinutes(),s.s.val=t.getSeconds()})(e)}),{immediate:!0});const c=t.ref(""),i=t.ref(!1);t.onMounted((()=>{const e=(a.format||"y/m/d h:i:s").split(" ");i.value=e.length>1,e.forEach((e=>{e.split(/\/|-|:/g).forEach((e=>{c.value||(c.value=e),s[e].show=!0}))}))}));const d={y:"年",m:"月",d:"日",h:"时",i:"分",s:"秒"},p=t.ref([]),m=t.ref(),f=t.ref();let v=0;const h=()=>{m.value&&(m.value.style.cssText=""),t.nextTick((()=>{v&&(s.d.val=Math.min(v,s.d.val));const e=f.value.$el.nextElementSibling.querySelector(`[state='${s[c.value].val}']`);e.style.cssText="\n font-weight: bolder;\n opacity: 1;\n text-shadow: 0 0 4px rgba(255,255,255,.7);\n ",e.scrollIntoView({behavior:"smooth"}),m.value=e}))};t.watch(c,(e=>{const t=[];switch(e){case"y":for(let e=s.y.val-50;e<s.y.val+20;e++)t.push(e);break;case"m":for(let e=0;e<12;e++)t.push(e+1);break;case"d":(()=>{const e=s.m.val,t=s.y.val;v=1===e||3===e||5===e||7===e||8===e||10===e||12===e?31:2===e?t%4==0&&t%100!=0||t%400==0?29:28:30})();for(let e=0;e<v;e++)t.push(e+1);break;case"h":for(let e=0;e<24;e++)t.push(e);break;case"i":case"s":for(let e=0;e<60;e++)t.push(e)}p.value=t,h()}),{immediate:!0});const g=e=>{var t;const o=e.clientX,a=e.clientY;let l=document.elementFromPoint(o,a);for(;!(null==l?void 0:l.hasAttribute("state"));)l=null==l?void 0:l.parentElement;s[c.value].val=1*(null==l?void 0:l.getAttribute("state"));const n="ymdhis".split(c.value)[1],r=null==(t=null==n?void 0:n.split(""))?void 0:t.find((e=>s[e].show));r?c.value=r:h()},x=()=>{const{y:e,m:t,d:a,h:l,i:r,s:c}=s;o("update:datetime",Date.parse(`${e.val}-${n(t.val)}-${n(a.val)}T${n(l.val)}:${n(r.val)}:${n(c.val)}`)),o("getData",{...s})};return(e,o)=>{const a=t.resolveComponent("b-icon"),r=t.resolveComponent("b-hot"),m=t.resolveComponent("b-text"),v=t.resolveComponent("b-list"),h=t.resolveComponent("btn-wid");return t.openBlock(),t.createBlock(u,null,{default:t.withCtx((()=>[t.createVNode(u,{class:"flex-4"},{default:t.withCtx((()=>[t.createVNode(a,{icon:"time",class:"alpha-d7 mrg-r-d7"}),s.y.show?(t.openBlock(),t.createBlock(u,{key:0},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:o[0]||(o[0]=e=>c.value="y"),cname:"y",state:c.value,states:{y:"color-green"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(s.y.val),1)])),_:1},8,["state"]),t.createVNode(m,{class:"pad-h-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("年")])),_:1})])),_:1})):t.createCommentVNode("",!0),s.m.show?(t.openBlock(),t.createBlock(u,{key:1},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:o[1]||(o[1]=e=>c.value="m"),cname:"m",state:c.value,states:{m:"color-green"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n(s.m.val)),1)])),_:1},8,["state"]),t.createVNode(m,{class:"pad-h-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("月")])),_:1})])),_:1})):t.createCommentVNode("",!0),s.d.show?(t.openBlock(),t.createBlock(u,{key:2},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:o[2]||(o[2]=e=>c.value="d"),cname:"d",state:c.value,states:{d:"color-green"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n(s.d.val)),1)])),_:1},8,["state"]),t.createVNode(m,{class:"pad-h-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("日")])),_:1})])),_:1})):t.createCommentVNode("",!0),i.value?(t.openBlock(),t.createBlock(u,{key:3,class:"w-1d4"})):t.createCommentVNode("",!0),s.h.show?(t.openBlock(),t.createBlock(u,{key:4},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:o[3]||(o[3]=e=>c.value="h"),cname:"h",state:c.value,states:{h:"color-green"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n(s.h.val)),1)])),_:1},8,["state"]),t.createVNode(m,{class:"pad-h-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("时")])),_:1})])),_:1})):t.createCommentVNode("",!0),s.i.show?(t.openBlock(),t.createBlock(u,{key:5},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:o[4]||(o[4]=e=>c.value="i"),cname:"i",state:c.value,states:{i:"color-green"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n(s.i.val)),1)])),_:1},8,["state"]),t.createVNode(m,{class:"pad-h-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("分")])),_:1})])),_:1})):t.createCommentVNode("",!0),s.s.show?(t.openBlock(),t.createBlock(u,{key:6},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:o[5]||(o[5]=e=>c.value="s"),cname:"s",state:c.value,states:{s:"color-green"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n(s.s.val)),1)])),_:1},8,["state"]),t.createVNode(m,{class:"pad-h-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("秒")])),_:1})])),_:1})):t.createCommentVNode("",!0)])),_:1}),t.createVNode(u,{class:"flex"},{default:t.withCtx((()=>[t.createVNode(v,{class:"grow-1 h-17 bg-color-neutral mrg-v-1 round-md pad-1",scroll:{x:"auto",y:"auto"}},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:g,ref_key:"$list",ref:f},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,(e=>(t.openBlock(),t.createBlock(u,{state:e.toString(),hover:"bg-color-neutral",class:"h-3 pad-h-1 lh-3-rem flex round-sm alpha-d7"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n(e))+" ",1),t.createVNode(m,{class:"pad-l-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(d[c.value]),1)])),_:1})])),_:2},1032,["state"])))),256))])),_:1},512)])),_:1})])),_:1}),t.createVNode(h,t.mergeProps(l.value,{onOn_click:x}),null,16)])),_:1})}}}),de=t.defineComponent({__name:"price-modal-wid",props:{price:{},input:{},matteColor:{},matteCloseForbid:{type:Boolean},hideScreen:{type:Boolean},theme:{}},emits:["sendPrice","update:price","update:input"],setup(e,{expose:o,emit:a}){const l=e,n=t.ref(!1),r=t.reactive({dir:"",pannel:"lgray",text:"dgray",btn:{normal:"light",active:"neutral"},btn2:{normal:"yellow",active:"yellow"},...l.theme});t.onMounted((()=>{const{availWidth:e,availHeight:t}=window.screen;r.dir=e/t>1?"center":"bottom"}));const s=t.ref(l.input);t.watch(s,(e=>{a("update:input",e)}));const c=t.ref(l.price),i=e=>{a("sendPrice",e),a("update:price",e),t.nextTick(u)},d=()=>{n.value=!0},u=()=>{n.value=!1};return o({show:d,hide:u,clear:()=>{c.value=0}}),(e,o)=>{const a=t.resolveComponent("b-hot"),l=t.resolveComponent("price-wid");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(a,{onOn_click:d},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3}),r.dir?(t.openBlock(),t.createBlock(G,{key:0,visiable:n.value,"onUpdate:visiable":o[2]||(o[2]=e=>n.value=e),dir:r.dir,"matte-color":e.matteColor,"matte-close-forbid":e.matteCloseForbid},{custom:t.withCtx((()=>[t.createVNode(l,{onSendPrice:i,input:s.value,"onUpdate:input":o[0]||(o[0]=e=>s.value=e),price:c.value,"onUpdate:price":o[1]||(o[1]=e=>c.value=e),theme:r,"hide-screen":e.hideScreen},t.createSlots({_:2},[e.$slots.delete?{name:"delete",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"delete")])),key:"0"}:void 0,e.$slots.ok?{name:"ok",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"ok")])),key:"1"}:void 0]),1032,["input","price","theme","hide-screen"])])),_:3},8,["visiable","dir","matte-color","matte-close-forbid"])):t.createCommentVNode("",!0)],64)}}}),ue=t.defineComponent({__name:"price-wid",props:{price:{},input:{},hideScreen:{type:Boolean},theme:{}},emits:["sendPrice","update:input","update:price"],setup(e,{expose:o,emit:a}){const l=e,n=t.reactive({dir:"",pannel:"lgray",text:"dgray",btn:{normal:"light",active:"neutral"},btn2:{normal:"yellow",active:"yellow"},...l.theme}),r=t.computed((()=>{switch(n.dir){case"center":return"w-30 round-md fsize-1d3";case"bottom":return"fsize-1d6";default:return""}})),s=t.ref(l.price.toString()),c=e=>{const t=e.clientX,o=e.clientY;let l=document.elementFromPoint(t,o),n=s.value||"";switch(l.getAttribute("state")){case".":""===n?n="0.":-1===n.indexOf(".")&&(n+=".");break;case"delete":n=n.slice(0,-1);break;case"ok":i();break;default:const e=n.split("."),t=e[1],o=e[0];"0"===n?n=l.innerText:(o.length<7||"."===n[7])&&((null==t?void 0:t.length)<2||!t&&("0"===l.innerText&&"0"!==n||"0"!==l.innerText))&&(n+=l.innerText)}s.value=n,a("update:input",s.value)},i=()=>{const e=parseFloat(s.value);a("sendPrice",e),a("update:price",e)};return o({clear:()=>{s.value=""}}),(e,o)=>{const a=t.resolveComponent("b-text"),l=t.resolveComponent("b-input"),i=t.resolveComponent("b-hot"),d=t.resolveComponent("b-col"),p=t.resolveComponent("b-row");return t.openBlock(),t.createBlock(u,{class:t.normalizeClass(`${r.value} bg-color-${n.pannel} color-${n.text}`)},{default:t.withCtx((()=>[e.hideScreen?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(u,{key:0,class:"flex-4 no-wrap pad-1d4"},{default:t.withCtx((()=>[t.createVNode(a,{class:"fsize-2d4 bold alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("¥")])),_:1}),t.createVNode(l,{text:s.value,"onUpdate:text":o[0]||(o[0]=e=>s.value=e),type:"text",readonly:!0,class:t.normalizeClass(`grow-1 bg-color-none fsize-3 bolder-500 line-none color-${n.text}`)},null,8,["text","class"])])),_:1})),t.createVNode(u,{class:"pad-b-2 bolder-500"},{default:t.withCtx((()=>[t.createVNode(i,{onOn_click:c},{default:t.withCtx((()=>[t.createVNode(p,{gap:.7},{default:t.withCtx((()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(3,(e=>t.createVNode(d,{span:3},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`bg-color-${n.btn.normal} flex-5 round-sm h-4d2`),active:`bg-color-${n.btn.active}`,state:e},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e),1)])),_:2},1032,["class","active","state"])])),_:2},1024))),64)),t.createVNode(d,{span:3},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`bg-color-${n.btn.normal} flex-5 round-sm h-4d2`),active:`bg-color-${n.btn.active}`,state:"delete"},{default:t.withCtx((()=>[e.$slots.delete?t.renderSlot(e.$slots,"delete",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("删除")],64))])),_:3},8,["class","active"])])),_:3}),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(3,(e=>t.createVNode(d,{span:3},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`bg-color-${n.btn.normal} flex-5 round-sm h-4d2`),active:`bg-color-${n.btn.active}`,state:e},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e+3),1)])),_:2},1032,["class","active","state"])])),_:2},1024))),64)),t.createVNode(d,{span:3}),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(3,(e=>t.createVNode(d,{span:3},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`bg-color-${n.btn.normal} flex-5 round-sm h-4d2`),active:`bg-color-${n.btn.active}`,state:e},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e+6),1)])),_:2},1032,["class","active","state"])])),_:2},1024))),64)),t.createVNode(d,{span:3}),t.createVNode(d,{span:6},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`bg-color-${n.btn.normal} flex-5 round-sm h-4d2`),active:`bg-color-${n.btn.active}`,state:"0"},{default:t.withCtx((()=>[t.createTextVNode("0")])),_:1},8,["class","active"])])),_:1}),t.createVNode(d,{span:3},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`bg-color-${n.btn.normal} flex-5 round-sm h-4d2`),active:`bg-color-${n.btn.active}`,state:"."},{default:t.withCtx((()=>[t.createTextVNode(".")])),_:1},8,["class","active"])])),_:1}),t.createVNode(d,{span:3},{default:t.withCtx((()=>[t.createVNode(u,{class:"rel h-4d2"},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`abs b-0 h-14 max-w bg-color-${n.btn2.normal} flex-5 round-sm`),active:`bg-color-${n.btn2.active}`,state:"ok"},{default:t.withCtx((()=>[e.$slots.ok?t.renderSlot(e.$slots,"ok",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("确认")],64))])),_:3},8,["class","active"])])),_:3})])),_:3})])),_:3})])),_:3})])),_:3})])),_:3},8,["class"])}}}),pe=t.defineComponent({__name:"content-node-wid",props:{dataTree:{},gap:{},indent:{},hover:{},active:{}},emits:["on_select"],setup(e,{emit:o}){const a=e,l=t.ref(a.dataTree||[]),n=t.inject("selected"),r=t.computed((()=>a.gap||"d7")),s=t.computed((()=>a.indent||"3")),c=e=>{const{parent:t,children:o,...a}=e;return a};return(e,o)=>{const i=t.resolveComponent("b-text"),d=t.resolveComponent("content-node-wid",!0);return t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(o=>(t.openBlock(),t.createBlock(u,{state:`id-${o.id}`,key:o.id},{default:t.withCtx((()=>{var l,p;return[t.createVNode(f,{cname:`${o.id}-${Math.random()}`,class:t.normalizeClass(`flex-4 pad-v-${r.value} pad-l-${p=o.level,(p*parseFloat(s.value.replace("d","."))+parseFloat(r.value.replace("d","."))).toString().replace(".","d")}`),hover:e.hover,states:{true:`${e.active?e.active:""}`,false:""},state:((null==(l=t.unref(n))?void 0:l.findIndex((e=>e.id===o.id)))>-1).toString()},{default:t.withCtx((()=>[o.children&&o.children.length?(t.openBlock(),t.createBlock(C,{key:0,class:"mrg-r-d4",state:o.spread?"content-wid-spread":"content-wid-collapse",icon:"arrow-right"},null,8,["state"])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default",{dataItem:c(o)},(()=>[t.createVNode(i,null,{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(o.text),1)])),_:2},1024)]))])),_:2},1032,["cname","class","hover","states","state"]),o.children&&o.children.length?(t.openBlock(),t.createBlock(u,{key:0,states:{show:"show",hide:"hide"},state:o.spread?"show":"hide"},{default:t.withCtx((()=>[t.createVNode(d,t.normalizeProps(t.guardReactiveProps({...a,dataTree:o.children})),t.createSlots({_:2},[e.$slots.default?{name:"default",fn:t.withCtx((o=>[t.renderSlot(e.$slots,"default",t.normalizeProps(t.guardReactiveProps(o)))])),key:"0"}:void 0]),1040)])),_:2},1032,["state"])):t.createCommentVNode("",!0)]})),_:2},1032,["state"])))),128)}}}),me=[i,u,m,f,h,C,T,E,j,$,P,V,F,I,A,L,H,U,q,se,J,re,t.defineComponent({__name:"content-wid",props:{dataTree:{},gap:{},indent:{},hover:{},active:{}},emits:["on_select"],setup(e,{emit:o}){const a=e;let l=0;const n=t.reactive([]),r=t.reactive({}),s=t.ref(a.dataTree),c=t.ref(!1),i=t.ref([]);t.onBeforeMount((()=>{t.provide("selected",i.value)})),t.onMounted((()=>{(()=>{const e=(t,o,a=0)=>{for(const s of t)s.level=a,s.prefix=l++,o&&(s.parent=o),s.children&&(s.spread=s.spread||!1),n.push(s),r[s.id]=s,s.children&&s.children.length>0&&e(s.children,s,a+1)};e(s.value)})(),c.value=!0}));const d=e=>{var t,a;const l=e.clientX,n=e.clientY;let s=document.elementFromPoint(l,n);for(;0!==(null==(t=null==s?void 0:s.getAttribute("state"))?void 0:t.indexOf("id-"));)s=null==s?void 0:s.parentElement;const c=r[null==(a=null==s?void 0:s.getAttribute("state"))?void 0:a.substring(3)];i.value[0]=c,void 0!==c.spread&&(c.spread=!c.spread),o("on_select",c)};return(e,o)=>(t.openBlock(),t.createBlock(f,{onOn_click:d,"event-proxy":!0},{default:t.withCtx((()=>[c.value?(t.openBlock(),t.createBlock(pe,t.normalizeProps(t.mergeProps({key:0},{...a,dataTree:s.value})),t.createSlots({_:2},[e.$slots.default?{name:"default",fn:t.withCtx((o=>[t.renderSlot(e.$slots,"default",t.normalizeProps(t.guardReactiveProps(o.dataItem)))])),key:"0"}:void 0]),1040)):t.createCommentVNode("",!0)])),_:3}))}}),G,Q,K,ce,ie,de,ue],fe={name:"btxui",install(e,t){me.forEach((t=>{e.component(t.__name,t)})),e.config.globalProperties.$btxui_theme=o,t&&Object.keys(t).forEach((o=>{e.config.globalProperties[`$${o}`]=t[o]}))}};e.compress=ne,e.confirmTheme=(e,t)=>{oe.theme=e,oe.matte=t},e.default=fe,e.hideLoadToast=async(e,t)=>{const o=await ee;e?(o.component.props.text=e,o.component.props.icon=t,o.component.props.extra.type="",setTimeout((()=>{te(o)}),1e3)):te(o)},e.showAlert=(e,t,o="")=>{ae("alert",e,t,void 0,{ok:o,cancel:""})},e.showConfirm=(e,t,o,a={ok:"",cancel:""})=>{ae("confirm",e,t,o,{ok:a.ok,cancel:a.cancel})},e.showLoadToast=(e="数据加载中")=>{ee=Z(e,0,"load",{type:"loading"})},e.showToast=Z,e.upload=le,e.uploadImage=async(e,t)=>{const o=await le(t),a=await ne(o[0],e),l=new FileReader;return l.readAsDataURL(a),new Promise((e=>{l.onload=t=>{var o;e({file:a,preview:null==(o=t.target)?void 0:o.result})}}))},Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).btxui={},e.vue)}(this,(function(e,t){"use strict";const a={colors:{none:"transparent",main:"#051c24",sub:"#b4967a",light:"#fff",lgray:"#eee",mgray:"#a7a7a7",dgray:"#373737",dark:"#111",blue:"#4085f3",green:"#02b9a1",yellow:"#fdba00",red:"#ec4334",neutral:"rgba(134,134,134,.17)"},append(e){this.colors={...this.colors,...e}}},o={lg:"font-size: 1.3rem;",md:"font-size: 1.15rem;",sm:"font-size: 1rem;",xs:"font-size: .85rem;",pcenter:"text-align: center;",pright:"text-align: right;",pleft:"text-align: left;",pjustify:"text-align: justify;",pindent:"text-indent: 2em;",bold:"font-weight: bold;",show:"display: block;",hide:"display: none;","no-wrap":"flex-wrap: nowrap; white-space: nowrap;","flex-wrap":"flex-wrap: wrap;",flex:"display: flex; justify-content: flex-start; align-items: stretch; flex-wrap: wrap; align-content: flex-start;","flex-column":"display: flex; flex-direction: column;","flex-between":"display: flex; justify-content: space-between; align-items: center;","flex-around":"display: flex; justify-content: space-around; align-items: center;","flex-baseline":"display: flex; align-items: baseline;","no-shrink":"flex-shrink: 0;","col-1":"flex-basis: 8.333%;","col-2":"flex-basis: 16.667%;","col-3":"flex-basis: 25%;","col-4":"flex-basis: 33.333%;","col-5":"flex-basis: 41.667%;","col-6":"flex-basis: 50%;","col-7":"flex-basis: 58.333%;","col-8":"flex-basis: 66.667%;","col-9":"flex-basis: 75%;","col-10":"flex-basis: 83.333%;","col-11":"flex-basis: 91.667%;","col-12":"flex-basis: 100%;","offset-1":"margin-left: 8.333%;","offset-2":"margin-left: 16.667%;","offset-3":"margin-left: 25%;","offset-4":"margin-left: 33.333%;","offset-5":"margin-left: 41.667%;","offset-6":"margin-left: 50%;","offset-7":"margin-left: 58.333%;","offset-8":"margin-left: 66.667%;","offset-9":"margin-left: 75%;","offset-10":"margin-left: 83.333%;","offset-11":"margin-left: 91.667%;","offset-12":"margin-left: 100%;","flex-1":"display: flex; justify-content: flex-start; align-items: flex-start;","flex-2":"display: flex; justify-content: center; align-items: flex-start;","flex-3":"display: flex; justify-content: flex-end; align-items: flex-start;","flex-4":"display: flex; justify-content: flex-start; align-items: center","flex-5":"display: flex; justify-content: center; align-items: center;","flex-6":"display: flex; justify-content: flex-end; align-items: center;","flex-7":"display: flex; justify-content: flex-start; align-items: flex-end;","flex-8":"display: flex; justify-content: center; align-items: flex-end;","flex-9":"display: flex; justify-content: flex-end; align-items: flex-end;","max-h":"height: 100%;","max-w":"width: 100%; !important",max:"height: 100%; width: 100%;","max-fixed":"height: 100%; width: 100%; position: fixed; left: 0; top: 0;","max-screen":"height: 100vh; width: 100%;",item:{breakInside:"avoid",mozPageBreakInside:"avoid",webkitColumnBreakInside:"avoid"},fixed:"position: fixed;",rel:"position: relative;",abs:"position: absolute;","over-hide":"overflow: hidden;","over-show":"overflow: visible;","over-scroll":"overflow: auto;",brepeat:"background-repeat: repeat;","brepeat-x":"background-repeat: repeat-x;","brepeat-y":"background-repeat: repeat-y;","bsize-cover":"background-size: cover;","bsize-contain":"background-size: contain;","bsize-max":"background-size: 100% 100%;","bsize-max-h":"background-size: auto 100%;","bsize-max-w":"background-size: 100% auto;","no-rw":"max-width: none;","bpos-1":"background-position: left top;","bpos-2":"background-position: center top;","bpos-3":"background-position: right top;","bpos-4":"background-position: left center;","bpos-5":"background-position: center center;","bpos-6":"background-position: right center;","bpos-7":"background-position: left bottom;","bpos-8":"background-position: center bottom;","bpos-9":"background-position: right bottom;","bg-fixed":"background-attachment: scroll;",round:"border-radius: 50%;","round-max":"border-radius: 999px;","round-lg":"border-radius: 24px;","round-md":"border-radius: 10px;","round-sm":"border-radius: 4px;","round-none":"border-radius: 0px;","round-t":"border-bottom-right-radius: 0; border-bottom-left-radius: 0;","round-b":"border-top-right-radius: 0; border-top-left-radius: 0;","round-l":"border-top-right-radius: 0; border-bottom-right-radius: 0;","round-r":"border-top-left-radius: 0; border-bottom-left-radius: 0;","round-1":"border-top-right-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0;","round-2":"border-top-left-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0;","round-3":"border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-right-radius: 0;","round-4":"border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-left-radius: 0;",solid:"border-style: solid;",dashed:"border-style: dashed;","solid-l":"border-left-style: solid;","solid-r":"border-right-style: solid;","solid-t":"border-top-style: solid;","solid-b":"border-bottom-style: solid;","solid-l-none":"border-left-style: none;","solid-r-none":"border-right-style: none;","solid-t-none":"border-top-style: none;","solid-b-none":"border-bottom-style: none;","dashed-l":"border-left-style: dashed;","dashed-r":"border-right-style: dashed;","dashed-t":"border-top-style: dashed;","dashed-b":"border-bottom-style: dashed;","line-outside":"background-clip: padding-box;",shadow:"box-shadow: 0 4px 17px;","shadow-sm":"box-shadow: 0 2px 4px;","shadow-lg":"box-shadow: 0 14px 40px;","shadow-relief":"box-shadow: 1px 1px 0 rgba(0,0,0,.7) inset, 1px 1px 0 rgba(255,255,255,.4);",trans:"transition: all .7s;","trans-fast":"transition: all .4s;","trans-slow":"transition: all 1.4s;","trans-no":"transition: none;","blur-no":"filter: blur(0px);","blur-sm":"filter: blur(2px);","blur-md":"filter: blur(7px);","blur-lg":"filter: blur(17px);","dark-no":"filter: brightness(100%);","dark-sm":"filter: brightness(80%);","dark-md":"filter: brightness(50%);","dark-lg":"filter: brightness(20%);","light-sm":"filter: brightness(120%);","light-md":"filter: brightness(150%);","light-lg":"filter: brightness(200%);","gray-no":"filter: grayscale(0%);","gray-sm":"filter: grayscale(40%);","gray-md":"filter: grayscale(70%);","gray-lg":"filter: grayscale(100%);","bg-none":"pointer-events: none;","bg-use":"pointer-events: auto;","touch-none":"touchAction: none;",ellipsis:"overflow: hidden; text-overflow: ellipsis; white-space: nowrap;","text-line":"textShadow: 1px 0 0 rgba(200, 200, 200, .5), -1px 0 0 rgba(200, 200, 200, .5), 0 1px 0 rgba(200, 200, 200, .5), 0 -1px 0 rgba(200, 200, 200, .5);","alpha-0":"opacity: 0; visibility: hidden; z-index: -1",visible:"visibility: visible;","select-none":"-webkit-touch-callout:none; -webkit-user-select:none; -khtml-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none;","objfit-fill":"object-fit: fill;","objfit-cover":"object-fit: cover;","objfit-contain":"object-fit: contain;","objfit-none":"object-fit: none;","objfit-scaledown":"object-fit: scale-down;",lighten:"mix-blend-mode: lighten;",ani:"animation-duration: 0.7s;","ani-fast":"animation-duration: 0.3s;","ani-slow":"animation-duration: 1.4s;","ani-mode-forwards":"animation-fill-mode: forwards;","ani-mode-backwards":"animation-fill-mode: backwards;","ani-mode-both":"animation-fill-mode: both;","ani-loop":"animation-timing-function: linear; animation-iteration-count: infinite;","cursor-grab":"cursor: grab;","cursor-grabbing":"cursor: grabbing;",color:{pro:"color"},bg:{pro:"background"},alpha:{pro:"opacity"},font:{pro:"font-family"},lh:{pro:"line-height"},z:{pro:"z-index"},line:{pro:"border-color"},origin:{pro:"transform-origin"},order:{pro:"order"},grow:{pro:"flex-grow"},gap:{pro:"gap",unit:"rem"},basis:{pro:"flex-basis"},column:{pro:"columnCount"},bsize:{pro:"background-size",unit:"%"},bpos:{pro:"background-position",unit:"%"},ratio:{pro:"aspect-ratio"},lspace:{pro:"letter-spacing",unit:"rem"},bolder:{pro:"font-weight"},w:{pro:"width",unit:"rem"},h:{pro:"height",unit:"rem"},rw:{pro:"max-width",unit:"rem"},lw:{pro:"min-width",unit:"rem"},th:{pro:"max-height",unit:"rem"},bh:{pro:"min-height",unit:"rem"},pad:{pro:"padding",unit:"rem"},mrg:{pro:"margin",unit:"rem"},fsize:{pro:"font-size",unit:"rem"},l:{pro:"left",unit:"rem"},r:{pro:"right",unit:"rem"},t:{pro:"top",unit:"rem"},b:{pro:"bottom",unit:"rem"},thick:{pro:"border-width",unit:"px"},delay:{pro:"transition-delay",unit:"s"}};var l,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={};l={get exports(){return r},set exports(e){r=e}},function(e){function t(e,t){var a=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(a>>16)<<16|65535&a}function a(e,a,o,l,n,r){return t((s=t(t(a,e),t(l,r)))<<(c=n)|s>>>32-c,o);var s,c}function o(e,t,o,l,n,r,s){return a(t&o|~t&l,e,t,n,r,s)}function n(e,t,o,l,n,r,s){return a(t&l|o&~l,e,t,n,r,s)}function r(e,t,o,l,n,r,s){return a(t^o^l,e,t,n,r,s)}function s(e,t,o,l,n,r,s){return a(o^(t|~l),e,t,n,r,s)}function c(e,a){var l,c,i,d,u;e[a>>5]|=128<<a%32,e[14+(a+64>>>9<<4)]=a;var p=1732584193,m=-271733879,v=-1732584194,f=271733878;for(l=0;l<e.length;l+=16)c=p,i=m,d=v,u=f,p=o(p,m,v,f,e[l],7,-680876936),f=o(f,p,m,v,e[l+1],12,-389564586),v=o(v,f,p,m,e[l+2],17,606105819),m=o(m,v,f,p,e[l+3],22,-1044525330),p=o(p,m,v,f,e[l+4],7,-176418897),f=o(f,p,m,v,e[l+5],12,1200080426),v=o(v,f,p,m,e[l+6],17,-1473231341),m=o(m,v,f,p,e[l+7],22,-45705983),p=o(p,m,v,f,e[l+8],7,1770035416),f=o(f,p,m,v,e[l+9],12,-1958414417),v=o(v,f,p,m,e[l+10],17,-42063),m=o(m,v,f,p,e[l+11],22,-1990404162),p=o(p,m,v,f,e[l+12],7,1804603682),f=o(f,p,m,v,e[l+13],12,-40341101),v=o(v,f,p,m,e[l+14],17,-1502002290),p=n(p,m=o(m,v,f,p,e[l+15],22,1236535329),v,f,e[l+1],5,-165796510),f=n(f,p,m,v,e[l+6],9,-1069501632),v=n(v,f,p,m,e[l+11],14,643717713),m=n(m,v,f,p,e[l],20,-373897302),p=n(p,m,v,f,e[l+5],5,-701558691),f=n(f,p,m,v,e[l+10],9,38016083),v=n(v,f,p,m,e[l+15],14,-660478335),m=n(m,v,f,p,e[l+4],20,-405537848),p=n(p,m,v,f,e[l+9],5,568446438),f=n(f,p,m,v,e[l+14],9,-1019803690),v=n(v,f,p,m,e[l+3],14,-187363961),m=n(m,v,f,p,e[l+8],20,1163531501),p=n(p,m,v,f,e[l+13],5,-1444681467),f=n(f,p,m,v,e[l+2],9,-51403784),v=n(v,f,p,m,e[l+7],14,1735328473),p=r(p,m=n(m,v,f,p,e[l+12],20,-1926607734),v,f,e[l+5],4,-378558),f=r(f,p,m,v,e[l+8],11,-2022574463),v=r(v,f,p,m,e[l+11],16,1839030562),m=r(m,v,f,p,e[l+14],23,-35309556),p=r(p,m,v,f,e[l+1],4,-1530992060),f=r(f,p,m,v,e[l+4],11,1272893353),v=r(v,f,p,m,e[l+7],16,-155497632),m=r(m,v,f,p,e[l+10],23,-1094730640),p=r(p,m,v,f,e[l+13],4,681279174),f=r(f,p,m,v,e[l],11,-358537222),v=r(v,f,p,m,e[l+3],16,-722521979),m=r(m,v,f,p,e[l+6],23,76029189),p=r(p,m,v,f,e[l+9],4,-640364487),f=r(f,p,m,v,e[l+12],11,-421815835),v=r(v,f,p,m,e[l+15],16,530742520),p=s(p,m=r(m,v,f,p,e[l+2],23,-995338651),v,f,e[l],6,-198630844),f=s(f,p,m,v,e[l+7],10,1126891415),v=s(v,f,p,m,e[l+14],15,-1416354905),m=s(m,v,f,p,e[l+5],21,-57434055),p=s(p,m,v,f,e[l+12],6,1700485571),f=s(f,p,m,v,e[l+3],10,-1894986606),v=s(v,f,p,m,e[l+10],15,-1051523),m=s(m,v,f,p,e[l+1],21,-2054922799),p=s(p,m,v,f,e[l+8],6,1873313359),f=s(f,p,m,v,e[l+15],10,-30611744),v=s(v,f,p,m,e[l+6],15,-1560198380),m=s(m,v,f,p,e[l+13],21,1309151649),p=s(p,m,v,f,e[l+4],6,-145523070),f=s(f,p,m,v,e[l+11],10,-1120210379),v=s(v,f,p,m,e[l+2],15,718787259),m=s(m,v,f,p,e[l+9],21,-343485551),p=t(p,c),m=t(m,i),v=t(v,d),f=t(f,u);return[p,m,v,f]}function i(e){var t,a="",o=32*e.length;for(t=0;t<o;t+=8)a+=String.fromCharCode(e[t>>5]>>>t%32&255);return a}function d(e){var t,a=[];for(a[(e.length>>2)-1]=void 0,t=0;t<a.length;t+=1)a[t]=0;var o=8*e.length;for(t=0;t<o;t+=8)a[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return a}function u(e){var t,a,o="0123456789abcdef",l="";for(a=0;a<e.length;a+=1)t=e.charCodeAt(a),l+=o.charAt(t>>>4&15)+o.charAt(15&t);return l}function p(e){return unescape(encodeURIComponent(e))}function m(e){return function(e){return i(c(d(e),8*e.length))}(p(e))}function v(e,t){return function(e,t){var a,o,l=d(e),n=[],r=[];for(n[15]=r[15]=void 0,l.length>16&&(l=c(l,8*e.length)),a=0;a<16;a+=1)n[a]=909522486^l[a],r[a]=1549556828^l[a];return o=c(n.concat(d(t)),512+8*t.length),i(c(r.concat(o),640))}(p(e),p(t))}function f(e,t,a){return t?a?v(t,e):u(v(t,e)):a?m(e):u(m(e))}l.exports?l.exports=f:e.md5=f}(n);const s=r,c="BTXUIGlobal",i=t.defineComponent({__name:"b-style",props:{class:{},focus:{},hover:{},active:{},states:{},matrix:{},extraClass:{},cname:{}},setup(e){const l=e,n=t.ref(),r=t.ref(""),i=t.computed((()=>{const e=[];for(let t of n.value.sheet.rules)e.push(t.selectorText.substr(1));return e})),d=t.reactive({}),u=e=>{if(!isNaN(1*e)||"auto"===e)return e;let t=e.toString();return"f"===t[0]&&(t=`-${t.substr(1)}`),/^-?\d*d\d+$/.test(t)&&(t=1*t.replace("d",".")),!isNaN(t)&&t},p=e=>{if(a.colors[e])return a.colors[e];if(e&&0===e.search("C"))return`#${e.substr(1)}`;if(e&&0===e.search("rgb")){const t=e.split("_");return`${t[0]}(${t[1]},${t[2]},${t[3]}${t[4]?","+u(t[4]):""})`}return!1},m=e=>{if(!e)return!1;if(0===e.search("_"))return e.substr(1);const t=u(e);if(!1!==t)return t;const a=p(e);if(!1!==a)return a;const o=(e=>{if(e&&0===e.search("linear")){const t=e.split("_"),[a,o,...l]=t;return`${a}-gradient(${o}deg,${l.map((e=>p(e))).join(",")})`}return!1})(e);return!1!==o&&o},v=(e,t,a)=>{let o=t??a;return"auto"===e&&(o=""),"P"===o&&(o="%"),o??""},f=e=>{if(!e)return"";return e.trim().split(" ").reduce(((e,t)=>{const a=(e=>{let t=o[e];if(t)return t;const a=e.split("-"),l={l:["left"],t:["top"],r:["right"],b:["bottom"],v:["top","bottom"],h:["left","right"],x:["x"],y:["y"]};let[n,r,s,c]=a;if(t=o[n],t){let e=m(r);if(e)return`${t.pro}: ${e}${v(e,s,t.unit)}`;if(e=m(s),e){const a=l[r];if(a){let o="";return a.forEach((a=>{o+=`${t.pro}-${a}: ${e}${v(e,c,t.unit)};`})),o}return`${t.pro}-${r}: ${e}${v(e,c,t.unit)}`}}})(t);return a||(console.warn(`combineStyles without ${t} rule!`),e+=""),e+=`${a};`}),"").replace(/;+/g,";")},h=(e,t)=>{if(!i.value.includes(e)){const a=f(t);if(!a)return;i.value.push(e),d[e]=a}},g=(e,t,a)=>{h(`${e}[state="${t}"]`,a)},x=t.reactive({res:{},str:""}),b=e=>{l.states&&(Object.keys(l.states).forEach((t=>{if(l.states){const a=l.states[t];if("string"==typeof a)g(e,t,a);else{const{class:o,ani:l}=a;g(e,t,o),((e,t)=>{x.res[e]=t})(t,l)}}})),x.str=0===Object.keys(x.res).length?"":JSON.stringify(x.res))},k=t.ref();return t.onBeforeMount((()=>{l.matrix&&(()=>{var e,t,a,o,n,r,s,c;const i=(null==(e=l.matrix)?void 0:e.translate)?`translate(${null==(t=l.matrix)?void 0:t.translate})`:"",d=(null==(a=l.matrix)?void 0:a.scale)?`scale(${null==(o=l.matrix)?void 0:o.scale})`:"",u=(null==(n=l.matrix)?void 0:n.rotate)?`rotate(${null==(r=l.matrix)?void 0:r.rotate})`:"",p=(null==(s=l.matrix)?void 0:s.skew)?`skew(${null==(c=l.matrix)?void 0:c.skew})`:"";k.value=l.matrix?{transform:`${i} ${d} ${u} ${p}`}:{}})(),(()=>{let e=document.head.querySelector(`#${c}`);e||(e=document.createElement("style"),e.setAttribute("type","text/css"),e.setAttribute("id",c),document.head.appendChild(e)),n.value=e})();const e=l.class??`style-${Math.round(1e4*Math.random())}`;(e=>{e&&e.split(" ").forEach((e=>{h(e,e)}))})(e);const t=((e,t)=>{const a=e.split(" ").sort(),o=`B-${s(a.join("&")+t)}`;return r.value=`${e} ${o}`,i.value.includes(o)||i.value.push(o),o})(e,l.cname??"");(e=>{l.focus&&h(e,l.focus)})(`${t}[focus-state='true']:focus`),(e=>{l.hover&&h(e,l.hover)})(`${t}[hover='true']:hover`),(e=>{l.active&&h(e,l.active)})(`${t}[active='true']:active`),b(t),(e=>{if(!l.extraClass)return;const{selector:t,value:a}=l.extraClass;h(`${e}${t}*`,a)})(t),Object.keys(d).forEach((e=>{n.value.sheet.addRule(`.${e}`,d[e])}))})),(e,a)=>t.renderSlot(e.$slots,"className",{aniStates:x.str||null,className:r.value,matrixStyle:k.value})}}),d=["data-ani-states","state"],u=t.defineComponent({__name:"b-view",props:{class:{},state:{},states:{},bgImg:{},matrix:{},cname:{},prevent:{type:Boolean},aniEndClear:{type:Boolean}},emits:["on_aniEnd"],setup(e,{emit:a}){const o=e,l=t.ref(),n=t.computed((()=>o.state));let r,s="";t.watch(n,(()=>{c()}));const c=()=>{if(!l.value.dataset.aniStates)return;const e=JSON.parse(l.value.dataset.aniStates),t=n.value;t&&e[t]&&(s&&l.value.classList.remove(s),s=e[t],l.value.classList.add(s),r=e[t])},u=e=>{o.aniEndClear||l.value.classList.remove(r),a("on_aniEnd",e)},p=t.computed((()=>o.bgImg?{backgroundImage:`url(${o.bgImg})`}:{}));return t.onMounted((()=>{o.prevent&&(l.value.ontouchstart=l.value.ontouchend=e=>{e.preventDefault()}),c()})),(e,a)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),cname:e.cname,states:e.states,matrix:e.matrix},{className:t.withCtx((a=>[t.createElementVNode("div",{ref_key:"$el",ref:l,onAnimationend:u,class:t.normalizeClass(a.className),"data-ani-states":a.aniStates,state:n.value,style:t.normalizeStyle({...p.value,...a.matrixStyle})},[t.renderSlot(e.$slots,"default")],46,d)])),_:3},8,["class","cname","states","matrix"]))}}),p=["state"],m=t.defineComponent({__name:"b-text",props:{class:{},state:{},states:{},cname:{}},setup:e=>(e,a)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),states:e.states,cname:e.cname},{className:t.withCtx((a=>[t.createElementVNode("span",{class:t.normalizeClass(a.className),state:e.state},[t.renderSlot(e.$slots,"default")],10,p)])),_:3},8,["class","states","cname"]))}),v=t.defineComponent({__name:"b-hot",props:{link:{},class:{},state:{},states:{},hover:{},active:{},forbid:{type:Boolean},download:{},anchor:{},cname:{},replace:{type:Boolean},touchDuration:{},eventProxy:{type:Boolean}},emits:["on_click","on_mousedown","on_wheel","on_mouseup","on_enter","on_move","on_leave","on_dblclick","on_longTouch","on_transend"],setup(e,{expose:a,emit:o}){const l=e,{proxy:n}=t.getCurrentInstance(),r=t.ref(),s=t.ref("");let c;const d=t.computed((()=>{const e=l.link;return l.forbid||!e?"javascript: void 0;":0===e.search("http")?(s.value="_blank",e):(0===e.search(/^(tel|mailto):/)||"/"===e[0]&&(c=e),e)})),u=t.computed((()=>l.forbid?"":"pointer")),p=e=>{if(l.anchor){const e=document.querySelector(l.anchor);e&&e.scrollIntoView({behavior:"smooth"})}c&&(e.preventDefault(),n.$router[l.replace?"replace":"push"](c)),"_blank"===s.value&&l.replace&&location.replace(d.value),!l.forbid&&o("on_click",e)},m=e=>{!l.forbid&&o("on_dblclick",e)};let v,f=t.ref(0),h=!1;const g=e=>{o("on_enter",e),"touchstart"===e.type&&(f.value=Date.now(),v=setInterval((()=>{Date.now()-f.value>(l.touchDuration||1e3)&&(h=!0,o("on_longTouch",e),clearTimeout(v))}),100))},x=e=>{o("on_move",e)},b=e=>{o("on_leave",e),"touchend"===e.type&&(h&&(e.preventDefault(),h=!1),clearTimeout(v))},k=e=>{o("on_wheel",e)};return t.onMounted((()=>{l.download&&(r.value.download=l.download)})),a({$el:r}),(e,a)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),states:e.states,hover:e.hover,active:e.active,cname:e.cname},{className:t.withCtx((o=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.eventProxy?"div":"a"),{style:t.normalizeStyle(`user-select: none; cursor: ${u.value};`),ref_key:"$anchor",ref:r,onMousedown:a[0]||(a[0]=t.withModifiers((t=>e.$emit("on_mousedown",t)),["prevent"])),onMouseup:a[1]||(a[1]=t.withModifiers((t=>e.$emit("on_mouseup",t)),["prevent"])),onMouseenter:t.withModifiers(g,["prevent"]),onMousemove:t.withModifiers(x,["prevent"]),onMouseleave:t.withModifiers(b,["prevent"]),onTouchstart:t.withModifiers(g,["prevent"]),onTouchmove:t.withModifiers(x,["prevent"]),onTouchend:b,onClick:p,onDblclick:t.withModifiers(m,["stop"]),onWheel:k,onTransitionend:a[2]||(a[2]=t=>e.$emit("on_transend",t)),target:s.value,class:t.normalizeClass(o.className),hover:!!e.hover||"",state:e.state,active:!!e.active||"",href:d.value},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:2},1064,["style","onMouseenter","onMousemove","onMouseleave","onTouchstart","onTouchmove","onDblclick","target","class","hover","state","active","href"]))])),_:3},8,["class","states","hover","active","cname"]))}}),f=["src","state","alt"],h=t.defineComponent({__name:"b-img",props:{img:{},class:{},state:{},states:{},defaultSrc:{},alt:{},matrix:{},cname:{}},emits:["on_load"],setup(e,{expose:a,emit:o}){const l=e,n=t.computed((()=>l.img)),r=t.ref(""),s=t.ref(),c=()=>{l.defaultSrc&&(r.value=l.defaultSrc);const e=new Image;e.onload=()=>{r.value=l.img,t.nextTick((()=>{o("on_load",s.value)}))},e.src=l.img};return t.watch(n,c),t.onMounted((()=>{c()})),a({$el:s}),(e,a)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),cname:e.cname,states:e.states,matrix:e.matrix},{className:t.withCtx((a=>[r.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:r.value,class:t.normalizeClass(`${a.className} ani-fade-in`),state:e.state,style:t.normalizeStyle({display:"block",...a.matrixStyle}),alt:e.alt,ref_key:"$img",ref:s},null,14,f)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(`bg-color-neutral ${a.className} ani-fade-in`)},null,2))])),_:1},8,["class","cname","states","matrix"]))}}),g=t.defineComponent({__name:"ani-success",setup:e=>(e,a)=>(t.openBlock(),t.createBlock(u,{class:"flex-5",matrix:{translate:"0,9px",rotate:"45deg"}},{default:t.withCtx((()=>[t.createVNode(m,{class:"ani-success-part1 w-1 h-3-px bg-color-green round-sm"}),t.createVNode(m,{class:"ani-success-part2 w-1d7 h-3-px bg-color-green round-sm rel t-1-px l-f1-px"})])),_:1}))}),x=(e,t)=>{const a=e.__vccOpts||e;for(const[o,l]of t)a[o]=l;return a};const b=x({},[["render",function(e,a){const o=t.resolveComponent("b-text"),l=t.resolveComponent("b-view");return t.openBlock(),t.createBlock(l,{class:"flex-5"},{default:t.withCtx((()=>[t.createVNode(o,{class:"ani-fail-part1 w-3-px h-1d7 rel l-2-px bg-color-red round-sm"}),t.createVNode(o,{class:"ani-fail-part2 w-3-px h-1d7 rel r-1-px bg-color-red round-sm"})])),_:1})}]]);const k=x({},[["render",function(e,a){const o=t.resolveComponent("b-text"),l=t.resolveComponent("b-view");return t.openBlock(),t.createBlock(l,{class:"flex-5",matrix:{rotate:"90deg"}},{default:t.withCtx((()=>[t.createVNode(o,{class:"ani-notic-part1 w-3-px h-3-px bg-color-blue round"}),t.createVNode(o,{class:"ani-notic-part2 w-1d3 h-3-px mrg-l-4-px bg-color-blue round-sm"})])),_:1})}]]);const y=x({},[["render",function(e,a){const o=t.resolveComponent("b-view");return t.openBlock(),t.createBlock(o,{class:"flex-5"},{default:t.withCtx((()=>[t.createVNode(o,{class:"ani-loading rel w-2d2 h-2d2 round"})])),_:1})}]]),w=["state"],C=t.defineComponent({__name:"b-icon",props:{icon:{},class:{},state:{},states:{},cname:{}},setup(e){const a=e;return(e,o)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),states:e.states,cname:e.cname},{className:t.withCtx((o=>[0===e.icon.search("ani_")?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},["ani_success"===e.icon?(t.openBlock(),t.createBlock(g,{key:"success"})):t.createCommentVNode("",!0),"ani_fail"===e.icon?(t.openBlock(),t.createBlock(b,{key:"fail"})):t.createCommentVNode("",!0),"ani_notic"===e.icon?(t.openBlock(),t.createBlock(k,{key:"notic"})):t.createCommentVNode("",!0),"ani_loading"===e.icon?(t.openBlock(),t.createBlock(y,{key:"loading"})):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),e.icon.search("/")>-1?(t.openBlock(),t.createBlock(u,{key:1,"bg-img":e.icon,states:e.states,class:t.normalizeClass(e.class),state:e.state},null,8,["bg-img","states","class","state"])):(t.openBlock(),t.createElementBlock("i",{key:2,class:t.normalizeClass(`ico-${a.icon} ${o.className}`),state:e.state},null,10,w))])),_:1},8,["class","states","cname"]))}}),_=["contenteditable","focus-state","state"],B=["type","name","focus-state","state","placeholder","maxlength","readonly"],$=t.defineComponent({__name:"b-input",props:{type:{},name:{},class:{},state:{},states:{},text:{},placeholder:{},maxlength:{},readonly:{type:Boolean},focus:{},rule:{},cname:{},aspectHeight:{type:Boolean},hideClear:{type:Boolean},step:{},max:{},min:{}},emits:["update:text","on_focus","on_blur","on_change","multiline"],setup(e,{expose:a,emit:o}){const l=e,n={required:{regexp:/[\w\.\-_\u4e00-\u9fa5]+/,notic:"输入内容为空!"},tel:{regexp:/^1[3-9]\d{9}$/,notic:"手机号格式有误!"},email:{regexp:/^[\w\.]+@(\w+\.)+(com|net|org|wiki|cn|cc)$/,notic:"邮箱格式有误!"},url:{regexp:/^((http|https):\/\/)?(wwww\.)?(\w+\.)+(com|net|org|wiki|cn|cc)$/,notic:"url 格式有误!"},uname:{regexp:/^[\w_]+$/,notic:"请输入英文字母、数字或下划线!"},zh:{regexp:/^[\u4e00-\u9fa5]+$/,notic:"请输入中文字符!"},uid:{regexp:/^\d{15}(\d{2}[0-9x])?$/i,notic:"身份证号输入有误!"}},r=t.ref(l.text),s=t.ref(l.text),c=t.ref(),d=()=>{if(!c.value)return;const e=parseInt(getComputedStyle(c.value).height.split("px")[0]);o("multiline",e>u.value,Math.ceil(e/u.value),e)};t.watchEffect((()=>{var e,a;r.value=l.text,l.text!==(null==(a=null==(e=null==c?void 0:c.value)?void 0:e.innerText)?void 0:a.trim())&&(s.value=l.text,t.nextTick(d)),""===l.text&&(s.value="")}));const u=t.ref(),p=()=>{var e;o("update:text",null==(e=r.value)?void 0:e.toString().trim())},m=()=>{const e=c.value.innerText.trim(),t=e.substring(0,l.maxlength);l.maxlength&&e.length>l.maxlength&&(c.value.innerText=t),o("update:text",t),d()},v=e=>{o("on_change",x(),e)},f=t.ref(!1),h=e=>{"number"===l.type&&r.value&&k(parseFloat(r.value)),f.value=!1,o("on_blur",x(),e)},g=e=>{f.value=!0,o("on_focus",e)},x=()=>{if(l.rule){const e=n[l.rule.type],t=e?e.regexp:l.rule.type;return{name:l.name,notic:l.rule.notic?l.rule.notic:e?e.notic:`${l.name}格式有误!`,pass:t.test(r.value)}}return!0},b=()=>{l.aspectHeight?(s.value=c.value.innerText="",m()):(r.value="",p())},k=e=>{l.min&&(e=Math.max(e,l.min)),l.max&&(e=Math.min(e,l.max)),r.value=e.toString(),p()},y=e=>{k((r.value?parseFloat(r.value):0)+e*(l.step||1))};return a({check:x,focus:function(){c.value.focus()},blur:function(){c.value.blur()},clear:b}),t.onMounted((()=>{t.nextTick((()=>{u.value=parseInt(getComputedStyle(c.value).height.split("px")[0].split(".")[0])}))})),(e,a)=>{const o=t.resolveComponent("b-hot"),l=t.resolveComponent("b-view"),n=t.resolveComponent("b-icon");return t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),focus:e.focus,states:e.states,cname:e.cname},{className:t.withCtx((i=>[t.createVNode(l,{class:"flex-4 rel"},{default:t.withCtx((()=>{var d;return[e.aspectHeight?t.withDirectives((t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(i.className),style:{"pointer-events":"none",position:"absolute",background:"none",border:"none",opacity:".4","font-size":".9em"}},t.toDisplayString(e.placeholder),3)),[[t.vShow,!e.text]]):t.createCommentVNode("",!0),e.aspectHeight?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(i.className),contenteditable:!e.readonly,onFocus:a[0]||(a[0]=e=>g(e)),onBlur:h,onChange:v,onInput:m,ref_key:"$input",ref:c,"focus-state":e.focus?"true":"",style:{outline:"none",width:"100%"},state:e.state,autocomplete:"off"},t.toDisplayString(s.value),43,_)):t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:2,class:t.normalizeClass(i.className),onFocus:a[1]||(a[1]=e=>g(e)),onBlur:h,onChange:v,onInput:p,"onUpdate:modelValue":a[2]||(a[2]=e=>r.value=e),type:e.type,ref_key:"$input",ref:c,name:e.name,"focus-state":e.focus?"true":"",state:e.state,placeholder:e.placeholder,maxlength:e.maxlength,readonly:e.readonly,autocomplete:"off"},null,42,B)),[[t.vModelDynamic,r.value]]),"number"===e.type?(t.openBlock(),t.createBlock(l,{key:3,class:"trans-fast abs r-6-px gap-2-px flex-4",states:{show:"alpha-1 z-1 visible",hide:"alpha-0"},state:f.value?"show":"hide"},{default:t.withCtx((()=>[t.createVNode(o,{onOn_click:a[3]||(a[3]=e=>y(1)),class:"flex-5 h-1d8 w-1d8 bg-color-neutral solid line-neutral thick-1 round-sm",active:"dark-sm",hover:"alpha-d8"},{default:t.withCtx((()=>[t.createTextVNode(" + ")])),_:1}),t.createVNode(o,{onOn_click:a[4]||(a[4]=e=>y(-1)),class:"flex-5 h-1d8 w-1d8 bg-color-neutral solid line-neutral thick-1 round-sm",active:"dark-sm",hover:"alpha-d8"},{default:t.withCtx((()=>[t.createTextVNode(" - ")])),_:1})])),_:1},8,["state"])):t.createCommentVNode("",!0),e.readonly||e.aspectHeight||e.hideClear||"number"===e.type?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(o,{key:4,onOn_click:b,class:"trans-fast abs r-1",states:{show:"alpha-1 z-1 visible",hide:"alpha-0"},state:0!=(null==(d=r.value)?void 0:d.length)&&f.value?"show":"hide"},{default:t.withCtx((()=>[e.$slots.cancel?t.renderSlot(e.$slots,"cancel",{key:0}):(t.openBlock(),t.createBlock(n,{key:1,class:"flex-5 h-1d8 w-1d8 bg-color-neutral round",icon:"fail"}))])),_:3},8,["state"]))]})),_:2},1024)])),_:3},8,["class","focus","states","cname"])}}}),N=["name","focus","state","placeholder","maxlength","readonly","rows"],V=t.defineComponent({__name:"b-textarea",props:{text:{},name:{},class:{},state:{},states:{},rows:{},placeholder:{},maxlength:{},readonly:{type:Boolean},focus:{},cname:{}},emits:["on_focus","on_blur","on_change","update:text"],setup(e,{emit:a}){const o=e,l=t.ref(o.text),n=()=>{a("update:text",l.value.replace(/[\n\r]/g,"<br>"))};return(e,a)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),focus:e.focus,states:e.states,cname:e.cname},{className:t.withCtx((o=>[t.withDirectives(t.createElementVNode("textarea",{class:t.normalizeClass(o.className),onFocus:a[0]||(a[0]=t=>e.$emit("on_focus",t)),onBlur:a[1]||(a[1]=t=>e.$emit("on_blur",t)),onChange:a[2]||(a[2]=t=>e.$emit("on_change",t)),onInput:n,"onUpdate:modelValue":a[3]||(a[3]=e=>l.value=e),name:e.name,focus:!!e.focus||"",state:e.state,placeholder:e.placeholder,maxlength:e.maxlength,readonly:e.readonly,rows:e.rows||7},null,42,N),[[t.vModelText,l.value]])])),_:1},8,["class","focus","states","cname"]))}}),z=["poster","muted","src","autoplay","controls","loop"],S=["poster","muted","src","autoplay","controls","loop"],T=t.defineComponent({__name:"b-video",props:{video:{},class:{},autoPlay:{type:Boolean},loop:{type:Boolean},cname:{},fullScreen:{type:Boolean},poster:{},customControls:{type:Boolean},muted:{type:Boolean}},emits:["on_play"],setup(e,{expose:a,emit:o}){const l=t.ref(),n=t.ref(0);t.onMounted((()=>{t.nextTick((()=>{const e=l.value.clientHeight/200;n.value=Math.max(1,.8*e)}))}));const r=t.ref(!1),s=t.ref(!1),c=t.computed((()=>!r.value||s.value)),d=()=>{r.value=!r.value,l.value[r.value?"play":"pause"]()},u=()=>{r.value=!0,o("on_play")},p=()=>{l.value.pause()};return a({play:()=>{l.value.play(),l.value.addEventListener("loadedmetadata",(()=>{l.value.play()}))},pause:p,stop:()=>{p(),l.value.currentTime=0}}),(e,a)=>{const o=t.resolveComponent("b-icon"),p=t.resolveComponent("b-view"),m=t.resolveComponent("b-hot");return t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),cname:e.cname},{className:t.withCtx((i=>[t.createElementVNode("div",{class:t.normalizeClass(`${i.className} over-hide rel`)},[e.customControls?(t.openBlock(),t.createBlock(m,{key:0,class:"max abs flex-5 z-2 bg-color-rgba_0_0_0_d1 trans-fast",onOn_click:d,onOn_enter:a[0]||(a[0]=e=>s.value=!0),onOn_leave:a[1]||(a[1]=e=>s.value=!1),state:c.value,states:{true:"alpha-1 visible",false:"alpha-d01"}},{default:t.withCtx((()=>[n.value?(t.openBlock(),t.createBlock(p,{key:0,class:"h-5 ratio-1 flex-5 round fsize-22-px bg-color-rgba_0_0_0_d8 color-light",matrix:{scale:n.value}},{default:t.withCtx((()=>[r.value?(t.openBlock(),t.createBlock(o,{key:1,icon:"pause"})):(t.openBlock(),t.createBlock(o,{key:0,icon:"play"}))])),_:1},8,["matrix"])):t.createCommentVNode("",!0)])),_:1},8,["state"])):t.createCommentVNode("",!0),e.fullScreen?(t.openBlock(),t.createElementBlock("video",{key:1,ref_key:"$video",ref:l,onPlaying:u,onDurationchange:u,class:t.normalizeClass(i.className),poster:e.poster,muted:e.muted,src:e.video,autoplay:e.autoPlay,controls:!e.customControls,loop:e.loop},null,42,z)):(t.openBlock(),t.createElementBlock("video",{key:2,ref_key:"$video",ref:l,onPlaying:u,onDurationchange:u,"webkit-playsinline":"",playsinline:"","x5-video-player-type":"h5-page",class:t.normalizeClass(i.className),poster:e.poster,muted:e.muted,src:e.video,autoplay:e.autoPlay,controls:!e.customControls,loop:e.loop},null,42,S))],2)])),_:1},8,["class","cname"])}}}),D=["state"],E=t.defineComponent({__name:"b-list",props:{scroll:{},class:{},state:{},states:{},scrollType:{},cname:{}},emits:["on_scroll","on_to_top","on_to_bottom"],setup(e,{expose:a,emit:o}){const l=e,n=t.ref(),r=t.computed((()=>l.scrollType?`${l.scrollType}-scroll`:"thin-scroll")),s=(e,t=!1)=>{n.value.scrollTo({top:e,behavior:t?"smooth":"auto"})};let c={x:0,y:0};return a({reset:()=>{n.value.scrollTop=0},toTop:e=>{s(0,e)},toEnd:e=>{s(99999,e)}}),t.onMounted((()=>{n.value.onscroll=e=>{const t=e.target.scrollTop,a=e.target.scrollLeft,l=a-c.x,n=t-c.y;let r;Math.abs(l)>=Math.abs(n)?(e.stopPropagation(),r=l>=0?"l2r":"r2l"):r=n>=0?"t2b":"b2t",c.x=a,c.y=t,o("on_scroll",{dir:r,left:a,top:t}),0===t&&o("on_to_top",e),t>=e.target.scrollHeight-e.target.clientHeight-2&&o("on_to_bottom",e)}})),(e,a)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),states:e.states,cname:e.cname},{className:t.withCtx((o=>[t.createElementVNode("div",{class:t.normalizeClass(o.className),state:e.state},[t.createElementVNode("div",{ref_key:"$list",ref:n,class:t.normalizeClass(r.value),style:t.normalizeStyle(`overflow-x: ${e.scroll.x}; overflow-y: ${e.scroll.y}; width: 100%; height: 100%;`),onTouchmove:a[0]||(a[0]=t.withModifiers((()=>{}),["stop"]))},[t.renderSlot(e.$slots,"default")],38)],10,D)])),_:3},8,["class","states","cname"]))}}),M=["state","draggable"],O=t.defineComponent({__name:"b-drag",props:{class:{},dataInfo:{},dragStart:{},dragOver:{},freeDrag:{type:Boolean},cname:{}},emits:["on_drag_start","on_drag_end","on_drag_over","on_drag_leave","on_drop","on_move"],setup(e,{emit:a}){const o=e,l=t.ref(),n=t.ref(""),r=t.ref(!1),s=t.ref(!1),c=t.reactive({x:0,y:0}),d=e=>{a("on_drag_start",e),n.value="dragStart",e.dataTransfer.setData("info",JSON.stringify(o.dataInfo))},u=e=>{e.preventDefault(),r.value=!0},p=e=>{a("on_drag_end",e),r.value=!1,n.value=""},m=e=>{e.preventDefault(),a("on_drag_over",e),n.value="dragOver"},v=e=>{a("on_drag_leave",e),n.value=""},f=e=>{a("on_drop",e.dataTransfer.getData("info"),e),n.value=""};let h;const g=t.reactive({x:0,y:0}),x=t.reactive({width:0,height:0}),b=e=>{e.preventDefault(),h||(h=l.value.offsetParent,h.onmousemove=k,h.ontouchmove=k,h.onmouseleave=y,h.onmouseup=y,h.ontouchend=y,Array.prototype.forEach.call(h.children,(e=>{e!==l.value&&(e.style.pointerEvents="none")})),x.width=l.value.offsetWidth,x.height=l.value.offsetHeight),n.value="dragStart",s.value=!0,g.x=e.offsetX,g.y=e.offsetY,l.value.style.pointerEvents="none"},k=e=>{if(!s.value)return;const t=e.offsetX-g.x,o=e.offsetY-g.y;c.x=Math.max(0,t),c.y=Math.max(0,o),c.x=Math.min(c.x+x.width,h.offsetWidth)-x.width,c.y=Math.min(c.y+x.height,h.offsetHeight)-x.height,a("on_move",c,e)},y=()=>{s.value&&(n.value="",s.value=!1,g.x=0,g.y=0,l.value.style.pointerEvents="auto")};return t.onMounted((()=>{(()=>{const e=l.value;o.freeDrag?(e.onmousedown=b,e.ontouchstart=b):(e.ondragstart=d,e.ondrag=u,e.ondragend=p,e.ondragover=m,e.ondragleave=v,e.ondrop=f)})()})),(e,a)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),states:{dragStart:e.dragStart,dragOver:e.dragOver},cname:e.cname},{className:t.withCtx((a=>[t.createElementVNode("div",{style:t.normalizeStyle({cursor:e.dragOver?"default":"move",visibility:r.value?"hidden":"visible",position:e.freeDrag?"absolute":"relative",left:0,top:0,transform:`translate(${c.x}px, ${c.y}px)`}),ref_key:"$el",ref:l,class:t.normalizeClass(a.className),state:n.value,draggable:!!e.dragStart},[t.renderSlot(e.$slots,"default")],14,M)])),_:3},8,["class","states","cname"]))}}),P=["src"],F=t.defineComponent({__name:"b-webview",props:{src:{},class:{},cname:{}},setup:e=>(e,a)=>(t.openBlock(),t.createBlock(i,{class:t.normalizeClass(e.class),cname:e.cname},{className:t.withCtx((a=>[t.createElementVNode("iframe",{class:t.normalizeClass(a.className),frameborder:"0",src:e.src},null,10,P)])),_:1},8,["class","cname"]))}),j=t.defineComponent({__name:"b-row",props:{class:{},gap:{},viewData:{}},setup(e){const a=e,o=t.computed((()=>{if(!a.gap)return["0","0"];const e=a.gap;return(Array.isArray(e)&&2===e.length?e:[e,e]).map((e=>(e/2).toString().replace(".","d")))})),l=t.ref(`${a.class??""} flex pad-h-${o.value[0]} pad-v-${o.value[1]}`);return(e,a)=>(t.openBlock(),t.createBlock(u,t.mergeProps({class:l.value},e.viewData,{extraClass:{selector:">",value:`pad-h-${o.value[0]} pad-v-${o.value[1]}`}}),{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},16,["class","extraClass"]))}}),I=t.defineComponent({__name:"b-col",props:{span:{},offset:{},class:{},viewData:{}},setup(e){const a=e,o=t.ref(`${a.class??""} ${a.span?"col-"+a.span:""} ${a.offset?"offset-"+a.offset:""}`);return(e,a)=>(t.openBlock(),t.createBlock(u,t.mergeProps({class:o.value},e.viewData),{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},16,["class"]))}}),A=t.defineComponent({__name:"btn-wid",props:{btnText:{},btnColor:{},btnRound:{type:Boolean},btnWidth:{},hotData:{},iconData:{},size:{}},setup(e){const a=e,o=(e,t)=>{const o=a.btnColor;if(o){const a=o[e].bg;return 0===(null==a?void 0:a.search("linear"))?`bg-image-${a}`:`bg-color-${a||t}`}return`bg-color-${t}`},l=t.computed((()=>{var e,t,l,n;return{text:`color-${(null==(t=null==(e=null==a?void 0:a.btnColor)?void 0:e.normal)?void 0:t.text)||"C777"}`,line:`line-${(null==(n=null==(l=null==a?void 0:a.btnColor)?void 0:l.normal)?void 0:n.line)||"none"}`,bg:o("normal","lgray")}})),n=t.computed((()=>{var e,t,l,n;return{text:`color-${(null==(t=null==(e=null==a?void 0:a.btnColor)?void 0:e.hover)?void 0:t.text)||"dgray"}`,line:`line-${(null==(n=null==(l=null==a?void 0:a.btnColor)?void 0:l.hover)?void 0:n.line)||"none"}`,bg:o("hover","Ce7e7e7")}})),r=t.computed((()=>{var e,t,l,n;return{text:`color-${(null==(t=null==(e=null==a?void 0:a.btnColor)?void 0:e.active)?void 0:t.text)||"dgray"}`,line:`line-${(null==(n=null==(l=null==a?void 0:a.btnColor)?void 0:l.active)?void 0:n.line)||"Cd7d7d7"}`,bg:o("active","Ce7e7e7")}})),s=t.computed((()=>{switch(a.size){case"lg":return"pad-v-d65 lg bolder-550";case"sm":return"pad-v-d17 sm";case"xs":return"pad-v-d04 xs";default:return"pad-v-d37 md bolder-470"}}));return(e,a)=>(t.openBlock(),t.createBlock(v,t.mergeProps(e.hotData,{class:`flex-5 pad-h-1d4 ${s.value} thick-1 ellipsis ${e.btnRound?"round-lg":"round-sm"} ${e.btnWidth?"lw-"+e.btnWidth:""} ${l.value.bg} ${l.value.text} ${l.value.line} solid`,hover:`${n.value.text} ${n.value.bg} ${n.value.line}`,active:`${r.value.text} ${r.value.bg} ${r.value.line}`}),{default:t.withCtx((()=>[e.iconData?(t.openBlock(),t.createBlock(C,t.mergeProps({key:0},e.iconData,{class:"mrg-r-d7"}),null,16)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.btnText),1)])),_:1},16,["class","hover","active"]))}}),L=t.defineComponent({__name:"checkbox-wid",props:{selected:{type:Boolean},value:{},class:{},actClass:{},actColor:{},label:{}},emits:["update:selected","change"],setup(e,{emit:a}){const o=e,l=t.ref(o.class??"flex-4 bg-color-neutral round-sm pad-4-px"),n=t.ref(`color-blue ${o.actClass??""}`),r=t.computed((()=>{const e=o.label;return e?Array.isArray(e)?e:[e,e]:null})),s=t.computed((()=>o.selected)),c=()=>{const e=!s.value;a("update:selected",e),a("change",o.value,e)};return(e,a)=>(t.openBlock(),t.createBlock(v,{class:t.normalizeClass(l.value),hover:"alpha-d9",state:s.value?"act":"",states:{act:n.value},cname:l.value+n.value,onOn_click:c},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default",{state:s.value?"act":""},(()=>{var a,o;return[t.createVNode(u,{class:"w-24-px h-24-px bg-color-neutral round-sm flex-5",state:s.value?"act":"",cname:l.value+n.value,states:{act:`bg-color-${e.actColor?(null==(a=e.actColor)?void 0:a.bg)??"blue":"blue"} color-${e.actColor?(null==(o=e.actColor)?void 0:o.icon)??"light":"light"}`}},{default:t.withCtx((()=>[t.createVNode(C,{icon:"success",class:"alpha-d3",state:s.value?"act":"",states:{act:"alpha-1"}},null,8,["state"])])),_:1},8,["state","cname","states"])]})),r.value?(t.openBlock(),t.createBlock(u,{key:0,class:"pad-h-1 ellipsis"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(s.value?r.value[1]:r.value[0]),1)])),_:1})):t.createCommentVNode("",!0)])),_:3},8,["class","state","states","cname"]))}}),H=t.defineComponent({__name:"checkbox-group-wid",props:{options:{},selected:{},class:{},title:{},span:{}},emits:["update:selected","change"],setup(e,{emit:a}){const o=e,l=t.computed((()=>o.options.map((e=>{var t;return{...e,checkboxData:{...null==e?void 0:e.checkboxData,class:(null==(t=null==e?void 0:e.checkboxData)?void 0:t.class)??"bg-color-none mrg-r-1d5 flex-4 pad-4-px"},selected:o.selected.includes(e.value)}})))),n=(e,t)=>{const l=[...o.selected];t&&!l.includes(e)&&l.push(e),!t&&l.includes(e)&&l.splice(l.findIndex((t=>t===e)),1),a("update:selected",l),a("change",l.map((e=>{var t;return{label:null==(t=o.options.find((t=>t.value===e)))?void 0:t.label,value:e}})))};return(e,a)=>{const o=t.resolveComponent("b-col"),r=t.resolveComponent("b-row");return t.openBlock(),t.createBlock(u,{class:t.normalizeClass(e.class)},{default:t.withCtx((()=>[e.title?(t.openBlock(),t.createBlock(u,{key:0,class:"mrg-b-1"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.title),1)])),_:1})):t.createCommentVNode("",!0),t.createVNode(r,null,{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,((a,l)=>(t.openBlock(),t.createBlock(o,{class:"flex-4",span:e.span,key:l},{default:t.withCtx((()=>[t.createVNode(L,t.mergeProps({onChange:n,label:a.label,value:a.value},a.checkboxData,{selected:a.selected,"onUpdate:selected":e=>a.selected=e}),t.createSlots({_:2},[e.$slots.default?{name:"default",fn:t.withCtx((a=>[t.renderSlot(e.$slots,"default",{state:a.state})])),key:"0"}:void 0,e.$slots[a.value]?{name:"default",fn:t.withCtx((o=>[t.renderSlot(e.$slots,a.value,{state:o.state})])),key:"1"}:void 0]),1040,["label","value","selected","onUpdate:selected"])])),_:2},1032,["span"])))),128))])),_:3})])),_:3},8,["class"])}}}),U=t.defineComponent({__name:"radio-group-wid",props:{options:{},selected:{},class:{},title:{},span:{},regular:{type:Boolean}},emits:["update:selected","change"],setup(e,{emit:a}){const o=e,l=t.computed((()=>[o.selected])),n=e=>{const t=e.map((e=>e.value));2===t.length&&(a("update:selected",t[1]),a("change",t))},r=t.ref([]);return t.onMounted((()=>{var e;r.value=Object.keys((null==(e=t.getCurrentInstance())?void 0:e.slots)??[])})),(e,a)=>{const o=t.resolveComponent("b-view");return t.openBlock(),t.createBlock(H,{span:e.span,title:e.title,class:t.normalizeClass(e.class),selected:l.value,options:e.options,onChange:n},t.createSlots({_:2},[e.regular?{name:"default",fn:t.withCtx((e=>[t.createVNode(o,{class:"h-24-px w-24-px round-lg pad-d5 bg-color-neutral"},{default:t.withCtx((()=>[t.createVNode(o,{class:"max round-lg bg-color-C99999944",state:e.state,states:{act:"bg-color-blue"}},null,8,["state"])])),_:2},1024)])),key:"0"}:void 0,t.renderList(r.value,(a=>({name:a,fn:t.withCtx((o=>[t.renderSlot(e.$slots,a,{state:o.state})]))})))]),1032,["span","title","class","selected","options"])}}}),X=["state"],Y=["innerHTML"],R=["innerHTML"],W=t.defineComponent({__name:"tabs-wid",props:{options:{},selected:{},title:{},color:{},tabStyle:{},smooth:{type:Boolean},noDataNotic:{}},emits:["update:selected","change"],setup(e,{emit:a}){const o=e,l=t.reactive({}),n=t.computed((()=>o.color??"blue")),r=t.reactive({}),s=t.ref(!1),c=t.computed((()=>o.options.map(((e,t)=>{const{label:a,value:c,cont:i}=e;let d=e.checkboxData;return l[c]=i,r[c]=t,d||(s.value=!0,d={class:"round-none solid-b line-neutral thick-1 bg-color-none rel pad-4-px pad-b-1",actClass:`color-${n.value}`},"grid"===o.tabStyle&&(s.value=!1,d={class:"round-none thick-1 solid line-neutral bg-color-none pad-d5",actClass:`line-${n.value} color-${n.value}`}),"card"===o.tabStyle&&(d={class:"round-sm round-t thick-1 solid line-neutral bg-color-neutral pad-d5 rel mrg-r-4-px",actClass:`bg-color-none solid-b-none t-f1-px color-${n.value}`})),{label:a,value:c,checkboxData:d}})))),i=t.computed((()=>o.options.findIndex((e=>e.cont))>-1)),d=t.computed((()=>o.selected)),p=t.ref(""),m=e=>{const[t,o]=e;p.value=r[o]>r[t]?"right-to-left":"left-to-right",a("update:selected",o),a("change",{cur:o,old:t,dir:r[o]>r[t]?1:0,aniClass:`ani-${p.value}`})},v=t.ref([]);return t.onBeforeMount((()=>{var e;v.value=Object.keys((null==(e=t.getCurrentInstance())?void 0:e.slots)??[])})),(e,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(u,{class:"flex-7"},{default:t.withCtx((()=>[t.createVNode(U,{options:c.value,title:e.title,selected:d.value,onChange:m},t.createSlots({_:2},[0===v.value.length&&"grid"===e.tabStyle?{name:"default",fn:t.withCtx((e=>[t.createElementVNode("span",{state:e},null,8,X)])),key:"0"}:0===v.value.length&&"card"===e.tabStyle?{name:"default",fn:t.withCtx((e=>[t.createVNode(u,{class:"w-4-px b-f1-px h-1-px bg-color-neutral r-f5-px abs"})])),key:"1"}:0===v.value.length?{name:"default",fn:t.withCtx((e=>[t.createVNode(u,{class:t.normalizeClass("max-w l-0 b-f1-px round-sm h-2-px bg-color-none abs"),state:e.state,states:{act:`bg-color-${n.value}`}},null,8,["state","states"])])),key:"2"}:void 0,t.renderList(v.value,(a=>({name:a,fn:t.withCtx((o=>[t.renderSlot(e.$slots,a,{state:o.state})]))})))]),1032,["options","title","selected"]),s.value?(t.openBlock(),t.createBlock(u,{key:0,class:"grow-1 h-1-px bg-color-neutral"})):t.createCommentVNode("",!0)])),_:3}),i.value?(t.openBlock(),t.createBlock(u,{key:0,class:"pad-v-1d5 over-hide"},{default:t.withCtx((()=>[d.value?(t.openBlock(),t.createBlock(u,{key:0},{default:t.withCtx((()=>[t.createElementVNode("div",{innerHTML:l[d.value],class:t.normalizeClass(e.smooth?`ani-fast ani-${p.value}`:""),onAnimationend:a[0]||(a[0]=e=>p.value="")},null,42,Y)])),_:1})):(t.openBlock(),t.createBlock(u,{key:1,class:"alpha-d5"},{default:t.withCtx((()=>[t.createElementVNode("div",{innerHTML:e.noDataNotic??"暂未选择标签"},null,8,R)])),_:1}))])),_:1})):t.createCommentVNode("",!0)],64))}}),q=["multiple"],J=t.defineComponent({__name:"upload-wid",props:{type:{},size:{},multiple:{type:Boolean},btnData:{},camera:{type:Boolean}},emits:["on_upload"],setup(e,{emit:a}){const o=e,l=t.ref(),n=t.computed((()=>({btnText:"上传",...o.btnData})));let r;const s=e=>{r=[];const t=e.currentTarget.files;for(let a of t){let t=!0;(c(a,o.type)||i(a,o.size||2097152))&&(e.currentTarget.value=null,t=!1),r.push({file:a,pass:t})}r.success=r.every((e=>e.pass)),a("on_upload",r.reduce(((e,t)=>(t.pass&&e.push(t.file),e)),[]),r)},c=(e,t)=>!(!t||t.includes(e.type))&&(console.error(`${e.name} 文件格式有误!`),!0),i=(e,t)=>e.size>t&&(console.error(`${e.name} 文件尺寸有误!`),!0);return(e,a)=>{const o=t.resolveComponent("b-hot");return t.openBlock(),t.createBlock(u,{class:"flex"},{default:t.withCtx((()=>[e.$slots.default?(t.openBlock(),t.createBlock(o,{key:0,onOn_click:a[0]||(a[0]=e=>l.value.click())},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3})):(t.openBlock(),t.createBlock(A,t.mergeProps({key:1,onOn_click:a[1]||(a[1]=e=>l.value.click())},n.value),null,16)),e.camera?(t.openBlock(),t.createElementBlock("input",{key:2,type:"file",style:{display:"none"},ref_key:"$uploader",ref:l,onChange:s,capture:"user",accept:"image/*"},null,544)):(t.openBlock(),t.createElementBlock("input",{key:3,type:"file",style:{display:"none"},ref_key:"$uploader",ref:l,onChange:s,multiple:e.multiple},null,40,q))])),_:3})}}}),G=t.defineComponent({__name:"modal-wid",props:{visiable:{type:Boolean},matteColor:{},matteCloseForbid:{type:Boolean},closeEnable:{type:Boolean},roundEnable:{type:Boolean},pannelColor:{},dir:{},aniName:{}},emits:["update:visiable","opened","closed"],setup(e,{emit:a}){const o=e,l=t.computed((()=>o.dir||"bottom")),n=t.computed((()=>{let e,t;switch(l.value){case"left":e="flex-4",t="max-h round-r";break;case"right":e="flex-6",t="max-h round-l";break;case"top":e="flex-2",t="max-w round-b";break;case"bottom":e="flex-8",t="max-w round-t";break;case"center":e="flex-5",t=""}return{layout:e,pannal:t}})),r=t.computed((()=>{const[e,t]=o.aniName??["",""];return{left:{ani:e||"ani-left-to-right"},right:{ani:e||"ani-right-to-left"},top:{ani:e||"ani-top-to-bottom"},bottom:{ani:e||"ani-bottom-to-top"},center:{ani:e||"ani-scale-fade-in"},leftBack:{ani:t||"ani-left-to-right-reverse"},rightBack:{ani:t||"ani-right-to-left-reverse"},topBack:{ani:t||"ani-top-to-bottom-reverse"},bottomBack:{ani:t||"ani-bottom-to-top-reverse"},centerBack:{ani:t||"ani-scale-fade-out"}}})),s=t.ref(""),c=t.ref(!1);t.watchEffect((()=>{o.visiable?(c.value=!0,s.value=l.value):s.value=`${l.value}Back`}));const i=e=>{-1===s.value.indexOf("Back")&&a("opened",e)},d=e=>{"0"===getComputedStyle(e.target).opacity&&"visibility"===e.propertyName&&(c.value=!1,a("closed",e))},p=()=>{a("update:visiable",!1)};return(e,a)=>(t.openBlock(),t.createBlock(u,{class:t.normalizeClass(`fixed t-0 l-0 max z-9 ${n.value.layout}`),state:c.value.toString(),states:{true:"alpha-1 visible",false:"alpha-0"}},{default:t.withCtx((()=>[t.createVNode(v,{onOn_transend:d,onOn_click:a[0]||(a[0]=t=>!e.matteCloseForbid&&p()),state:e.visiable.toString(),states:{true:"alpha-1 visible",false:"alpha-0"},class:t.normalizeClass(`abs trans-fast max t-0 l-0 bg-color-${e.matteColor||"C000000cc"}`)},null,8,["state","class"]),t.createVNode(u,{class:t.normalizeClass(`${n.value.pannal} rel ani-mode-both ani-fast`),state:s.value,"ani-end-clear":!0,onOn_aniEnd:i,states:r.value},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"custom",{},(()=>[t.createVNode(u,{class:t.normalizeClass(`bg-color-${e.pannelColor||"light"} rel pad-2 ${e.roundEnable?"round-md":""} ${n.value.pannal}`)},{default:t.withCtx((()=>[e.closeEnable?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(v,{key:0,class:"abs r-1 t-d7 color-mgray",onOn_click:p},{default:t.withCtx((()=>[t.createVNode(C,{icon:"fail",class:"fsize-2 lh-1d4"})])),_:1})),t.renderSlot(e.$slots,"default")])),_:3},8,["class"])]))])),_:3},8,["class","state","states"])])),_:3},8,["class","state"]))}}),K=t.defineComponent({__name:"toast-wid",props:{text:{},duration:{},icon:{},matteColor:{},extra:{}},emits:["close"],setup(e,{expose:a,emit:o}){const l=e;let n,r=!1;const s=t.ref(!1),c=()=>{r=!0},i=()=>{s.value=!1,!r&&o("close")},d=()=>{clearTimeout(n),o("close")};return a({show:()=>{s.value=!0,0!==l.duration&&(n=setTimeout((()=>{i()}),l.duration||2e3))},close:i}),(e,a)=>(t.openBlock(),t.createBlock(G,{visiable:s.value,"onUpdate:visiable":a[0]||(a[0]=e=>s.value=e),"matte-close-forbid":!0,onClosed:d,onOpened:c,"ani-name":["ani-fade-in","ani-fade-out"],dir:"center","matte-color":e.matteColor||"C00000044"},{custom:t.withCtx((()=>[t.renderSlot(e.$slots,"default",{},(()=>[t.createVNode(u,{class:"round-md pad-v-1d2 pad-h-1d7 color-light fsize-1d27 bg-color-C000000ee flex-column lw-10 pcenter"},{default:t.withCtx((()=>{var a;return[e.icon?(t.openBlock(),t.createBlock(u,{key:0,class:"mrg-b-1d2 fsize-3d2",states:{loading:{class:"ani-loop ani-slow",ani:"ani-rotate"}},state:(null==(a=e.extra)?void 0:a.type)??""},{default:t.withCtx((()=>[t.createVNode(C,{icon:e.icon},null,8,["icon"])])),_:1},8,["state"])):t.createCommentVNode("",!0),t.createVNode(m,null,{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.text),1)])),_:1})]})),_:1})]))])),_:3},8,["visiable","matte-color"]))}}),Q=t.defineComponent({__name:"confirm-wid",props:{notic:{},type:{},theme:{},text:{},matteColor:{},ok:{type:Function},cancel:{type:Function}},emits:["ok","cancel","close"],setup(e,{expose:a,emit:o}){const l=e,n=t.ref(!1),r=()=>{o("close")},s=t.computed((()=>{const{availWidth:e,availHeight:t}=window.screen;return e/t>1?"lw-24 rw-37":"lw-74-vw"})),c=t.computed((()=>({bg:"light",text:"dark",line:"lgray",ok:"blue",cancel:"mgray",...null==l?void 0:l.theme}))),i=()=>{var e;o("ok"),null==(e=l.ok)||e.call(l),n.value=!1},d=()=>{var e;o("cancel"),null==(e=l.cancel)||e.call(l),n.value=!1};return a({show:()=>{n.value=!0}}),(e,a)=>(t.openBlock(),t.createBlock(G,{visiable:n.value,"onUpdate:visiable":a[0]||(a[0]=e=>n.value=e),"matte-close-forbid":!0,onClosed:r,dir:"center","ani-name":["ani-fade-in","ani-fade-out"],"matte-color":e.matteColor},{custom:t.withCtx((()=>[t.createVNode(u,{class:t.normalizeClass(`bg-color-${c.value.bg} round-md ${s.value} pcenter`)},{default:t.withCtx((()=>[t.createVNode(u,{class:t.normalizeClass(`color-${c.value.text} pad-3d4 fsize-1d4 bolder-470`)},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.notic),1)])),_:1},8,["class"]),t.createVNode(u,{class:t.normalizeClass(`flex solid-t bolder-470 line-${c.value.line} thick-d4 fsize-1d44`)},{default:t.withCtx((()=>["confirm"===e.type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(v,{class:t.normalizeClass(`color-${c.value.cancel} solid-r thick-d4 line-${c.value.line} round-md round-3 flex-5 pad-v-1d4 w-50-P`),active:"bg-color-neutral",onOn_click:d},{default:t.withCtx((()=>{var a;return[t.createTextVNode(t.toDisplayString((null==(a=e.text)?void 0:a.cancel)||"取消"),1)]})),_:1},8,["class"]),t.createVNode(v,{class:t.normalizeClass(`color-${c.value.ok} round-md round-4 flex-5 pad-v-1d4 w-50-P`),active:"bg-color-neutral",onOn_click:i},{default:t.withCtx((()=>{var a;return[t.createTextVNode(t.toDisplayString((null==(a=e.text)?void 0:a.ok)||"确定"),1)]})),_:1},8,["class"])],64)):(t.openBlock(),t.createBlock(v,{key:1,class:t.normalizeClass(`color-${c.value.ok} round-b round-md flex-5 pad-v-1d4 grow-1`),active:"bg-color-neutral",onOn_click:i},{default:t.withCtx((()=>{var a;return[t.createTextVNode(t.toDisplayString((null==(a=e.text)?void 0:a.ok)||"确定"),1)]})),_:1},8,["class"]))])),_:1},8,["class"])])),_:1},8,["class"])])),_:1},8,["visiable","matte-color"]))}}),Z=(e,a=2e3,o="",l={})=>{const n=document.createElement("div");n.setAttribute("id","BTXUI-toast"),document.body.appendChild(n);const r=t.createVNode(K,{text:e,duration:a,icon:o,extra:l,onClose:()=>{t.render(null,n),document.body.removeChild(n)}});return t.render(r,n),new Promise((e=>{t.nextTick((()=>{setTimeout((()=>{var t,a;null==(a=null==(t=r.component)?void 0:t.exposed)||a.show(),e(r)}),40)}))}))};let ee;const te=e=>{var t,a;null==(a=null==(t=e.component)?void 0:t.exposed)||a.close()};let ae={theme:{},matte:""};const oe=(e,a,o,l,n={ok:"",cancel:""})=>{var r,s;const c=document.createElement("div");c.setAttribute("id","BTXUI-confirm"),document.body.appendChild(c);const i=t.createVNode(Q,{type:e,notic:a,ok:o,cancel:l,theme:ae.theme,matteColor:ae.matte,text:n,onClose:()=>{t.render(null,c),document.body.removeChild(c)}});return t.render(i,c),setTimeout(null==(s=null==(r=i.component)?void 0:r.exposed)?void 0:s.show,40),i},le=e=>{const t=document.createElement("input");return t.type="file",(null==e?void 0:e.camera)&&(t.capture="user",t.accept="image/*"),document.body.appendChild(t),new Promise((e=>{t.onchange=t=>{const a=t.target;a.files&&e(a.files)},t.click(),document.body.removeChild(t)}))},ne=(e,t)=>new Promise(((a,o)=>{const l=new FileReader;l.readAsDataURL(e),l.onload=function(){const n=new Image;n.src=l.result,n.onload=function(){const o=document.createElement("canvas"),l=o.getContext("2d"),{naturalHeight:r,naturalWidth:s}=n,c=s/r;o.width=(null==t?void 0:t.width)||s,o.height=(null==t?void 0:t.height)||o.width/c,l.drawImage(n,0,0,o.width,o.height),o.toBlob((t=>{a(new File([t],e.name,{type:t.type,lastModified:(new Date).getTime()}))}),e.type,(null==t?void 0:t.quality)||.7)},n.onerror=o},l.onerror=o})),re=t.defineComponent({__name:"img-upload-wid",props:{preview:{},cover:{},size:{},multiple:{type:Boolean},bsize:{},compress:{},camera:{type:Boolean}},emits:["update:preview","on_upload"],setup(e,{emit:a}){const o=e,l=t.computed((()=>o.compress?20971520:o.size)),n=(e,t)=>{if(t.success){let t=e[0];const l=new FileReader;l.readAsDataURL(e[0]),l.onload=async e=>{var l,n;if(null==o?void 0:o.compress){if(o.compress.clip)return void N(null==(l=e.target)?void 0:l.result,t);t=await ne(t,o.compress)}a("update:preview",null==(n=e.target)?void 0:n.result),a("on_upload",t)}}},r=t.ref(!1),s=t.ref(""),c=t.ref(),i=t.ref(),d=t.ref(1),u=t.ref({x:0,y:0}),p=t.ref(!1),m=t.ref({x:0,y:0}),v=t.ref({startDistance:0,startScale:1,origin:{x:0,y:0},startOffset:{x:0,y:0}}),f=t.ref(null),h=t.ref({w:0,h:0}),g=t.computed((()=>{var e;return(null==(e=o.compress)?void 0:e.width)||0})),x=t.computed((()=>{var e;return(null==(e=o.compress)?void 0:e.height)||0})),b=()=>{const e=h.value.w*d.value,a=h.value.h*d.value;t.nextTick((()=>{c.value&&(c.value.$el.style.width=e?e+"px":"auto",c.value.$el.style.height=a?a+"px":"auto",c.value.$el.style.top=u.value.y+"px",c.value.$el.style.left=u.value.x+"px")}))},k=e=>{const t=e.deltaY<0?1.1:.9;d.value=Math.max(.1,Math.min(5,d.value*t)),b()},y=e=>{p.value=!0,m.value={x:e.clientX,y:e.clientY},c.value.$el.style.cursor="grabbing"},w=e=>{if(!p.value)return;const{clientX:t,clientY:a}=e,o=t-m.value.x,l=a-m.value.y;u.value.x+=o,u.value.y+=l,m.value={x:t,y:a},b()},C=e=>{(null==e?void 0:e.touches)?$(e):w(e)},_=()=>{p.value=!1,c.value.$el.style.cursor="grab"},B=e=>{if(null==e?void 0:e.touches)if(1===e.touches.length){const t=e.touches[0];y({clientX:t.clientX,clientY:t.clientY})}else if(2===e.touches.length&&i.value){const[t,a]=e.touches,o=Math.hypot(a.clientX-t.clientX,a.clientY-t.clientY);v.value.startDistance=o,v.value.startScale=d.value,v.value.startOffset={...u.value};const l=i.value.getBoundingClientRect(),n=(t.clientX+a.clientX)/2-l.left,r=(t.clientY+a.clientY)/2-l.top;v.value.origin={x:n,y:r}}},$=e=>{if(1===e.touches.length&&p.value){const t=e.touches[0];w({clientX:t.clientX,clientY:t.clientY})}else if(2===e.touches.length){const[t,a]=e.touches,o=Math.hypot(a.clientX-t.clientX,a.clientY-t.clientY),l=v.value.startScale,n=l*o/v.value.startDistance,r=Math.max(.1,Math.min(5,n)),s=v.value.origin,c=v.value.startOffset;u.value={x:c.x+(1-r/l)*(s.x-c.x),y:c.y+(1-r/l)*(s.y-c.y)},d.value=r,b()}},N=(e,a)=>{f.value=a,d.value=1,u.value={x:0,y:0},r.value=!0,t.nextTick((()=>{s.value=e}))},V=()=>{t.nextTick((()=>{const e=c.value.$el,t=i.value.$el;if(e&&t){h.value={w:e.naturalWidth,h:e.naturalHeight};const a=t.clientWidth,o=t.clientHeight;if(0===a||0===o)return void setTimeout(V,50);const l=a/e.naturalWidth,n=o/e.naturalHeight;d.value=Math.max(l,n),b()}}))},z=async()=>{var e;const t=c.value.$el;if(!t||!i.value.$el)return;const l=f.value,n=i.value.$el.clientWidth,s=i.value.$el.clientHeight,p=-u.value.x/d.value,m=-u.value.y/d.value,v=n/d.value,h=s/d.value,b=g.value||n,k=x.value||s,y=document.createElement("canvas");y.width=b,y.height=k;const w=y.getContext("2d");null==w||w.drawImage(t,p,m,v,h,0,0,b,k),y.toBlob((e=>{if(e){const t=new File([e],l.name,{type:e.type}),o=new FileReader;o.onload=()=>{const e=o.result;a("on_upload",t),a("update:preview",e)},o.readAsDataURL(e)}}),l.type,null==(e=o.compress)?void 0:e.quality),r.value=!1},S=()=>{r.value=!1,f.value=null,s.value=""};return(e,a)=>{const o=t.resolveComponent("b-view"),d=t.resolveComponent("b-icon"),u=t.resolveComponent("b-img"),p=t.resolveComponent("b-hot"),m=t.resolveComponent("btn-wid");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(J,{onOn_upload:n,size:l.value,multiple:e.multiple,camera:e.camera,type:["image/jpeg","image/png","image/gif"]},{default:t.withCtx((()=>{var a,l,n,r,s,c;return[e.preview?(t.openBlock(),t.createBlock(o,{key:0,class:t.normalizeClass(`w-${(null==(a=e.cover)?void 0:a.width)||7} h-${(null==(l=e.cover)?void 0:l.height)||7} bsize-${e.bsize||"cover"} bpos-2 round-sm bg-color-neutral`),"bg-img":e.preview},null,8,["class","bg-img"])):(t.openBlock(),t.createBlock(d,{key:1,icon:"add",class:t.normalizeClass(`flex-5 w-${(null==(n=e.cover)?void 0:n.width)||7} h-${(null==(r=e.cover)?void 0:r.height)||7} ${(null==(s=e.cover)?void 0:s.color)?"color-"+(null==(c=e.cover)?void 0:c.color):""} round-sm bg-color-neutral`)},null,8,["class"]))]})),_:1},8,["size","multiple","camera"]),r.value?(t.openBlock(),t.createBlock(o,{key:0,class:"max-fixed color-light bg-color-rgba_0_0_0_d7 flex-5 z-10 flex-column"},{default:t.withCtx((()=>{var a,l;return[t.createVNode(o,{class:"mrg-b-1"},{default:t.withCtx((()=>[t.createTextVNode("拖动/触摸移动,滚轮或捏合缩放")])),_:1}),t.createVNode(p,{class:t.normalizeClass(`bg-color-dgray show rel line-outside over-hide round-md line-Cffffff44 solid thick-7-px w-${null==(a=e.compress)?void 0:a.width}-px h-${null==(l=e.compress)?void 0:l.height}-px`),ref_key:"$cropArea",ref:i,onOn_wheel:k,onOn_mousedown:y,onOn_move:C,onOn_mouseup:_,onOn_enter:B,onOn_leave:_},{default:t.withCtx((()=>[t.createVNode(u,{class:"abs t-0 l-0 no-rw select-none cursor-grab",ref_key:"$cropImage",ref:c,img:s.value,onOn_load:V},null,8,["img"])])),_:1},8,["class"]),t.createVNode(o,{class:"mrg-t-2 flex gap-1"},{default:t.withCtx((()=>[t.createVNode(m,{onOn_click:z,"btn-text":"确认"}),t.createVNode(m,{onOn_click:S,"btn-text":"取消"})])),_:1})]})),_:1})):t.createCommentVNode("",!0)],64)}}}),se=t.defineComponent({__name:"app-wid",props:{path:{},spread:{},iconTransAni:{type:Boolean},center:{},colors:{},round:{type:Boolean},keepAlive:{type:Boolean}},emits:["on_toggle"],setup(e){const a=e,o=t.computed((()=>a.path)),l=t.computed((()=>{const e=[...a.spread];return a.center&&e.splice(Math.floor(e.length/2),0,t.reactive({...a.center,main:!0})),e}));return(e,a)=>{var n;const r=t.resolveComponent("router-view");return t.openBlock(),t.createBlock(u,{class:t.normalizeClass(`max fixed flex-column color-light select-none bg-color-${(null==(n=e.colors)?void 0:n.bg)||"none"}`)},{default:t.withCtx((()=>{var a;return[t.createVNode(u,{class:"rel grow-1"},{default:t.withCtx((()=>[t.createVNode(E,{scroll:{y:"auto",x:"hidden"},class:"abs max"},{default:t.withCtx((()=>[e.keepAlive?(t.openBlock(),t.createBlock(t.KeepAlive,{key:0},[t.createVNode(r)],1024)):(t.openBlock(),t.createBlock(r,{key:1}))])),_:1})])),_:1}),t.createVNode(u,{class:t.normalizeClass(`pcenter pad-t-d5 flex-1 ${e.round?"round-md round-t":""} bg-color-${(null==(a=e.colors)?void 0:a.bar)||"dark"} solid-t line-neutral thick-d4 app-nav-bar`)},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,((a,l)=>(t.openBlock(),t.createBlock(v,t.mergeProps({key:l},a.hotData,{class:"grow-1",onOn_click:t=>e.$emit("on_toggle",a)}),{default:t.withCtx((()=>{var l,n,r,s,c,i;return[a.main?(t.openBlock(),t.createBlock(u,{key:0,class:"rel w-5 mrg-h-auto"},{default:t.withCtx((()=>{var o,l,n,r;return[t.createVNode(C,t.mergeProps(a.iconData,{class:`abs flex-5 solid t-f1d4 thick-2 w-5 h-5 round fsize-1d7 line-${(null==(l=null==(o=e.colors)?void 0:o.center)?void 0:l.line)||"neutral"} bg-color-${(null==(r=null==(n=e.colors)?void 0:n.center)?void 0:r.bg)||"dgray"}`}),null,16,["class"])]})),_:2},1024)):(t.openBlock(),t.createBlock(u,{key:1,class:t.normalizeClass(`flex-column rel flex-5 color-${(null==(n=null==(l=e.colors)?void 0:l.text)?void 0:n.normal)||"mgray"}`),cname:(null==(s=null==(r=e.colors)?void 0:r.text)?void 0:s.act)||"light",state:0===o.value.search(a.hotData.link)?"act":"",states:{act:`color-${(null==(i=null==(c=e.colors)?void 0:c.text)?void 0:i.act)||"light"}`}},{default:t.withCtx((()=>[1===a.unread?(t.openBlock(),t.createBlock(u,{key:0,class:"round w-d7 h-d7 r-9d2-vw t-d2 bg-color-red abs"})):t.createCommentVNode("",!0),a.unread>1?(t.openBlock(),t.createBlock(u,{key:1,class:"flex-5 round w-1d5 h-1d5 bold r-7d7-vw t-fd5 bg-color-red abs color-Cfff"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(a.unread),1)])),_:2},1024)):t.createCommentVNode("",!0),t.createVNode(C,t.mergeProps(a.iconData,{cname:a.act,state:0===o.value.search(a.hotData.link)?"act":"",states:{act:a.act??""},class:`w-2d7 h-2d7 ${e.iconTransAni?"trans-fast":""} fsize-1d7`}),null,16,["cname","state","states","class"]),a.text?(t.openBlock(),t.createBlock(m,{key:2,class:"fsize-d83"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(a.text),1)])),_:2},1024)):t.createCommentVNode("",!0)])),_:2},1032,["class","cname","state","states"]))]})),_:2},1040,["onOn_click"])))),128))])),_:1},8,["class"])]})),_:1},8,["class"])}}}),ce=t.defineComponent({__name:"datetime-modal-wid",props:{datetime:{},format:{},btnData:{},modalData:{}},emits:["update:datetime","getData"],setup(e,{expose:a,emit:o}){const l=e,n=t.ref(!1),r=t.reactive({roundEnable:!0,...l.modalData,dir:""});t.onMounted((()=>{const{availWidth:e,availHeight:t}=window.screen;r.dir=e/t>1?"center":"bottom"}));const s=t.ref(l.datetime),c=e=>{d(),o("update:datetime",s.value),o("getData",e)},i=()=>{n.value=!0},d=()=>{n.value=!1};return a({show:i,hide:d}),(e,a)=>{const o=t.resolveComponent("b-hot"),l=t.resolveComponent("datetime-wid");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(o,{onOn_click:i},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3}),r.dir?(t.openBlock(),t.createBlock(G,t.mergeProps({key:0,visiable:n.value,"onUpdate:visiable":a[1]||(a[1]=e=>n.value=e)},r),{default:t.withCtx((()=>[t.createVNode(u,{class:"pad-t-1 lw-24"},{default:t.withCtx((()=>[t.createVNode(l,{onGetData:c,datetime:s.value,"onUpdate:datetime":a[0]||(a[0]=e=>s.value=e),format:e.format,"btn-data":e.btnData},null,8,["datetime","format","btn-data"])])),_:1})])),_:1},16,["visiable"])):t.createCommentVNode("",!0)],64)}}}),ie=t.defineComponent({__name:"datetime-wid",props:{datetime:{},format:{},btnData:{}},emits:["update:datetime","getData"],setup(e,{emit:a}){const o=e,l=t.computed((()=>({btnText:"确定",...o.btnData}))),n=e=>e.toString().padStart(2,"0"),r=t.computed((()=>o.datetime)),s=t.reactive({y:{val:0,show:!1},m:{val:0,show:!1},d:{val:0,show:!1},h:{val:0,show:!1},i:{val:0,show:!1},s:{val:0,show:!1}});t.watch(r,(e=>{(e=>{const t=new Date(e);s.y.val=t.getFullYear(),s.m.val=t.getMonth()+1,s.d.val=t.getDate(),s.h.val=t.getHours(),s.i.val=t.getMinutes(),s.s.val=t.getSeconds()})(e)}),{immediate:!0});const c=t.ref(""),i=t.ref(!1);t.onMounted((()=>{const e=(o.format||"y/m/d h:i:s").split(" ");i.value=e.length>1,e.forEach((e=>{e.split(/\/|-|:/g).forEach((e=>{c.value||(c.value=e),s[e].show=!0}))}))}));const d={y:"年",m:"月",d:"日",h:"时",i:"分",s:"秒"},p=t.ref([]),m=t.ref(),v=t.ref();let f=0;const h=()=>{m.value&&(m.value.style.cssText=""),t.nextTick((()=>{f&&(s.d.val=Math.min(f,s.d.val));const e=v.value.$el.nextElementSibling.querySelector(`[state='${s[c.value].val}']`);e.style.cssText="\n font-weight: bolder;\n opacity: 1;\n text-shadow: 0 0 4px rgba(255,255,255,.7);\n ",e.scrollIntoView({behavior:"smooth"}),m.value=e}))};t.watch(c,(e=>{const t=[];switch(e){case"y":for(let e=s.y.val-50;e<s.y.val+20;e++)t.push(e);break;case"m":for(let e=0;e<12;e++)t.push(e+1);break;case"d":(()=>{const e=s.m.val,t=s.y.val;f=1===e||3===e||5===e||7===e||8===e||10===e||12===e?31:2===e?t%4==0&&t%100!=0||t%400==0?29:28:30})();for(let e=0;e<f;e++)t.push(e+1);break;case"h":for(let e=0;e<24;e++)t.push(e);break;case"i":case"s":for(let e=0;e<60;e++)t.push(e)}p.value=t,h()}),{immediate:!0});const g=e=>{var t;const a=e.clientX,o=e.clientY;let l=document.elementFromPoint(a,o);for(;!(null==l?void 0:l.hasAttribute("state"));)l=null==l?void 0:l.parentElement;s[c.value].val=1*(null==l?void 0:l.getAttribute("state"));const n="ymdhis".split(c.value)[1],r=null==(t=null==n?void 0:n.split(""))?void 0:t.find((e=>s[e].show));r?c.value=r:h()},x=()=>{const{y:e,m:t,d:o,h:l,i:r,s:c}=s;a("update:datetime",Date.parse(`${e.val}-${n(t.val)}-${n(o.val)}T${n(l.val)}:${n(r.val)}:${n(c.val)}`)),a("getData",{...s})};return(e,a)=>{const o=t.resolveComponent("b-icon"),r=t.resolveComponent("b-hot"),m=t.resolveComponent("b-text"),f=t.resolveComponent("b-list"),h=t.resolveComponent("btn-wid");return t.openBlock(),t.createBlock(u,null,{default:t.withCtx((()=>[t.createVNode(u,{class:"flex-4"},{default:t.withCtx((()=>[t.createVNode(o,{icon:"time",class:"alpha-d7 mrg-r-d7"}),s.y.show?(t.openBlock(),t.createBlock(u,{key:0},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:a[0]||(a[0]=e=>c.value="y"),cname:"y",state:c.value,states:{y:"color-green"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(s.y.val),1)])),_:1},8,["state"]),t.createVNode(m,{class:"pad-h-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("年")])),_:1})])),_:1})):t.createCommentVNode("",!0),s.m.show?(t.openBlock(),t.createBlock(u,{key:1},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:a[1]||(a[1]=e=>c.value="m"),cname:"m",state:c.value,states:{m:"color-green"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n(s.m.val)),1)])),_:1},8,["state"]),t.createVNode(m,{class:"pad-h-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("月")])),_:1})])),_:1})):t.createCommentVNode("",!0),s.d.show?(t.openBlock(),t.createBlock(u,{key:2},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:a[2]||(a[2]=e=>c.value="d"),cname:"d",state:c.value,states:{d:"color-green"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n(s.d.val)),1)])),_:1},8,["state"]),t.createVNode(m,{class:"pad-h-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("日")])),_:1})])),_:1})):t.createCommentVNode("",!0),i.value?(t.openBlock(),t.createBlock(u,{key:3,class:"w-1d4"})):t.createCommentVNode("",!0),s.h.show?(t.openBlock(),t.createBlock(u,{key:4},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:a[3]||(a[3]=e=>c.value="h"),cname:"h",state:c.value,states:{h:"color-green"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n(s.h.val)),1)])),_:1},8,["state"]),t.createVNode(m,{class:"pad-h-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("时")])),_:1})])),_:1})):t.createCommentVNode("",!0),s.i.show?(t.openBlock(),t.createBlock(u,{key:5},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:a[4]||(a[4]=e=>c.value="i"),cname:"i",state:c.value,states:{i:"color-green"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n(s.i.val)),1)])),_:1},8,["state"]),t.createVNode(m,{class:"pad-h-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("分")])),_:1})])),_:1})):t.createCommentVNode("",!0),s.s.show?(t.openBlock(),t.createBlock(u,{key:6},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:a[5]||(a[5]=e=>c.value="s"),cname:"s",state:c.value,states:{s:"color-green"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n(s.s.val)),1)])),_:1},8,["state"]),t.createVNode(m,{class:"pad-h-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("秒")])),_:1})])),_:1})):t.createCommentVNode("",!0)])),_:1}),t.createVNode(u,{class:"flex"},{default:t.withCtx((()=>[t.createVNode(f,{class:"grow-1 h-17 bg-color-neutral mrg-v-1 round-md pad-1",scroll:{x:"auto",y:"auto"}},{default:t.withCtx((()=>[t.createVNode(r,{onOn_click:g,ref_key:"$list",ref:v},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,(e=>(t.openBlock(),t.createBlock(u,{state:e.toString(),hover:"bg-color-neutral",class:"h-3 pad-h-1 lh-3-rem flex round-sm alpha-d7"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n(e))+" ",1),t.createVNode(m,{class:"pad-l-d4 alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(d[c.value]),1)])),_:1})])),_:2},1032,["state"])))),256))])),_:1},512)])),_:1})])),_:1}),t.createVNode(h,t.mergeProps(l.value,{onOn_click:x}),null,16)])),_:1})}}}),de=t.defineComponent({__name:"price-modal-wid",props:{price:{},input:{},matteColor:{},matteCloseForbid:{type:Boolean},hideScreen:{type:Boolean},theme:{}},emits:["sendPrice","update:price","update:input"],setup(e,{expose:a,emit:o}){const l=e,n=t.ref(!1),r=t.reactive({dir:"",pannel:"lgray",text:"dgray",btn:{normal:"light",active:"neutral"},btn2:{normal:"yellow",active:"yellow"},...l.theme});t.onMounted((()=>{const{availWidth:e,availHeight:t}=window.screen;r.dir=e/t>1?"center":"bottom"}));const s=t.ref(l.input);t.watch(s,(e=>{o("update:input",e)}));const c=t.ref(l.price),i=e=>{o("sendPrice",e),o("update:price",e),t.nextTick(u)},d=()=>{n.value=!0},u=()=>{n.value=!1};return a({show:d,hide:u,clear:()=>{c.value=0}}),(e,a)=>{const o=t.resolveComponent("b-hot"),l=t.resolveComponent("price-wid");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(o,{onOn_click:d},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3}),r.dir?(t.openBlock(),t.createBlock(G,{key:0,visiable:n.value,"onUpdate:visiable":a[2]||(a[2]=e=>n.value=e),dir:r.dir,"matte-color":e.matteColor,"matte-close-forbid":e.matteCloseForbid},{custom:t.withCtx((()=>[t.createVNode(l,{onSendPrice:i,input:s.value,"onUpdate:input":a[0]||(a[0]=e=>s.value=e),price:c.value,"onUpdate:price":a[1]||(a[1]=e=>c.value=e),theme:r,"hide-screen":e.hideScreen},t.createSlots({_:2},[e.$slots.delete?{name:"delete",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"delete")])),key:"0"}:void 0,e.$slots.ok?{name:"ok",fn:t.withCtx((()=>[t.renderSlot(e.$slots,"ok")])),key:"1"}:void 0]),1032,["input","price","theme","hide-screen"])])),_:3},8,["visiable","dir","matte-color","matte-close-forbid"])):t.createCommentVNode("",!0)],64)}}}),ue=t.defineComponent({__name:"price-wid",props:{price:{},input:{},hideScreen:{type:Boolean},theme:{}},emits:["sendPrice","update:input","update:price"],setup(e,{expose:a,emit:o}){const l=e,n=t.reactive({dir:"",pannel:"lgray",text:"dgray",btn:{normal:"light",active:"neutral"},btn2:{normal:"yellow",active:"yellow"},...l.theme}),r=t.computed((()=>{switch(n.dir){case"center":return"w-30 round-md fsize-1d3";case"bottom":return"fsize-1d6";default:return""}})),s=t.ref(l.price.toString()),c=e=>{const t=e.clientX,a=e.clientY;let l=document.elementFromPoint(t,a),n=s.value||"";switch(l.getAttribute("state")){case".":""===n?n="0.":-1===n.indexOf(".")&&(n+=".");break;case"delete":n=n.slice(0,-1);break;case"ok":i();break;default:const e=n.split("."),t=e[1],a=e[0];"0"===n?n=l.innerText:(a.length<7||"."===n[7])&&((null==t?void 0:t.length)<2||!t&&("0"===l.innerText&&"0"!==n||"0"!==l.innerText))&&(n+=l.innerText)}s.value=n,o("update:input",s.value)},i=()=>{const e=parseFloat(s.value);o("sendPrice",e),o("update:price",e)};return a({clear:()=>{s.value=""}}),(e,a)=>{const o=t.resolveComponent("b-text"),l=t.resolveComponent("b-input"),i=t.resolveComponent("b-hot"),d=t.resolveComponent("b-col"),p=t.resolveComponent("b-row");return t.openBlock(),t.createBlock(u,{class:t.normalizeClass(`${r.value} bg-color-${n.pannel} color-${n.text}`)},{default:t.withCtx((()=>[e.hideScreen?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(u,{key:0,class:"flex-4 no-wrap pad-1d4"},{default:t.withCtx((()=>[t.createVNode(o,{class:"fsize-2d4 bold alpha-d4"},{default:t.withCtx((()=>[t.createTextVNode("¥")])),_:1}),t.createVNode(l,{text:s.value,"onUpdate:text":a[0]||(a[0]=e=>s.value=e),type:"text",readonly:!0,class:t.normalizeClass(`grow-1 bg-color-none fsize-3 bolder-500 line-none color-${n.text}`)},null,8,["text","class"])])),_:1})),t.createVNode(u,{class:"pad-b-2 bolder-500"},{default:t.withCtx((()=>[t.createVNode(i,{onOn_click:c},{default:t.withCtx((()=>[t.createVNode(p,{gap:.7},{default:t.withCtx((()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(3,(e=>t.createVNode(d,{span:3},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`bg-color-${n.btn.normal} flex-5 round-sm h-4d2`),active:`bg-color-${n.btn.active}`,state:e},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e),1)])),_:2},1032,["class","active","state"])])),_:2},1024))),64)),t.createVNode(d,{span:3},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`bg-color-${n.btn.normal} flex-5 round-sm h-4d2`),active:`bg-color-${n.btn.active}`,state:"delete"},{default:t.withCtx((()=>[e.$slots.delete?t.renderSlot(e.$slots,"delete",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("删除")],64))])),_:3},8,["class","active"])])),_:3}),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(3,(e=>t.createVNode(d,{span:3},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`bg-color-${n.btn.normal} flex-5 round-sm h-4d2`),active:`bg-color-${n.btn.active}`,state:e},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e+3),1)])),_:2},1032,["class","active","state"])])),_:2},1024))),64)),t.createVNode(d,{span:3}),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(3,(e=>t.createVNode(d,{span:3},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`bg-color-${n.btn.normal} flex-5 round-sm h-4d2`),active:`bg-color-${n.btn.active}`,state:e},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e+6),1)])),_:2},1032,["class","active","state"])])),_:2},1024))),64)),t.createVNode(d,{span:3}),t.createVNode(d,{span:6},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`bg-color-${n.btn.normal} flex-5 round-sm h-4d2`),active:`bg-color-${n.btn.active}`,state:"0"},{default:t.withCtx((()=>[t.createTextVNode("0")])),_:1},8,["class","active"])])),_:1}),t.createVNode(d,{span:3},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`bg-color-${n.btn.normal} flex-5 round-sm h-4d2`),active:`bg-color-${n.btn.active}`,state:"."},{default:t.withCtx((()=>[t.createTextVNode(".")])),_:1},8,["class","active"])])),_:1}),t.createVNode(d,{span:3},{default:t.withCtx((()=>[t.createVNode(u,{class:"rel h-4d2"},{default:t.withCtx((()=>[t.createVNode(i,{class:t.normalizeClass(`abs b-0 h-14 max-w bg-color-${n.btn2.normal} flex-5 round-sm`),active:`bg-color-${n.btn2.active}`,state:"ok"},{default:t.withCtx((()=>[e.$slots.ok?t.renderSlot(e.$slots,"ok",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("确认")],64))])),_:3},8,["class","active"])])),_:3})])),_:3})])),_:3})])),_:3})])),_:3})])),_:3},8,["class"])}}}),pe=t.defineComponent({__name:"content-node-wid",props:{dataTree:{},gap:{},indent:{},hover:{},active:{}},emits:["on_select"],setup(e,{emit:a}){const o=e,l=t.ref(o.dataTree||[]),n=t.inject("selected"),r=t.computed((()=>o.gap||"d7")),s=t.computed((()=>o.indent||"3")),c=e=>{const{parent:t,children:a,...o}=e;return o};return(e,a)=>{const i=t.resolveComponent("b-text"),d=t.resolveComponent("content-node-wid",!0);return t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(a=>(t.openBlock(),t.createBlock(u,{state:`id-${a.id}`,key:a.id},{default:t.withCtx((()=>{var l,p;return[t.createVNode(v,{cname:`${a.id}-${Math.random()}`,class:t.normalizeClass(`flex-4 pad-v-${r.value} pad-l-${p=a.level,(p*parseFloat(s.value.replace("d","."))+parseFloat(r.value.replace("d","."))).toString().replace(".","d")}`),hover:e.hover,states:{true:`${e.active?e.active:""}`,false:""},state:((null==(l=t.unref(n))?void 0:l.findIndex((e=>e.id===a.id)))>-1).toString()},{default:t.withCtx((()=>[a.children&&a.children.length?(t.openBlock(),t.createBlock(C,{key:0,class:"mrg-r-d4",state:a.spread?"content-wid-spread":"content-wid-collapse",icon:"arrow-right"},null,8,["state"])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default",{dataItem:c(a)},(()=>[t.createVNode(i,null,{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(a.text),1)])),_:2},1024)]))])),_:2},1032,["cname","class","hover","states","state"]),a.children&&a.children.length?(t.openBlock(),t.createBlock(u,{key:0,states:{show:"show",hide:"hide"},state:a.spread?"show":"hide"},{default:t.withCtx((()=>[t.createVNode(d,t.normalizeProps(t.guardReactiveProps({...o,dataTree:a.children})),t.createSlots({_:2},[e.$slots.default?{name:"default",fn:t.withCtx((a=>[t.renderSlot(e.$slots,"default",t.normalizeProps(t.guardReactiveProps(a)))])),key:"0"}:void 0]),1040)])),_:2},1032,["state"])):t.createCommentVNode("",!0)]})),_:2},1032,["state"])))),128)}}}),me=[i,u,m,v,h,C,T,E,F,$,O,V,j,I,A,L,H,U,W,se,J,re,t.defineComponent({__name:"content-wid",props:{dataTree:{},gap:{},indent:{},hover:{},active:{}},emits:["on_select"],setup(e,{emit:a}){const o=e;let l=0;const n=t.reactive([]),r=t.reactive({}),s=t.ref(o.dataTree),c=t.ref(!1),i=t.ref([]);t.onBeforeMount((()=>{t.provide("selected",i.value)})),t.onMounted((()=>{(()=>{const e=(t,a,o=0)=>{for(const s of t)s.level=o,s.prefix=l++,a&&(s.parent=a),s.children&&(s.spread=s.spread||!1),n.push(s),r[s.id]=s,s.children&&s.children.length>0&&e(s.children,s,o+1)};e(s.value)})(),c.value=!0}));const d=e=>{var t,o;const l=e.clientX,n=e.clientY;let s=document.elementFromPoint(l,n);for(;0!==(null==(t=null==s?void 0:s.getAttribute("state"))?void 0:t.indexOf("id-"));)s=null==s?void 0:s.parentElement;const c=r[null==(o=null==s?void 0:s.getAttribute("state"))?void 0:o.substring(3)];i.value[0]=c,void 0!==c.spread&&(c.spread=!c.spread),a("on_select",c)};return(e,a)=>(t.openBlock(),t.createBlock(v,{onOn_click:d,"event-proxy":!0},{default:t.withCtx((()=>[c.value?(t.openBlock(),t.createBlock(pe,t.normalizeProps(t.mergeProps({key:0},{...o,dataTree:s.value})),t.createSlots({_:2},[e.$slots.default?{name:"default",fn:t.withCtx((a=>[t.renderSlot(e.$slots,"default",t.normalizeProps(t.guardReactiveProps(a.dataItem)))])),key:"0"}:void 0]),1040)):t.createCommentVNode("",!0)])),_:3}))}}),G,Q,K,ce,ie,de,ue],ve={name:"btxui",install(e,t){me.forEach((t=>{e.component(t.__name,t)})),e.config.globalProperties.$btxui_theme=a,t&&Object.keys(t).forEach((a=>{e.config.globalProperties[`$${a}`]=t[a]}))}};e.compress=ne,e.confirmTheme=(e,t)=>{ae.theme=e,ae.matte=t},e.default=ve,e.hideLoadToast=async(e,t)=>{const a=await ee;e?(a.component.props.text=e,a.component.props.icon=t,a.component.props.extra.type="",setTimeout((()=>{te(a)}),1e3)):te(a)},e.showAlert=(e,t,a="")=>{oe("alert",e,t,void 0,{ok:a,cancel:""})},e.showConfirm=(e,t,a,o={ok:"",cancel:""})=>{oe("confirm",e,t,a,{ok:o.ok,cancel:o.cancel})},e.showLoadToast=(e="数据加载中")=>{ee=Z(e,0,"load",{type:"loading"})},e.showToast=Z,e.upload=le,e.uploadImage=async(e,t)=>{const a=await le(t),o=await ne(a[0],e),l=new FileReader;return l.readAsDataURL(o),new Promise((e=>{l.onload=t=>{var a;e({file:o,preview:null==(a=t.target)?void 0:a.result})}}))},Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btxui",
3
- "version": "1.1.22",
3
+ "version": "1.1.26",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {