btxui 1.0.15 → 1.0.16
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 +7 -6
- package/dist/index.js.gz +0 -0
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, reactive, onMounted, renderSlot, openBlock, createBlock, normalizeClass, withCtx, createElementVNode, normalizeStyle, withModifiers, watch, createVNode, resolveComponent, createElementBlock, Fragment, createCommentVNode, withDirectives, vModelDynamic, vModelText } from "vue";
|
|
2
2
|
const prestyles = {
|
|
3
3
|
//预置样式-----------------------------------------------------------------------------------
|
|
4
|
+
// 文本对齐
|
|
5
|
+
"pcenter": `text-align: center;`,
|
|
6
|
+
"pright": `text-align: right;`,
|
|
7
|
+
"pleft": `text-align: left;`,
|
|
8
|
+
"pjustify": `text-align: justify;`,
|
|
9
|
+
// 首行缩进
|
|
10
|
+
"pindent": `text-indent: 2em;`,
|
|
4
11
|
// 文字加粗
|
|
5
12
|
"bold": `font-weight: bold;`,
|
|
6
13
|
// 隐藏显示
|
|
@@ -124,10 +131,6 @@ const prestyles = {
|
|
|
124
131
|
"objfit-none": `object-fit: none;`,
|
|
125
132
|
"objfit-scaledown": `object-fit: scale-down;`,
|
|
126
133
|
// 二段赋值-----------------------------------------------------------------------------------
|
|
127
|
-
// 文本对齐
|
|
128
|
-
"p": {
|
|
129
|
-
pro: "text-align"
|
|
130
|
-
},
|
|
131
134
|
// 文字颜色
|
|
132
135
|
"color": {
|
|
133
136
|
pro: "color"
|
|
@@ -627,8 +630,6 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
627
630
|
};
|
|
628
631
|
const combineClassName = (_class) => {
|
|
629
632
|
const classArr = _class.split(" ").sort();
|
|
630
|
-
console.log(md5, "------");
|
|
631
|
-
console.log(`B-${md5(classArr.join("&"))}`);
|
|
632
633
|
const compSelector = `B-${md5(classArr.join("&"))}`;
|
|
633
634
|
className.value = `${_class} ${compSelector}`;
|
|
634
635
|
if (!styleMap.value.includes(compSelector)) {
|
package/dist/index.js.gz
CHANGED
|
Binary file
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).btxui=t(e.vue)}(this,(function(e){"use strict";const t={bold:"font-weight: bold;",show:"display: block;",hide:"display: none;",wrap:"flex-wrap: wrap;",flex:"display: flex; justify-content: flex-start; align-items: stretch;","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;",grid:"display: flex; flex-wrap: wrap; align-content: flex-start;","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%;",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;","bg-repeat":"background-repeat: repeat;","bg-repeat-x":"background-repeat: repeat-x;","bg-repeat-y":"background-repeat: repeat-y;","bg-size-cover":"background-size: cover;","bg-size-contain":"background-size: contain;","bg-size-max":"background-size: 100% 100%;","bg-size-max-h":"background-size: auto 100%;","bg-size-max-w":"background-size: 100% auto;","bg-pos-1":"background-position: left top;","bg-pos-2":"background-position: center top;","bg-pos-3":"background-position: right top;","bg-pos-4":"background-position: left center;","bg-pos-5":"background-position: center center;","bg-pos-6":"background-position: right center;","bg-pos-7":"background-position: left bottom;","bg-pos-8":"background-position: center bottom;","bg-pos-9":"background-position: right bottom;","bg-fixed":"background-attachment: scroll;",round:"border-radius: 50%;","round-lg":"borderRadius: 24px;","round-md":"border-radius: 10px;","round-sm":"border-radius: 4px;","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;",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;","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%);","gray-no":"filter: grayscale(0%);","gray-sm":"filter: grayscale(40%);","gray-md":"filter: grayscale(70%);","gray-lg":"filter: grayscale(100%);","bg-none":"pointerEvents: none;","bg-use":"pointerEvents: 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;","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;",p:{pro:"text-align"},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"},lspace:{pro:"letter-spacing",unit:"rem"},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"},rule_2:{column:{pro:"columnCount",extra:{columnGap:0}}},rule_3:{gradient:{pro:["Image"],tmp:"-webkit-linear-gradient(%{}%)"}}},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}}};var a,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s={};a={get exports(){return s},set exports(e){s=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,r,s,n){return t((l=t(t(o,e),t(r,n)))<<(i=s)|l>>>32-i,a);var l,i}function r(e,t,a,r,s,n,l){return o(t&a|~t&r,e,t,s,n,l)}function s(e,t,a,r,s,n,l){return o(t&r|a&~r,e,t,s,n,l)}function n(e,t,a,r,s,n,l){return o(t^a^r,e,t,s,n,l)}function l(e,t,a,r,s,n,l){return o(a^(t|~r),e,t,s,n,l)}function i(e,o){var a,i,c,d,u;e[o>>5]|=128<<o%32,e[14+(o+64>>>9<<4)]=o;var p=1732584193,f=-271733879,m=-1732584194,g=271733878;for(a=0;a<e.length;a+=16)i=p,c=f,d=m,u=g,p=r(p,f,m,g,e[a],7,-680876936),g=r(g,p,f,m,e[a+1],12,-389564586),m=r(m,g,p,f,e[a+2],17,606105819),f=r(f,m,g,p,e[a+3],22,-1044525330),p=r(p,f,m,g,e[a+4],7,-176418897),g=r(g,p,f,m,e[a+5],12,1200080426),m=r(m,g,p,f,e[a+6],17,-1473231341),f=r(f,m,g,p,e[a+7],22,-45705983),p=r(p,f,m,g,e[a+8],7,1770035416),g=r(g,p,f,m,e[a+9],12,-1958414417),m=r(m,g,p,f,e[a+10],17,-42063),f=r(f,m,g,p,e[a+11],22,-1990404162),p=r(p,f,m,g,e[a+12],7,1804603682),g=r(g,p,f,m,e[a+13],12,-40341101),m=r(m,g,p,f,e[a+14],17,-1502002290),p=s(p,f=r(f,m,g,p,e[a+15],22,1236535329),m,g,e[a+1],5,-165796510),g=s(g,p,f,m,e[a+6],9,-1069501632),m=s(m,g,p,f,e[a+11],14,643717713),f=s(f,m,g,p,e[a],20,-373897302),p=s(p,f,m,g,e[a+5],5,-701558691),g=s(g,p,f,m,e[a+10],9,38016083),m=s(m,g,p,f,e[a+15],14,-660478335),f=s(f,m,g,p,e[a+4],20,-405537848),p=s(p,f,m,g,e[a+9],5,568446438),g=s(g,p,f,m,e[a+14],9,-1019803690),m=s(m,g,p,f,e[a+3],14,-187363961),f=s(f,m,g,p,e[a+8],20,1163531501),p=s(p,f,m,g,e[a+13],5,-1444681467),g=s(g,p,f,m,e[a+2],9,-51403784),m=s(m,g,p,f,e[a+7],14,1735328473),p=n(p,f=s(f,m,g,p,e[a+12],20,-1926607734),m,g,e[a+5],4,-378558),g=n(g,p,f,m,e[a+8],11,-2022574463),m=n(m,g,p,f,e[a+11],16,1839030562),f=n(f,m,g,p,e[a+14],23,-35309556),p=n(p,f,m,g,e[a+1],4,-1530992060),g=n(g,p,f,m,e[a+4],11,1272893353),m=n(m,g,p,f,e[a+7],16,-155497632),f=n(f,m,g,p,e[a+10],23,-1094730640),p=n(p,f,m,g,e[a+13],4,681279174),g=n(g,p,f,m,e[a],11,-358537222),m=n(m,g,p,f,e[a+3],16,-722521979),f=n(f,m,g,p,e[a+6],23,76029189),p=n(p,f,m,g,e[a+9],4,-640364487),g=n(g,p,f,m,e[a+12],11,-421815835),m=n(m,g,p,f,e[a+15],16,530742520),p=l(p,f=n(f,m,g,p,e[a+2],23,-995338651),m,g,e[a],6,-198630844),g=l(g,p,f,m,e[a+7],10,1126891415),m=l(m,g,p,f,e[a+14],15,-1416354905),f=l(f,m,g,p,e[a+5],21,-57434055),p=l(p,f,m,g,e[a+12],6,1700485571),g=l(g,p,f,m,e[a+3],10,-1894986606),m=l(m,g,p,f,e[a+10],15,-1051523),f=l(f,m,g,p,e[a+1],21,-2054922799),p=l(p,f,m,g,e[a+8],6,1873313359),g=l(g,p,f,m,e[a+15],10,-30611744),m=l(m,g,p,f,e[a+6],15,-1560198380),f=l(f,m,g,p,e[a+13],21,1309151649),p=l(p,f,m,g,e[a+4],6,-145523070),g=l(g,p,f,m,e[a+11],10,-1120210379),m=l(m,g,p,f,e[a+2],15,718787259),f=l(f,m,g,p,e[a+9],21,-343485551),p=t(p,i),f=t(f,c),m=t(m,d),g=t(g,u);return[p,f,m,g]}function c(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",r="";for(o=0;o<e.length;o+=1)t=e.charCodeAt(o),r+=a.charAt(t>>>4&15)+a.charAt(15&t);return r}function p(e){return unescape(encodeURIComponent(e))}function f(e){return function(e){return c(i(d(e),8*e.length))}(p(e))}function m(e,t){return function(e,t){var o,a,r=d(e),s=[],n=[];for(s[15]=n[15]=void 0,r.length>16&&(r=i(r,8*e.length)),o=0;o<16;o+=1)s[o]=909522486^r[o],n[o]=1549556828^r[o];return a=i(s.concat(d(t)),512+8*t.length),c(i(n.concat(a),640))}(p(e),p(t))}function g(e,t,o){return t?o?m(t,e):u(m(t,e)):o?f(e):u(f(e))}a.exports?a.exports=g:e.md5=g}(r);const n=s,l="BTXUIGlobal",i=e.defineComponent({__name:"b-style",props:{class:{},focus:{},hover:{},active:{},states:{}},setup(a){const r=a,s=e.ref(),i=e.ref(""),c=e.computed((()=>{const e=[];for(let t of s.value.sheet.rules)e.push(t.selectorText.substr(1));return e})),d=e.reactive({}),u=e=>{if(e&&0===e.search("_"))return e.substr(1);const t=(e=>{if(!isNaN(1*e))return e;let t=e;return/^f\d+$/.test(t)&&(t=-1*t.substr(1)),/^\d*d\d+$/.test(t)&&(t=1*t.replace("d",".")),!isNaN(t)&&t})(e);if(!1!==t)return t;const a=(e=>o.colors[e]?o.colors[e]:!(!e||0!==e.search("C"))&&`#${e.substr(1)}`)(e);return!1!==a&&a},p=e=>{if(!e)return"";return e.split(" ").reduce(((e,o)=>{const a=(e=>{let o=t[e];if(o)return o;const a=e.split("-"),r={l:["left"],t:["top"],r:["right"],b:["bottom"],v:["top","bottom"],h:["left","right"]};let[s,n,l,i]=a;if(o=t[s],o){let e=u(n);if(e)return`${o.pro}: ${e}${l||o.unit||""}`;if(e=u(l),e){const t=r[n];if(t){let a="";return t.forEach((t=>{a+=`${o.pro}-${t}: ${e}${i||o.unit||""};`})),a}return`${o.pro}-${n}: ${e}${i||o.unit||""}`}}})(o);if(a)return e+=`${a};`}),"").replace(/;+/g,";")},f=(e,t)=>{const o=p(t);o&&(c.value.includes(e)||(c.value.push(e),d[e]=o))};return e.onMounted((()=>{if(r.class){(()=>{let e=document.head.querySelector(`#${l}`);e||(e=document.createElement("style"),e.setAttribute("type","text/css"),e.setAttribute("id",l),document.head.appendChild(e)),s.value=e})(),(t=r.class)&&t.split(" ").forEach((e=>{f(e,e)}));const o=(e=>{const t=e.split(" ").sort();console.log(n,"------"),console.log(`B-${n(t.join("&"))}`);const o=`B-${n(t.join("&"))}`;return i.value=`${e} ${o}`,c.value.includes(o)||c.value.push(o),o})(r.class);(e=>{r.focus&&f(e,r.focus)})(`${o}[focus='true']:focus`),(e=>{r.hover&&f(e,r.hover)})(`${o}[hover='true']:hover`),(e=>{r.active&&f(e,r.active)})(`${o}[active='true']:active`),e=o,r.states&&Object.keys(r.states).forEach((t=>{f(`${e}[state="${t}"]`,r.states[t])})),Object.keys(d).forEach((e=>{s.value.sheet.addRule(`.${e}`,d[e])}))}var e,t})),(t,o)=>e.renderSlot(t.$slots,"className",{className:i.value})}}),c=["state"],d=e.defineComponent({__name:"b-view",props:{class:{},state:{type:[String,Boolean]},states:{},bgImg:{},matrix:{}},setup(t){const o=t,a=e.computed((()=>{var e,t,a,r,s,n,l,i;const c=o.bgImg?{backgroundImage:`url(${o.bgImg})`}:{},d=(null==(e=o.matrix)?void 0:e.translate)?`translate(${null==(t=o.matrix)?void 0:t.translate})`:"",u=(null==(a=o.matrix)?void 0:a.scale)?`scale(${null==(r=o.matrix)?void 0:r.scale})`:"",p=(null==(s=o.matrix)?void 0:s.rotate)?`rotate(${null==(n=o.matrix)?void 0:n.rotate})`:"",f=(null==(l=o.matrix)?void 0:l.skew)?`skew(${null==(i=o.matrix)?void 0:i.skew})`:"";return{...c,...o.matrix?{transform:`${d} ${u} ${p} ${f}`}:{}}}));return(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:t.states},{className:e.withCtx((o=>[e.createElementVNode("div",{class:e.normalizeClass(o.className),state:t.state,style:e.normalizeStyle(a.value)},[e.renderSlot(t.$slots,"default")],14,c)])),_:3},8,["class","states"]))}}),u=["state"],p=e.defineComponent({__name:"b-text",props:{class:{},state:{type:[String,Boolean]},states:{}},setup:t=>(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:t.states},{className:e.withCtx((o=>[e.createElementVNode("span",{class:e.normalizeClass(o.className),state:t.state},[e.renderSlot(t.$slots,"default")],10,u)])),_:3},8,["class","states"]))}),f=["onClick","onDblclick","target","hover","state","active","href"],m=e.defineComponent({__name:"b-hot",props:{link:{},class:{},state:{type:[String,Boolean]},states:{},hover:{},active:{},forbid:{type:Boolean},download:{},anchor:{}},emits:["on_click","on_enter","on_move","on_leave","on_dblclick"],setup(t,{emit:o}){const a=t,r=e.ref(),s=e.ref(""),n=e.computed((()=>{const e=a.link;return a.forbid||!e?"javascript: void 0;":0===e.search("http")?(s.value="_blank",e):(e.search(/^(tel|mailto):/),e)})),l=e.computed((()=>a.forbid?"":"pointer")),c=e=>{if(a.anchor){const e=document.querySelector(a.anchor);e&&e.scrollIntoView({behavior:"smooth"})}!a.forbid&&o("on_click",e)},d=e=>{!a.forbid&&o("on_dblclick",e)},u=e=>{o("on_enter",e)},p=e=>{o("on_move",e)},m=e=>{o("on_leave",e)};return e.onMounted((()=>{a.download&&(r.value.download=a.download)})),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:t.states,hover:t.hover,active:t.active},{className:e.withCtx((o=>[e.createElementVNode("a",{style:e.normalizeStyle(`user-select: none; cursor: ${l.value};`),ref_key:"$anchor",ref:r,onMouseenter:u,onTouchstart:u,onMousemove:p,onTouchmove:p,onMouseleave:m,onTouchend:m,onClick:e.withModifiers(c,["stop"]),onDblclick:e.withModifiers(d,["stop"]),target:s.value,class:e.normalizeClass(o.className),hover:!!t.hover||"",state:t.state,active:!!t.active||"",href:n.value},[e.renderSlot(t.$slots,"default")],46,f)])),_:3},8,["class","states","hover","active"]))}}),g=["src","alt"],h=e.defineComponent({__name:"b-img",props:{img:{},class:{},defaultSrc:{},alt:{}},emits:["on_load"],setup(t,{emit:o}){const a=t,r=e.computed((()=>a.img)),s=e.ref(""),n=()=>{a.defaultSrc&&(s.value=a.defaultSrc);const e=new Image;e.onload=()=>{s.value=a.img,o("on_load")},e.src=a.img};return e.watch(r,n),e.onMounted((()=>{n()})),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class)},{className:e.withCtx((o=>[e.createElementVNode("img",{src:s.value,class:e.normalizeClass(o.className),style:{display:"block"},alt:t.alt},null,10,g)])),_:1},8,["class"]))}}),b=e.defineComponent({__name:"ani-success",setup:t=>(t,o)=>(e.openBlock(),e.createBlock(d,{class:"flex-5",matrix:{translate:"0,9px",rotate:"45deg"}},{default:e.withCtx((()=>[e.createVNode(p,{class:"ani-success-part1 w-1 h-3-px bg-color-green round-sm"}),e.createVNode(p,{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,r]of t)o[a]=r;return o};const v=x({},[["render",function(t,o){const a=e.resolveComponent("b-text"),r=e.resolveComponent("b-view");return e.openBlock(),e.createBlock(r,{class:"flex-5"},{default:e.withCtx((()=>[e.createVNode(a,{class:"ani-fail-part1 w-3-px h-1d7 rel l-2-px bg-color-red round-sm"}),e.createVNode(a,{class:"ani-fail-part2 w-3-px h-1d7 rel r-1-px bg-color-red round-sm"})])),_:1})}]]);const y=x({},[["render",function(t,o){const a=e.resolveComponent("b-text"),r=e.resolveComponent("b-view");return e.openBlock(),e.createBlock(r,{class:"flex-5",matrix:{rotate:"90deg"}},{default:e.withCtx((()=>[e.createVNode(a,{class:"ani-notic-part1 w-3-px h-3-px bg-color-blue round"}),e.createVNode(a,{class:"ani-notic-part2 w-1d3 h-3-px mrg-l-4-px bg-color-blue round-sm"})])),_:1})}]]);const w=x({},[["render",function(t,o){const a=e.resolveComponent("b-view");return e.openBlock(),e.createBlock(a,{class:"flex-5"},{default:e.withCtx((()=>[e.createVNode(a,{class:"ani-loading rel w-2d2 h-2d2 round"})])),_:1})}]]),_=e.defineComponent({__name:"b-icon",props:{icon:{},class:{}},setup(t){const o=t;return(t,a)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class)},{className:e.withCtx((a=>[0===t.icon.search("ani_")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},["ani_success"===t.icon?(e.openBlock(),e.createBlock(b,{key:"success"})):e.createCommentVNode("",!0),"ani_fail"===t.icon?(e.openBlock(),e.createBlock(v,{key:"fail"})):e.createCommentVNode("",!0),"ani_notic"===t.icon?(e.openBlock(),e.createBlock(y,{key:"notic"})):e.createCommentVNode("",!0),"ani_loading"===t.icon?(e.openBlock(),e.createBlock(w,{key:"loading"})):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.icon.search("/")>-1?(e.openBlock(),e.createBlock(h,{key:1,img:t.icon,class:e.normalizeClass(a.className)},null,8,["img","class"])):(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(`ico-${o.icon} ${a.className}`)},null,2))])),_:1},8,["class"]))}}),k=["type","name","focus","state","placeholder","maxlength","readonly"],C=e.defineComponent({__name:"b-input",props:{type:{},name:{},class:{},state:{type:[String,Boolean]},states:{},text:{},placeholder:{},maxlength:{},readonly:{type:Boolean},focus:{},rule:{}},emits:["update:text","on_focus","on_blur","on_change"],setup(t,{expose:o,emit:a}){const r=t,s=e.ref(r.text),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:"身份证号输入有误!"}},l=()=>{var e;a("update:text",null==(e=s.value)?void 0:e.trim())},c=e=>{a("on_change",u(),e)},d=e=>{a("on_blur",u(),e)},u=()=>{if(r.rule){const e=n[r.rule.type],t=e?e.regexp:r.rule.type;return{name:r.name,notic:r.rule.notic?r.rule.notic:e?e.notic:`${r.name}格式有误!`,pass:t.test(s.value)}}return!0};return o({check:u}),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),focus:t.focus,states:t.states},{className:e.withCtx((a=>[e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass(a.className),type:t.type,onFocus:o[0]||(o[0]=e=>t.$emit("on_focus",e)),onBlur:d,onChange:c,onInput:l,"onUpdate:modelValue":o[1]||(o[1]=e=>s.value=e),name:t.name,focus:!!t.focus||"",state:t.state,placeholder:t.placeholder,maxlength:t.maxlength,readonly:t.readonly,autocomplete:"off"},null,42,k),[[e.vModelDynamic,s.value]])])),_:1},8,["class","focus","states"]))}}),$=["name","focus","state","placeholder","maxlength","readonly","rows"],B=e.defineComponent({__name:"b-textarea",props:{text:{},name:{},class:{},state:{type:[String,Boolean]},states:{},rows:{},placeholder:{},maxlength:{},readonly:{type:Boolean},focus:{}},emits:["on_focus","on_blur","on_change","update:text"],setup(t,{emit:o}){const a=t,r=e.ref(a.text),s=()=>{o("update:text",r.value.replace(/[\n\r]/g,"<br>"))};return(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),focus:t.focus,states:t.states},{className:e.withCtx((a=>[e.withDirectives(e.createElementVNode("textarea",{class:e.normalizeClass(a.className),onFocus:o[0]||(o[0]=e=>t.$emit("on_focus",e)),onBlur:o[1]||(o[1]=e=>t.$emit("on_blur",e)),onChange:o[2]||(o[2]=e=>t.$emit("on_change",e)),onInput:s,"onUpdate:modelValue":o[3]||(o[3]=e=>r.value=e),name:t.name,focus:!!t.focus||"",state:t.state,placeholder:t.placeholder,maxlength:t.maxlength,readonly:t.readonly,rows:t.rows||7},null,42,$),[[e.vModelText,r.value]])])),_:1},8,["class","focus","states"]))}}),N=["muted","src","autoplay","loop"],z=e.defineComponent({__name:"b-video",props:{video:{},class:{},autoPlay:{type:Boolean},loop:{type:Boolean}},setup(t){const o=e.ref();return(t,a)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class)},{className:e.withCtx((a=>[e.createElementVNode("video",{ref_key:"$video",ref:o,class:e.normalizeClass(a.className),muted:t.autoPlay,src:t.video,autoplay:t.autoPlay,loop:t.loop},null,10,N)])),_:1},8,["class"]))}}),S=["state"],j=e.defineComponent({__name:"b-list",props:{scroll:{},class:{},state:{type:[String,Boolean]},states:{},scrollType:{}},emits:["on_scroll","on_to_top","on_to_bottom"],setup(t,{expose:o,emit:a}){const r=t,s=e.ref(),n=e.computed((()=>r.scrollType?`${r.scrollType}-scroll`:"thin-scroll"));let l={x:0,y:0};return o({reset:()=>{s.value.scrollTop=0}}),e.onMounted((()=>{s.value.onscroll=e=>{const t=e.target.scrollTop,o=e.target.scrollLeft,r=o-l.x,s=t-l.y;let n;Math.abs(r)>=Math.abs(s)?(e.stopPropagation(),n=r>=0?"l2r":"r2l"):n=s>=0?"t2b":"b2t",l.x=o,l.y=t,a("on_scroll",{dir:n,left:o,top:t}),0===t&&a("on_to_top",e),t>=e.target.scrollHeight-e.target.clientHeight-2&&a("on_to_bottom",e)}})),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:t.states},{className:e.withCtx((a=>[e.createElementVNode("div",{class:e.normalizeClass(a.className),style:{position:"relative"},state:t.state},[e.createElementVNode("div",{ref_key:"$list",ref:s,class:e.normalizeClass(n.value),style:e.normalizeStyle(`overflow-x: ${t.scroll.x}; overflow-y: ${t.scroll.y}; width: 100%; height: 100%;`),onTouchmove:o[0]||(o[0]=e.withModifiers((()=>{}),["stop"]))},[e.renderSlot(t.$slots,"default")],38)],10,S)])),_:3},8,["class","states"]))}}),V=["state","draggable"],E=e.defineComponent({__name:"b-drag",props:{class:{},dataInfo:{},dragStart:{},dragOver:{},freeDrag:{type:Boolean}},emits:["on_drag_start","on_drag_end","on_drag_over","on_drag_leave","on_drop","on_move"],setup(t,{emit:o}){const a=t,r=e.ref(),s=e.ref(""),n=e.ref(!1),l=e.ref(!1),c=e.reactive({x:0,y:0}),d=e=>{o("on_drag_start",e),s.value="dragStart",e.dataTransfer.setData("info",JSON.stringify(a.dataInfo))},u=e=>{e.preventDefault(),n.value=!0},p=e=>{o("on_drag_end",e),n.value=!1,s.value=""},f=e=>{e.preventDefault(),o("on_drag_over",e),s.value="dragOver"},m=e=>{o("on_drag_leave",e),s.value=""},g=e=>{o("on_drop",e.dataTransfer.getData("info"),e),s.value=""};let h;const b=e.reactive({x:0,y:0}),x=e.reactive({width:0,height:0}),v=e=>{e.preventDefault(),h||(h=r.value.offsetParent,h.onmousemove=y,h.ontouchmove=y,h.onmouseleave=w,h.onmouseup=w,h.ontouchend=w,Array.prototype.forEach.call(h.children,(e=>{e!==r.value&&(e.style.pointerEvents="none")})),x.width=r.value.offsetWidth,x.height=r.value.offsetHeight),s.value="dragStart",l.value=!0,b.x=e.offsetX,b.y=e.offsetY,r.value.style.pointerEvents="none"},y=e=>{if(!l.value)return;const t=e.offsetX-b.x,a=e.offsetY-b.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)},w=()=>{l.value&&(s.value="",l.value=!1,b.x=0,b.y=0,r.value.style.pointerEvents="auto")};return e.onMounted((()=>{(()=>{const e=r.value;a.freeDrag?(e.onmousedown=v,e.ontouchstart=v):(e.ondragstart=d,e.ondrag=u,e.ondragend=p,e.ondragover=f,e.ondragleave=m,e.ondrop=g)})()})),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:{dragStart:t.dragStart,dragOver:t.dragOver}},{className:e.withCtx((o=>[e.createElementVNode("div",{style:e.normalizeStyle({cursor:t.dragOver?"default":"move",visibility:n.value?"hidden":"visible",position:t.freeDrag?"absolute":"relative",left:0,top:0,transform:`translate(${c.x}px, ${c.y}px)`}),ref_key:"$el",ref:r,class:e.normalizeClass(o.className),state:s.value,draggable:!!t.dragStart},[e.renderSlot(t.$slots,"default")],14,V)])),_:3},8,["class","states"]))}}),M=["src"],T=[i,d,p,m,h,_,z,j,e.defineComponent({__name:"b-webview",props:{src:{},class:{}},setup:t=>(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class)},{className:e.withCtx((o=>[e.createElementVNode("iframe",{class:e.normalizeClass(o.className),frameborder:"0",src:t.src},null,10,M)])),_:1},8,["class"]))}),C,E,B];return{name:"btxui",install(e){T.forEach((t=>{e.component(t.__name,t)}))}}}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).btxui=t(e.vue)}(this,(function(e){"use strict";const t={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;",wrap:"flex-wrap: wrap;",flex:"display: flex; justify-content: flex-start; align-items: stretch;","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;",grid:"display: flex; flex-wrap: wrap; align-content: flex-start;","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%;",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;","bg-repeat":"background-repeat: repeat;","bg-repeat-x":"background-repeat: repeat-x;","bg-repeat-y":"background-repeat: repeat-y;","bg-size-cover":"background-size: cover;","bg-size-contain":"background-size: contain;","bg-size-max":"background-size: 100% 100%;","bg-size-max-h":"background-size: auto 100%;","bg-size-max-w":"background-size: 100% auto;","bg-pos-1":"background-position: left top;","bg-pos-2":"background-position: center top;","bg-pos-3":"background-position: right top;","bg-pos-4":"background-position: left center;","bg-pos-5":"background-position: center center;","bg-pos-6":"background-position: right center;","bg-pos-7":"background-position: left bottom;","bg-pos-8":"background-position: center bottom;","bg-pos-9":"background-position: right bottom;","bg-fixed":"background-attachment: scroll;",round:"border-radius: 50%;","round-lg":"borderRadius: 24px;","round-md":"border-radius: 10px;","round-sm":"border-radius: 4px;","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;",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;","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%);","gray-no":"filter: grayscale(0%);","gray-sm":"filter: grayscale(40%);","gray-md":"filter: grayscale(70%);","gray-lg":"filter: grayscale(100%);","bg-none":"pointerEvents: none;","bg-use":"pointerEvents: 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;","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;",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"},lspace:{pro:"letter-spacing",unit:"rem"},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"},rule_2:{column:{pro:"columnCount",extra:{columnGap:0}}},rule_3:{gradient:{pro:["Image"],tmp:"-webkit-linear-gradient(%{}%)"}}},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}}};var a,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s={};a={get exports(){return s},set exports(e){s=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,r,s,n){return t((l=t(t(o,e),t(r,n)))<<(i=s)|l>>>32-i,a);var l,i}function r(e,t,a,r,s,n,l){return o(t&a|~t&r,e,t,s,n,l)}function s(e,t,a,r,s,n,l){return o(t&r|a&~r,e,t,s,n,l)}function n(e,t,a,r,s,n,l){return o(t^a^r,e,t,s,n,l)}function l(e,t,a,r,s,n,l){return o(a^(t|~r),e,t,s,n,l)}function i(e,o){var a,i,c,d,u;e[o>>5]|=128<<o%32,e[14+(o+64>>>9<<4)]=o;var p=1732584193,f=-271733879,m=-1732584194,g=271733878;for(a=0;a<e.length;a+=16)i=p,c=f,d=m,u=g,p=r(p,f,m,g,e[a],7,-680876936),g=r(g,p,f,m,e[a+1],12,-389564586),m=r(m,g,p,f,e[a+2],17,606105819),f=r(f,m,g,p,e[a+3],22,-1044525330),p=r(p,f,m,g,e[a+4],7,-176418897),g=r(g,p,f,m,e[a+5],12,1200080426),m=r(m,g,p,f,e[a+6],17,-1473231341),f=r(f,m,g,p,e[a+7],22,-45705983),p=r(p,f,m,g,e[a+8],7,1770035416),g=r(g,p,f,m,e[a+9],12,-1958414417),m=r(m,g,p,f,e[a+10],17,-42063),f=r(f,m,g,p,e[a+11],22,-1990404162),p=r(p,f,m,g,e[a+12],7,1804603682),g=r(g,p,f,m,e[a+13],12,-40341101),m=r(m,g,p,f,e[a+14],17,-1502002290),p=s(p,f=r(f,m,g,p,e[a+15],22,1236535329),m,g,e[a+1],5,-165796510),g=s(g,p,f,m,e[a+6],9,-1069501632),m=s(m,g,p,f,e[a+11],14,643717713),f=s(f,m,g,p,e[a],20,-373897302),p=s(p,f,m,g,e[a+5],5,-701558691),g=s(g,p,f,m,e[a+10],9,38016083),m=s(m,g,p,f,e[a+15],14,-660478335),f=s(f,m,g,p,e[a+4],20,-405537848),p=s(p,f,m,g,e[a+9],5,568446438),g=s(g,p,f,m,e[a+14],9,-1019803690),m=s(m,g,p,f,e[a+3],14,-187363961),f=s(f,m,g,p,e[a+8],20,1163531501),p=s(p,f,m,g,e[a+13],5,-1444681467),g=s(g,p,f,m,e[a+2],9,-51403784),m=s(m,g,p,f,e[a+7],14,1735328473),p=n(p,f=s(f,m,g,p,e[a+12],20,-1926607734),m,g,e[a+5],4,-378558),g=n(g,p,f,m,e[a+8],11,-2022574463),m=n(m,g,p,f,e[a+11],16,1839030562),f=n(f,m,g,p,e[a+14],23,-35309556),p=n(p,f,m,g,e[a+1],4,-1530992060),g=n(g,p,f,m,e[a+4],11,1272893353),m=n(m,g,p,f,e[a+7],16,-155497632),f=n(f,m,g,p,e[a+10],23,-1094730640),p=n(p,f,m,g,e[a+13],4,681279174),g=n(g,p,f,m,e[a],11,-358537222),m=n(m,g,p,f,e[a+3],16,-722521979),f=n(f,m,g,p,e[a+6],23,76029189),p=n(p,f,m,g,e[a+9],4,-640364487),g=n(g,p,f,m,e[a+12],11,-421815835),m=n(m,g,p,f,e[a+15],16,530742520),p=l(p,f=n(f,m,g,p,e[a+2],23,-995338651),m,g,e[a],6,-198630844),g=l(g,p,f,m,e[a+7],10,1126891415),m=l(m,g,p,f,e[a+14],15,-1416354905),f=l(f,m,g,p,e[a+5],21,-57434055),p=l(p,f,m,g,e[a+12],6,1700485571),g=l(g,p,f,m,e[a+3],10,-1894986606),m=l(m,g,p,f,e[a+10],15,-1051523),f=l(f,m,g,p,e[a+1],21,-2054922799),p=l(p,f,m,g,e[a+8],6,1873313359),g=l(g,p,f,m,e[a+15],10,-30611744),m=l(m,g,p,f,e[a+6],15,-1560198380),f=l(f,m,g,p,e[a+13],21,1309151649),p=l(p,f,m,g,e[a+4],6,-145523070),g=l(g,p,f,m,e[a+11],10,-1120210379),m=l(m,g,p,f,e[a+2],15,718787259),f=l(f,m,g,p,e[a+9],21,-343485551),p=t(p,i),f=t(f,c),m=t(m,d),g=t(g,u);return[p,f,m,g]}function c(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",r="";for(o=0;o<e.length;o+=1)t=e.charCodeAt(o),r+=a.charAt(t>>>4&15)+a.charAt(15&t);return r}function p(e){return unescape(encodeURIComponent(e))}function f(e){return function(e){return c(i(d(e),8*e.length))}(p(e))}function m(e,t){return function(e,t){var o,a,r=d(e),s=[],n=[];for(s[15]=n[15]=void 0,r.length>16&&(r=i(r,8*e.length)),o=0;o<16;o+=1)s[o]=909522486^r[o],n[o]=1549556828^r[o];return a=i(s.concat(d(t)),512+8*t.length),c(i(n.concat(a),640))}(p(e),p(t))}function g(e,t,o){return t?o?m(t,e):u(m(t,e)):o?f(e):u(f(e))}a.exports?a.exports=g:e.md5=g}(r);const n=s,l="BTXUIGlobal",i=e.defineComponent({__name:"b-style",props:{class:{},focus:{},hover:{},active:{},states:{}},setup(a){const r=a,s=e.ref(),i=e.ref(""),c=e.computed((()=>{const e=[];for(let t of s.value.sheet.rules)e.push(t.selectorText.substr(1));return e})),d=e.reactive({}),u=e=>{if(e&&0===e.search("_"))return e.substr(1);const t=(e=>{if(!isNaN(1*e))return e;let t=e;return/^f\d+$/.test(t)&&(t=-1*t.substr(1)),/^\d*d\d+$/.test(t)&&(t=1*t.replace("d",".")),!isNaN(t)&&t})(e);if(!1!==t)return t;const a=(e=>o.colors[e]?o.colors[e]:!(!e||0!==e.search("C"))&&`#${e.substr(1)}`)(e);return!1!==a&&a},p=e=>{if(!e)return"";return e.split(" ").reduce(((e,o)=>{const a=(e=>{let o=t[e];if(o)return o;const a=e.split("-"),r={l:["left"],t:["top"],r:["right"],b:["bottom"],v:["top","bottom"],h:["left","right"]};let[s,n,l,i]=a;if(o=t[s],o){let e=u(n);if(e)return`${o.pro}: ${e}${l||o.unit||""}`;if(e=u(l),e){const t=r[n];if(t){let a="";return t.forEach((t=>{a+=`${o.pro}-${t}: ${e}${i||o.unit||""};`})),a}return`${o.pro}-${n}: ${e}${i||o.unit||""}`}}})(o);if(a)return e+=`${a};`}),"").replace(/;+/g,";")},f=(e,t)=>{const o=p(t);o&&(c.value.includes(e)||(c.value.push(e),d[e]=o))};return e.onMounted((()=>{if(r.class){(()=>{let e=document.head.querySelector(`#${l}`);e||(e=document.createElement("style"),e.setAttribute("type","text/css"),e.setAttribute("id",l),document.head.appendChild(e)),s.value=e})(),(t=r.class)&&t.split(" ").forEach((e=>{f(e,e)}));const o=(e=>{const t=e.split(" ").sort(),o=`B-${n(t.join("&"))}`;return i.value=`${e} ${o}`,c.value.includes(o)||c.value.push(o),o})(r.class);(e=>{r.focus&&f(e,r.focus)})(`${o}[focus='true']:focus`),(e=>{r.hover&&f(e,r.hover)})(`${o}[hover='true']:hover`),(e=>{r.active&&f(e,r.active)})(`${o}[active='true']:active`),e=o,r.states&&Object.keys(r.states).forEach((t=>{f(`${e}[state="${t}"]`,r.states[t])})),Object.keys(d).forEach((e=>{s.value.sheet.addRule(`.${e}`,d[e])}))}var e,t})),(t,o)=>e.renderSlot(t.$slots,"className",{className:i.value})}}),c=["state"],d=e.defineComponent({__name:"b-view",props:{class:{},state:{type:[String,Boolean]},states:{},bgImg:{},matrix:{}},setup(t){const o=t,a=e.computed((()=>{var e,t,a,r,s,n,l,i;const c=o.bgImg?{backgroundImage:`url(${o.bgImg})`}:{},d=(null==(e=o.matrix)?void 0:e.translate)?`translate(${null==(t=o.matrix)?void 0:t.translate})`:"",u=(null==(a=o.matrix)?void 0:a.scale)?`scale(${null==(r=o.matrix)?void 0:r.scale})`:"",p=(null==(s=o.matrix)?void 0:s.rotate)?`rotate(${null==(n=o.matrix)?void 0:n.rotate})`:"",f=(null==(l=o.matrix)?void 0:l.skew)?`skew(${null==(i=o.matrix)?void 0:i.skew})`:"";return{...c,...o.matrix?{transform:`${d} ${u} ${p} ${f}`}:{}}}));return(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:t.states},{className:e.withCtx((o=>[e.createElementVNode("div",{class:e.normalizeClass(o.className),state:t.state,style:e.normalizeStyle(a.value)},[e.renderSlot(t.$slots,"default")],14,c)])),_:3},8,["class","states"]))}}),u=["state"],p=e.defineComponent({__name:"b-text",props:{class:{},state:{type:[String,Boolean]},states:{}},setup:t=>(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:t.states},{className:e.withCtx((o=>[e.createElementVNode("span",{class:e.normalizeClass(o.className),state:t.state},[e.renderSlot(t.$slots,"default")],10,u)])),_:3},8,["class","states"]))}),f=["onClick","onDblclick","target","hover","state","active","href"],m=e.defineComponent({__name:"b-hot",props:{link:{},class:{},state:{type:[String,Boolean]},states:{},hover:{},active:{},forbid:{type:Boolean},download:{},anchor:{}},emits:["on_click","on_enter","on_move","on_leave","on_dblclick"],setup(t,{emit:o}){const a=t,r=e.ref(),s=e.ref(""),n=e.computed((()=>{const e=a.link;return a.forbid||!e?"javascript: void 0;":0===e.search("http")?(s.value="_blank",e):(e.search(/^(tel|mailto):/),e)})),l=e.computed((()=>a.forbid?"":"pointer")),c=e=>{if(a.anchor){const e=document.querySelector(a.anchor);e&&e.scrollIntoView({behavior:"smooth"})}!a.forbid&&o("on_click",e)},d=e=>{!a.forbid&&o("on_dblclick",e)},u=e=>{o("on_enter",e)},p=e=>{o("on_move",e)},m=e=>{o("on_leave",e)};return e.onMounted((()=>{a.download&&(r.value.download=a.download)})),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:t.states,hover:t.hover,active:t.active},{className:e.withCtx((o=>[e.createElementVNode("a",{style:e.normalizeStyle(`user-select: none; cursor: ${l.value};`),ref_key:"$anchor",ref:r,onMouseenter:u,onTouchstart:u,onMousemove:p,onTouchmove:p,onMouseleave:m,onTouchend:m,onClick:e.withModifiers(c,["stop"]),onDblclick:e.withModifiers(d,["stop"]),target:s.value,class:e.normalizeClass(o.className),hover:!!t.hover||"",state:t.state,active:!!t.active||"",href:n.value},[e.renderSlot(t.$slots,"default")],46,f)])),_:3},8,["class","states","hover","active"]))}}),g=["src","alt"],h=e.defineComponent({__name:"b-img",props:{img:{},class:{},defaultSrc:{},alt:{}},emits:["on_load"],setup(t,{emit:o}){const a=t,r=e.computed((()=>a.img)),s=e.ref(""),n=()=>{a.defaultSrc&&(s.value=a.defaultSrc);const e=new Image;e.onload=()=>{s.value=a.img,o("on_load")},e.src=a.img};return e.watch(r,n),e.onMounted((()=>{n()})),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class)},{className:e.withCtx((o=>[e.createElementVNode("img",{src:s.value,class:e.normalizeClass(o.className),style:{display:"block"},alt:t.alt},null,10,g)])),_:1},8,["class"]))}}),b=e.defineComponent({__name:"ani-success",setup:t=>(t,o)=>(e.openBlock(),e.createBlock(d,{class:"flex-5",matrix:{translate:"0,9px",rotate:"45deg"}},{default:e.withCtx((()=>[e.createVNode(p,{class:"ani-success-part1 w-1 h-3-px bg-color-green round-sm"}),e.createVNode(p,{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,r]of t)o[a]=r;return o};const v=x({},[["render",function(t,o){const a=e.resolveComponent("b-text"),r=e.resolveComponent("b-view");return e.openBlock(),e.createBlock(r,{class:"flex-5"},{default:e.withCtx((()=>[e.createVNode(a,{class:"ani-fail-part1 w-3-px h-1d7 rel l-2-px bg-color-red round-sm"}),e.createVNode(a,{class:"ani-fail-part2 w-3-px h-1d7 rel r-1-px bg-color-red round-sm"})])),_:1})}]]);const y=x({},[["render",function(t,o){const a=e.resolveComponent("b-text"),r=e.resolveComponent("b-view");return e.openBlock(),e.createBlock(r,{class:"flex-5",matrix:{rotate:"90deg"}},{default:e.withCtx((()=>[e.createVNode(a,{class:"ani-notic-part1 w-3-px h-3-px bg-color-blue round"}),e.createVNode(a,{class:"ani-notic-part2 w-1d3 h-3-px mrg-l-4-px bg-color-blue round-sm"})])),_:1})}]]);const w=x({},[["render",function(t,o){const a=e.resolveComponent("b-view");return e.openBlock(),e.createBlock(a,{class:"flex-5"},{default:e.withCtx((()=>[e.createVNode(a,{class:"ani-loading rel w-2d2 h-2d2 round"})])),_:1})}]]),_=e.defineComponent({__name:"b-icon",props:{icon:{},class:{}},setup(t){const o=t;return(t,a)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class)},{className:e.withCtx((a=>[0===t.icon.search("ani_")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},["ani_success"===t.icon?(e.openBlock(),e.createBlock(b,{key:"success"})):e.createCommentVNode("",!0),"ani_fail"===t.icon?(e.openBlock(),e.createBlock(v,{key:"fail"})):e.createCommentVNode("",!0),"ani_notic"===t.icon?(e.openBlock(),e.createBlock(y,{key:"notic"})):e.createCommentVNode("",!0),"ani_loading"===t.icon?(e.openBlock(),e.createBlock(w,{key:"loading"})):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.icon.search("/")>-1?(e.openBlock(),e.createBlock(h,{key:1,img:t.icon,class:e.normalizeClass(a.className)},null,8,["img","class"])):(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(`ico-${o.icon} ${a.className}`)},null,2))])),_:1},8,["class"]))}}),k=["type","name","focus","state","placeholder","maxlength","readonly"],C=e.defineComponent({__name:"b-input",props:{type:{},name:{},class:{},state:{type:[String,Boolean]},states:{},text:{},placeholder:{},maxlength:{},readonly:{type:Boolean},focus:{},rule:{}},emits:["update:text","on_focus","on_blur","on_change"],setup(t,{expose:o,emit:a}){const r=t,s=e.ref(r.text),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:"身份证号输入有误!"}},l=()=>{var e;a("update:text",null==(e=s.value)?void 0:e.trim())},c=e=>{a("on_change",u(),e)},d=e=>{a("on_blur",u(),e)},u=()=>{if(r.rule){const e=n[r.rule.type],t=e?e.regexp:r.rule.type;return{name:r.name,notic:r.rule.notic?r.rule.notic:e?e.notic:`${r.name}格式有误!`,pass:t.test(s.value)}}return!0};return o({check:u}),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),focus:t.focus,states:t.states},{className:e.withCtx((a=>[e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass(a.className),type:t.type,onFocus:o[0]||(o[0]=e=>t.$emit("on_focus",e)),onBlur:d,onChange:c,onInput:l,"onUpdate:modelValue":o[1]||(o[1]=e=>s.value=e),name:t.name,focus:!!t.focus||"",state:t.state,placeholder:t.placeholder,maxlength:t.maxlength,readonly:t.readonly,autocomplete:"off"},null,42,k),[[e.vModelDynamic,s.value]])])),_:1},8,["class","focus","states"]))}}),$=["name","focus","state","placeholder","maxlength","readonly","rows"],B=e.defineComponent({__name:"b-textarea",props:{text:{},name:{},class:{},state:{type:[String,Boolean]},states:{},rows:{},placeholder:{},maxlength:{},readonly:{type:Boolean},focus:{}},emits:["on_focus","on_blur","on_change","update:text"],setup(t,{emit:o}){const a=t,r=e.ref(a.text),s=()=>{o("update:text",r.value.replace(/[\n\r]/g,"<br>"))};return(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),focus:t.focus,states:t.states},{className:e.withCtx((a=>[e.withDirectives(e.createElementVNode("textarea",{class:e.normalizeClass(a.className),onFocus:o[0]||(o[0]=e=>t.$emit("on_focus",e)),onBlur:o[1]||(o[1]=e=>t.$emit("on_blur",e)),onChange:o[2]||(o[2]=e=>t.$emit("on_change",e)),onInput:s,"onUpdate:modelValue":o[3]||(o[3]=e=>r.value=e),name:t.name,focus:!!t.focus||"",state:t.state,placeholder:t.placeholder,maxlength:t.maxlength,readonly:t.readonly,rows:t.rows||7},null,42,$),[[e.vModelText,r.value]])])),_:1},8,["class","focus","states"]))}}),N=["muted","src","autoplay","loop"],z=e.defineComponent({__name:"b-video",props:{video:{},class:{},autoPlay:{type:Boolean},loop:{type:Boolean}},setup(t){const o=e.ref();return(t,a)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class)},{className:e.withCtx((a=>[e.createElementVNode("video",{ref_key:"$video",ref:o,class:e.normalizeClass(a.className),muted:t.autoPlay,src:t.video,autoplay:t.autoPlay,loop:t.loop},null,10,N)])),_:1},8,["class"]))}}),S=["state"],j=e.defineComponent({__name:"b-list",props:{scroll:{},class:{},state:{type:[String,Boolean]},states:{},scrollType:{}},emits:["on_scroll","on_to_top","on_to_bottom"],setup(t,{expose:o,emit:a}){const r=t,s=e.ref(),n=e.computed((()=>r.scrollType?`${r.scrollType}-scroll`:"thin-scroll"));let l={x:0,y:0};return o({reset:()=>{s.value.scrollTop=0}}),e.onMounted((()=>{s.value.onscroll=e=>{const t=e.target.scrollTop,o=e.target.scrollLeft,r=o-l.x,s=t-l.y;let n;Math.abs(r)>=Math.abs(s)?(e.stopPropagation(),n=r>=0?"l2r":"r2l"):n=s>=0?"t2b":"b2t",l.x=o,l.y=t,a("on_scroll",{dir:n,left:o,top:t}),0===t&&a("on_to_top",e),t>=e.target.scrollHeight-e.target.clientHeight-2&&a("on_to_bottom",e)}})),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:t.states},{className:e.withCtx((a=>[e.createElementVNode("div",{class:e.normalizeClass(a.className),style:{position:"relative"},state:t.state},[e.createElementVNode("div",{ref_key:"$list",ref:s,class:e.normalizeClass(n.value),style:e.normalizeStyle(`overflow-x: ${t.scroll.x}; overflow-y: ${t.scroll.y}; width: 100%; height: 100%;`),onTouchmove:o[0]||(o[0]=e.withModifiers((()=>{}),["stop"]))},[e.renderSlot(t.$slots,"default")],38)],10,S)])),_:3},8,["class","states"]))}}),V=["state","draggable"],E=e.defineComponent({__name:"b-drag",props:{class:{},dataInfo:{},dragStart:{},dragOver:{},freeDrag:{type:Boolean}},emits:["on_drag_start","on_drag_end","on_drag_over","on_drag_leave","on_drop","on_move"],setup(t,{emit:o}){const a=t,r=e.ref(),s=e.ref(""),n=e.ref(!1),l=e.ref(!1),c=e.reactive({x:0,y:0}),d=e=>{o("on_drag_start",e),s.value="dragStart",e.dataTransfer.setData("info",JSON.stringify(a.dataInfo))},u=e=>{e.preventDefault(),n.value=!0},p=e=>{o("on_drag_end",e),n.value=!1,s.value=""},f=e=>{e.preventDefault(),o("on_drag_over",e),s.value="dragOver"},m=e=>{o("on_drag_leave",e),s.value=""},g=e=>{o("on_drop",e.dataTransfer.getData("info"),e),s.value=""};let h;const b=e.reactive({x:0,y:0}),x=e.reactive({width:0,height:0}),v=e=>{e.preventDefault(),h||(h=r.value.offsetParent,h.onmousemove=y,h.ontouchmove=y,h.onmouseleave=w,h.onmouseup=w,h.ontouchend=w,Array.prototype.forEach.call(h.children,(e=>{e!==r.value&&(e.style.pointerEvents="none")})),x.width=r.value.offsetWidth,x.height=r.value.offsetHeight),s.value="dragStart",l.value=!0,b.x=e.offsetX,b.y=e.offsetY,r.value.style.pointerEvents="none"},y=e=>{if(!l.value)return;const t=e.offsetX-b.x,a=e.offsetY-b.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)},w=()=>{l.value&&(s.value="",l.value=!1,b.x=0,b.y=0,r.value.style.pointerEvents="auto")};return e.onMounted((()=>{(()=>{const e=r.value;a.freeDrag?(e.onmousedown=v,e.ontouchstart=v):(e.ondragstart=d,e.ondrag=u,e.ondragend=p,e.ondragover=f,e.ondragleave=m,e.ondrop=g)})()})),(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class),states:{dragStart:t.dragStart,dragOver:t.dragOver}},{className:e.withCtx((o=>[e.createElementVNode("div",{style:e.normalizeStyle({cursor:t.dragOver?"default":"move",visibility:n.value?"hidden":"visible",position:t.freeDrag?"absolute":"relative",left:0,top:0,transform:`translate(${c.x}px, ${c.y}px)`}),ref_key:"$el",ref:r,class:e.normalizeClass(o.className),state:s.value,draggable:!!t.dragStart},[e.renderSlot(t.$slots,"default")],14,V)])),_:3},8,["class","states"]))}}),M=["src"],T=[i,d,p,m,h,_,z,j,e.defineComponent({__name:"b-webview",props:{src:{},class:{}},setup:t=>(t,o)=>(e.openBlock(),e.createBlock(i,{class:e.normalizeClass(t.class)},{className:e.withCtx((o=>[e.createElementVNode("iframe",{class:e.normalizeClass(o.className),frameborder:"0",src:t.src},null,10,M)])),_:1},8,["class"]))}),C,E,B];return{name:"btxui",install(e){T.forEach((t=>{e.component(t.__name,t)}))}}}));
|