@xto/data 1.6.3 → 1.7.0
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/es/Card/types.d.ts +2 -2
- package/es/Carousel/types.d.ts +1 -1
- package/es/Descriptions/types.d.ts +1 -1
- package/es/DynamicTable/index.vue.d.ts +1 -1
- package/es/QRCode/index.vue.d.ts +1 -1
- package/es/Table/index.vue.d.ts +1 -1
- package/es/Timeline/types.d.ts +1 -1
- package/es/Tree/index.d.ts +26 -1
- package/es/Tree/index.vue.d.ts +1 -1
- package/es/Tree/src/useTree.d.ts +2 -75
- package/es/TreeTable/index.vue.d.ts +2 -2
- package/es/index.d.ts +7 -2
- package/es/index.mjs +1376 -1365
- package/es/style.css +1 -1
- package/lib/index.cjs +3 -3
- package/lib/style.css +1 -1
- package/package.json +5 -3
package/lib/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("@xto/core"),ae={"arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up-bold":"M12 5l-7 7h4v7h6v-7h4l-7-7z","arrow-down-bold":"M12 19l7-7h-4V5H9v7H5l7 7z","arrow-left-bold":"M5 12l7-7v4h7v6h-7v4l-7-7z","arrow-right-bold":"M19 12l-7 7v-4H5v-6h7V5l7 7z","caret-down":"M6 9l6 6 6-6","caret-right":"M9 18l6-6-6-6",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",close:"M6 18L18 6M6 6l12 12",check:"M5 13l4 4L19 7","check-bold":"M4 12l5 5L20 6",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",delete:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",more:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z","more-h":"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z",setting:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",share:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",loading:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",question:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z","user-add":"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z","user-group":"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",logout:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1",login:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z","folder-open":"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",document:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",video:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",music:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",camera:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",chat:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",message:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z",eye:"M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z","eye-off":"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",history:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",timer:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",location:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",map:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",globe:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z","thumb-up":"M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",lock:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",unlock:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",key:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",menu:"M4 6h16M4 12h16M4 18h16","menu-fold":"M4 6h16M4 12h10M4 18h16","menu-unfold":"M4 6h16M10 12h10M4 18h16","menu-collapse":"M4 6h16M4 12h10M4 18h16","menu-expand":"M4 6h16M10 12h10M4 18h16","sidebar-fold":"M11 19l-7-7 7-7m8 14l-7-7 7-7","sidebar-expand":"M13 5l7 7-7 7M5 5l7 7-7 7","sidebar-left":"M11 19l-7-7 7-7m8 14l-7-7 7-7",dashboard:"M4 5a1 1 0 011-1h4a1 1 0 011 1v5a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v2a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 12a1 1 0 011-1h4a1 1 0 011 1v7a1 1 0 01-1 1h-4a1 1 0 01-1-1v-7z",chart:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z","chart-pie":"M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z","chart-line":"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4v16",report:"M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",analytics:"M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",system:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M12 15a3 3 0 100-6 3 3 0 000 6z",permission:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",role:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z","user-manage":"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",log:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",app:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",list:"M4 6h16M4 10h16M4 14h16M4 18h16",grid:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",fullscreen:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4","fullscreen-exit":"M9 4V9H4m11-5v5h5M4 15h5v5m11-5h-5v5","zoom-in":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7","zoom-out":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",print:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",bookmark:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",tag:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",code:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",terminal:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",database:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",server:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",cloud:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",gift:"M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7",moon:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",sun:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",theme:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01",skin:"M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z",heading:"M4 6h16M4 12h8m-8 6h16",bold:"M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z",italic:"M10 4h4m-2 0v16m-4 0h8",strikethrough:"M16 4H8a4 4 0 00-4 4v4h16V8a4 4 0 00-4-4zM4 12h16m-4 4H8a4 4 0 00-4 4v0a4 4 0 004 4h8a4 4 0 004-4v0a4 4 0 00-4-4z","list-bullet":"M4 6h.01M4 12h.01M4 18h.01M8 6h12M8 12h12M8 18h12","list-number":"M4 6h2M4 12h2M4 18h2M8 6h12M8 12h12M8 18h12","link-text":"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","image-insert":"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z","code-inline":"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4","divider-h":"M4 12h16",quote:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z","code-block":"M4 4h16v16H4z M8 8h8M8 12h8M8 16h4","sort-up":"M12 5v14m-7-7l7-7 7 7","sort-down":"M12 19V5m7 7l-7 7-7-7","chevron-down":"M6 9l6 6 6-6","chevron-right":"M9 18l6-6-6-6","chevron-up":"M18 15l-6-6-6 6","chevron-left":"M15 18l-6-6 6-6","move-up":"M5 15l7-7 7 7","move-down":"M19 9l-7 7-7-7","back-top":"M12 19V5m-7 7l7-7 7 7","dropdown-arrow":"M6 9l6 6 6-6","close-circle":"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z","close-bold":"M6 18L18 6M6 6l12 12","check-circle":"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z","info-circle":"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z","warning-circle":"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z","back-arrow":"M19 12H5m0 0l7 7m-7-7l7-7","d-arrow-left":"M11 17l-5-5 5-5M18 17l-5-5 5-5","d-arrow-right":"M6 7l5 5-5 5M13 7l5 5-5 5",left:"M15 19l-7-7 7-7",right:"M9 5l7 7-7 7",down:"M19 9l-7 7-7-7",up:"M5 15l7-7 7 7"};function ce(s){return s in ae}const de=["aria-hidden","aria-label"],ue=["stroke-width"],fe=["d"],_=e.defineComponent({name:"XIcon",__name:"index",props:{name:{},size:{default:24},color:{},spin:{type:Boolean,default:!1},strokeWidth:{default:2}},setup(s,{expose:i}){const l=s,t=j.useNamespace("icon"),r=e.computed(()=>typeof l.size=="number"?`${l.size}px`:l.size),o=e.computed(()=>({width:r.value,height:r.value,color:l.color})),n=e.computed(()=>({strokeWidth:l.strokeWidth})),a=e.computed(()=>[t.b(),t.is("spin",l.spin)]),c=e.computed(()=>l.name&&ce(l.name)?ae[l.name]:"");return i({iconSize:r,iconStyle:o,iconPath:c}),(M,y)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(a.value),style:e.normalizeStyle(o.value),"aria-hidden":!s.name,"aria-label":s.name,role:"img"},[c.value?(e.openBlock(),e.createElementBlock("svg",{key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":s.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle(n.value),"aria-hidden":"true"},[e.createElementVNode("path",{d:c.value},null,8,fe)],12,ue)):e.renderSlot(M.$slots,"default",{key:1},()=>[e.createTextVNode(e.toDisplayString(s.name),1)])],14,de))}}),me=e.defineComponent({name:"XTag",__name:"index",props:{type:{default:""},size:{default:"default"},effect:{default:"light"},closable:{type:Boolean,default:!1},hit:{type:Boolean,default:!1},color:{}},emits:["close"],setup(s,{emit:i}){const l=s,t=i,r=j.useNamespace("tag"),o=e.computed(()=>[r.b(),r.m(l.type||"primary"),l.size!=="default"?r.m(l.size):"",r.m(l.effect),r.is("hit",l.hit)]),n=e.computed(()=>l.color?{backgroundColor:l.effect==="dark"?l.color:"",borderColor:l.color,color:l.effect==="dark"?"#fff":l.color}:{}),a=c=>{t("close",c)};return(c,M)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(o.value),style:e.normalizeStyle(n.value)},[e.renderSlot(c.$slots,"default"),s.closable?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(e.unref(r).e("close")),onClick:a},[e.createVNode(e.unref(_),{name:"close",size:10})],2)):e.createCommentVNode("",!0)],6))}}),he=e.defineComponent({name:"XCard",__name:"index",props:{header:{},bodyStyle:{default:()=>({padding:"4px"})},shadow:{default:"always"}},setup(s){const i=s,l=j.useNamespace("card"),t=e.computed(()=>[l.b(),l.is(`shadow-${i.shadow}`)]);return(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value)},[s.header||r.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("header"))},[e.renderSlot(r.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(s.header),1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("body")),style:e.normalizeStyle(s.bodyStyle)},[e.renderSlot(r.$slots,"default")],6)],2))}}),pe=["viewBox"],ge=["cx","cy","r","stroke-width"],ve=["cx","cy","r","stroke-width","stroke-dasharray","stroke"],ke=e.defineComponent({name:"XProgress",__name:"index",props:{percentage:{default:0},type:{default:"line"},status:{default:""},strokeWidth:{default:6},color:{type:[String,Array,Function],default:"#4F46E5"},width:{default:126},showText:{type:Boolean,default:!0}},setup(s){const i=s,l=j.useNamespace("progress"),t=e.computed(()=>Math.min(100,Math.max(0,i.percentage))),r=e.computed(()=>({width:`${t.value}%`,backgroundColor:typeof i.color=="function"?i.color(t.value):i.color})),o=e.computed(()=>[l.b(),l.m(i.type),l.is("show-text",i.showText),l.is(`status-${i.status||""}`,i.status)]);return e.computed(()=>i.status==="success"?"100%":i.status==="warning"?"Warning":i.status==="exception"?"Exception":`${t.value}%`),(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.value)},[s.type==="line"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("line"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("outer"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("inner"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("bar")),style:e.normalizeStyle(r.value)},null,6)],2)],2),s.showText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("text"))},e.toDisplayString(t.value)+"% ",3)):e.createCommentVNode("",!0)],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("circle"))},[(e.openBlock(),e.createElementBlock("svg",{viewBox:`0 0 ${s.width} ${s.width}`,style:e.normalizeStyle({width:`${s.width}px`,height:`${s.width}px`})},[e.createElementVNode("circle",{cx:s.width/2,cy:s.width/2,r:(s.width-s.strokeWidth)/2,fill:"none","stroke-width":s.strokeWidth,stroke:"var(--xto-fill-color, #F2F3F5)"},null,8,ge),e.createElementVNode("circle",{cx:s.width/2,cy:s.width/2,r:(s.width-s.strokeWidth)/2,fill:"none","stroke-width":s.strokeWidth,"stroke-dasharray":`${t.value/100*Math.PI*(s.width-s.strokeWidth)} ${Math.PI*(s.width-s.strokeWidth)}`,stroke:typeof s.color=="function"?s.color(t.value):s.color,"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"center"}},null,8,ve)],12,pe)),s.showText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("circle-text"))},e.toDisplayString(t.value)+"% ",3)):e.createCommentVNode("",!0)],2))],2))}}),ye=["disabled"],Ce=["onClick"],Me=["disabled"],we=["value"],xe=["value"],re=e.defineComponent({name:"XPagination",__name:"index",props:{total:{default:0},pageSize:{default:10},currentPage:{default:1},pageSizes:{default:()=>[10,20,50,100]},layout:{default:"total, sizes, prev, pager, next, jumper"}},emits:["update:currentPage","update:pageSize","current-change","size-change"],setup(s,{emit:i}){const l=s,t=i,r=j.useNamespace("pagination"),o=e.ref(l.currentPage),n=e.ref(l.pageSize);e.watch(()=>l.currentPage,V=>{o.value=V}),e.watch(()=>l.pageSize,V=>{n.value=V});const a=e.computed(()=>o.value),c=e.computed(()=>n.value),M=e.computed(()=>Math.max(1,Math.ceil(l.total/c.value))),y=e.computed(()=>l.layout.split(",").map(V=>V.trim()).filter(Boolean)),k=V=>y.value.includes(V),w=e.computed(()=>{const V=[],E=M.value,D=a.value;if(E<=7)for(let S=1;S<=E;S++)V.push(S);else if(D<=4){for(let S=1;S<=5;S++)V.push(S);V.push(-1),V.push(E)}else if(D>=E-3){V.push(1),V.push(-1);for(let S=E-4;S<=E;S++)V.push(S)}else{V.push(1),V.push(-1);for(let S=D-1;S<=D+1;S++)V.push(S);V.push(-1),V.push(E)}return V}),N=V=>{V<1||V>M.value||V===a.value||(o.value=V,t("update:currentPage",V),t("current-change",V))},A=V=>{V!==c.value&&(n.value=V,t("update:pageSize",V),t("size-change",V),o.value=1,t("update:currentPage",1),t("current-change",1))},L=e.ref(""),K=()=>{const V=parseInt(L.value,10);isFinite(V)&&(N(Math.min(Math.max(1,V),M.value)),L.value="")};return(V,E)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r).b())},[k("total")?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(r).e("total"))},"共 "+e.toDisplayString(s.total)+" 条",3)):e.createCommentVNode("",!0),k("prev")?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(e.unref(r).e("btn")),disabled:a.value<=1,onClick:E[0]||(E[0]=D=>N(a.value-1))},[...E[4]||(E[4]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"12",height:"12"},[e.createElementVNode("path",{d:"M15 18l-6-6 6-6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,ye)):e.createCommentVNode("",!0),k("pager")?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(w.value,D=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:D},[D===-1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(r).e("ellipsis"))},"...",2)):(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass([e.unref(r).e("btn"),e.unref(r).is("active",D===a.value)]),onClick:S=>N(D)},e.toDisplayString(D),11,Ce))],64))),128)):e.createCommentVNode("",!0),k("next")?(e.openBlock(),e.createElementBlock("button",{key:3,class:e.normalizeClass(e.unref(r).e("btn")),disabled:a.value>=M.value,onClick:E[1]||(E[1]=D=>N(a.value+1))},[...E[5]||(E[5]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"12",height:"12"},[e.createElementVNode("path",{d:"M9 18l6-6-6-6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,Me)):e.createCommentVNode("",!0),k("sizes")?(e.openBlock(),e.createElementBlock("select",{key:4,class:e.normalizeClass(e.unref(r).e("sizes")),value:c.value,onChange:E[2]||(E[2]=D=>A(Number(D.target.value)))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.pageSizes,D=>(e.openBlock(),e.createElementBlock("option",{key:D,value:D},e.toDisplayString(D)+" 条/页",9,xe))),128))],42,we)):e.createCommentVNode("",!0),k("jumper")?(e.openBlock(),e.createElementBlock("span",{key:5,class:e.normalizeClass(e.unref(r).e("jumper"))},[E[6]||(E[6]=e.createTextVNode(" 前往 ",-1)),e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass(e.unref(r).e("jumper-input")),type:"text",inputmode:"numeric","onUpdate:modelValue":E[3]||(E[3]=D=>L.value=D),onKeyup:e.withKeys(K,["enter"]),onBlur:K},null,34),[[e.vModelText,L.value]]),E[7]||(E[7]=e.createTextVNode(" 页 ",-1))],2)):e.createCommentVNode("",!0)],2))}}),Be={key:0},be=["checked","indeterminate"],ze=["onClick"],Ee={class:"sort-arrow up"},Ne={class:"sort-arrow down"},Ve=["onClick"],Se=["checked","onChange"],De=["onClick"],Ie=["onClick"],Ae={key:1},Le=["colspan"],Te=e.defineComponent({name:"XDynamicTable",__name:"index",props:{data:{default:()=>[]},columns:{default:()=>[]},height:{},maxHeight:{},rowKey:{},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showIndex:{type:Boolean,default:!1},showOperation:{type:Boolean,default:!1},showAddButton:{type:Boolean,default:!1},operationWidth:{default:120},operationLabel:{default:"操作"},emptyText:{default:"暂无数据"},defaultSort:{}},emits:["sort-change","row-click","row-dblclick","selection-change","select-all","cell-click","add-row","delete-row","update:data"],setup(s,{expose:i,emit:l}){var b,d;const t=s,r=l,o=j.useNamespace("dynamic-table");e.useSlots();const n=e.computed({get:()=>t.data,set:u=>r("update:data",u)}),a=e.ref({prop:((b=t.defaultSort)==null?void 0:b.prop)||"",order:((d=t.defaultSort)==null?void 0:d.order)||null}),c=e.ref([]),M=e.ref(!1),y=e.ref(!1),k=e.computed(()=>{if(!a.value.prop||!a.value.order)return n.value;const{prop:u,order:m}=a.value;return[...n.value].sort((g,f)=>{const z=g[u],I=f[u];if(z===I)return 0;const T=z>I?1:-1;return m==="ascending"?T:-T})}),w=e.computed(()=>{const u={};return t.height&&(u.height=typeof t.height=="number"?`${t.height}px`:t.height),t.maxHeight&&(u.maxHeight=typeof t.maxHeight=="number"?`${t.maxHeight}px`:t.maxHeight),u}),N=e.computed(()=>{const u=typeof t.operationWidth=="number"?`${t.operationWidth}px`:t.operationWidth;return{width:u,minWidth:u}}),A=e.computed(()=>[o.b(),o.is("border",t.border),o.is("stripe",t.stripe),o.is("loading",t.loading)]),L=u=>{u.sortable&&(a.value.prop===u.prop?a.value.order==="ascending"?a.value.order="descending":a.value.order==="descending"&&(a.value.order=null,a.value.prop=""):(a.value.prop=u.prop,a.value.order="ascending"),r("sort-change",{...a.value}))},K=u=>u.sortable?a.value.prop!==u.prop?o.is("sortable"):[o.is("sortable"),o.is(`sort-${a.value.order}`)]:"",V=(u,m,g)=>{const f=u[m.prop];return m.formatter?m.formatter(u,m,f,g):f??""},E=(u,m,g)=>{r("row-click",u,m,g)},D=(u,m,g)=>{const f=g.target;r("cell-click",u,m,f,g)},S=()=>{M.value||y.value?(c.value=[],M.value=!1,y.value=!1):(c.value=[...n.value],M.value=!0,y.value=!1),r("select-all",c.value),r("selection-change",c.value)},H=u=>{const m=c.value.findIndex(g=>typeof t.rowKey=="function"?t.rowKey(g)===t.rowKey(u):t.rowKey?g[t.rowKey]===u[t.rowKey]:g===u);m>-1?c.value.splice(m,1):c.value.push(u),M.value=c.value.length===n.value.length,y.value=c.value.length>0&&c.value.length<n.value.length,r("selection-change",c.value)},O=u=>c.value.some(m=>typeof t.rowKey=="function"?t.rowKey(m)===t.rowKey(u):t.rowKey?m[t.rowKey]===u[t.rowKey]:m===u),h=u=>{const m={};return u.width&&(m.width=typeof u.width=="number"?`${u.width}px`:u.width),u.minWidth&&(m.minWidth=typeof u.minWidth=="number"?`${u.minWidth}px`:u.minWidth),u.align&&(m.textAlign=u.align),m},C=u=>{const m=u||{};t.columns.forEach(g=>{m[g.prop]===void 0&&(m[g.prop]="")}),n.value=[...n.value,m],r("add-row",m)},v=u=>{const m=n.value[u];n.value=n.value.filter((g,f)=>f!==u),r("delete-row",m,u)};return i({clearSelection:()=>{c.value=[],M.value=!1,y.value=!1},getSelection:()=>[...c.value],sortState:a,addRow:C,deleteRow:v,getData:()=>[...n.value]}),(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(A.value)},[s.showAddButton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("toolbar"))},[e.renderSlot(u.$slots,"toolbar",{},()=>[e.createElementVNode("button",{class:e.normalizeClass(e.unref(o).e("add-btn")),onClick:m[0]||(m[0]=g=>C())},[...m[2]||(m[2]=[e.createElementVNode("span",{class:"add-icon"},"+",-1),e.createTextVNode(" 新增一行 ",-1)])],2)])],2)):e.createCommentVNode("",!0),s.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).e("loading"))},[...m[3]||(m[3]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("wrapper")),style:e.normalizeStyle(w.value)},[e.createElementVNode("table",null,[s.showHeader?(e.openBlock(),e.createElementBlock("thead",Be,[e.createElementVNode("tr",null,[s.rowKey?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass([e.unref(o).e("header-cell"),e.unref(o).e("selection-cell")])},[e.createElementVNode("input",{type:"checkbox",checked:M.value,indeterminate:y.value,onChange:S},null,40,be)],2)):e.createCommentVNode("",!0),s.showIndex?(e.openBlock(),e.createElementBlock("th",{key:1,class:e.normalizeClass(e.unref(o).e("header-cell")),style:{width:"60px"}}," 序号 ",2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,g=>(e.openBlock(),e.createElementBlock("th",{key:g.prop,class:e.normalizeClass([e.unref(o).e("header-cell"),K(g)]),style:e.normalizeStyle(h(g)),onClick:f=>L(g)},[e.createElementVNode("span",null,e.toDisplayString(g.label),1),g.sortable?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("sort-icon"))},[e.createElementVNode("span",Ee,[e.createVNode(e.unref(_),{name:"sort-up",size:12})]),e.createElementVNode("span",Ne,[e.createVNode(e.unref(_),{name:"sort-down",size:12})])],2)):e.createCommentVNode("",!0)],14,ze))),128)),s.showOperation?(e.openBlock(),e.createElementBlock("th",{key:2,class:e.normalizeClass(e.unref(o).e("header-cell")),style:e.normalizeStyle(N.value)},e.toDisplayString(s.operationLabel),7)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(g,f)=>(e.openBlock(),e.createElementBlock("tr",{key:s.rowKey?typeof s.rowKey=="function"?s.rowKey(g):g[s.rowKey]:f,class:e.normalizeClass([e.unref(o).e("row"),e.unref(o).is("selected",O(g))]),onClick:z=>E(g,s.columns[0],z)},[s.rowKey?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(e.unref(o).e("cell"))},[e.createElementVNode("input",{type:"checkbox",checked:O(g),onClick:m[1]||(m[1]=e.withModifiers(()=>{},["stop"])),onChange:z=>H(g)},null,40,Se)],2)):e.createCommentVNode("",!0),s.showIndex?(e.openBlock(),e.createElementBlock("td",{key:1,class:e.normalizeClass(e.unref(o).e("cell"))},e.toDisplayString(f+1),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,z=>(e.openBlock(),e.createElementBlock("td",{key:z.prop,class:e.normalizeClass(e.unref(o).e("cell")),style:e.normalizeStyle(h(z)),onClick:I=>D(g,z,I)},[e.renderSlot(u.$slots,`column-${z.prop}`,e.mergeProps({row:g,column:z},{ref_for:!0},{$index:f}),()=>[e.createTextVNode(e.toDisplayString(V(g,z,f)),1)])],14,De))),128)),s.showOperation?(e.openBlock(),e.createElementBlock("td",{key:2,class:e.normalizeClass([e.unref(o).e("cell"),e.unref(o).e("operation-cell")])},[e.renderSlot(u.$slots,"operation",e.mergeProps({row:g,deleteRow:()=>v(f)},{ref_for:!0},{$index:f}),()=>[e.createElementVNode("button",{class:e.normalizeClass(e.unref(o).e("operation-btn")),onClick:e.withModifiers(z=>v(f),["stop"])}," 删除 ",10,Ie)])],2)):e.createCommentVNode("",!0)],10,Ve))),128))]),k.value.length===0&&!s.loading?(e.openBlock(),e.createElementBlock("tbody",Ae,[e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:s.columns.length+(s.rowKey?1:0)+(s.showIndex?1:0)+(s.showOperation?1:0),class:e.normalizeClass(e.unref(o).e("empty"))},[e.renderSlot(u.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(s.emptyText),1)])],10,Le)])])):e.createCommentVNode("",!0)])],6)],2))}}),$e=["draggable"],Ke={key:0,class:"x-tree-node__loading-icon"},He={key:0,class:"x-tree-node__expand-arrow"},Pe={key:0,class:"x-tree-node__icon"},Re={class:"x-tree-node__label"},je=e.defineComponent({name:"XTreeNode",__name:"tree-node",props:{node:{}},setup(s){const i=s,l=e.inject("tree"),{props:t,store:r,toggleExpand:o,toggleCheck:n,handleNodeClick:a,handleNodeContextmenu:c}=l,M=e.ref(),y=e.ref(null),k=e.computed(()=>i.node.expanded),w=e.computed(()=>i.node.checked),N=e.computed(()=>i.node.indeterminate),A=e.computed(()=>i.node.disabled),L=e.computed(()=>i.node.loading),K=e.computed(()=>i.node.isLeaf),V=e.computed(()=>t.showCheckbox||t.checkable),E=e.computed(()=>i.node.selected),D=e.computed(()=>({paddingLeft:`${i.node.level*(t.indent||16)}px`})),S=d=>{a(i.node,d)},H=d=>{c(i.node,d)},O=d=>{d.stopPropagation(),A.value||o(i.node)},h=d=>{d.stopPropagation(),A.value||n(i.node)},C=d=>{var u;if(!(!t.draggable||A.value)){if(t.allowDrag&&!t.allowDrag(i.node)){d.preventDefault();return}d.dataTransfer.effectAllowed="move",d.dataTransfer.setData("nodeKey",String(i.node.key)),(u=l.emit)==null||u.call(l,"node-drag-start",i.node,d)}},v=d=>{var u;d.preventDefault(),t.draggable&&(y.value="inner",(u=l.emit)==null||u.call(l,"node-drag-enter",i.node,d))},B=d=>{var u;y.value=null,(u=l.emit)==null||u.call(l,"node-drag-leave",i.node,d)},x=d=>{var f,z;if(d.preventDefault(),!t.draggable||A.value)return;const u=(f=M.value)==null?void 0:f.getBoundingClientRect();if(!u)return;const m=d.clientY-u.top,g=u.height;m<g*.25?y.value="prev":m>g*.75?y.value="next":y.value="inner",(z=l.emit)==null||z.call(l,"node-drag-over",i.node,d)},p=d=>{var m,g;if(d.preventDefault(),!t.draggable)return;const u=(m=d.dataTransfer)==null?void 0:m.getData("nodeKey");if(u){const f=r.nodesMap.get(u);if(f&&y.value){if(t.allowDrop&&!t.allowDrop(f,i.node,y.value)){y.value=null;return}(g=l.emit)==null||g.call(l,"node-drop",f,i.node,y.value,d)}}y.value=null},b=d=>{var u;y.value=null,(u=l.emit)==null||u.call(l,"node-drag-end",i.node,d)};return(d,u)=>{var g;const m=e.resolveComponent("TreeNode",!0);return e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"nodeRef",ref:M,class:e.normalizeClass(["x-tree-node",{"is-expanded":k.value,"is-current":d.isCurrent,"is-selected":E.value,"is-disabled":A.value,"is-drop-inner":y.value==="inner","is-drop-prev":y.value==="prev","is-drop-next":y.value==="next"}]),draggable:e.unref(t).draggable&&!A.value,onDragstart:C,onDragenter:v,onDragleave:B,onDragover:x,onDrop:p,onDragend:b},[e.createElementVNode("div",{class:"x-tree-node__content",style:e.normalizeStyle(D.value),onClick:S,onContextmenu:H},[e.createElementVNode("span",{class:e.normalizeClass(["x-tree-node__expand-icon",{"is-expanded":k.value,"is-leaf":K.value,"is-loading":L.value}]),onClick:O},[L.value?(e.openBlock(),e.createElementBlock("span",Ke)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[K.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",He))],64))],2),s.node.icon||e.unref(t).icon?(e.openBlock(),e.createElementBlock("span",Pe,e.toDisplayString(s.node.icon||e.unref(t).icon),1)):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["x-tree-node__checkbox",{"is-checked":w.value,"is-indeterminate":N.value,"is-disabled":A.value}]),onClick:e.withModifiers(h,["stop"])},[w.value?(e.openBlock(),e.createBlock(e.unref(_),{key:0,name:"check",size:12,class:"x-tree-node__checkbox-icon"})):N.value?(e.openBlock(),e.createBlock(e.unref(_),{key:1,name:"minus",size:12,class:"x-tree-node__checkbox-icon"})):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("span",Re,[e.renderSlot(d.$slots,"default",{node:s.node,data:s.node.data},()=>[e.createTextVNode(e.toDisplayString(s.node.label),1)])])],36),!K.value&&k.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["x-tree-node__children",{"x-tree-node__children--show-line":e.unref(t).showLine}])},[!e.unref(t).renderAfterExpand||k.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.node.children,f=>(e.openBlock(),e.createBlock(m,{key:f.key,node:f},{default:e.withCtx(z=>[e.renderSlot(d.$slots,"default",{node:z.node,data:z.data})]),_:3},8,["node"]))),128)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],42,$e)),[[e.vShow,s.node.visible&&(((g=s.node.parent)==null?void 0:g.expanded)??!0)]])}}});class F{constructor(i,l,t=0,r=null){this.data=i,this.store=l,this.level=t,this.parent=r,this.children=[],this.expanded=!1,this.selected=!1,this.checked=!1,this.indeterminate=!1,this.loading=!1,this.visible=!0,this.loaded=!1;const o=l.props||{},n=o.value||"value",a=o.label||"label",c=o.disabled||"disabled",M=o.isLeaf||"isLeaf";this.key=i[n]??i.value??i.id??Math.random().toString(),this.label=i[a]??i.label??"",this.disabled=i[c]??i.disabled??!1,this.isLeaf=i[M]??i.isLeaf??!1;const y=o.children||"children",k=i[y]??i.children??[];k.length>0?this.children=k.map(w=>new F(w,l,t+1,this)):this.isLeaf=!0}setExpanded(i,l=!0){this.expanded=i,i?this.store.expandedKeys.add(this.key):this.store.expandedKeys.delete(this.key)}setSelected(i){this.selected=i,i?this.store.selectedKeys.add(this.key):this.store.selectedKeys.delete(this.key)}setChecked(i,l=!0,t=!0){this.checked=i,this.indeterminate=!1,i?(this.store.checkedKeys.add(this.key),this.store.indeterminateKeys.delete(this.key)):(this.store.checkedKeys.delete(this.key),this.store.indeterminateKeys.delete(this.key)),l&&(this.updateChildrenChecked(i),this.updateParentChecked())}updateChildrenChecked(i){const l=t=>{t.children.forEach(r=>{r.disabled||(r.checked=i,r.indeterminate=!1,i?(this.store.checkedKeys.add(r.key),this.store.indeterminateKeys.delete(r.key)):(this.store.checkedKeys.delete(r.key),this.store.indeterminateKeys.delete(r.key)),l(r))})};l(this)}updateParentChecked(){let i=this.parent;for(;i;){const l=i.children.filter(o=>!o.disabled);if(l.length===0){i=i.parent;continue}const t=l.every(o=>o.checked),r=l.some(o=>o.checked||o.indeterminate);t?(i.checked=!0,i.indeterminate=!1,this.store.checkedKeys.add(i.key),this.store.indeterminateKeys.delete(i.key)):r?(i.checked=!1,i.indeterminate=!0,this.store.checkedKeys.delete(i.key),this.store.indeterminateKeys.add(i.key)):(i.checked=!1,i.indeterminate=!1,this.store.checkedKeys.delete(i.key),this.store.indeterminateKeys.delete(i.key)),i=i.parent}}toggleExpand(){this.setExpanded(!this.expanded)}toggleCheck(){this.setChecked(!this.checked)}get shouldShow(){return!(!this.visible||this.parent&&!this.parent.expanded)}getParentKeys(){const i=[];let l=this.parent;for(;l;)i.push(l.key),l=l.parent;return i}getChildrenKeys(){const i=[],l=t=>{t.forEach(r=>{i.push(r.key),r.children.length&&l(r.children)})};return l(this.children),i}}const Oe=e.defineComponent({name:"XTree",__name:"index",props:{data:{default:()=>[]},treeData:{},emptyText:{default:"暂无数据"},nodeKey:{default:"value"},props:{default:()=>({})},fieldNames:{},renderAfterExpand:{type:Boolean,default:!0},load:{},renderContent:{},highlightCurrent:{type:Boolean,default:!1},checkOnClickNode:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultExpandedKeys:{default:()=>[]},defaultCheckedKeys:{default:()=>[]},defaultSelectedKeys:{default:()=>[]},expandedKeys:{},checkedKeys:{},selectedKeys:{},checkStrictly:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:{},allowDrop:{},accordion:{type:Boolean,default:!1},indent:{default:16},icon:{},expandOnClickNode:{type:Boolean,default:!0},checkDescendants:{type:Boolean,default:!1},currentKey:{},showLine:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},size:{default:"default"},defaultExpandAll:{type:Boolean,default:!1},checkable:{type:Boolean}},emits:["node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse","node-drag-start","node-drag-enter","node-drag-leave","node-drag-over","node-drag-end","node-drop"],setup(s,{expose:i,emit:l}){const t=s,r=l,o=j.useNamespace("tree"),n=e.reactive({nodesMap:new Map,rootNodes:[],expandedKeys:new Set,checkedKeys:new Set,selectedKeys:new Set,indeterminateKeys:new Set,currentKey:null,filterValue:""}),a=e.ref(""),c=()=>t.fieldNames?{value:t.fieldNames.key||"value",label:t.fieldNames.title||t.fieldNames.key||"label",children:t.fieldNames.children||"children",disabled:t.fieldNames.disabled||"disabled",isLeaf:t.fieldNames.isLeaf||"isLeaf"}:t.props,M=()=>t.treeData||t.data||[];n.props=c();const y=d=>{if(n.nodesMap.clear(),n.rootNodes=[],n.checkedKeys.clear(),n.indeterminateKeys.clear(),!d||!d.length)return;const u=c(),m=(g,f,z)=>{const I=new F(g,n,f,z);n.nodesMap.set(I.key,I);const T=(u==null?void 0:u.children)||"children",P=g[T]??g.children??[];return P.length>0&&(I.children=P.map($=>m($,f+1,I)),I.isLeaf=!1),I};n.rootNodes=d.map(g=>m(g,0,null)),k()},k=()=>{var d,u,m;t.defaultExpandAll?w():(d=t.defaultExpandedKeys)!=null&&d.length&&t.defaultExpandedKeys.forEach(g=>{const f=n.nodesMap.get(g);f&&(f.expanded=!0,n.expandedKeys.add(g))}),(u=t.defaultCheckedKeys)!=null&&u.length&&t.defaultCheckedKeys.forEach(g=>{const f=n.nodesMap.get(g);f&&f.setChecked(!0,!t.checkStrictly)}),(m=t.checkedKeys)!=null&&m.length&&t.checkedKeys.forEach(g=>{const f=n.nodesMap.get(g);f&&f.setChecked(!0,!t.checkStrictly)})},w=()=>{n.nodesMap.forEach(d=>{d.children.length>0&&(d.expanded=!0,n.expandedKeys.add(d.key))})},N=()=>{n.nodesMap.forEach(d=>{d.expanded=!1}),n.expandedKeys.clear()},A=d=>{if(d.disabled)return;!d.expanded?(d.expanded=!0,n.expandedKeys.add(d.key),r("node-expand",d.data,d,null)):(d.expanded=!1,n.expandedKeys.delete(d.key),r("node-collapse",d.data,d,null))},L=(d,u)=>{if(d.disabled)return;const m=u??!d.checked;d.setChecked(m,!t.checkStrictly),r("check-change",d.data,d.checked,d.indeterminate);const g=[],f=[],z=[],I=[];n.nodesMap.forEach(T=>{T.checked&&(g.push(T.data),f.push(T.key)),T.indeterminate&&(z.push(T.data),I.push(T.key))}),r("check",d.data,{checkedNodes:g,checkedKeys:f,halfCheckedNodes:z,halfCheckedKeys:I})},K=(d,u)=>{d.disabled||(r("node-click",d.data,d,null),t.expandOnClickNode&&d.children.length>0&&A(d),t.highlightCurrent&&(n.currentKey=d.key,r("current-change",d.data,d)))},V=d=>{if(a.value=d,n.filterValue=d,!d){n.nodesMap.forEach(u=>{u.visible=!0});return}n.nodesMap.forEach(u=>{const m=u.label||"";u.visible=String(m).toLowerCase().includes(d.toLowerCase())}),n.nodesMap.forEach(u=>{if(u.visible&&u.parent){let m=u.parent;for(;m;)m.visible=!0,m.expanded=!0,n.expandedKeys.add(m.key),m=m.parent}})},E=d=>n.nodesMap.get(d),D=d=>{n.currentKey=d},S=()=>{if(n.currentKey)return n.nodesMap.get(n.currentKey)},H=(d=!1)=>{const u=[];return n.nodesMap.forEach(m=>{m.checked&&(!d||m.isLeaf)&&u.push(m.data)}),u},O=(d=!1)=>{const u=[];return n.nodesMap.forEach(m=>{m.checked&&(!d||m.isLeaf)&&u.push(m.key)}),u},h=d=>{n.nodesMap.forEach(u=>{u.checked=!1,u.indeterminate=!1}),n.checkedKeys.clear(),n.indeterminateKeys.clear(),d.forEach(u=>{const m=n.nodesMap.get(u);m&&m.setChecked(!0,!t.checkStrictly)})},C=()=>{const d=[];return n.nodesMap.forEach(u=>{u.indeterminate&&d.push(u.data)}),d},v=()=>{const d=[];return n.nodesMap.forEach(u=>{u.indeterminate&&d.push(u.key)}),d},B=(d,u,m=!0)=>{const g=n.nodesMap.get(d);g&&g.setChecked(u,m&&!t.checkStrictly)},x=()=>{const d=[];return n.nodesMap.forEach(u=>{u.selected&&d.push(u.data)}),d},p=d=>{n.nodesMap.forEach(u=>{u.selected=!1}),n.selectedKeys.clear(),d.forEach(u=>{const m=n.nodesMap.get(u);m&&(m.selected=!0,n.selectedKeys.add(u))})},b=e.computed(()=>t.showCheckbox||t.checkable);return e.provide("tree",{props:t,store:n,emit:r,toggleExpand:A,toggleCheck:L,handleNodeClick:K,filterValue:e.toRef(a),showCheckboxComputed:b}),i({filter:V,getNode:E,setCurrentKey:D,getCurrentKey:()=>n.currentKey,getCurrentNode:S,getCheckedNodes:H,getCheckedKeys:O,setCheckedKeys:h,getHalfCheckedNodes:C,getHalfCheckedKeys:v,setChecked:B,getSelectedNodes:x,setSelectedKeys:p,expandAll:w,collapseAll:N,updateKeyChildren:(d,u)=>{const m=n.nodesMap.get(d);m&&(m.children.forEach(g=>{n.nodesMap.delete(g.key)}),m.children=u.map(g=>{const f=new F(g,n,m.level+1,m);return n.nodesMap.set(f.key,f),f}),m.isLeaf=m.children.length===0)},remove:d=>{const u=n.nodesMap.get(d);if(u){const m=u.parent;if(m){const f=m.children.indexOf(u);f>-1&&m.children.splice(f,1),m.children.length===0&&(m.isLeaf=!0)}else{const f=n.rootNodes.indexOf(u);f>-1&&n.rootNodes.splice(f,1)}const g=f=>{n.nodesMap.delete(f.key),f.children.forEach(g)};g(u)}},append:(d,u)=>{if(u){const m=n.nodesMap.get(u);if(m){const g=new F(d,n,m.level+1,m);n.nodesMap.set(g.key,g),m.children.push(g),m.isLeaf=!1}}else{const m=new F(d,n,0,null);n.nodesMap.set(m.key,m),n.rootNodes.push(m)}},insertBefore:(d,u)=>{var g;const m=n.nodesMap.get(u);if(m){const f=new F(d,n,m.level,m.parent);n.nodesMap.set(f.key,f);const z=((g=m.parent)==null?void 0:g.children)||n.rootNodes,I=z.indexOf(m);z.splice(I,0,f)}},insertAfter:(d,u)=>{var g;const m=n.nodesMap.get(u);if(m){const f=new F(d,n,m.level,m.parent);n.nodesMap.set(f.key,f);const z=((g=m.parent)==null?void 0:g.children)||n.rootNodes,I=z.indexOf(m);z.splice(I+1,0,f)}}}),e.watch(()=>[t.treeData,t.data],()=>{y(M())},{immediate:!0,deep:!0}),e.watch(()=>t.checkedKeys,d=>{d&&h(d)},{immediate:!0,deep:!0}),e.watch(()=>t.defaultCheckedKeys,d=>{d&&d.length>0&&!t.checkedKeys&&h(d)},{immediate:!0,deep:!0}),(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(o).b(),e.unref(o).m(s.size)])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.rootNodes,m=>(e.openBlock(),e.createBlock(je,{key:m.key,node:m},{default:e.withCtx(g=>[e.renderSlot(d.$slots,"default",{node:g.node,data:g.data},()=>[e.createTextVNode(e.toDisplayString(g.node.label),1)])]),_:2},1032,["node"]))),128)),n.rootNodes.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("empty"))},[e.renderSlot(d.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(s.emptyText),1)])],2))],2))}}),_e=["src"],We="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTg0IiBoZWlnaHQ9IjE1MiIgdmlld0JveD0iMCAwIDE4NCAxNTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0IDMxLjY3KSI+CiAgICAgIDxlbGxpcHNlIGZpbGwtb3BhY2l0eT0iLjgiIGZpbGw9IiNGNUY1RjciIGN4PSI2Ny43OTciIGN5PSIxMDYuODkiIHJ4PSI2Ny43OTciIHJ5PSIxMi42NjgiLz4KICAgICAgPHBhdGggZD0iTTEyMi4wMzQgNjkuNjc0TDk5LjM5NCA0OC4xNjJsMCAyMS41MTYgMjIuNjQgMjIuNjQ0IDAtMjIuNjQ0em0tMjIuNjQgMjIuNjQ0TDc2Ljk5OCA3MC43OThsMCAyMS41MTYgMjIuMzk2IDIyLjM5NiAwLTIyLjM5NnoiIGZpbGw9IiNFRkVGRkYiLz4KICAgICAgPHBhdGggZD0iTTk5LjM5NCA0OC4xNjJsLTIyLjM5NiAyMi42MzYgMjIuMzk2IDIxLjUyIDAtNDQuMTU2eiIgZmlsbD0iI0YyRjZGQyIvPgogICAgICA8cGF0aCBkPSJNMTIxLjk3OCA2OS42NzRMOTkuMzk0IDkyLjI1OGwzLjE2OCAzLjE2OCAyMi41ODQtMjIuNTg0LTMuMTY4LTMuMTY4eiIgZmlsbD0iI0M3Q0NEQyIvPgogICAgICA8cGF0aCBkPSJNOTkuMzk0IDkyLjI1OEw3Ni44MSA2OS42NzRsMy4xNjgtMy4xNjggMjIuNTg0IDIyLjU4NC0zLjE2OCAzLjE2OHoiIGZpbGw9IiNDN0NEREMiLz4KICAgIDwvZz4KICAgIDxwYXRoIGQ9Ik0xNDcuODU3IDMxLjY3bC0zLjI5Mi0zLjI5MmEyLjUgMi41IDAgMCAwLTMuNTM2IDBsLTEzLjQ2IDEzLjQ2YTMuNSAzLjUgMCAwIDAgMCA0Ljk1bDMuMjkzIDMuMjkyYTMuNSAzLjUgMCAwIDAgNC45NSAwbDEzLjQ2LTEzLjQ2YTIuNSAyLjUgMCAwIDAgMC0zLjUzNnoiIGZpbGw9IiNENkRCRUMiLz4KICAgIDxwYXRoIGQ9Ik0zNi4xNDMgMzEuNjdsMy4yOTItMy4yOTJhMi41IDIuNSAwIDAgMSAzLjUzNiAwbDEzLjQ2IDEzLjQ2YTMuNSAzLjUgMCAwIDEgMCA0Ljk1bC0zLjI5MyAzLjI5MmEzLjUgMy41IDAgMCAxLTQuOTUgMEwzNi4xNDMgMzUuMmEyLjUgMi41IDAgMCAxIDAtMy41MzZ6IiBmaWxsPSIjRDZEQkVDIi8+CiAgICA8Y2lyY2xlIGZpbGw9IiNFQUVFRjQiIGN4PSI5MiIgY3k9IjgiIHI9IjgiLz4KICA8L2c+Cjwvc3ZnPg==",Fe=e.defineComponent({name:"XEmpty",__name:"index",props:{image:{default:""},imageSize:{default:0},description:{default:""},size:{default:"default"}},setup(s){const i=s,l=j.useNamespace("empty"),t=e.computed(()=>{const o={};return i.imageSize&&(o.height=`${i.imageSize}px`,o.width=`${i.imageSize}px`),o}),r=e.computed(()=>i.description||"暂无数据");return(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l).b(),e.unref(l).m(s.size)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("image")),style:e.normalizeStyle(t.value)},[e.renderSlot(o.$slots,"image",{},()=>[s.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.image,style:e.normalizeStyle(t.value),draggable:"false"},null,12,_e)):(e.openBlock(),e.createElementBlock("img",{key:1,src:We,style:e.normalizeStyle(t.value),draggable:"false"},null,4))])],6),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("description"))},[e.renderSlot(o.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(r.value),1)])],2),o.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("bottom"))},[e.renderSlot(o.$slots,"default")],2)):e.createCommentVNode("",!0)],2))}}),Ye=e.defineComponent({name:"XTimeline",__name:"index",props:{direction:{default:"vertical"}},setup(s){const i=s,l=j.useNamespace("timeline");e.provide("timeline",{props:i});const t=e.computed(()=>[l.b(),l.m(i.direction)]);return(r,o)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(t.value),role:"timeline"},[e.renderSlot(r.$slots,"default")],2))}}),Ue=e.defineComponent({name:"XTimelineItem",__name:"TimelineItem",props:{timestamp:{default:""},type:{default:"primary"},color:{},size:{default:"normal"},hideTimestamp:{type:Boolean,default:!1},placement:{default:"bottom"}},setup(s){const i=s,l=j.useNamespace("timeline-item"),t={primary:"#4F46E5",success:"#00A870",warning:"#FF7D00",danger:"#F53F3F",info:"#86909C"},r=e.computed(()=>{const n={};return i.color?n.backgroundColor=i.color:i.type&&t[i.type]&&(n.backgroundColor=t[i.type]),n}),o=e.computed(()=>[l.b(),l.m(i.size)]);return(n,a)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(o.value)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("node")),style:e.normalizeStyle(r.value)},[e.renderSlot(n.$slots,"dot")],6),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("tail"))},null,2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("wrapper"))},[!s.hideTimestamp&&s.timestamp&&s.placement==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("timestamp"))},e.toDisplayString(s.timestamp),3)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[e.renderSlot(n.$slots,"default")],2),!s.hideTimestamp&&s.timestamp&&s.placement==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("timestamp"))},e.toDisplayString(s.timestamp),3)):e.createCommentVNode("",!0)],2)],2))}}),Xe=["onMouseenter","onClick"],Qe=e.defineComponent({name:"XCarousel",__name:"index",props:{activeIndex:{default:0},autoplay:{type:Boolean,default:!0},interval:{default:3e3},indicatorPosition:{default:"inside"},trigger:{default:"hover"},arrow:{default:"hover"},loop:{type:Boolean,default:!0},height:{default:300}},emits:["update:activeIndex","change"],setup(s,{expose:i,emit:l}){const t=s,r=l,o=j.useNamespace("carousel"),n=e.ref(t.activeIndex),a=e.ref(0),c=e.ref(null),M=e.ref(!1);e.provide("carousel",{currentIndex:n,itemCount:a});const y=H=>{const O=n.value;t.loop?n.value=(H+a.value)%a.value:n.value=Math.max(0,Math.min(H,a.value-1)),r("update:activeIndex",n.value),r("change",n.value,O)},k=()=>{y(n.value-1)},w=()=>{y(n.value+1)},N=()=>{t.autoplay&&a.value>1&&(A(),c.value=setInterval(()=>{M.value||w()},t.interval))},A=()=>{c.value&&(clearInterval(c.value),c.value=null)},L=()=>{M.value=!0,t.arrow},K=()=>{M.value=!1},V=H=>{t.trigger==="hover"&&y(H)},E=H=>{t.trigger==="click"&&y(H)},D=e.computed(()=>({height:typeof t.height=="number"?`${t.height}px`:t.height})),S=e.computed(()=>[o.b(),o.m(`arrow-${t.arrow}`),o.m(`indicator-${t.indicatorPosition}`)]);return e.watch(()=>t.activeIndex,H=>{n.value=H}),e.watch(()=>t.autoplay,()=>{N()}),e.watch(a,()=>{e.nextTick(()=>{N()})}),e.onMounted(()=>{N()}),e.onUnmounted(()=>{A()}),i({prev:k,next:w,setActiveItem:y}),(H,O)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(S.value),style:e.normalizeStyle(D.value),onMouseenter:L,onMouseleave:K},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("container"))},[e.renderSlot(H.$slots,"default")],2),s.arrow!=="never"?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass([e.unref(o).e("arrow"),e.unref(o).e("arrow-left")]),onClick:k}," ‹ ",2)):e.createCommentVNode("",!0),s.arrow!=="never"?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass([e.unref(o).e("arrow"),e.unref(o).e("arrow-right")]),onClick:w}," › ",2)):e.createCommentVNode("",!0),s.indicatorPosition!=="none"?(e.openBlock(),e.createElementBlock("ul",{key:2,class:e.normalizeClass(e.unref(o).e("indicators"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,h=>(e.openBlock(),e.createElementBlock("li",{key:h,class:e.normalizeClass([e.unref(o).e("indicator"),e.unref(o).is("active",h-1===n.value)]),onMouseenter:C=>V(h-1),onClick:C=>E(h-1)},[e.createElementVNode("button",{class:e.normalizeClass(e.unref(o).e("indicator-btn"))},null,2)],42,Xe))),128))],2)):e.createCommentVNode("",!0)],38))}}),Ge=e.defineComponent({name:"XCarouselItem",__name:"CarouselItem",setup(s){const i=j.useNamespace("carousel-item"),l=e.inject("carousel"),t=e.ref(-1);e.onMounted(()=>{l&&(t.value=l.itemCount.value,l.itemCount.value++)}),e.onUnmounted(()=>{l&&l.itemCount.value--});const r=e.computed(()=>l&&t.value===l.currentIndex.value),o=e.computed(()=>[i.b(),i.is("active",r.value)]);return(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.value)},[e.renderSlot(n.$slots,"default")],2))}}),Ze={key:0},Je=["onClick"],qe={class:"sort-arrow up"},et={class:"sort-arrow down"},tt=["onClick"],nt=["onClick"],ot={key:1},lt=["colspan"],at={style:{display:"none"}},rt=e.defineComponent({name:"XTable",__name:"index",props:{data:{default:()=>[]},height:{},maxHeight:{},rowKey:{},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},emptyText:{default:"暂无数据"},defaultSort:{},pagination:{}},emits:["sort-change","row-click","row-dblclick","cell-click","selection-change","select-all","page-change","size-change"],setup(s,{expose:i,emit:l}){var m,g;const t=s,r=l,o=j.useNamespace("table");e.useSlots();const n=e.reactive([]),a=(f,z)=>{n.findIndex(T=>T.config.prop===f.prop)===-1&&n.push({config:f,slot:z})},c=f=>{const z=n.findIndex(I=>I.config.prop===f);z!==-1&&n.splice(z,1)},M=(f,z)=>{const I=n.find(T=>T.config.prop===f);I&&(I.slot=z)};e.provide("x-table",{registerColumn:a,unregisterColumn:c,updateColumnSlot:M,props:t});const y=e.computed(()=>{const f=n.map(P=>P.config),z=f.filter(P=>P.fixed==="left"||P.fixed===!0),I=f.filter(P=>!P.fixed),T=f.filter(P=>P.fixed==="right");return[...z,...I,...T]}),k=e.computed(()=>y.value.filter(f=>f.fixed==="left"||f.fixed===!0)),w=e.computed(()=>y.value.filter(f=>f.fixed==="right"));e.computed(()=>y.value.filter(f=>!f.fixed)),e.computed(()=>k.value.reduce((f,z)=>{const I=z.width?typeof z.width=="number"?z.width:parseInt(z.width):100;return f+I},0)),e.computed(()=>w.value.reduce((f,z)=>{const I=z.width?typeof z.width=="number"?z.width:parseInt(z.width):100;return f+I},0));const N=e.computed(()=>{const f={};return n.forEach(z=>{z.slot&&(f[z.config.prop]=z.slot)}),f}),A=e.ref({prop:((m=t.defaultSort)==null?void 0:m.prop)||"",order:((g=t.defaultSort)==null?void 0:g.order)||null}),L=e.computed(()=>{if(!A.value.prop||!A.value.order)return t.data;const{prop:f,order:z}=A.value;return[...t.data].sort((I,T)=>{const P=I[f],$=T[f];if(P===$)return 0;const R=P>$?1:-1;return z==="ascending"?R:-R})}),K=e.computed(()=>{const f={};return t.height&&(f.height=typeof t.height=="number"?`${t.height}px`:t.height),t.maxHeight&&(f.maxHeight=typeof t.maxHeight=="number"?`${t.maxHeight}px`:t.maxHeight),f}),V=e.computed(()=>[o.b(),o.is("border",t.border),o.is("stripe",t.stripe),o.is("loading",t.loading),o.is("has-fixed",k.value.length>0||w.value.length>0)]),E=f=>{f.sortable&&(A.value.prop===f.prop?A.value.order==="ascending"?A.value.order="descending":A.value.order==="descending"&&(A.value.order=null,A.value.prop=""):(A.value.prop=f.prop,A.value.order="ascending"),r("sort-change",{...A.value}))},D=f=>f.sortable?A.value.prop!==f.prop?o.is("sortable"):[o.is("sortable"),o.is(`sort-${A.value.order}`)]:"",S=(f,z,I)=>{const T=f[z.prop];return z.formatter?z.formatter(f,z,T,I):T??""},H=(f,z)=>{r("row-click",f,y.value[0],z)},O=(f,z,I)=>{const T=I.target;r("cell-click",f,z,T,I)},h=f=>{r("page-change",f)},C=f=>{r("size-change",f)},v=(f,z,I)=>{const T={};if(f.width&&(T.width=typeof f.width=="number"?`${f.width}px`:f.width),f.minWidth&&(T.minWidth=typeof f.minWidth=="number"?`${f.minWidth}px`:f.minWidth),f.align&&(T.textAlign=f.align),(f.fixed==="left"||f.fixed===!0)&&(T.position="sticky",T.left="0px",T.zIndex="2",z!==void 0&&z>0)){let P=0;for(let $=0;$<z;$++){const R=k.value[$],G=R.width?typeof R.width=="number"?R.width:parseInt(R.width):100;P+=G}T.left=`${P}px`}if(f.fixed==="right"&&(T.position="sticky",T.right="0px",T.zIndex="2",z!==void 0)){const P=w.value,$=P.length-1-z;if($>0){let R=0;for(let G=0;G<$;G++){const q=P[P.length-1-G],ie=q.width?typeof q.width=="number"?q.width:parseInt(q.width):100;R+=ie}T.right=`${R}px`}}return T},B=f=>{const z=[];return(f.fixed==="left"||f.fixed===!0)&&z.push(o.is("fixed-left")),f.fixed==="right"&&z.push(o.is("fixed-right")),z},x=e.ref([]),p=f=>t.rowKey?typeof t.rowKey=="function"?t.rowKey(f):String(f[t.rowKey]):String(t.data.indexOf(f));return i({clearSelection:()=>{x.value=[],r("selection-change",[])},getSelection:()=>[...x.value],toggleRowSelection:(f,z)=>{const I=p(f),T=x.value.findIndex(P=>p(P)===I);z===void 0?T>-1?x.value.splice(T,1):x.value.push(f):z&&T===-1?x.value.push(f):!z&&T>-1&&x.value.splice(T,1),r("selection-change",[...x.value])},sortState:A,columns:y}),(f,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(V.value)},[s.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("loading"))},[...z[0]||(z[0]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("wrapper")),style:e.normalizeStyle(K.value)},[e.createElementVNode("table",null,[s.showHeader?(e.openBlock(),e.createElementBlock("thead",Ze,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(I,T)=>(e.openBlock(),e.createElementBlock("th",{key:I.prop,class:e.normalizeClass([e.unref(o).e("header-cell"),D(I),...B(I)]),style:e.normalizeStyle(v(I,I.fixed==="right"?w.value.indexOf(I):T)),onClick:P=>E(I)},[e.createElementVNode("span",null,e.toDisplayString(I.label),1),I.sortable?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("sort-icon"))},[e.createElementVNode("span",qe,[e.createVNode(e.unref(_),{name:"sort-up",size:12})]),e.createElementVNode("span",et,[e.createVNode(e.unref(_),{name:"sort-down",size:12})])],2)):e.createCommentVNode("",!0)],14,Je))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(I,T)=>(e.openBlock(),e.createElementBlock("tr",{key:s.rowKey?typeof s.rowKey=="function"?s.rowKey(I):I[s.rowKey]:T,class:e.normalizeClass([e.unref(o).e("row")]),onClick:P=>H(I,P)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(P,$)=>(e.openBlock(),e.createElementBlock("td",{key:P.prop,class:e.normalizeClass([e.unref(o).e("cell"),...B(P)]),style:e.normalizeStyle(v(P,P.fixed==="right"?w.value.indexOf(P):$)),onClick:R=>O(I,P,R)},[N.value[P.prop]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>N.value[P.prop]({row:I,column:P,$index:T})),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(S(I,P,T)),1)],64))],14,nt))),128))],10,tt))),128))]),L.value.length===0&&!s.loading?(e.openBlock(),e.createElementBlock("tbody",ot,[e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:y.value.length||1,class:e.normalizeClass(e.unref(o).e("empty"))},[e.renderSlot(f.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(s.emptyText),1)])],10,lt)])])):e.createCommentVNode("",!0)])],6),s.pagination?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).e("pagination"))},[e.createVNode(re,{total:s.pagination.total,"current-page":s.pagination.current,"page-size":s.pagination.pageSize,onCurrentChange:h,onSizeChange:C},null,8,["total","current-page","page-size"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",at,[e.renderSlot(f.$slots,"default")])],2))}}),st=e.defineComponent({name:"XTableColumn",__name:"TableColumn",props:{prop:{},label:{},width:{},minWidth:{},align:{default:"left"},sortable:{type:[Boolean,String]},fixed:{type:[String,Boolean]},formatter:{}},setup(s){const i=s;j.useNamespace("table-column");const l=e.useSlots(),t=e.ref(`column_${Date.now()}_${Math.random().toString(36).slice(2,9)}`),r=e.inject("x-table"),o=e.computed(()=>({prop:i.prop||t.value,label:i.label,width:i.width,minWidth:i.minWidth,align:i.align,sortable:i.sortable,fixed:i.fixed,formatter:i.formatter}));return e.onMounted(()=>{r!=null&&r.registerColumn&&r.registerColumn(o.value,l.default)}),e.watch(()=>l.default,n=>{r!=null&&r.updateColumnSlot&&n&&r.updateColumnSlot(i.prop||t.value,n)},{immediate:!0}),e.onUnmounted(()=>{r!=null&&r.unregisterColumn&&r.unregisterColumn(i.prop||t.value)}),(n,a)=>null}}),it={key:0},ct=["onClick"],dt={class:"sort-arrow up"},ut={class:"sort-arrow down"},ft=["onClick"],mt={key:0},ht=["colspan"],pt={style:{display:"none"}},gt=e.defineComponent({name:"XTreeTable",__name:"index",props:{data:{default:()=>[]},rowKey:{},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},emptyText:{default:"暂无数据"},defaultExpandAll:{type:Boolean,default:!1},defaultExpandedKeys:{},indent:{default:20},treeProps:{default:()=>({children:"children",hasChildren:"hasChildren"})},expandIcon:{},collapseIcon:{}},emits:["row-click","cell-click","expand-change","sort-change"],setup(s,{expose:i,emit:l}){const t=s,r=l,o=j.useNamespace("tree-table"),n=e.ref(new Set),a=e.ref([]),c=e.ref({}),M=(p,b)=>{const d=a.value.findIndex(u=>u.prop===p.prop);d===-1?a.value.push(p):a.value[d]=p,b&&(c.value[p.prop]=b)},y=p=>{const b=a.value.findIndex(d=>d.prop===p);b>-1&&a.value.splice(b,1),delete c.value[p]},k=(p,b)=>{c.value[p]=b};e.provide("x-tree-table",{registerColumn:M,unregisterColumn:y,updateColumnSlot:k,props:t});const w=p=>typeof t.rowKey=="function"?t.rowKey(p):p[t.rowKey||"id"],N=p=>{var d;const b=((d=t.treeProps)==null?void 0:d.children)||"children";return p[b]||[]},A=p=>{var u;if(N(p).length>0)return!0;const d=((u=t.treeProps)==null?void 0:u.hasChildren)||"hasChildren";return p[d]===!0},L=p=>{const b=w(p);return n.value.has(b)},K=p=>{const b=w(p),d=!n.value.has(b);d?n.value.add(b):n.value.delete(b),r("expand-change",p,d)},V=()=>{const p=b=>{b.forEach(d=>{A(d)&&(n.value.add(w(d)),p(N(d)))})};p(t.data)},E=()=>{n.value.clear()},D=e.computed(()=>{const p=[],b=(d,u=0,m=!0)=>{d.forEach(g=>{const f=w(g),z=n.value.has(f),I=m;p.push({row:g,level:u,visible:I});const T=N(g);T.length>0&&z&&b(T,u+1,I)})};return b(t.data),p}),S=e.ref({prop:"",order:null}),H=e.computed(()=>{if(!S.value.prop||!S.value.order)return D.value;const{prop:p,order:b}=S.value;return[...D.value].sort((d,u)=>{const m=d.row[p],g=u.row[p];if(m===g)return 0;const f=m>g?1:-1;return b==="ascending"?f:-f})}),O=p=>{p.sortable&&(S.value.prop===p.prop?S.value.order==="ascending"?S.value.order="descending":S.value.order==="descending"&&(S.value.order=null,S.value.prop=""):(S.value.prop=p.prop,S.value.order="ascending"),r("sort-change",{...S.value}))},h=p=>p.sortable?S.value.prop!==p.prop?o.is("sortable"):[o.is("sortable"),o.is(`sort-${S.value.order}`)]:"",C=(p,b,d)=>{const u=p[b.prop];return b.formatter?b.formatter(p,b,u,d):u??""},v=p=>{const b={};return p.width&&(b.width=typeof p.width=="number"?`${p.width}px`:p.width),p.minWidth&&(b.minWidth=typeof p.minWidth=="number"?`${p.minWidth}px`:p.minWidth),p.align&&(b.textAlign=p.align),b},B=e.computed(()=>[o.b(),o.is("border",t.border),o.is("stripe",t.stripe),o.is("loading",t.loading)]),x=()=>{var p;t.defaultExpandAll?V():(p=t.defaultExpandedKeys)!=null&&p.length&&t.defaultExpandedKeys.forEach(b=>{n.value.add(b)})};return e.watch(()=>t.data,()=>{x()},{immediate:!0}),e.watch(()=>t.defaultExpandedKeys,p=>{p!=null&&p.length&&!t.defaultExpandAll&&(n.value.clear(),p.forEach(b=>{n.value.add(b)}))},{immediate:!0}),i({expandAll:V,collapseAll:E,toggleExpand:K,expandedKeys:n,columns:a}),(p,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(B.value)},[s.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("loading"))},[...b[0]||(b[0]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("wrapper"))},[e.createElementVNode("table",null,[s.showHeader?(e.openBlock(),e.createElementBlock("thead",it,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,d=>(e.openBlock(),e.createElementBlock("th",{key:d.prop,class:e.normalizeClass([e.unref(o).e("header-cell"),h(d)]),style:e.normalizeStyle(v(d)),onClick:u=>O(d)},[e.createElementVNode("span",null,e.toDisplayString(d.label),1),d.sortable?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("sort-icon"))},[e.createElementVNode("span",dt,[e.createVNode(e.unref(_),{name:"sort-up",size:12})]),e.createElementVNode("span",ut,[e.createVNode(e.unref(_),{name:"sort-down",size:12})])],2)):e.createCommentVNode("",!0)],14,ct))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,(d,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:w(d.row)},[d.visible?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass([e.unref(o).e("row"),e.unref(o).is("level-"+d.level)])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(m,g)=>(e.openBlock(),e.createElementBlock("td",{key:m.prop,class:e.normalizeClass(e.unref(o).e("cell")),style:e.normalizeStyle(v(m))},[g===0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("cell-content"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("indent")),style:e.normalizeStyle({width:`${d.level*s.indent}px`})},null,6),A(d.row)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(o).e("expand-icon"),e.unref(o).is("expanded",L(d.row))]),onClick:e.withModifiers(f=>K(d.row),["stop"])},[L(d.row)?(e.openBlock(),e.createBlock(e.unref(_),{key:0,name:"chevron-down",size:14})):(e.openBlock(),e.createBlock(e.unref(_),{key:1,name:"chevron-right",size:14}))],10,ft)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(o).e("expand-placeholder"))},null,2)),e.createElementVNode("span",null,[c.value[m.prop]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>c.value[m.prop]({row:d.row,column:m,$index:u})),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(C(d.row,m,u)),1)],64))])],2)):c.value[m.prop]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>c.value[m.prop]({row:d.row,column:m,$index:u})),{key:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(C(d.row,m,u)),1)],64))],6))),128))],2)):e.createCommentVNode("",!0)],64))),128)),H.value.length===0&&!s.loading?(e.openBlock(),e.createElementBlock("tr",mt,[e.createElementVNode("td",{colspan:a.value.length||1,class:e.normalizeClass(e.unref(o).e("empty"))},[e.renderSlot(p.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(s.emptyText),1)])],10,ht)])):e.createCommentVNode("",!0)])])],2),e.createElementVNode("div",pt,[e.renderSlot(p.$slots,"default")])],2))}}),vt=e.defineComponent({name:"XTreeTableColumn",__name:"TreeTableColumn",props:{prop:{},label:{},width:{},minWidth:{},align:{default:"left"},sortable:{type:[Boolean,String]},fixed:{type:[String,Boolean]},formatter:{}},setup(s){const i=s;j.useNamespace("tree-table-column");const l=e.useSlots(),t=e.inject("x-tree-table"),r=e.computed(()=>({prop:i.prop,label:i.label,width:i.width,minWidth:i.minWidth,align:i.align,sortable:i.sortable,fixed:i.fixed,formatter:i.formatter}));return e.onMounted(()=>{t!=null&&t.registerColumn&&t.registerColumn(r.value,l.default)}),e.watch(()=>l.default,o=>{t!=null&&t.updateColumnSlot&&o&&t.updateColumnSlot(i.prop,o)},{immediate:!0}),e.onUnmounted(()=>{t!=null&&t.unregisterColumn&&t.unregisterColumn(i.prop)}),(o,n)=>null}}),kt=["src","alt"],yt=e.defineComponent({name:"XAvatar",__name:"index",props:{src:{},icon:{},size:{default:"default"},shape:{default:"circle"},fit:{default:"cover"},alt:{}},emits:["error"],setup(s,{emit:i}){const l=s,t=i,r=j.useNamespace("avatar"),o=e.computed(()=>[r.b(),r.m(l.shape),typeof l.size=="string"?r.m(l.size):""]),n=e.computed(()=>{const c={};return typeof l.size=="number"&&(c.width=`${l.size}px`,c.height=`${l.size}px`,c.lineHeight=`${l.size}px`),c}),a=c=>{t("error",c)};return(c,M)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(o.value),style:e.normalizeStyle(n.value)},[s.src?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.src,alt:s.alt,style:e.normalizeStyle({objectFit:s.fit}),onError:a},null,44,kt)):s.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(r).e("icon"))},e.toDisplayString(s.icon),3)):(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(r).e("default"))},[e.renderSlot(c.$slots,"default")],2))],6))}}),Ct=e.defineComponent({name:"XDescriptions",__name:"index",props:{title:{},column:{default:3},border:{type:Boolean,default:!1},size:{default:"default"},labelWidth:{},labelAlign:{default:"right"},contentAlign:{default:"left"},colon:{type:Boolean,default:!0}},setup(s){const i=s,l=j.useNamespace("descriptions");e.provide("x-descriptions",{props:i,column:e.computed(()=>i.column)});const t=e.computed(()=>[l.b(),l.m(i.size),l.is("bordered",i.border)]);return(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value)},[s.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("title"))},e.toDisplayString(s.title),3)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("body"))},[e.createElementVNode("table",null,[e.createElementVNode("tbody",null,[e.renderSlot(r.$slots,"default")])])],2)],2))}}),Mt=["colspan"],wt=e.defineComponent({name:"XDescriptionsItem",__name:"DescriptionsItem",props:{label:{},span:{default:1},labelAlign:{},contentAlign:{}},setup(s){const i=s,l=j.useNamespace("descriptions-item"),t=e.inject("x-descriptions"),r=e.computed(()=>{var y;const c={},M=(y=t==null?void 0:t.props)==null?void 0:y.labelWidth;return M&&(c.width=typeof M=="number"?`${M}px`:M),c}),o=e.computed(()=>{var c;return i.labelAlign||((c=t==null?void 0:t.props)==null?void 0:c.labelAlign)||"right"}),n=e.computed(()=>{var c;return i.contentAlign||((c=t==null?void 0:t.props)==null?void 0:c.contentAlign)||"left"}),a=e.computed(()=>{var c;return((c=t==null?void 0:t.props)==null?void 0:c.colon)??!0});return e.computed(()=>{var c;return((c=t==null?void 0:t.props)==null?void 0:c.border)??!1}),(c,M)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass(e.unref(l).b())},[e.createElementVNode("th",{class:e.normalizeClass([e.unref(l).e("label"),`is-${o.value}`]),style:e.normalizeStyle(r.value)},e.toDisplayString(s.label)+e.toDisplayString(a.value?":":""),7),e.createElementVNode("td",{class:e.normalizeClass([e.unref(l).e("content"),`is-${n.value}`]),colspan:s.span*2-1},[e.renderSlot(c.$slots,"default")],10,Mt)],2))}}),xt=e.defineComponent({name:"XScrollbar",__name:"index",props:{height:{},maxHeight:{},native:{type:Boolean,default:!1},wrapStyle:{},wrapClass:{},viewStyle:{},viewClass:{},noresize:{type:Boolean},tag:{default:"div"},always:{type:Boolean,default:!1},minSize:{default:20}},emits:["scroll"],setup(s,{expose:i,emit:l}){const t=s,r=l,o=j.useNamespace("scrollbar"),n=e.ref(),a=e.ref(),c=e.ref("0"),M=e.ref("0"),y=e.ref(0),k=e.ref(0),w=e.computed(()=>{const D={};return t.height&&(D.height=typeof t.height=="number"?`${t.height}px`:t.height),t.maxHeight&&(D.maxHeight=typeof t.maxHeight=="number"?`${t.maxHeight}px`:t.maxHeight),D}),N=()=>{if(!n.value)return;const D=n.value.offsetHeight-4,S=n.value.offsetWidth-4,H=n.value.scrollHeight,O=n.value.scrollWidth,h=D/H,C=S/O;M.value=h>=1?"0":`${D*h}px`,c.value=C>=1?"0":`${S*C}px`},A=D=>{if(!n.value)return;const S=n.value.offsetHeight,H=n.value.offsetWidth;k.value=n.value.scrollTop*100/S,y.value=n.value.scrollLeft*100/H,r("scroll",D)},L=D=>{var S;(S=n.value)==null||S.scrollTo(D)},K=D=>{n.value&&(n.value.scrollTop=D)},V=D=>{n.value&&(n.value.scrollLeft=D)};let E=null;return e.onMounted(()=>{t.native||(e.nextTick(N),t.noresize||(E=new ResizeObserver(N),a.value&&E.observe(a.value),window.addEventListener("resize",N)))}),e.onUnmounted(()=>{E&&E.disconnect(),window.removeEventListener("resize",N)}),i({scrollTo:L,setScrollTop:K,setScrollLeft:V,update:N}),(D,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(o).b())},[e.createElementVNode("div",{ref_key:"wrapRef",ref:n,class:e.normalizeClass([e.unref(o).e("wrap"),s.wrapClass,{[e.unref(o).em("wrap","hidden-default")]:!s.native}]),style:e.normalizeStyle([w.value,{overflow:s.native?"auto":"hidden"}]),onScroll:A},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.tag),{ref_key:"resizeRef",ref:a,class:e.normalizeClass([e.unref(o).e("view"),s.viewClass]),style:e.normalizeStyle(s.viewStyle)},{default:e.withCtx(()=>[e.renderSlot(D.$slots,"default")]),_:3},8,["class","style"]))],38),!s.native&&M.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(o).e("bar"),e.unref(o).is("vertical")]),style:e.normalizeStyle({height:M.value,top:`${k.value}%`})},null,6)):e.createCommentVNode("",!0),!s.native&&c.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(o).e("bar"),e.unref(o).is("horizontal")]),style:e.normalizeStyle({width:c.value,left:`${y.value}%`})},null,6)):e.createCommentVNode("",!0)],2))}}),Bt=e.defineComponent({name:"XCollapse",__name:"index",props:{modelValue:{default:()=>[]},accordion:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(s,{emit:i}){const l=s,t=i,r=j.useNamespace("collapse"),o=e.ref([]);e.watch(()=>l.modelValue,a=>{Array.isArray(a)?o.value=a:a?o.value=[a]:o.value=[]},{immediate:!0});const n=a=>{if(l.accordion){const c=o.value.includes(a)?"":a;o.value=c?[c]:[],t("update:modelValue",c),t("change",c)}else{const c=o.value.indexOf(a);c>-1?o.value.splice(c,1):o.value.push(a),t("update:modelValue",o.value),t("change",o.value)}};return e.provide("collapse",{activeNames:o,handleItemClick:n}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r).b())},[e.renderSlot(a.$slots,"default")],2))}}),bt=e.defineComponent({name:"XCollapseItem",__name:"CollapseItem",props:{name:{},title:{},disabled:{type:Boolean}},setup(s){const i=s,l=j.useNamespace("collapse-item"),t=e.inject("collapse"),{activeNames:r,handleItemClick:o}=t,n=e.computed(()=>r.value.includes(i.name)),a=()=>{i.disabled||o(i.name)};return(c,M)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l).b(),e.unref(l).is("active",n.value),e.unref(l).is("disabled",s.disabled)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("header")),onClick:a},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l).e("arrow"))},[e.createVNode(e.unref(_),{name:"right",size:12})],2),e.renderSlot(c.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(s.title),1)])],2),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content-box"))},[e.renderSlot(c.$slots,"default")],2)],2),[[e.vShow,n.value]])],2))}}),zt=["src","loading"],Et=["src"],te=.2,ne=8,Nt=e.defineComponent({name:"XImage",__name:"index",props:{src:{default:""},previewList:{default:()=>[]},initialIndex:{default:0},preview:{type:Boolean,default:!0},width:{},height:{},fit:{default:"cover"},error:{},placeholder:{},lazy:{type:Boolean,default:!1}},emits:["load","error"],setup(s,{emit:i}){const l=s,t=i,r=j.useNamespace("image"),o=e.ref(!0),n=e.ref(!1),a=e.ref(!1),c=e.ref(0),M=e.ref(1),y=e.ref(0),k=e.ref(0),w=e.ref(0),N=e.ref(!1),A=e.ref({x:0,y:0}),L=e.ref({x:0,y:0}),K=e.ref(null),V=e.computed(()=>({width:typeof l.width=="number"?`${l.width}px`:l.width,height:typeof l.height=="number"?`${l.height}px`:l.height,objectFit:l.fit})),E=e.computed(()=>l.previewList.length>0?l.previewList:[l.src]),D=e.computed(()=>E.value[c.value]),S=e.computed(()=>`translate(${k.value}px, ${w.value}px) scale(${M.value}) rotate(${y.value}deg)`),H=()=>{M.value=1,y.value=0,k.value=0,w.value=0,N.value=!1},O=$=>{o.value=!1,t("load",$)},h=$=>{o.value=!1,n.value=!0,t("error",$)},C=()=>{l.preview&&(c.value=l.initialIndex,H(),a.value=!0)},v=()=>{a.value=!1,H()},B=()=>{E.value.length<=1||(c.value=c.value>0?c.value-1:E.value.length-1)},x=()=>{E.value.length<=1||(c.value=c.value<E.value.length-1?c.value+1:0)},p=()=>{M.value=Math.min(ne,M.value*1.25)},b=()=>{M.value=Math.max(te,M.value/1.25),M.value<=1&&(k.value=0,w.value=0)},d=()=>H(),u=()=>{const $=K.value;if(!$||!$.naturalWidth)return;const R=$.getBoundingClientRect();R.width<=0||(M.value=Math.min(ne,Math.max(te,M.value*($.naturalWidth/R.width))))},m=()=>{y.value=(y.value+90)%360},g=()=>{const $=document.createElement("a");$.href=D.value,$.download="",$.target="_blank",$.rel="noopener",$.click()},f=$=>{$.preventDefault(),$.deltaY<0?p():b()},z=$=>{M.value<=1||(N.value=!0,A.value={x:$.clientX,y:$.clientY},L.value={x:k.value,y:w.value})},I=$=>{N.value&&(k.value=L.value.x+($.clientX-A.value.x),w.value=L.value.y+($.clientY-A.value.y))},T=()=>{N.value=!1},P=$=>{if(a.value)switch($.key){case"ArrowLeft":B();break;case"ArrowRight":x();break;case"Escape":v();break;case"+":case"=":p();break;case"-":b();break;case"r":case"R":m();break;case"0":H();break}};return typeof window<"u"&&window.addEventListener("keydown",P),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("keydown",P)}),e.watch(c,()=>H()),($,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r).b()),style:e.normalizeStyle({width:V.value.width,height:V.value.height})},[e.createElementVNode("img",{src:s.src,class:e.normalizeClass(e.unref(r).e("inner")),style:e.normalizeStyle(V.value),loading:s.lazy?"lazy":"eager",onLoad:O,onError:h,onClick:C},null,46,zt),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).e("placeholder"))},[e.renderSlot($.$slots,"placeholder",{},()=>[e.createVNode(e.unref(_),{name:"loading",size:24})])],2)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r).e("error"))},[e.renderSlot($.$slots,"error",{},()=>[e.createVNode(e.unref(_),{name:"image",size:24}),R[2]||(R[2]=e.createElementVNode("span",null,"加载失败",-1))])],2)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).e("preview")),onClick:v},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("preview-toolbar")),onClick:R[0]||(R[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-tool")),title:"放大",onClick:p},[...R[3]||(R[3]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"7"}),e.createElementVNode("path",{d:"M21 21l-4.35-4.35M11 8v6M8 11h6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-tool")),title:"缩小",onClick:b},[...R[4]||(R[4]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"7"}),e.createElementVNode("path",{d:"M21 21l-4.35-4.35M8 11h6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-tool")),title:"1:1 实际大小",onClick:u},[...R[5]||(R[5]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M9 3H3v6M15 3h6v6M9 21H3v-6M15 21h6v-6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-tool")),title:"适应窗口",onClick:d},[...R[6]||(R[6]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-tool")),title:"旋转",onClick:m},[...R[7]||(R[7]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M20 12a8 8 0 1 1-2.34-5.66M20 3v4h-4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-tool")),title:"下载",onClick:g},[...R[8]||(R[8]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-close")),title:"关闭",onClick:e.withModifiers(v,["stop"])},[...R[9]||(R[9]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M18 6L6 18M6 6l12 12","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)],2),e.createElementVNode("img",{ref_key:"previewImgRef",ref:K,src:D.value,class:e.normalizeClass([e.unref(r).e("preview-image"),{"is-zoomable":M.value>1}]),style:e.normalizeStyle({transform:S.value}),draggable:!1,onClick:R[1]||(R[1]=e.withModifiers(()=>{},["stop"])),onWheel:e.withModifiers(f,["prevent"]),onMousedown:z,onMousemove:I,onMouseup:T,onMouseleave:T},null,46,Et),E.value.length>1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(r).e("preview-arrow"),e.unref(r).em("preview-arrow","left")]),onClick:e.withModifiers(B,["stop"])},[e.createVNode(e.unref(_),{name:"left",size:24})],2)):e.createCommentVNode("",!0),E.value.length>1?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass([e.unref(r).e("preview-arrow"),e.unref(r).em("preview-arrow","right")]),onClick:e.withModifiers(x,["stop"])},[e.createVNode(e.unref(_),{name:"right",size:24})],2)):e.createCommentVNode("",!0),E.value.length>1?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(r).e("preview-counter"))},e.toDisplayString(c.value+1)+" / "+e.toDisplayString(E.value.length),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)]))],6))}}),Vt=["onClick"],St=e.defineComponent({name:"XCalendar",__name:"index",props:{modelValue:{default:()=>new Date},range:{}},emits:["update:modelValue","select","change"],setup(s,{emit:i}){const l=s,t=i,r=j.useNamespace("calendar"),o=e.ref(l.modelValue.getFullYear()),n=e.ref(l.modelValue.getMonth()),a=["日","一","二","三","四","五","六"],c=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],M=new Date,y=e.computed(()=>{const E=[],D=new Date(o.value,n.value,1),S=new Date(o.value,n.value+1,0),H=D.getDay();for(let h=H-1;h>=0;h--){const C=new Date(o.value,n.value,-h);E.push({date:C,isCurrentMonth:!1,isToday:k(C,M),isSelected:k(C,l.modelValue)})}for(let h=1;h<=S.getDate();h++){const C=new Date(o.value,n.value,h);E.push({date:C,isCurrentMonth:!0,isToday:k(C,M),isSelected:k(C,l.modelValue)})}const O=42-E.length;for(let h=1;h<=O;h++){const C=new Date(o.value,n.value+1,h);E.push({date:C,isCurrentMonth:!1,isToday:k(C,M),isSelected:k(C,l.modelValue)})}return E}),k=(E,D)=>E.getFullYear()===D.getFullYear()&&E.getMonth()===D.getMonth()&&E.getDate()===D.getDate(),w=E=>{t("update:modelValue",E.date),t("select",E.date),t("change",E.date)},N=()=>{o.value--},A=()=>{o.value++},L=()=>{n.value===0?(n.value=11,o.value--):n.value--},K=()=>{n.value===11?(n.value=0,o.value++):n.value++},V=()=>{o.value=M.getFullYear(),n.value=M.getMonth(),t("update:modelValue",M),t("select",M)};return e.watch(()=>l.modelValue,E=>{o.value=E.getFullYear(),n.value=E.getMonth()}),(E,D)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("title"))},e.toDisplayString(o.value)+" 年 "+e.toDisplayString(c[n.value]),3),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("actions"))},[e.createElementVNode("button",{class:e.normalizeClass(e.unref(r).e("btn")),onClick:N},[e.createVNode(e.unref(_),{name:"d-arrow-left",size:12})],2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(r).e("btn")),onClick:L},[e.createVNode(e.unref(_),{name:"arrow-left",size:12})],2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(r).e("btn")),onClick:V},"今天",2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(r).e("btn")),onClick:K},[e.createVNode(e.unref(_),{name:"arrow-right",size:12})],2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(r).e("btn")),onClick:A},[e.createVNode(e.unref(_),{name:"d-arrow-right",size:12})],2)],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("weekdays"))},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(a,S=>e.createElementVNode("div",{key:S,class:e.normalizeClass(e.unref(r).e("weekday"))},e.toDisplayString(S),3)),64))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("body"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(S,H)=>(e.openBlock(),e.createElementBlock("div",{key:H,class:e.normalizeClass([e.unref(r).e("day"),e.unref(r).is("current-month",S.isCurrentMonth),e.unref(r).is("today",S.isToday),e.unref(r).is("selected",S.isSelected)]),onClick:O=>w(S)},[e.renderSlot(E.$slots,"default",{date:S.date,isCurrentMonth:S.isCurrentMonth},()=>[e.createTextVNode(e.toDisplayString(S.date.getDate()),1)])],10,Vt))),128))],2)],2))}}),Q=function(s,i){let r=s;const o=Z[i];let n=null,a=0,c=null;const M=[],y={},k=function(h,C){a=r*4+17,n=function(v){const B=new Array(v);for(let x=0;x<v;x+=1){B[x]=new Array(v);for(let p=0;p<v;p+=1)B[x][p]=null}return B}(a),w(0,0),w(a-7,0),w(0,a-7),L(),A(),V(h,C),r>=7&&K(h),c==null&&(c=S(r,o,M)),E(c,C)},w=function(h,C){for(let v=-1;v<=7;v+=1)if(!(h+v<=-1||a<=h+v))for(let B=-1;B<=7;B+=1)C+B<=-1||a<=C+B||(0<=v&&v<=6&&(B==0||B==6)||0<=B&&B<=6&&(v==0||v==6)||2<=v&&v<=4&&2<=B&&B<=4?n[h+v][C+B]=!0:n[h+v][C+B]=!1)},N=function(){let h=0,C=0;for(let v=0;v<8;v+=1){k(!0,v);const B=U.getLostPoint(y);(v==0||h>B)&&(h=B,C=v)}return C},A=function(){for(let h=8;h<a-8;h+=1)n[h][6]==null&&(n[h][6]=h%2==0);for(let h=8;h<a-8;h+=1)n[6][h]==null&&(n[6][h]=h%2==0)},L=function(){const h=U.getPatternPosition(r);for(let C=0;C<h.length;C+=1)for(let v=0;v<h.length;v+=1){const B=h[C],x=h[v];if(n[B][x]==null)for(let p=-2;p<=2;p+=1)for(let b=-2;b<=2;b+=1)p==-2||p==2||b==-2||b==2||p==0&&b==0?n[B+p][x+b]=!0:n[B+p][x+b]=!1}},K=function(h){const C=U.getBCHTypeNumber(r);for(let v=0;v<18;v+=1){const B=!h&&(C>>v&1)==1;n[Math.floor(v/3)][v%3+a-8-3]=B}for(let v=0;v<18;v+=1){const B=!h&&(C>>v&1)==1;n[v%3+a-8-3][Math.floor(v/3)]=B}},V=function(h,C){const v=o<<3|C,B=U.getBCHTypeInfo(v);for(let x=0;x<15;x+=1){const p=!h&&(B>>x&1)==1;x<6?n[x][8]=p:x<8?n[x+1][8]=p:n[a-15+x][8]=p}for(let x=0;x<15;x+=1){const p=!h&&(B>>x&1)==1;x<8?n[8][a-x-1]=p:x<9?n[8][15-x-1+1]=p:n[8][15-x-1]=p}n[a-8][8]=!h},E=function(h,C){let v=-1,B=a-1,x=7,p=0;const b=U.getMaskFunction(C);for(let d=a-1;d>0;d-=2)for(d==6&&(d-=1);;){for(let u=0;u<2;u+=1)if(n[B][d-u]==null){let m=!1;p<h.length&&(m=(h[p]>>>x&1)==1),b(B,d-u)&&(m=!m),n[B][d-u]=m,x-=1,x==-1&&(p+=1,x=7)}if(B+=v,B<0||a<=B){B-=v,v=-v;break}}},D=function(h,C){let v=0,B=0,x=0;const p=new Array(C.length),b=new Array(C.length);for(let g=0;g<C.length;g+=1){const f=C[g].dataCount,z=C[g].totalCount-f;B=Math.max(B,f),x=Math.max(x,z),p[g]=new Array(f);for(let $=0;$<p[g].length;$+=1)p[g][$]=255&h.getBuffer()[$+v];v+=f;const I=U.getErrorCorrectPolynomial(z),P=J(p[g],I.getLength()-1).mod(I);b[g]=new Array(I.getLength()-1);for(let $=0;$<b[g].length;$+=1){const R=$+P.getLength()-b[g].length;b[g][$]=R>=0?P.getAt(R):0}}let d=0;for(let g=0;g<C.length;g+=1)d+=C[g].totalCount;const u=new Array(d);let m=0;for(let g=0;g<B;g+=1)for(let f=0;f<C.length;f+=1)g<p[f].length&&(u[m]=p[f][g],m+=1);for(let g=0;g<x;g+=1)for(let f=0;f<C.length;f+=1)g<b[f].length&&(u[m]=b[f][g],m+=1);return u},S=function(h,C,v){const B=oe.getRSBlocks(h,C),x=le();for(let b=0;b<v.length;b+=1){const d=v[b];x.put(d.getMode(),4),x.put(d.getLength(),U.getLengthInBits(d.getMode(),h)),d.write(x)}let p=0;for(let b=0;b<B.length;b+=1)p+=B[b].dataCount;if(x.getLengthInBits()>p*8)throw"code length overflow. ("+x.getLengthInBits()+">"+p*8+")";for(x.getLengthInBits()+4<=p*8&&x.put(0,4);x.getLengthInBits()%8!=0;)x.putBit(!1);for(;!(x.getLengthInBits()>=p*8||(x.put(236,8),x.getLengthInBits()>=p*8));)x.put(17,8);return D(x,B)};y.addData=function(h,C){C=C||"Byte";let v=null;switch(C){case"Numeric":v=Dt(h);break;case"Alphanumeric":v=It(h);break;case"Byte":v=At(h);break;case"Kanji":v=Lt(h);break;default:throw"mode:"+C}M.push(v),c=null},y.isDark=function(h,C){if(h<0||a<=h||C<0||a<=C)throw h+","+C;return n[h][C]},y.getModuleCount=function(){return a},y.make=function(){if(r<1){let h=1;for(;h<40;h++){const C=oe.getRSBlocks(h,o),v=le();for(let x=0;x<M.length;x++){const p=M[x];v.put(p.getMode(),4),v.put(p.getLength(),U.getLengthInBits(p.getMode(),h)),p.write(v)}let B=0;for(let x=0;x<C.length;x++)B+=C[x].dataCount;if(v.getLengthInBits()<=B*8)break}r=h}k(!1,N())},y.createTableTag=function(h,C){h=h||2,C=typeof C>"u"?h*4:C;let v="";v+='<table style="',v+=" border-width: 0px; border-style: none;",v+=" border-collapse: collapse;",v+=" padding: 0px; margin: "+C+"px;",v+='">',v+="<tbody>";for(let B=0;B<y.getModuleCount();B+=1){v+="<tr>";for(let x=0;x<y.getModuleCount();x+=1)v+='<td style="',v+=" border-width: 0px; border-style: none;",v+=" border-collapse: collapse;",v+=" padding: 0px; margin: 0px;",v+=" width: "+h+"px;",v+=" height: "+h+"px;",v+=" background-color: ",v+=y.isDark(B,x)?"#000000":"#ffffff",v+=";",v+='"/>';v+="</tr>"}return v+="</tbody>",v+="</table>",v},y.createSvgTag=function(h,C,v,B){let x={};typeof arguments[0]=="object"&&(x=arguments[0],h=x.cellSize,C=x.margin,v=x.alt,B=x.title),h=h||2,C=typeof C>"u"?h*4:C,v=typeof v=="string"?{text:v}:v||{},v.text=v.text||null,v.id=v.text?v.id||"qrcode-description":null,B=typeof B=="string"?{text:B}:B||{},B.text=B.text||null,B.id=B.text?B.id||"qrcode-title":null;const p=y.getModuleCount()*h+C*2;let b,d,u,m,g="",f;for(f="l"+h+",0 0,"+h+" -"+h+",0 0,-"+h+"z ",g+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',g+=x.scalable?"":' width="'+p+'px" height="'+p+'px"',g+=' viewBox="0 0 '+p+" "+p+'" ',g+=' preserveAspectRatio="xMinYMin meet"',g+=B.text||v.text?' role="img" aria-labelledby="'+H([B.id,v.id].join(" ").trim())+'"':"",g+=">",g+=B.text?'<title id="'+H(B.id)+'">'+H(B.text)+"</title>":"",g+=v.text?'<description id="'+H(v.id)+'">'+H(v.text)+"</description>":"",g+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',g+='<path d="',u=0;u<y.getModuleCount();u+=1)for(m=u*h+C,b=0;b<y.getModuleCount();b+=1)y.isDark(u,b)&&(d=b*h+C,g+="M"+d+","+m+f);return g+='" stroke="transparent" fill="black"/>',g+="</svg>",g},y.createDataURL=function(h,C){h=h||2,C=typeof C>"u"?h*4:C;const v=y.getModuleCount()*h+C*2,B=C,x=v-C;return Ht(v,v,function(p,b){if(B<=p&&p<x&&B<=b&&b<x){const d=Math.floor((p-B)/h),u=Math.floor((b-B)/h);return y.isDark(u,d)?0:1}else return 1})},y.createImgTag=function(h,C,v){h=h||2,C=typeof C>"u"?h*4:C;const B=y.getModuleCount()*h+C*2;let x="";return x+="<img",x+=' src="',x+=y.createDataURL(h,C),x+='"',x+=' width="',x+=B,x+='"',x+=' height="',x+=B,x+='"',v&&(x+=' alt="',x+=H(v),x+='"'),x+="/>",x};const H=function(h){let C="";for(let v=0;v<h.length;v+=1){const B=h.charAt(v);switch(B){case"<":C+="<";break;case">":C+=">";break;case"&":C+="&";break;case'"':C+=""";break;default:C+=B;break}}return C},O=function(h){h=typeof h>"u"?1*2:h;const v=y.getModuleCount()*1+h*2,B=h,x=v-h;let p,b,d,u,m;const g={"██":"█","█ ":"▀"," █":"▄"," ":" "},f={"██":"▀","█ ":"▀"," █":" "," ":" "};let z="";for(p=0;p<v;p+=2){for(d=Math.floor((p-B)/1),u=Math.floor((p+1-B)/1),b=0;b<v;b+=1)m="█",B<=b&&b<x&&B<=p&&p<x&&y.isDark(d,Math.floor((b-B)/1))&&(m=" "),B<=b&&b<x&&B<=p+1&&p+1<x&&y.isDark(u,Math.floor((b-B)/1))?m+=" ":m+="█",z+=h<1&&p+1>=x?f[m]:g[m];z+=`
|
|
2
|
-
`}return
|
|
3
|
-
`}return f.substring(0,f.length-1)},y.renderTo2dContext=function(h,C){C=C||2;const v=y.getModuleCount();for(let B=0;B<v;B++)for(let x=0;x<v;x++)h.fillStyle=y.isDark(B,x)?"black":"white",h.fillRect(x*C,B*C,C,C)},y};Q.stringToBytes=function(s){const i=[];for(let l=0;l<s.length;l+=1){const t=s.charCodeAt(l);i.push(t&255)}return i};Q.createStringToBytes=function(s,i){const l=function(){const r=$t(s),o=function(){const c=r.read();if(c==-1)throw"eof";return c};let n=0;const a={};for(;;){const c=r.read();if(c==-1)break;const M=o(),y=o(),k=o(),w=String.fromCharCode(c<<8|M),N=y<<8|k;a[w]=N,n+=1}if(n!=i)throw n+" != "+i;return a}(),t=63;return function(r){const o=[];for(let n=0;n<r.length;n+=1){const a=r.charCodeAt(n);if(a<128)o.push(a);else{const c=l[r.charAt(n)];typeof c=="number"?(c&255)==c?o.push(c):(o.push(c>>>8),o.push(c&255)):o.push(t)}}return o}};const W={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Z={L:1,M:0,Q:3,H:2},Y={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},U=function(){const s=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],i=1335,l=7973,t=21522,r={},o=function(n){let a=0;for(;n!=0;)a+=1,n>>>=1;return a};return r.getBCHTypeInfo=function(n){let a=n<<10;for(;o(a)-o(i)>=0;)a^=i<<o(a)-o(i);return(n<<10|a)^t},r.getBCHTypeNumber=function(n){let a=n<<12;for(;o(a)-o(l)>=0;)a^=l<<o(a)-o(l);return n<<12|a},r.getPatternPosition=function(n){return s[n-1]},r.getMaskFunction=function(n){switch(n){case Y.PATTERN000:return function(a,c){return(a+c)%2==0};case Y.PATTERN001:return function(a,c){return a%2==0};case Y.PATTERN010:return function(a,c){return c%3==0};case Y.PATTERN011:return function(a,c){return(a+c)%3==0};case Y.PATTERN100:return function(a,c){return(Math.floor(a/2)+Math.floor(c/3))%2==0};case Y.PATTERN101:return function(a,c){return a*c%2+a*c%3==0};case Y.PATTERN110:return function(a,c){return(a*c%2+a*c%3)%2==0};case Y.PATTERN111:return function(a,c){return(a*c%3+(a+c)%2)%2==0};default:throw"bad maskPattern:"+n}},r.getErrorCorrectPolynomial=function(n){let a=J([1],0);for(let c=0;c<n;c+=1)a=a.multiply(J([1,X.gexp(c)],0));return a},r.getLengthInBits=function(n,a){if(1<=a&&a<10)switch(n){case W.MODE_NUMBER:return 10;case W.MODE_ALPHA_NUM:return 9;case W.MODE_8BIT_BYTE:return 8;case W.MODE_KANJI:return 8;default:throw"mode:"+n}else if(a<27)switch(n){case W.MODE_NUMBER:return 12;case W.MODE_ALPHA_NUM:return 11;case W.MODE_8BIT_BYTE:return 16;case W.MODE_KANJI:return 10;default:throw"mode:"+n}else if(a<41)switch(n){case W.MODE_NUMBER:return 14;case W.MODE_ALPHA_NUM:return 13;case W.MODE_8BIT_BYTE:return 16;case W.MODE_KANJI:return 12;default:throw"mode:"+n}else throw"type:"+a},r.getLostPoint=function(n){const a=n.getModuleCount();let c=0;for(let k=0;k<a;k+=1)for(let w=0;w<a;w+=1){let N=0;const A=n.isDark(k,w);for(let L=-1;L<=1;L+=1)if(!(k+L<0||a<=k+L))for(let K=-1;K<=1;K+=1)w+K<0||a<=w+K||L==0&&K==0||A==n.isDark(k+L,w+K)&&(N+=1);N>5&&(c+=3+N-5)}for(let k=0;k<a-1;k+=1)for(let w=0;w<a-1;w+=1){let N=0;n.isDark(k,w)&&(N+=1),n.isDark(k+1,w)&&(N+=1),n.isDark(k,w+1)&&(N+=1),n.isDark(k+1,w+1)&&(N+=1),(N==0||N==4)&&(c+=3)}for(let k=0;k<a;k+=1)for(let w=0;w<a-6;w+=1)n.isDark(k,w)&&!n.isDark(k,w+1)&&n.isDark(k,w+2)&&n.isDark(k,w+3)&&n.isDark(k,w+4)&&!n.isDark(k,w+5)&&n.isDark(k,w+6)&&(c+=40);for(let k=0;k<a;k+=1)for(let w=0;w<a-6;w+=1)n.isDark(w,k)&&!n.isDark(w+1,k)&&n.isDark(w+2,k)&&n.isDark(w+3,k)&&n.isDark(w+4,k)&&!n.isDark(w+5,k)&&n.isDark(w+6,k)&&(c+=40);let M=0;for(let k=0;k<a;k+=1)for(let w=0;w<a;w+=1)n.isDark(w,k)&&(M+=1);const y=Math.abs(100*M/a/a-50)/5;return c+=y*10,c},r}(),X=function(){const s=new Array(256),i=new Array(256);for(let t=0;t<8;t+=1)s[t]=1<<t;for(let t=8;t<256;t+=1)s[t]=s[t-4]^s[t-5]^s[t-6]^s[t-8];for(let t=0;t<255;t+=1)i[s[t]]=t;const l={};return l.glog=function(t){if(t<1)throw"glog("+t+")";return i[t]},l.gexp=function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return s[t]},l}(),J=function(s,i){if(typeof s.length>"u")throw s.length+"/"+i;const l=function(){let r=0;for(;r<s.length&&s[r]==0;)r+=1;const o=new Array(s.length-r+i);for(let n=0;n<s.length-r;n+=1)o[n]=s[n+r];return o}(),t={};return t.getAt=function(r){return l[r]},t.getLength=function(){return l.length},t.multiply=function(r){const o=new Array(t.getLength()+r.getLength()-1);for(let n=0;n<t.getLength();n+=1)for(let a=0;a<r.getLength();a+=1)o[n+a]^=X.gexp(X.glog(t.getAt(n))+X.glog(r.getAt(a)));return J(o,0)},t.mod=function(r){if(t.getLength()-r.getLength()<0)return t;const o=X.glog(t.getAt(0))-X.glog(r.getAt(0)),n=new Array(t.getLength());for(let a=0;a<t.getLength();a+=1)n[a]=t.getAt(a);for(let a=0;a<r.getLength();a+=1)n[a]^=X.gexp(X.glog(r.getAt(a))+o);return J(n,0).mod(r)},t},oe=function(){const s=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],i=function(r,o){const n={};return n.totalCount=r,n.dataCount=o,n},l={},t=function(r,o){switch(o){case Z.L:return s[(r-1)*4+0];case Z.M:return s[(r-1)*4+1];case Z.Q:return s[(r-1)*4+2];case Z.H:return s[(r-1)*4+3];default:return}};return l.getRSBlocks=function(r,o){const n=t(r,o);if(typeof n>"u")throw"bad rs block @ typeNumber:"+r+"/errorCorrectionLevel:"+o;const a=n.length/3,c=[];for(let M=0;M<a;M+=1){const y=n[M*3+0],k=n[M*3+1],w=n[M*3+2];for(let N=0;N<y;N+=1)c.push(i(k,w))}return c},l}(),le=function(){const s=[];let i=0;const l={};return l.getBuffer=function(){return s},l.getAt=function(t){const r=Math.floor(t/8);return(s[r]>>>7-t%8&1)==1},l.put=function(t,r){for(let o=0;o<r;o+=1)l.putBit((t>>>r-o-1&1)==1)},l.getLengthInBits=function(){return i},l.putBit=function(t){const r=Math.floor(i/8);s.length<=r&&s.push(0),t&&(s[r]|=128>>>i%8),i+=1},l},Dt=function(s){const i=W.MODE_NUMBER,l=s,t={};t.getMode=function(){return i},t.getLength=function(n){return l.length},t.write=function(n){const a=l;let c=0;for(;c+2<a.length;)n.put(r(a.substring(c,c+3)),10),c+=3;c<a.length&&(a.length-c==1?n.put(r(a.substring(c,c+1)),4):a.length-c==2&&n.put(r(a.substring(c,c+2)),7))};const r=function(n){let a=0;for(let c=0;c<n.length;c+=1)a=a*10+o(n.charAt(c));return a},o=function(n){if("0"<=n&&n<="9")return n.charCodeAt(0)-48;throw"illegal char :"+n};return t},It=function(s){const i=W.MODE_ALPHA_NUM,l=s,t={};t.getMode=function(){return i},t.getLength=function(o){return l.length},t.write=function(o){const n=l;let a=0;for(;a+1<n.length;)o.put(r(n.charAt(a))*45+r(n.charAt(a+1)),11),a+=2;a<n.length&&o.put(r(n.charAt(a)),6)};const r=function(o){if("0"<=o&&o<="9")return o.charCodeAt(0)-48;if("A"<=o&&o<="Z")return o.charCodeAt(0)-65+10;switch(o){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+o}};return t},At=function(s){const i=W.MODE_8BIT_BYTE,l=Q.stringToBytes(s),t={};return t.getMode=function(){return i},t.getLength=function(r){return l.length},t.write=function(r){for(let o=0;o<l.length;o+=1)r.put(l[o],8)},t},Lt=function(s){const i=W.MODE_KANJI,l=Q.stringToBytes;(function(o,n){const a=l(o);if(a.length!=2||(a[0]<<8|a[1])!=n)throw"sjis not supported."})("友",38726);const t=l(s),r={};return r.getMode=function(){return i},r.getLength=function(o){return~~(t.length/2)},r.write=function(o){const n=t;let a=0;for(;a+1<n.length;){let c=(255&n[a])<<8|255&n[a+1];if(33088<=c&&c<=40956)c-=33088;else if(57408<=c&&c<=60351)c-=49472;else throw"illegal char at "+(a+1)+"/"+c;c=(c>>>8&255)*192+(c&255),o.put(c,13),a+=2}if(a<n.length)throw"illegal char at "+(a+1)},r},se=function(){const s=[],i={};return i.writeByte=function(l){s.push(l&255)},i.writeShort=function(l){i.writeByte(l),i.writeByte(l>>>8)},i.writeBytes=function(l,t,r){t=t||0,r=r||l.length;for(let o=0;o<r;o+=1)i.writeByte(l[o+t])},i.writeString=function(l){for(let t=0;t<l.length;t+=1)i.writeByte(l.charCodeAt(t))},i.toByteArray=function(){return s},i.toString=function(){let l="";l+="[";for(let t=0;t<s.length;t+=1)t>0&&(l+=","),l+=s[t];return l+="]",l},i},Tt=function(){let s=0,i=0,l=0,t="";const r={},o=function(a){t+=String.fromCharCode(n(a&63))},n=function(a){if(a<0)throw"n:"+a;if(a<26)return 65+a;if(a<52)return 97+(a-26);if(a<62)return 48+(a-52);if(a==62)return 43;if(a==63)return 47;throw"n:"+a};return r.writeByte=function(a){for(s=s<<8|a&255,i+=8,l+=1;i>=6;)o(s>>>i-6),i-=6},r.flush=function(){if(i>0&&(o(s<<6-i),s=0,i=0),l%3!=0){const a=3-l%3;for(let c=0;c<a;c+=1)t+="="}},r.toString=function(){return t},r},$t=function(s){const i=s;let l=0,t=0,r=0;const o={};o.read=function(){for(;r<8;){if(l>=i.length){if(r==0)return-1;throw"unexpected end of file./"+r}const c=i.charAt(l);if(l+=1,c=="=")return r=0,-1;if(c.match(/^\s$/))continue;t=t<<6|n(c.charCodeAt(0)),r+=6}const a=t>>>r-8&255;return r-=8,a};const n=function(a){if(65<=a&&a<=90)return a-65;if(97<=a&&a<=122)return a-97+26;if(48<=a&&a<=57)return a-48+52;if(a==43)return 62;if(a==47)return 63;throw"c:"+a};return o},Kt=function(s,i){const l=s,t=i,r=new Array(s*i),o={};o.setPixel=function(M,y,k){r[y*l+M]=k},o.write=function(M){M.writeString("GIF87a"),M.writeShort(l),M.writeShort(t),M.writeByte(128),M.writeByte(0),M.writeByte(0),M.writeByte(0),M.writeByte(0),M.writeByte(0),M.writeByte(255),M.writeByte(255),M.writeByte(255),M.writeString(","),M.writeShort(0),M.writeShort(0),M.writeShort(l),M.writeShort(t),M.writeByte(0);const y=2,k=a(y);M.writeByte(y);let w=0;for(;k.length-w>255;)M.writeByte(255),M.writeBytes(k,w,255),w+=255;M.writeByte(k.length-w),M.writeBytes(k,w,k.length-w),M.writeByte(0),M.writeString(";")};const n=function(M){const y=M;let k=0,w=0;const N={};return N.write=function(A,L){if(A>>>L)throw"length over";for(;k+L>=8;)y.writeByte(255&(A<<k|w)),L-=8-k,A>>>=8-k,w=0,k=0;w=A<<k|w,k=k+L},N.flush=function(){k>0&&y.writeByte(w)},N},a=function(M){const y=1<<M,k=(1<<M)+1;let w=M+1;const N=c();for(let E=0;E<y;E+=1)N.add(String.fromCharCode(E));N.add(String.fromCharCode(y)),N.add(String.fromCharCode(k));const A=se(),L=n(A);L.write(y,w);let K=0,V=String.fromCharCode(r[K]);for(K+=1;K<r.length;){const E=String.fromCharCode(r[K]);K+=1,N.contains(V+E)?V=V+E:(L.write(N.indexOf(V),w),N.size()<4095&&(N.size()==1<<w&&(w+=1),N.add(V+E)),V=E)}return L.write(N.indexOf(V),w),L.write(k,w),L.flush(),A.toByteArray()},c=function(){const M={};let y=0;const k={};return k.add=function(w){if(k.contains(w))throw"dup key:"+w;M[w]=y,y+=1},k.size=function(){return y},k.indexOf=function(w){return M[w]},k.contains=function(w){return typeof M[w]<"u"},k};return o},Ht=function(s,i,l){const t=Kt(s,i);for(let a=0;a<i;a+=1)for(let c=0;c<s;c+=1)t.setPixel(c,a,l(c,a));const r=se();t.write(r);const o=Tt(),n=r.toByteArray();for(let a=0;a<n.length;a+=1)o.writeByte(n[a]);return o.flush(),"data:image/gif;base64,"+o};Q.stringToBytes;const ee=4,Pt=e.defineComponent({name:"XQRCode",__name:"index",props:{value:{default:""},size:{default:128},bgColor:{default:"#ffffff"},fgColor:{default:"#000000"},level:{default:"M"},showDownload:{type:Boolean,default:!1}},emits:["ready","error"],setup(s,{emit:i}){const l=s,t=i,r=j.useNamespace("qrcode"),o=e.ref();Q.stringToBytes=y=>Array.from(new TextEncoder().encode(y));const n=(y,k)=>{const w=Q(0,k);w.addData(y),w.make();const N=w.getModuleCount(),A=[];for(let L=0;L<N;L++){const K=[];for(let V=0;V<N;V++)K.push(w.isDark(L,V));A.push(K)}return A},a=y=>{if(!o.value)return;const k=o.value.getContext("2d");if(!k)return;const w=y.length,N=l.size/(w+ee*2);o.value.width=l.size,o.value.height=l.size,k.fillStyle=l.bgColor,k.fillRect(0,0,l.size,l.size),k.fillStyle=l.fgColor;const A=Math.ceil(N);for(let L=0;L<w;L++)for(let K=0;K<w;K++)y[L][K]&&k.fillRect(Math.round((K+ee)*N),Math.round((L+ee)*N),A,A)},c=()=>{if(!(!o.value||!l.value))try{const y=n(l.value,l.level);a(y),t("ready",o.value)}catch(y){t("error",y)}},M=()=>{if(!o.value)return;const y=document.createElement("a");y.download="qrcode.png",y.href=o.value.toDataURL("image/png"),y.click()};return e.watch(()=>[l.value,l.size,l.bgColor,l.fgColor,l.level],()=>{c()}),e.onMounted(()=>{c()}),(y,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r).b())},[e.createElementVNode("canvas",{ref_key:"canvasRef",ref:o,class:e.normalizeClass(e.unref(r).e("canvas"))},null,2),s.showDownload?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).e("actions"))},[e.createElementVNode("button",{class:e.normalizeClass(e.unref(r).e("download")),onClick:M}," 下载二维码 ",2)],2)):e.createCommentVNode("",!0)],2))}}),Rt=e.defineComponent({name:"XVirtualScroll",__name:"index",props:{items:{default:()=>[]},itemSize:{default:50},height:{default:400},buffer:{default:5},virtual:{type:Boolean,default:!0}},emits:["scroll"],setup(s,{expose:i,emit:l}){const t=s,r=l,o=j.useNamespace("virtual-scroll"),n=e.ref(),a=e.ref(0),c=e.computed(()=>typeof t.height=="number"?`${t.height}px`:t.height),M=e.computed(()=>t.items.length*t.itemSize),y=e.computed(()=>{const E=typeof t.height=="number"?t.height:parseInt(t.height)||400;return Math.ceil(E/t.itemSize)+t.buffer*2}),k=e.computed(()=>{if(!t.virtual)return 0;const E=Math.floor(a.value/t.itemSize)-t.buffer;return Math.max(0,E)}),w=e.computed(()=>t.virtual?Math.min(t.items.length,k.value+y.value):t.items.length),N=e.computed(()=>t.virtual?t.items.slice(k.value,w.value).map((E,D)=>({...E,index:k.value+D})):t.items),A=e.computed(()=>k.value*t.itemSize),L=E=>{const D=E.target;a.value=D.scrollTop,r("scroll",a.value)};return i({scrollToIndex:E=>{n.value&&(n.value.scrollTop=E*t.itemSize)},scrollToBottom:()=>{n.value&&(n.value.scrollTop=M.value)}}),(E,D)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:n,class:e.normalizeClass(e.unref(o).b()),style:e.normalizeStyle({height:c.value}),onScroll:L},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("wrapper")),style:e.normalizeStyle({height:`${M.value}px`})},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("content")),style:e.normalizeStyle({transform:`translateY(${A.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(S,H)=>(e.openBlock(),e.createElementBlock("div",{key:S.id??H,class:e.normalizeClass(e.unref(o).e("item")),style:e.normalizeStyle({height:`${s.itemSize}px`})},[e.renderSlot(E.$slots,"default",{item:S,index:S.index})],6))),128))],6)],6)],38))}}),jt=e.defineComponent({name:"XInfiniteScroll",__name:"index",props:{loading:{type:Boolean,default:!1},finished:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0},distance:{default:50},loadingText:{default:"加载中..."},finishedText:{default:"没有更多了"}},emits:["load"],setup(s,{emit:i}){const l=s,t=i,r=j.useNamespace("infinite-scroll"),o=e.ref(),n=e.ref();let a=null;const c=()=>{a&&a.disconnect(),a=new IntersectionObserver(M=>{M[0].isIntersecting&&!l.loading&&!l.finished&&t("load")},{rootMargin:`${l.distance}px`}),n.value&&a.observe(n.value)};return e.onMounted(()=>{c(),l.immediate&&!l.finished&&t("load")}),e.onBeforeUnmount(()=>{a&&a.disconnect()}),(M,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:o,class:e.normalizeClass(e.unref(r).b())},[e.renderSlot(M.$slots,"default"),e.createElementVNode("div",{ref_key:"observerRef",ref:n,class:e.normalizeClass(e.unref(r).e("footer"))},[s.loading?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(r).e("loading"))},[e.createVNode(e.unref(_),{name:"loading",size:16}),e.createElementVNode("span",null,e.toDisplayString(s.loadingText),1)],2)):s.finished?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(r).e("finished"))},e.toDisplayString(s.finishedText),3)):e.createCommentVNode("",!0)],2)],2))}});exports.Avatar=yt;exports.Calendar=St;exports.Card=he;exports.Carousel=Qe;exports.CarouselItem=Ge;exports.Collapse=Bt;exports.CollapseItem=bt;exports.Descriptions=Ct;exports.DescriptionsItem=wt;exports.DynamicTable=Te;exports.Empty=Fe;exports.Image=Nt;exports.InfiniteScroll=jt;exports.Pagination=re;exports.Progress=ke;exports.QRCode=Pt;exports.Scrollbar=xt;exports.Table=rt;exports.TableColumn=st;exports.Tag=me;exports.Timeline=Ye;exports.TimelineItem=Ue;exports.Tree=Oe;exports.TreeNode=F;exports.TreeTable=gt;exports.TreeTableColumn=vt;exports.VirtualScroll=Rt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("@xto/core"),ae={"arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up-bold":"M12 5l-7 7h4v7h6v-7h4l-7-7z","arrow-down-bold":"M12 19l7-7h-4V5H9v7H5l7 7z","arrow-left-bold":"M5 12l7-7v4h7v6h-7v4l-7-7z","arrow-right-bold":"M19 12l-7 7v-4H5v-6h7V5l7 7z","caret-down":"M6 9l6 6 6-6","caret-right":"M9 18l6-6-6-6",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",close:"M6 18L18 6M6 6l12 12",check:"M5 13l4 4L19 7","check-bold":"M4 12l5 5L20 6",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",delete:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",more:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z","more-h":"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z",setting:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",share:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",loading:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",question:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z","user-add":"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z","user-group":"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",logout:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1",login:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z","folder-open":"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",document:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",video:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",music:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",camera:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",chat:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",message:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z",eye:"M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z","eye-off":"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",history:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",timer:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",location:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",map:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",globe:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z","thumb-up":"M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",lock:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",unlock:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",key:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",menu:"M4 6h16M4 12h16M4 18h16","menu-fold":"M4 6h16M4 12h10M4 18h16","menu-unfold":"M4 6h16M10 12h10M4 18h16","menu-collapse":"M4 6h16M4 12h10M4 18h16","menu-expand":"M4 6h16M10 12h10M4 18h16","sidebar-fold":"M11 19l-7-7 7-7m8 14l-7-7 7-7","sidebar-expand":"M13 5l7 7-7 7M5 5l7 7-7 7","sidebar-left":"M11 19l-7-7 7-7m8 14l-7-7 7-7",dashboard:"M4 5a1 1 0 011-1h4a1 1 0 011 1v5a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v2a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 12a1 1 0 011-1h4a1 1 0 011 1v7a1 1 0 01-1 1h-4a1 1 0 01-1-1v-7z",chart:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z","chart-pie":"M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z","chart-line":"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4v16",report:"M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",analytics:"M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",system:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M12 15a3 3 0 100-6 3 3 0 000 6z",permission:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",role:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z","user-manage":"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",log:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",app:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",list:"M4 6h16M4 10h16M4 14h16M4 18h16",grid:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",fullscreen:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4","fullscreen-exit":"M9 4V9H4m11-5v5h5M4 15h5v5m11-5h-5v5","zoom-in":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7","zoom-out":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",print:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",bookmark:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",tag:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",code:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",terminal:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",database:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",server:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",cloud:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",gift:"M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7",moon:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",sun:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",theme:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01",skin:"M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z",heading:"M4 6h16M4 12h8m-8 6h16",bold:"M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z",italic:"M10 4h4m-2 0v16m-4 0h8",strikethrough:"M16 4H8a4 4 0 00-4 4v4h16V8a4 4 0 00-4-4zM4 12h16m-4 4H8a4 4 0 00-4 4v0a4 4 0 004 4h8a4 4 0 004-4v0a4 4 0 00-4-4z","list-bullet":"M4 6h.01M4 12h.01M4 18h.01M8 6h12M8 12h12M8 18h12","list-number":"M4 6h2M4 12h2M4 18h2M8 6h12M8 12h12M8 18h12","link-text":"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","image-insert":"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z","code-inline":"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4","divider-h":"M4 12h16",quote:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z","code-block":"M4 4h16v16H4z M8 8h8M8 12h8M8 16h4","sort-up":"M12 5v14m-7-7l7-7 7 7","sort-down":"M12 19V5m7 7l-7 7-7-7","chevron-down":"M6 9l6 6 6-6","chevron-right":"M9 18l6-6-6-6","chevron-up":"M18 15l-6-6-6 6","chevron-left":"M15 18l-6-6 6-6","move-up":"M5 15l7-7 7 7","move-down":"M19 9l-7 7-7-7","back-top":"M12 19V5m-7 7l7-7 7 7","dropdown-arrow":"M6 9l6 6 6-6","close-circle":"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z","close-bold":"M6 18L18 6M6 6l12 12","check-circle":"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z","info-circle":"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z","warning-circle":"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z","back-arrow":"M19 12H5m0 0l7 7m-7-7l7-7","d-arrow-left":"M11 17l-5-5 5-5M18 17l-5-5 5-5","d-arrow-right":"M6 7l5 5-5 5M13 7l5 5-5 5",left:"M15 19l-7-7 7-7",right:"M9 5l7 7-7 7",down:"M19 9l-7 7-7-7",up:"M5 15l7-7 7 7"};function ce(s){return s in ae}const de=["aria-hidden","aria-label"],ue=["stroke-width"],fe=["d"],_=e.defineComponent({name:"XIcon",__name:"index",props:{name:{},size:{default:24},color:{},spin:{type:Boolean,default:!1},strokeWidth:{default:2}},setup(s,{expose:i}){const o=s,t=j.useNamespace("icon"),r=e.computed(()=>typeof o.size=="number"?`${o.size}px`:o.size),l=e.computed(()=>({width:r.value,height:r.value,color:o.color})),n=e.computed(()=>({strokeWidth:o.strokeWidth})),a=e.computed(()=>[t.b(),t.is("spin",o.spin)]),c=e.computed(()=>o.name&&ce(o.name)?ae[o.name]:"");return i({iconSize:r,iconStyle:l,iconPath:c}),(M,k)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(a.value),style:e.normalizeStyle(l.value),"aria-hidden":!s.name,"aria-label":s.name,role:"img"},[c.value?(e.openBlock(),e.createElementBlock("svg",{key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":s.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle(n.value),"aria-hidden":"true"},[e.createElementVNode("path",{d:c.value},null,8,fe)],12,ue)):e.renderSlot(M.$slots,"default",{key:1},()=>[e.createTextVNode(e.toDisplayString(s.name),1)])],14,de))}}),me=e.defineComponent({name:"XTag",__name:"index",props:{type:{default:""},size:{default:"default"},effect:{default:"light"},closable:{type:Boolean,default:!1},hit:{type:Boolean,default:!1},color:{}},emits:["close"],setup(s,{emit:i}){const o=s,t=i,r=j.useNamespace("tag"),l=e.computed(()=>[r.b(),r.m(o.type||"primary"),o.size!=="default"?r.m(o.size):"",r.m(o.effect),r.is("hit",o.hit)]),n=e.computed(()=>o.color?{backgroundColor:o.effect==="dark"?o.color:"",borderColor:o.color,color:o.effect==="dark"?"#fff":o.color}:{}),a=c=>{t("close",c)};return(c,M)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(l.value),style:e.normalizeStyle(n.value)},[e.renderSlot(c.$slots,"default"),s.closable?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(e.unref(r).e("close")),onClick:a},[e.createVNode(e.unref(_),{name:"close",size:10})],2)):e.createCommentVNode("",!0)],6))}}),he=e.defineComponent({name:"XCard",__name:"index",props:{header:{},bodyStyle:{default:()=>({})},shadow:{default:"never"}},setup(s){const i=s,o=j.useNamespace("card"),t=e.computed(()=>[o.b(),o.is(`shadow-${i.shadow}`)]);return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value)},[s.header||r.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("header"))},[e.renderSlot(r.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(s.header),1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("body")),style:e.normalizeStyle(s.bodyStyle)},[e.renderSlot(r.$slots,"default")],6)],2))}}),pe=["viewBox"],ge=["cx","cy","r","stroke-width"],ve=["cx","cy","r","stroke-width","stroke-dasharray","stroke"],ke=e.defineComponent({name:"XProgress",__name:"index",props:{percentage:{default:0},type:{default:"line"},status:{default:""},strokeWidth:{default:6},color:{type:[String,Array,Function],default:"#4F46E5"},width:{default:126},showText:{type:Boolean,default:!0}},setup(s){const i=s,o=j.useNamespace("progress"),t=e.computed(()=>Math.min(100,Math.max(0,i.percentage))),r=e.computed(()=>{if(typeof i.color=="function")return i.color(t.value);if(Array.isArray(i.color)){const a=Math.min(i.color.length-1,Math.floor(t.value/100*i.color.length));return i.color[a]||"var(--xto-color-primary, #4F46E5)"}return i.color}),l=e.computed(()=>({width:`${t.value}%`,backgroundColor:r.value})),n=e.computed(()=>[o.b(),o.m(i.type),o.is("show-text",i.showText),o.is(`status-${i.status||""}`,!!i.status)]);return e.computed(()=>i.status==="success"?"100%":i.status==="warning"?"Warning":i.status==="exception"?"Exception":`${t.value}%`),(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.value)},[s.type==="line"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("line"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("outer"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("inner"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("bar")),style:e.normalizeStyle(l.value)},null,6)],2)],2),s.showText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("text"))},e.toDisplayString(t.value)+"% ",3)):e.createCommentVNode("",!0)],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).e("circle"))},[(e.openBlock(),e.createElementBlock("svg",{viewBox:`0 0 ${s.width} ${s.width}`,style:e.normalizeStyle({width:`${s.width}px`,height:`${s.width}px`})},[e.createElementVNode("circle",{cx:s.width/2,cy:s.width/2,r:(s.width-s.strokeWidth)/2,fill:"none","stroke-width":s.strokeWidth,stroke:"var(--xto-fill-color, #F2F3F5)"},null,8,ge),e.createElementVNode("circle",{cx:s.width/2,cy:s.width/2,r:(s.width-s.strokeWidth)/2,fill:"none","stroke-width":s.strokeWidth,"stroke-dasharray":`${t.value/100*Math.PI*(s.width-s.strokeWidth)} ${Math.PI*(s.width-s.strokeWidth)}`,stroke:r.value,"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"center"}},null,8,ve)],12,pe)),s.showText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("circle-text"))},e.toDisplayString(t.value)+"% ",3)):e.createCommentVNode("",!0)],2))],2))}}),ye=["disabled"],Ce=["onClick"],Me=["disabled"],we=["value"],xe=["value"],re=e.defineComponent({name:"XPagination",__name:"index",props:{total:{default:0},pageSize:{default:10},currentPage:{default:1},pageSizes:{default:()=>[10,20,50,100]},layout:{default:"total, sizes, prev, pager, next, jumper"}},emits:["update:currentPage","update:pageSize","current-change","size-change"],setup(s,{emit:i}){const o=s,t=i,r=j.useNamespace("pagination"),l=e.ref(o.currentPage),n=e.ref(o.pageSize);e.watch(()=>o.currentPage,V=>{l.value=V}),e.watch(()=>o.pageSize,V=>{n.value=V});const a=e.computed(()=>l.value),c=e.computed(()=>n.value),M=e.computed(()=>Math.max(1,Math.ceil(o.total/c.value))),k=e.computed(()=>o.layout.split(",").map(V=>V.trim()).filter(Boolean)),y=V=>k.value.includes(V),w=e.computed(()=>{const V=[],E=M.value,I=a.value;if(E<=7)for(let D=1;D<=E;D++)V.push(D);else if(I<=4){for(let D=1;D<=5;D++)V.push(D);V.push(-1),V.push(E)}else if(I>=E-3){V.push(1),V.push(-1);for(let D=E-4;D<=E;D++)V.push(D)}else{V.push(1),V.push(-1);for(let D=I-1;D<=I+1;D++)V.push(D);V.push(-1),V.push(E)}return V}),N=V=>{V<1||V>M.value||V===a.value||(l.value=V,t("update:currentPage",V),t("current-change",V))},L=V=>{V!==c.value&&(n.value=V,t("update:pageSize",V),t("size-change",V),l.value=1,t("update:currentPage",1),t("current-change",1))},A=e.ref(""),K=()=>{const V=parseInt(A.value,10);isFinite(V)&&(N(Math.min(Math.max(1,V),M.value)),A.value="")};return(V,E)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r).b())},[y("total")?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(r).e("total"))},"共 "+e.toDisplayString(s.total)+" 条",3)):e.createCommentVNode("",!0),y("prev")?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(e.unref(r).e("btn")),disabled:a.value<=1,onClick:E[0]||(E[0]=I=>N(a.value-1))},[...E[4]||(E[4]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"12",height:"12"},[e.createElementVNode("path",{d:"M15 18l-6-6 6-6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,ye)):e.createCommentVNode("",!0),y("pager")?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(w.value,I=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:I},[I===-1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(r).e("ellipsis"))},"...",2)):(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass([e.unref(r).e("btn"),e.unref(r).is("active",I===a.value)]),onClick:D=>N(I)},e.toDisplayString(I),11,Ce))],64))),128)):e.createCommentVNode("",!0),y("next")?(e.openBlock(),e.createElementBlock("button",{key:3,class:e.normalizeClass(e.unref(r).e("btn")),disabled:a.value>=M.value,onClick:E[1]||(E[1]=I=>N(a.value+1))},[...E[5]||(E[5]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"12",height:"12"},[e.createElementVNode("path",{d:"M9 18l6-6-6-6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,Me)):e.createCommentVNode("",!0),y("sizes")?(e.openBlock(),e.createElementBlock("select",{key:4,class:e.normalizeClass(e.unref(r).e("sizes")),value:c.value,onChange:E[2]||(E[2]=I=>L(Number(I.target.value)))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.pageSizes,I=>(e.openBlock(),e.createElementBlock("option",{key:I,value:I},e.toDisplayString(I)+" 条/页",9,xe))),128))],42,we)):e.createCommentVNode("",!0),y("jumper")?(e.openBlock(),e.createElementBlock("span",{key:5,class:e.normalizeClass(e.unref(r).e("jumper"))},[E[6]||(E[6]=e.createTextVNode(" 前往 ",-1)),e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass(e.unref(r).e("jumper-input")),type:"text",inputmode:"numeric","onUpdate:modelValue":E[3]||(E[3]=I=>A.value=I),onKeyup:e.withKeys(K,["enter"]),onBlur:K},null,34),[[e.vModelText,A.value]]),E[7]||(E[7]=e.createTextVNode(" 页 ",-1))],2)):e.createCommentVNode("",!0)],2))}}),Be={key:0},be=["checked","indeterminate"],ze=["onClick"],Ee={class:"sort-arrow up"},Ne={class:"sort-arrow down"},Ve=["onClick"],Se=["checked","onChange"],De=["onClick"],Ie=["onClick"],Ae={key:1},Le=["colspan"],Te=e.defineComponent({name:"XDynamicTable",__name:"index",props:{data:{default:()=>[]},columns:{default:()=>[]},height:{},maxHeight:{},rowKey:{},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showIndex:{type:Boolean,default:!1},showOperation:{type:Boolean,default:!1},showAddButton:{type:Boolean,default:!1},operationWidth:{default:120},operationLabel:{default:"操作"},emptyText:{default:"暂无数据"},defaultSort:{}},emits:["sort-change","row-click","row-dblclick","selection-change","select-all","cell-click","add-row","delete-row","update:data"],setup(s,{expose:i,emit:o}){var b,m;const t=s,r=o,l=j.useNamespace("dynamic-table");e.useSlots();const n=e.computed({get:()=>t.data,set:d=>r("update:data",d)}),a=e.ref({prop:((b=t.defaultSort)==null?void 0:b.prop)||"",order:((m=t.defaultSort)==null?void 0:m.order)||null}),c=e.ref([]),M=e.ref(!1),k=e.ref(!1),y=e.computed(()=>{if(!a.value.prop||!a.value.order)return n.value;const{prop:d,order:u}=a.value;return[...n.value].sort((v,f)=>{const z=v[d],S=f[d];if(z===S)return 0;const T=z>S?1:-1;return u==="ascending"?T:-T})}),w=e.computed(()=>{const d={};return t.height&&(d.height=typeof t.height=="number"?`${t.height}px`:t.height),t.maxHeight&&(d.maxHeight=typeof t.maxHeight=="number"?`${t.maxHeight}px`:t.maxHeight),d}),N=e.computed(()=>{const d=typeof t.operationWidth=="number"?`${t.operationWidth}px`:t.operationWidth;return{width:d,minWidth:d}}),L=e.computed(()=>[l.b(),l.is("border",t.border),l.is("stripe",t.stripe),l.is("loading",t.loading)]),A=d=>{d.sortable&&(a.value.prop===d.prop?a.value.order==="ascending"?a.value.order="descending":a.value.order==="descending"&&(a.value.order=null,a.value.prop=""):(a.value.prop=d.prop,a.value.order="ascending"),r("sort-change",{...a.value}))},K=d=>d.sortable?a.value.prop!==d.prop?l.is("sortable"):[l.is("sortable"),l.is(`sort-${a.value.order}`)]:"",V=(d,u,v)=>{const f=d[u.prop];return u.formatter?u.formatter(d,u,f,v):f??""},E=(d,u,v)=>{r("row-click",d,u,v)},I=(d,u,v)=>{const f=v.target;r("cell-click",d,u,f,v)},D=()=>{M.value||k.value?(c.value=[],M.value=!1,k.value=!1):(c.value=[...n.value],M.value=!0,k.value=!1),r("select-all",c.value),r("selection-change",c.value)},H=d=>{const u=c.value.findIndex(v=>typeof t.rowKey=="function"?t.rowKey(v)===t.rowKey(d):t.rowKey?v[t.rowKey]===d[t.rowKey]:v===d);u>-1?c.value.splice(u,1):c.value.push(d),M.value=c.value.length===n.value.length,k.value=c.value.length>0&&c.value.length<n.value.length,r("selection-change",c.value)},O=d=>c.value.some(u=>typeof t.rowKey=="function"?t.rowKey(u)===t.rowKey(d):t.rowKey?u[t.rowKey]===d[t.rowKey]:u===d),h=d=>{const u={};return d.width&&(u.width=typeof d.width=="number"?`${d.width}px`:d.width),d.minWidth&&(u.minWidth=typeof d.minWidth=="number"?`${d.minWidth}px`:d.minWidth),d.align&&(u.textAlign=d.align),u},C=d=>{const u=d||{};t.columns.forEach(v=>{u[v.prop]===void 0&&(u[v.prop]="")}),n.value=[...n.value,u],r("add-row",u)},g=d=>{const u=n.value[d];n.value=n.value.filter((v,f)=>f!==d),r("delete-row",u,d)};return i({clearSelection:()=>{c.value=[],M.value=!1,k.value=!1},getSelection:()=>[...c.value],sortState:a,addRow:C,deleteRow:g,getData:()=>[...n.value]}),(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(L.value)},[s.showAddButton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("toolbar"))},[e.renderSlot(d.$slots,"toolbar",{},()=>[e.createElementVNode("button",{class:e.normalizeClass(e.unref(l).e("add-btn")),onClick:u[0]||(u[0]=v=>C())},[...u[2]||(u[2]=[e.createElementVNode("span",{class:"add-icon"},"+",-1),e.createTextVNode(" 新增一行 ",-1)])],2)])],2)):e.createCommentVNode("",!0),s.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("loading"))},[...u[3]||(u[3]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("wrapper")),style:e.normalizeStyle(w.value)},[e.createElementVNode("table",null,[s.showHeader?(e.openBlock(),e.createElementBlock("thead",Be,[e.createElementVNode("tr",null,[s.rowKey?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass([e.unref(l).e("header-cell"),e.unref(l).e("selection-cell")])},[e.createElementVNode("input",{type:"checkbox",checked:M.value,indeterminate:k.value,onChange:D},null,40,be)],2)):e.createCommentVNode("",!0),s.showIndex?(e.openBlock(),e.createElementBlock("th",{key:1,class:e.normalizeClass(e.unref(l).e("header-cell")),style:{width:"60px"}}," 序号 ",2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,v=>(e.openBlock(),e.createElementBlock("th",{key:v.prop,class:e.normalizeClass([e.unref(l).e("header-cell"),K(v)]),style:e.normalizeStyle(h(v)),onClick:f=>A(v)},[e.createElementVNode("span",null,e.toDisplayString(v.label),1),v.sortable?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("sort-icon"))},[e.createElementVNode("span",Ee,[e.createVNode(e.unref(_),{name:"sort-up",size:12})]),e.createElementVNode("span",Ne,[e.createVNode(e.unref(_),{name:"sort-down",size:12})])],2)):e.createCommentVNode("",!0)],14,ze))),128)),s.showOperation?(e.openBlock(),e.createElementBlock("th",{key:2,class:e.normalizeClass(e.unref(l).e("header-cell")),style:e.normalizeStyle(N.value)},e.toDisplayString(s.operationLabel),7)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(v,f)=>(e.openBlock(),e.createElementBlock("tr",{key:s.rowKey?typeof s.rowKey=="function"?s.rowKey(v):v[s.rowKey]:f,class:e.normalizeClass([e.unref(l).e("row"),e.unref(l).is("selected",O(v))]),onClick:z=>E(v,s.columns[0],z)},[s.rowKey?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(e.unref(l).e("cell"))},[e.createElementVNode("input",{type:"checkbox",checked:O(v),onClick:u[1]||(u[1]=e.withModifiers(()=>{},["stop"])),onChange:z=>H(v)},null,40,Se)],2)):e.createCommentVNode("",!0),s.showIndex?(e.openBlock(),e.createElementBlock("td",{key:1,class:e.normalizeClass(e.unref(l).e("cell"))},e.toDisplayString(f+1),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.columns,z=>(e.openBlock(),e.createElementBlock("td",{key:z.prop,class:e.normalizeClass(e.unref(l).e("cell")),style:e.normalizeStyle(h(z)),onClick:S=>I(v,z,S)},[e.renderSlot(d.$slots,`column-${z.prop}`,e.mergeProps({row:v,column:z},{ref_for:!0},{$index:f}),()=>[e.createTextVNode(e.toDisplayString(V(v,z,f)),1)])],14,De))),128)),s.showOperation?(e.openBlock(),e.createElementBlock("td",{key:2,class:e.normalizeClass([e.unref(l).e("cell"),e.unref(l).e("operation-cell")])},[e.renderSlot(d.$slots,"operation",e.mergeProps({row:v,deleteRow:()=>g(f)},{ref_for:!0},{$index:f}),()=>[e.createElementVNode("button",{class:e.normalizeClass(e.unref(l).e("operation-btn")),onClick:e.withModifiers(z=>g(f),["stop"])}," 删除 ",10,Ie)])],2)):e.createCommentVNode("",!0)],10,Ve))),128))]),y.value.length===0&&!s.loading?(e.openBlock(),e.createElementBlock("tbody",Ae,[e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:s.columns.length+(s.rowKey?1:0)+(s.showIndex?1:0)+(s.showOperation?1:0),class:e.normalizeClass(e.unref(l).e("empty"))},[e.renderSlot(d.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(s.emptyText),1)])],10,Le)])])):e.createCommentVNode("",!0)])],6)],2))}}),$e=["draggable"],Ke={key:0,class:"x-tree-node__loading-icon"},He={key:0,class:"x-tree-node__expand-arrow"},Pe={key:0,class:"x-tree-node__icon"},Re={class:"x-tree-node__label"},je=e.defineComponent({name:"XTreeNode",__name:"tree-node",props:{node:{}},setup(s){const i=s,o=e.inject("tree"),{props:t,store:r,toggleExpand:l,toggleCheck:n,handleNodeClick:a,handleNodeContextmenu:c}=o,M=e.ref(),k=e.ref(null),y=e.computed(()=>{var d;return t.highlightCurrent&&((d=o.store)==null?void 0:d.currentKey)===i.node.key}),w=e.computed(()=>i.node.expanded),N=e.computed(()=>i.node.checked),L=e.computed(()=>i.node.indeterminate),A=e.computed(()=>i.node.disabled),K=e.computed(()=>i.node.loading),V=e.computed(()=>i.node.isLeaf),E=e.computed(()=>t.showCheckbox||t.checkable),I=e.computed(()=>i.node.selected),D=e.computed(()=>({paddingLeft:`${i.node.level*(t.indent||16)}px`})),H=d=>{a(i.node,d)},O=d=>{c(i.node,d)},h=d=>{d.stopPropagation(),A.value||l(i.node)},C=d=>{d.stopPropagation(),A.value||n(i.node)},g=d=>{var u;if(!(!t.draggable||A.value)){if(t.allowDrag&&!t.allowDrag(i.node)){d.preventDefault();return}d.dataTransfer.effectAllowed="move",d.dataTransfer.setData("nodeKey",String(i.node.key)),(u=o.emit)==null||u.call(o,"node-drag-start",i.node,d)}},B=d=>{var u;d.preventDefault(),t.draggable&&(k.value="inner",(u=o.emit)==null||u.call(o,"node-drag-enter",i.node,d))},x=d=>{var u;k.value=null,(u=o.emit)==null||u.call(o,"node-drag-leave",i.node,d)},p=d=>{var z,S;if(d.preventDefault(),!t.draggable||A.value)return;const u=(z=M.value)==null?void 0:z.getBoundingClientRect();if(!u)return;const v=d.clientY-u.top,f=u.height;v<f*.25?k.value="prev":v>f*.75?k.value="next":k.value="inner",(S=o.emit)==null||S.call(o,"node-drag-over",i.node,d)},b=d=>{var v,f;if(d.preventDefault(),!t.draggable)return;const u=(v=d.dataTransfer)==null?void 0:v.getData("nodeKey");if(u){const z=r.nodesMap.get(u);if(z&&k.value){if(t.allowDrop&&!t.allowDrop(z,i.node,k.value)){k.value=null;return}(f=o.emit)==null||f.call(o,"node-drop",z,i.node,k.value,d)}}k.value=null},m=d=>{var u;k.value=null,(u=o.emit)==null||u.call(o,"node-drag-end",i.node,d)};return(d,u)=>{var f;const v=e.resolveComponent("TreeNode",!0);return e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"nodeRef",ref:M,class:e.normalizeClass(["x-tree-node",{"is-expanded":w.value,"is-current":y.value,"is-selected":I.value,"is-disabled":A.value,"is-drop-inner":k.value==="inner","is-drop-prev":k.value==="prev","is-drop-next":k.value==="next"}]),draggable:e.unref(t).draggable&&!A.value,onDragstart:g,onDragenter:B,onDragleave:x,onDragover:p,onDrop:b,onDragend:m},[e.createElementVNode("div",{class:"x-tree-node__content",style:e.normalizeStyle(D.value),onClick:H,onContextmenu:O},[e.createElementVNode("span",{class:e.normalizeClass(["x-tree-node__expand-icon",{"is-expanded":w.value,"is-leaf":V.value,"is-loading":K.value}]),onClick:h},[K.value?(e.openBlock(),e.createElementBlock("span",Ke)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",He))],64))],2),s.node.data.icon||e.unref(t).icon?(e.openBlock(),e.createElementBlock("span",Pe,e.toDisplayString(s.node.data.icon||e.unref(t).icon),1)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["x-tree-node__checkbox",{"is-checked":N.value,"is-indeterminate":L.value,"is-disabled":A.value}]),onClick:e.withModifiers(C,["stop"])},[N.value?(e.openBlock(),e.createBlock(e.unref(_),{key:0,name:"check",size:12,class:"x-tree-node__checkbox-icon"})):L.value?(e.openBlock(),e.createBlock(e.unref(_),{key:1,name:"minus",size:12,class:"x-tree-node__checkbox-icon"})):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("span",Re,[e.renderSlot(d.$slots,"default",{node:s.node,data:s.node.data},()=>[e.createTextVNode(e.toDisplayString(s.node.label),1)])])],36),!V.value&&w.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["x-tree-node__children",{"x-tree-node__children--show-line":e.unref(t).showLine}])},[!e.unref(t).renderAfterExpand||w.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.node.children,z=>(e.openBlock(),e.createBlock(v,{key:z.key,node:z},{default:e.withCtx(S=>[e.renderSlot(d.$slots,"default",{node:S.node,data:S.data})]),_:3},8,["node"]))),128)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],42,$e)),[[e.vShow,s.node.visible&&(((f=s.node.parent)==null?void 0:f.expanded)??!0)]])}}});class F{constructor(i,o,t=0,r=null){this.data=i,this.store=o,this.level=t,this.parent=r,this.children=[],this.expanded=!1,this.selected=!1,this.checked=!1,this.indeterminate=!1,this.loading=!1,this.visible=!0,this.loaded=!1;const l=o.props||{},n=l.value||"value",a=l.label||"label",c=l.disabled||"disabled",M=l.isLeaf||"isLeaf";this.key=i[n]??i.value??i.id??Math.random().toString(),this.label=i[a]??i.label??"",this.disabled=i[c]??i.disabled??!1,this.isLeaf=i[M]??i.isLeaf??!1;const k=l.children||"children",y=i[k]??i.children??[];y.length>0?this.children=y.map(w=>new F(w,o,t+1,this)):this.isLeaf=!0}setExpanded(i,o=!0){this.expanded=i,i?this.store.expandedKeys.add(this.key):this.store.expandedKeys.delete(this.key)}setSelected(i){this.selected=i,i?this.store.selectedKeys.add(this.key):this.store.selectedKeys.delete(this.key)}setChecked(i,o=!0,t=!0){this.checked=i,this.indeterminate=!1,i?(this.store.checkedKeys.add(this.key),this.store.indeterminateKeys.delete(this.key)):(this.store.checkedKeys.delete(this.key),this.store.indeterminateKeys.delete(this.key)),o&&(this.updateChildrenChecked(i),this.updateParentChecked())}updateChildrenChecked(i){const o=t=>{t.children.forEach(r=>{r.disabled||(r.checked=i,r.indeterminate=!1,i?(this.store.checkedKeys.add(r.key),this.store.indeterminateKeys.delete(r.key)):(this.store.checkedKeys.delete(r.key),this.store.indeterminateKeys.delete(r.key)),o(r))})};o(this)}updateParentChecked(){let i=this.parent;for(;i;){const o=i.children.filter(l=>!l.disabled);if(o.length===0){i=i.parent;continue}const t=o.every(l=>l.checked),r=o.some(l=>l.checked||l.indeterminate);t?(i.checked=!0,i.indeterminate=!1,this.store.checkedKeys.add(i.key),this.store.indeterminateKeys.delete(i.key)):r?(i.checked=!1,i.indeterminate=!0,this.store.checkedKeys.delete(i.key),this.store.indeterminateKeys.add(i.key)):(i.checked=!1,i.indeterminate=!1,this.store.checkedKeys.delete(i.key),this.store.indeterminateKeys.delete(i.key)),i=i.parent}}toggleExpand(){this.setExpanded(!this.expanded)}toggleCheck(){this.setChecked(!this.checked)}get shouldShow(){return!(!this.visible||this.parent&&!this.parent.expanded)}getParentKeys(){const i=[];let o=this.parent;for(;o;)i.push(o.key),o=o.parent;return i}getChildrenKeys(){const i=[],o=t=>{t.forEach(r=>{i.push(r.key),r.children.length&&o(r.children)})};return o(this.children),i}}const Oe=e.defineComponent({name:"XTree",__name:"index",props:{filterNodeMethod:{},data:{default:()=>[]},treeData:{},emptyText:{default:"暂无数据"},nodeKey:{default:"value"},props:{default:()=>({})},fieldNames:{},renderAfterExpand:{type:Boolean,default:!0},load:{},renderContent:{},highlightCurrent:{type:Boolean,default:!1},checkOnClickNode:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultExpandedKeys:{default:()=>[]},defaultCheckedKeys:{default:()=>[]},defaultSelectedKeys:{default:()=>[]},expandedKeys:{},checkedKeys:{},selectedKeys:{},checkStrictly:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:{},allowDrop:{},accordion:{type:Boolean,default:!1},indent:{default:16},icon:{},expandOnClickNode:{type:Boolean,default:!0},checkDescendants:{type:Boolean,default:!1},currentKey:{},showLine:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},size:{default:"default"},defaultExpandAll:{type:Boolean,default:!1},checkable:{type:Boolean}},emits:["node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse","node-drag-start","node-drag-enter","node-drag-leave","node-drag-over","node-drag-end","node-drop"],setup(s,{expose:i,emit:o}){const t=s,r=o,l=j.useNamespace("tree"),n=e.reactive({nodesMap:new Map,rootNodes:[],expandedKeys:new Set,checkedKeys:new Set,selectedKeys:new Set,indeterminateKeys:new Set,currentKey:null,filterValue:""}),a=e.ref(""),c=()=>t.fieldNames?{value:t.fieldNames.key||"value",label:t.fieldNames.title||t.fieldNames.key||"label",children:t.fieldNames.children||"children",disabled:t.fieldNames.disabled||"disabled",isLeaf:t.fieldNames.isLeaf||"isLeaf"}:t.props,M=()=>t.treeData||t.data||[];n.props=c();const k=m=>{if(n.nodesMap.clear(),n.rootNodes=[],n.checkedKeys.clear(),n.indeterminateKeys.clear(),!m||!m.length)return;const d=c(),u=(v,f,z)=>{const S=new F(v,n,f,z);n.nodesMap.set(S.key,S);const T=(d==null?void 0:d.children)||"children",P=v[T]??v.children??[];return P.length>0&&(S.children=P.map($=>u($,f+1,S)),S.isLeaf=!1),S};n.rootNodes=m.map(v=>u(v,0,null)),y()},y=()=>{var m,d,u;t.defaultExpandAll?w():(m=t.defaultExpandedKeys)!=null&&m.length&&t.defaultExpandedKeys.forEach(v=>{const f=n.nodesMap.get(v);f&&(f.expanded=!0,n.expandedKeys.add(v))}),(d=t.defaultCheckedKeys)!=null&&d.length&&t.defaultCheckedKeys.forEach(v=>{const f=n.nodesMap.get(v);f&&f.setChecked(!0,!t.checkStrictly)}),(u=t.checkedKeys)!=null&&u.length&&t.checkedKeys.forEach(v=>{const f=n.nodesMap.get(v);f&&f.setChecked(!0,!t.checkStrictly)})},w=()=>{n.nodesMap.forEach(m=>{m.children.length>0&&(m.expanded=!0,n.expandedKeys.add(m.key))})},N=()=>{n.nodesMap.forEach(m=>{m.expanded=!1}),n.expandedKeys.clear()},L=m=>{if(m.disabled)return;!m.expanded?(m.expanded=!0,n.expandedKeys.add(m.key),r("node-expand",m.data,m,null)):(m.expanded=!1,n.expandedKeys.delete(m.key),r("node-collapse",m.data,m,null))},A=(m,d)=>{if(m.disabled)return;const u=d??!m.checked;m.setChecked(u,!t.checkStrictly),r("check-change",m.data,m.checked,m.indeterminate);const v=[],f=[],z=[],S=[];n.nodesMap.forEach(T=>{T.checked&&(v.push(T.data),f.push(T.key)),T.indeterminate&&(z.push(T.data),S.push(T.key))}),r("check",m.data,{checkedNodes:v,checkedKeys:f,halfCheckedNodes:z,halfCheckedKeys:S})},K=(m,d)=>{m.disabled||(r("node-click",m.data,m,null),t.expandOnClickNode&&m.children.length>0&&L(m),t.highlightCurrent&&(n.currentKey=m.key,r("current-change",m.data,m)))},V=m=>{if(a.value=m,n.filterValue=m,!m){n.nodesMap.forEach(d=>{d.visible=!0});return}n.nodesMap.forEach(d=>{const u=d.label||"";d.visible=String(u).toLowerCase().includes(m.toLowerCase())}),n.nodesMap.forEach(d=>{if(d.visible&&d.parent){let u=d.parent;for(;u;)u.visible=!0,u.expanded=!0,n.expandedKeys.add(u.key),u=u.parent}})},E=m=>n.nodesMap.get(m),I=m=>{n.currentKey=m},D=()=>{if(n.currentKey)return n.nodesMap.get(n.currentKey)},H=(m=!1)=>{const d=[];return n.nodesMap.forEach(u=>{u.checked&&(!m||u.isLeaf)&&d.push(u.data)}),d},O=(m=!1)=>{const d=[];return n.nodesMap.forEach(u=>{u.checked&&(!m||u.isLeaf)&&d.push(u.key)}),d},h=m=>{n.nodesMap.forEach(d=>{d.checked=!1,d.indeterminate=!1}),n.checkedKeys.clear(),n.indeterminateKeys.clear(),m.forEach(d=>{const u=n.nodesMap.get(d);u&&u.setChecked(!0,!t.checkStrictly)})},C=()=>{const m=[];return n.nodesMap.forEach(d=>{d.indeterminate&&m.push(d.data)}),m},g=()=>{const m=[];return n.nodesMap.forEach(d=>{d.indeterminate&&m.push(d.key)}),m},B=(m,d,u=!0)=>{const v=n.nodesMap.get(m);v&&v.setChecked(d,u&&!t.checkStrictly)},x=()=>{const m=[];return n.nodesMap.forEach(d=>{d.selected&&m.push(d.data)}),m},p=m=>{n.nodesMap.forEach(d=>{d.selected=!1}),n.selectedKeys.clear(),m.forEach(d=>{const u=n.nodesMap.get(d);u&&(u.selected=!0,n.selectedKeys.add(d))})},b=e.computed(()=>t.showCheckbox||t.checkable);return e.provide("tree",{props:t,store:n,emit:r,toggleExpand:L,toggleCheck:A,handleNodeClick:K,filterValue:e.toRef(a),showCheckboxComputed:b}),i({filter:V,getNode:E,setCurrentKey:I,getCurrentKey:()=>n.currentKey,getCurrentNode:D,getCheckedNodes:H,getCheckedKeys:O,setCheckedKeys:h,getHalfCheckedNodes:C,getHalfCheckedKeys:g,setChecked:B,getSelectedNodes:x,setSelectedKeys:p,expandAll:w,collapseAll:N,updateKeyChildren:(m,d)=>{const u=n.nodesMap.get(m);u&&(u.children.forEach(v=>{n.nodesMap.delete(v.key)}),u.children=d.map(v=>{const f=new F(v,n,u.level+1,u);return n.nodesMap.set(f.key,f),f}),u.isLeaf=u.children.length===0)},remove:m=>{const d=n.nodesMap.get(m);if(d){const u=d.parent;if(u){const f=u.children.indexOf(d);f>-1&&u.children.splice(f,1),u.children.length===0&&(u.isLeaf=!0)}else{const f=n.rootNodes.indexOf(d);f>-1&&n.rootNodes.splice(f,1)}const v=f=>{n.nodesMap.delete(f.key),f.children.forEach(v)};v(d)}},append:(m,d)=>{if(d){const u=n.nodesMap.get(d);if(u){const v=new F(m,n,u.level+1,u);n.nodesMap.set(v.key,v),u.children.push(v),u.isLeaf=!1}}else{const u=new F(m,n,0,null);n.nodesMap.set(u.key,u),n.rootNodes.push(u)}},insertBefore:(m,d)=>{var v;const u=n.nodesMap.get(d);if(u){const f=new F(m,n,u.level,u.parent);n.nodesMap.set(f.key,f);const z=((v=u.parent)==null?void 0:v.children)||n.rootNodes,S=z.indexOf(u);z.splice(S,0,f)}},insertAfter:(m,d)=>{var v;const u=n.nodesMap.get(d);if(u){const f=new F(m,n,u.level,u.parent);n.nodesMap.set(f.key,f);const z=((v=u.parent)==null?void 0:v.children)||n.rootNodes,S=z.indexOf(u);z.splice(S+1,0,f)}}}),e.watch(()=>[t.treeData,t.data],()=>{k(M())},{immediate:!0,deep:!0}),e.watch(()=>t.checkedKeys,m=>{m&&h(m)},{immediate:!0,deep:!0}),e.watch(()=>t.defaultCheckedKeys,m=>{m&&m.length>0&&!t.checkedKeys&&h(m)},{immediate:!0,deep:!0}),(m,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l).b(),e.unref(l).m(s.size)])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.rootNodes,u=>(e.openBlock(),e.createBlock(je,{key:u.key,node:u},{default:e.withCtx(v=>[e.renderSlot(m.$slots,"default",{node:v.node,data:v.data},()=>[e.createTextVNode(e.toDisplayString(v.node.label),1)])]),_:2},1032,["node"]))),128)),n.rootNodes.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("empty"))},[e.renderSlot(m.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(s.emptyText),1)])],2))],2))}}),_e=["src"],We="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTg0IiBoZWlnaHQ9IjE1MiIgdmlld0JveD0iMCAwIDE4NCAxNTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0IDMxLjY3KSI+CiAgICAgIDxlbGxpcHNlIGZpbGwtb3BhY2l0eT0iLjgiIGZpbGw9IiNGNUY1RjciIGN4PSI2Ny43OTciIGN5PSIxMDYuODkiIHJ4PSI2Ny43OTciIHJ5PSIxMi42NjgiLz4KICAgICAgPHBhdGggZD0iTTEyMi4wMzQgNjkuNjc0TDk5LjM5NCA0OC4xNjJsMCAyMS41MTYgMjIuNjQgMjIuNjQ0IDAtMjIuNjQ0em0tMjIuNjQgMjIuNjQ0TDc2Ljk5OCA3MC43OThsMCAyMS41MTYgMjIuMzk2IDIyLjM5NiAwLTIyLjM5NnoiIGZpbGw9IiNFRkVGRkYiLz4KICAgICAgPHBhdGggZD0iTTk5LjM5NCA0OC4xNjJsLTIyLjM5NiAyMi42MzYgMjIuMzk2IDIxLjUyIDAtNDQuMTU2eiIgZmlsbD0iI0YyRjZGQyIvPgogICAgICA8cGF0aCBkPSJNMTIxLjk3OCA2OS42NzRMOTkuMzk0IDkyLjI1OGwzLjE2OCAzLjE2OCAyMi41ODQtMjIuNTg0LTMuMTY4LTMuMTY4eiIgZmlsbD0iI0M3Q0NEQyIvPgogICAgICA8cGF0aCBkPSJNOTkuMzk0IDkyLjI1OEw3Ni44MSA2OS42NzRsMy4xNjgtMy4xNjggMjIuNTg0IDIyLjU4NC0zLjE2OCAzLjE2OHoiIGZpbGw9IiNDN0NEREMiLz4KICAgIDwvZz4KICAgIDxwYXRoIGQ9Ik0xNDcuODU3IDMxLjY3bC0zLjI5Mi0zLjI5MmEyLjUgMi41IDAgMCAwLTMuNTM2IDBsLTEzLjQ2IDEzLjQ2YTMuNSAzLjUgMCAwIDAgMCA0Ljk1bDMuMjkzIDMuMjkyYTMuNSAzLjUgMCAwIDAgNC45NSAwbDEzLjQ2LTEzLjQ2YTIuNSAyLjUgMCAwIDAgMC0zLjUzNnoiIGZpbGw9IiNENkRCRUMiLz4KICAgIDxwYXRoIGQ9Ik0zNi4xNDMgMzEuNjdsMy4yOTItMy4yOTJhMi41IDIuNSAwIDAgMSAzLjUzNiAwbDEzLjQ2IDEzLjQ2YTMuNSAzLjUgMCAwIDEgMCA0Ljk1bC0zLjI5MyAzLjI5MmEzLjUgMy41IDAgMCAxLTQuOTUgMEwzNi4xNDMgMzUuMmEyLjUgMi41IDAgMCAxIDAtMy41MzZ6IiBmaWxsPSIjRDZEQkVDIi8+CiAgICA8Y2lyY2xlIGZpbGw9IiNFQUVFRjQiIGN4PSI5MiIgY3k9IjgiIHI9IjgiLz4KICA8L2c+Cjwvc3ZnPg==",Fe=e.defineComponent({name:"XEmpty",__name:"index",props:{image:{default:""},imageSize:{default:0},description:{default:""},size:{default:"default"}},setup(s){const i=s,o=j.useNamespace("empty"),t=e.computed(()=>{const l={};return i.imageSize&&(l.height=`${i.imageSize}px`,l.width=`${i.imageSize}px`),l}),r=e.computed(()=>i.description||"暂无数据");return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(o).b(),e.unref(o).m(s.size)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("image")),style:e.normalizeStyle(t.value)},[e.renderSlot(l.$slots,"image",{},()=>[s.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.image,style:e.normalizeStyle(t.value),draggable:"false"},null,12,_e)):(e.openBlock(),e.createElementBlock("img",{key:1,src:We,style:e.normalizeStyle(t.value),draggable:"false"},null,4))])],6),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("description"))},[e.renderSlot(l.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(r.value),1)])],2),l.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("bottom"))},[e.renderSlot(l.$slots,"default")],2)):e.createCommentVNode("",!0)],2))}}),Ye=e.defineComponent({name:"XTimeline",__name:"index",props:{direction:{default:"vertical"}},setup(s){const i=s,o=j.useNamespace("timeline");e.provide("timeline",{props:i});const t=e.computed(()=>[o.b(),o.m(i.direction)]);return(r,l)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(t.value),role:"timeline"},[e.renderSlot(r.$slots,"default")],2))}}),Ue=e.defineComponent({name:"XTimelineItem",__name:"TimelineItem",props:{timestamp:{default:""},type:{default:"primary"},color:{},size:{default:"normal"},hideTimestamp:{type:Boolean,default:!1},placement:{default:"bottom"}},setup(s){const i=s,o=j.useNamespace("timeline-item"),t={primary:"#4F46E5",success:"#00A870",warning:"#FF7D00",danger:"#F53F3F",info:"#86909C"},r=e.computed(()=>{const n={};return i.color?n.backgroundColor=i.color:i.type&&t[i.type]&&(n.backgroundColor=t[i.type]),n}),l=e.computed(()=>[o.b(),o.m(i.size)]);return(n,a)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(l.value)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("node")),style:e.normalizeStyle(r.value)},[e.renderSlot(n.$slots,"dot")],6),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("tail"))},null,2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("wrapper"))},[!s.hideTimestamp&&s.timestamp&&s.placement==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("timestamp"))},e.toDisplayString(s.timestamp),3)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("content"))},[e.renderSlot(n.$slots,"default")],2),!s.hideTimestamp&&s.timestamp&&s.placement==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).e("timestamp"))},e.toDisplayString(s.timestamp),3)):e.createCommentVNode("",!0)],2)],2))}}),Xe=["onMouseenter","onClick"],Qe=e.defineComponent({name:"XCarousel",__name:"index",props:{activeIndex:{default:0},autoplay:{type:Boolean,default:!0},interval:{default:3e3},indicatorPosition:{default:"inside"},trigger:{default:"hover"},arrow:{default:"hover"},loop:{type:Boolean,default:!0},height:{default:300}},emits:["update:activeIndex","change"],setup(s,{expose:i,emit:o}){const t=s,r=o,l=j.useNamespace("carousel"),n=e.ref(t.activeIndex),a=e.ref(0),c=e.ref(null),M=e.ref(!1);e.provide("carousel",{currentIndex:n,itemCount:a});const k=H=>{const O=n.value;t.loop?n.value=(H+a.value)%a.value:n.value=Math.max(0,Math.min(H,a.value-1)),r("update:activeIndex",n.value),r("change",n.value,O)},y=()=>{k(n.value-1)},w=()=>{k(n.value+1)},N=()=>{t.autoplay&&a.value>1&&(L(),c.value=setInterval(()=>{M.value||w()},t.interval))},L=()=>{c.value&&(clearInterval(c.value),c.value=null)},A=()=>{M.value=!0,t.arrow},K=()=>{M.value=!1},V=H=>{t.trigger==="hover"&&k(H)},E=H=>{t.trigger==="click"&&k(H)},I=e.computed(()=>({height:typeof t.height=="number"?`${t.height}px`:t.height})),D=e.computed(()=>[l.b(),l.m(`arrow-${t.arrow}`),l.m(`indicator-${t.indicatorPosition}`)]);return e.watch(()=>t.activeIndex,H=>{n.value=H}),e.watch(()=>t.autoplay,()=>{N()}),e.watch(a,()=>{e.nextTick(()=>{N()})}),e.onMounted(()=>{N()}),e.onUnmounted(()=>{L()}),i({prev:y,next:w,setActiveItem:k}),(H,O)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(D.value),style:e.normalizeStyle(I.value),onMouseenter:A,onMouseleave:K},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("container"))},[e.renderSlot(H.$slots,"default")],2),s.arrow!=="never"?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass([e.unref(l).e("arrow"),e.unref(l).e("arrow-left")]),onClick:y}," ‹ ",2)):e.createCommentVNode("",!0),s.arrow!=="never"?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass([e.unref(l).e("arrow"),e.unref(l).e("arrow-right")]),onClick:w}," › ",2)):e.createCommentVNode("",!0),s.indicatorPosition!=="none"?(e.openBlock(),e.createElementBlock("ul",{key:2,class:e.normalizeClass(e.unref(l).e("indicators"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,h=>(e.openBlock(),e.createElementBlock("li",{key:h,class:e.normalizeClass([e.unref(l).e("indicator"),e.unref(l).is("active",h-1===n.value)]),onMouseenter:C=>V(h-1),onClick:C=>E(h-1)},[e.createElementVNode("button",{class:e.normalizeClass(e.unref(l).e("indicator-btn"))},null,2)],42,Xe))),128))],2)):e.createCommentVNode("",!0)],38))}}),Ge=e.defineComponent({name:"XCarouselItem",__name:"CarouselItem",setup(s){const i=j.useNamespace("carousel-item"),o=e.inject("carousel"),t=e.ref(-1);e.onMounted(()=>{o&&(t.value=o.itemCount.value,o.itemCount.value++)}),e.onUnmounted(()=>{o&&o.itemCount.value--});const r=e.computed(()=>o&&t.value===o.currentIndex.value),l=e.computed(()=>[i.b(),i.is("active",r.value)]);return(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.value)},[e.renderSlot(n.$slots,"default")],2))}}),Ze={key:0},Je=["onClick"],qe={class:"sort-arrow up"},et={class:"sort-arrow down"},tt=["onClick"],nt=["onClick"],ot={key:1},lt=["colspan"],at={style:{display:"none"}},rt=e.defineComponent({name:"XTable",__name:"index",props:{data:{default:()=>[]},height:{},maxHeight:{},rowKey:{},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},emptyText:{default:"暂无数据"},defaultSort:{},pagination:{}},emits:["sort-change","row-click","row-dblclick","cell-click","selection-change","select-all","page-change","size-change"],setup(s,{expose:i,emit:o}){var u,v;const t=s,r=o,l=j.useNamespace("table");e.useSlots();const n=e.reactive([]),a=(f,z)=>{n.findIndex(T=>T.config.prop===f.prop)===-1&&n.push({config:f,slot:z})},c=f=>{const z=n.findIndex(S=>S.config.prop===f);z!==-1&&n.splice(z,1)},M=(f,z)=>{const S=n.find(T=>T.config.prop===f);S&&(S.slot=z)};e.provide("x-table",{registerColumn:a,unregisterColumn:c,updateColumnSlot:M,props:t});const k=e.computed(()=>{const f=n.map(P=>P.config),z=f.filter(P=>P.fixed==="left"||P.fixed===!0),S=f.filter(P=>!P.fixed),T=f.filter(P=>P.fixed==="right");return[...z,...S,...T]}),y=e.computed(()=>k.value.filter(f=>f.fixed==="left"||f.fixed===!0)),w=e.computed(()=>k.value.filter(f=>f.fixed==="right"));e.computed(()=>k.value.filter(f=>!f.fixed)),e.computed(()=>y.value.reduce((f,z)=>{const S=z.width?typeof z.width=="number"?z.width:parseInt(z.width):100;return f+S},0)),e.computed(()=>w.value.reduce((f,z)=>{const S=z.width?typeof z.width=="number"?z.width:parseInt(z.width):100;return f+S},0));const N=e.computed(()=>{const f={};return n.forEach(z=>{z.slot&&(f[z.config.prop]=z.slot)}),f}),L=e.ref({prop:((u=t.defaultSort)==null?void 0:u.prop)||"",order:((v=t.defaultSort)==null?void 0:v.order)||null}),A=e.computed(()=>{if(!L.value.prop||!L.value.order)return t.data;const{prop:f,order:z}=L.value;return[...t.data].sort((S,T)=>{const P=S[f],$=T[f];if(P===$)return 0;const R=P>$?1:-1;return z==="ascending"?R:-R})}),K=e.computed(()=>{const f={};return t.height&&(f.height=typeof t.height=="number"?`${t.height}px`:t.height),t.maxHeight&&(f.maxHeight=typeof t.maxHeight=="number"?`${t.maxHeight}px`:t.maxHeight),f}),V=e.computed(()=>[l.b(),l.is("border",t.border),l.is("stripe",t.stripe),l.is("loading",t.loading),l.is("has-fixed",y.value.length>0||w.value.length>0)]),E=f=>{f.sortable&&(L.value.prop===f.prop?L.value.order==="ascending"?L.value.order="descending":L.value.order==="descending"&&(L.value.order=null,L.value.prop=""):(L.value.prop=f.prop,L.value.order="ascending"),r("sort-change",{...L.value}))},I=f=>f.sortable?L.value.prop!==f.prop?l.is("sortable"):[l.is("sortable"),l.is(`sort-${L.value.order}`)]:"",D=(f,z,S)=>{const T=f[z.prop];return z.formatter?z.formatter(f,z,T,S):T??""},H=(f,z)=>{r("row-click",f,k.value[0],z)},O=(f,z,S)=>{const T=S.target;r("cell-click",f,z,T,S)},h=f=>{r("page-change",f)},C=f=>{r("size-change",f)},g=(f,z,S)=>{const T={};if(f.width&&(T.width=typeof f.width=="number"?`${f.width}px`:f.width),f.minWidth&&(T.minWidth=typeof f.minWidth=="number"?`${f.minWidth}px`:f.minWidth),f.align&&(T.textAlign=f.align),(f.fixed==="left"||f.fixed===!0)&&(T.position="sticky",T.left="0px",T.zIndex="2",z!==void 0&&z>0)){let P=0;for(let $=0;$<z;$++){const R=y.value[$],G=R.width?typeof R.width=="number"?R.width:parseInt(R.width):100;P+=G}T.left=`${P}px`}if(f.fixed==="right"&&(T.position="sticky",T.right="0px",T.zIndex="2",z!==void 0)){const P=w.value,$=P.length-1-z;if($>0){let R=0;for(let G=0;G<$;G++){const q=P[P.length-1-G],ie=q.width?typeof q.width=="number"?q.width:parseInt(q.width):100;R+=ie}T.right=`${R}px`}}return T},B=f=>{const z=[];return(f.fixed==="left"||f.fixed===!0)&&z.push(l.is("fixed-left")),f.fixed==="right"&&z.push(l.is("fixed-right")),z},x=e.ref([]),p=f=>t.rowKey?typeof t.rowKey=="function"?t.rowKey(f):String(f[t.rowKey]):String(t.data.indexOf(f));return i({clearSelection:()=>{x.value=[],r("selection-change",[])},getSelection:()=>[...x.value],toggleRowSelection:(f,z)=>{const S=p(f),T=x.value.findIndex(P=>p(P)===S);z===void 0?T>-1?x.value.splice(T,1):x.value.push(f):z&&T===-1?x.value.push(f):!z&&T>-1&&x.value.splice(T,1),r("selection-change",[...x.value])},sortState:L,columns:k}),(f,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(V.value)},[s.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("loading"))},[...z[0]||(z[0]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("wrapper")),style:e.normalizeStyle(K.value)},[e.createElementVNode("table",null,[s.showHeader?(e.openBlock(),e.createElementBlock("thead",Ze,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(S,T)=>(e.openBlock(),e.createElementBlock("th",{key:S.prop,class:e.normalizeClass([e.unref(l).e("header-cell"),I(S),...B(S)]),style:e.normalizeStyle(g(S,S.fixed==="right"?w.value.indexOf(S):T)),onClick:P=>E(S)},[e.createElementVNode("span",null,e.toDisplayString(S.label),1),S.sortable?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("sort-icon"))},[e.createElementVNode("span",qe,[e.createVNode(e.unref(_),{name:"sort-up",size:12})]),e.createElementVNode("span",et,[e.createVNode(e.unref(_),{name:"sort-down",size:12})])],2)):e.createCommentVNode("",!0)],14,Je))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,(S,T)=>(e.openBlock(),e.createElementBlock("tr",{key:s.rowKey?typeof s.rowKey=="function"?s.rowKey(S):S[s.rowKey]:T,class:e.normalizeClass([e.unref(l).e("row")]),onClick:P=>H(S,P)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(P,$)=>(e.openBlock(),e.createElementBlock("td",{key:P.prop,class:e.normalizeClass([e.unref(l).e("cell"),...B(P)]),style:e.normalizeStyle(g(P,P.fixed==="right"?w.value.indexOf(P):$)),onClick:R=>O(S,P,R)},[N.value[P.prop]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>N.value[P.prop]({row:S,column:P,$index:T})),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(D(S,P,T)),1)],64))],14,nt))),128))],10,tt))),128))]),A.value.length===0&&!s.loading?(e.openBlock(),e.createElementBlock("tbody",ot,[e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:k.value.length||1,class:e.normalizeClass(e.unref(l).e("empty"))},[e.renderSlot(f.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(s.emptyText),1)])],10,lt)])])):e.createCommentVNode("",!0)])],6),s.pagination?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("pagination"))},[e.createVNode(re,{total:s.pagination.total,"current-page":s.pagination.current,"page-size":s.pagination.pageSize,onCurrentChange:h,onSizeChange:C},null,8,["total","current-page","page-size"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",at,[e.renderSlot(f.$slots,"default")])],2))}}),st=e.defineComponent({name:"XTableColumn",__name:"TableColumn",props:{prop:{},label:{},width:{},minWidth:{},align:{default:"left"},sortable:{type:[Boolean,String]},fixed:{type:[String,Boolean]},formatter:{}},setup(s){const i=s;j.useNamespace("table-column");const o=e.useSlots(),t=e.ref(`column_${Date.now()}_${Math.random().toString(36).slice(2,9)}`),r=e.inject("x-table"),l=e.computed(()=>({prop:i.prop||t.value,label:i.label,width:i.width,minWidth:i.minWidth,align:i.align,sortable:i.sortable,fixed:i.fixed,formatter:i.formatter}));return e.onMounted(()=>{r!=null&&r.registerColumn&&r.registerColumn(l.value,o.default)}),e.watch(()=>o.default,n=>{r!=null&&r.updateColumnSlot&&n&&r.updateColumnSlot(i.prop||t.value,n)},{immediate:!0}),e.onUnmounted(()=>{r!=null&&r.unregisterColumn&&r.unregisterColumn(i.prop||t.value)}),(n,a)=>null}}),it={key:0},ct=["onClick"],dt={class:"sort-arrow up"},ut={class:"sort-arrow down"},ft=["onClick"],mt={key:0},ht=["colspan"],pt={style:{display:"none"}},gt=e.defineComponent({name:"XTreeTable",__name:"index",props:{data:{default:()=>[]},rowKey:{},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},emptyText:{default:"暂无数据"},defaultExpandAll:{type:Boolean,default:!1},defaultExpandedKeys:{},indent:{default:20},treeProps:{default:()=>({children:"children",hasChildren:"hasChildren"})},expandIcon:{},collapseIcon:{}},emits:["row-click","cell-click","expand-change","sort-change"],setup(s,{expose:i,emit:o}){const t=s,r=o,l=j.useNamespace("tree-table"),n=e.ref(new Set),a=e.ref([]),c=e.ref({}),M=(p,b)=>{const m=a.value.findIndex(d=>d.prop===p.prop);m===-1?a.value.push(p):a.value[m]=p,b&&(c.value[p.prop]=b)},k=p=>{const b=a.value.findIndex(m=>m.prop===p);b>-1&&a.value.splice(b,1),delete c.value[p]},y=(p,b)=>{c.value[p]=b};e.provide("x-tree-table",{registerColumn:M,unregisterColumn:k,updateColumnSlot:y,props:t});const w=p=>typeof t.rowKey=="function"?t.rowKey(p):p[t.rowKey||"id"],N=p=>{var m;const b=((m=t.treeProps)==null?void 0:m.children)||"children";return p[b]||[]},L=p=>{var d;if(N(p).length>0)return!0;const m=((d=t.treeProps)==null?void 0:d.hasChildren)||"hasChildren";return p[m]===!0},A=p=>{const b=w(p);return n.value.has(b)},K=p=>{const b=w(p),m=!n.value.has(b);m?n.value.add(b):n.value.delete(b),r("expand-change",p,m)},V=()=>{const p=b=>{b.forEach(m=>{L(m)&&(n.value.add(w(m)),p(N(m)))})};p(t.data)},E=()=>{n.value.clear()},I=e.computed(()=>{const p=[],b=(m,d=0,u=!0)=>{m.forEach(v=>{const f=w(v),z=n.value.has(f),S=u;p.push({row:v,level:d,visible:S});const T=N(v);T.length>0&&z&&b(T,d+1,S)})};return b(t.data),p}),D=e.ref({prop:"",order:null}),H=e.computed(()=>{if(!D.value.prop||!D.value.order)return I.value;const{prop:p,order:b}=D.value;return[...I.value].sort((m,d)=>{const u=m.row[p],v=d.row[p];if(u===v)return 0;const f=u>v?1:-1;return b==="ascending"?f:-f})}),O=p=>{p.sortable&&(D.value.prop===p.prop?D.value.order==="ascending"?D.value.order="descending":D.value.order==="descending"&&(D.value.order=null,D.value.prop=""):(D.value.prop=p.prop,D.value.order="ascending"),r("sort-change",{...D.value}))},h=p=>p.sortable?D.value.prop!==p.prop?l.is("sortable"):[l.is("sortable"),l.is(`sort-${D.value.order}`)]:"",C=(p,b,m)=>{const d=p[b.prop];return b.formatter?b.formatter(p,b,d,m):d??""},g=p=>{const b={};return p.width&&(b.width=typeof p.width=="number"?`${p.width}px`:p.width),p.minWidth&&(b.minWidth=typeof p.minWidth=="number"?`${p.minWidth}px`:p.minWidth),p.align&&(b.textAlign=p.align),b},B=e.computed(()=>[l.b(),l.is("border",t.border),l.is("stripe",t.stripe),l.is("loading",t.loading)]),x=()=>{var p;t.defaultExpandAll?V():(p=t.defaultExpandedKeys)!=null&&p.length&&t.defaultExpandedKeys.forEach(b=>{n.value.add(b)})};return e.watch(()=>t.data,()=>{x()},{immediate:!0}),e.watch(()=>t.defaultExpandedKeys,p=>{p!=null&&p.length&&!t.defaultExpandAll&&(n.value.clear(),p.forEach(b=>{n.value.add(b)}))},{immediate:!0}),i({expandAll:V,collapseAll:E,toggleExpand:K,expandedKeys:n,columns:a}),(p,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(B.value)},[s.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("loading"))},[...b[0]||(b[0]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("wrapper"))},[e.createElementVNode("table",null,[s.showHeader?(e.openBlock(),e.createElementBlock("thead",it,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,m=>(e.openBlock(),e.createElementBlock("th",{key:m.prop,class:e.normalizeClass([e.unref(l).e("header-cell"),h(m)]),style:e.normalizeStyle(g(m)),onClick:d=>O(m)},[e.createElementVNode("span",null,e.toDisplayString(m.label),1),m.sortable?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l).e("sort-icon"))},[e.createElementVNode("span",dt,[e.createVNode(e.unref(_),{name:"sort-up",size:12})]),e.createElementVNode("span",ut,[e.createVNode(e.unref(_),{name:"sort-down",size:12})])],2)):e.createCommentVNode("",!0)],14,ct))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,(m,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:w(m.row)},[m.visible?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass([e.unref(l).e("row"),e.unref(l).is("level-"+m.level)])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,v)=>(e.openBlock(),e.createElementBlock("td",{key:u.prop,class:e.normalizeClass(e.unref(l).e("cell")),style:e.normalizeStyle(g(u))},[v===0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("cell-content"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l).e("indent")),style:e.normalizeStyle({width:`${m.level*s.indent}px`})},null,6),L(m.row)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(l).e("expand-icon"),e.unref(l).is("expanded",A(m.row))]),onClick:e.withModifiers(f=>K(m.row),["stop"])},[A(m.row)?(e.openBlock(),e.createBlock(e.unref(_),{key:0,name:"chevron-down",size:14})):(e.openBlock(),e.createBlock(e.unref(_),{key:1,name:"chevron-right",size:14}))],10,ft)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(l).e("expand-placeholder"))},null,2)),e.createElementVNode("span",null,[c.value[u.prop]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>c.value[u.prop]({row:m.row,column:u,$index:d})),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(C(m.row,u,d)),1)],64))])],2)):c.value[u.prop]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>c.value[u.prop]({row:m.row,column:u,$index:d})),{key:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(C(m.row,u,d)),1)],64))],6))),128))],2)):e.createCommentVNode("",!0)],64))),128)),H.value.length===0&&!s.loading?(e.openBlock(),e.createElementBlock("tr",mt,[e.createElementVNode("td",{colspan:a.value.length||1,class:e.normalizeClass(e.unref(l).e("empty"))},[e.renderSlot(p.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(s.emptyText),1)])],10,ht)])):e.createCommentVNode("",!0)])])],2),e.createElementVNode("div",pt,[e.renderSlot(p.$slots,"default")])],2))}}),vt=e.defineComponent({name:"XTreeTableColumn",__name:"TreeTableColumn",props:{prop:{},label:{},width:{},minWidth:{},align:{default:"left"},sortable:{type:[Boolean,String]},fixed:{type:[String,Boolean]},formatter:{}},setup(s){const i=s;j.useNamespace("tree-table-column");const o=e.useSlots(),t=e.inject("x-tree-table"),r=e.computed(()=>({prop:i.prop,label:i.label,width:i.width,minWidth:i.minWidth,align:i.align,sortable:i.sortable,fixed:i.fixed,formatter:i.formatter}));return e.onMounted(()=>{t!=null&&t.registerColumn&&t.registerColumn(r.value,o.default)}),e.watch(()=>o.default,l=>{t!=null&&t.updateColumnSlot&&l&&t.updateColumnSlot(i.prop,l)},{immediate:!0}),e.onUnmounted(()=>{t!=null&&t.unregisterColumn&&t.unregisterColumn(i.prop)}),(l,n)=>null}}),kt=["src","alt"],yt=e.defineComponent({name:"XAvatar",__name:"index",props:{src:{},icon:{},size:{default:"default"},shape:{default:"circle"},fit:{default:"cover"},alt:{}},emits:["error"],setup(s,{emit:i}){const o=s,t=i,r=j.useNamespace("avatar"),l=e.computed(()=>[r.b(),r.m(o.shape),typeof o.size=="string"?r.m(o.size):""]),n=e.computed(()=>{const c={};return typeof o.size=="number"&&(c.width=`${o.size}px`,c.height=`${o.size}px`,c.lineHeight=`${o.size}px`),c}),a=c=>{t("error",c)};return(c,M)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(l.value),style:e.normalizeStyle(n.value)},[s.src?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.src,alt:s.alt,style:e.normalizeStyle({objectFit:s.fit}),onError:a},null,44,kt)):s.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(r).e("icon"))},e.toDisplayString(s.icon),3)):(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(r).e("default"))},[e.renderSlot(c.$slots,"default")],2))],6))}}),Ct=e.defineComponent({name:"XDescriptions",__name:"index",props:{title:{},column:{default:3},border:{type:Boolean,default:!1},size:{default:"default"},labelWidth:{},labelAlign:{default:"right"},contentAlign:{default:"left"},colon:{type:Boolean,default:!0}},setup(s){const i=s,o=j.useNamespace("descriptions");e.provide("x-descriptions",{props:i,column:e.computed(()=>i.column)});const t=e.computed(()=>[o.b(),o.m(i.size),o.is("bordered",i.border)]);return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value)},[s.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("title"))},e.toDisplayString(s.title),3)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("body"))},[e.createElementVNode("table",null,[e.createElementVNode("tbody",null,[e.renderSlot(r.$slots,"default")])])],2)],2))}}),Mt=["colspan"],wt=e.defineComponent({name:"XDescriptionsItem",__name:"DescriptionsItem",props:{label:{},span:{default:1},labelAlign:{},contentAlign:{}},setup(s){const i=s,o=j.useNamespace("descriptions-item"),t=e.inject("x-descriptions"),r=e.computed(()=>{var k;const c={},M=(k=t==null?void 0:t.props)==null?void 0:k.labelWidth;return M&&(c.width=typeof M=="number"?`${M}px`:M),c}),l=e.computed(()=>{var c;return i.labelAlign||((c=t==null?void 0:t.props)==null?void 0:c.labelAlign)||"right"}),n=e.computed(()=>{var c;return i.contentAlign||((c=t==null?void 0:t.props)==null?void 0:c.contentAlign)||"left"}),a=e.computed(()=>{var c;return((c=t==null?void 0:t.props)==null?void 0:c.colon)??!0});return e.computed(()=>{var c;return((c=t==null?void 0:t.props)==null?void 0:c.border)??!1}),(c,M)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass(e.unref(o).b())},[e.createElementVNode("th",{class:e.normalizeClass([e.unref(o).e("label"),`is-${l.value}`]),style:e.normalizeStyle(r.value)},e.toDisplayString(s.label)+e.toDisplayString(a.value?":":""),7),e.createElementVNode("td",{class:e.normalizeClass([e.unref(o).e("content"),`is-${n.value}`]),colspan:s.span*2-1},[e.renderSlot(c.$slots,"default")],10,Mt)],2))}}),xt=e.defineComponent({name:"XScrollbar",__name:"index",props:{height:{},maxHeight:{},native:{type:Boolean,default:!1},wrapStyle:{},wrapClass:{},viewStyle:{},viewClass:{},noresize:{type:Boolean},tag:{default:"div"},always:{type:Boolean,default:!1},minSize:{default:20}},emits:["scroll"],setup(s,{expose:i,emit:o}){const t=s,r=o,l=j.useNamespace("scrollbar"),n=e.ref(),a=e.ref(),c=e.ref("0"),M=e.ref("0"),k=e.ref(0),y=e.ref(0),w=e.computed(()=>{const I={};return t.height&&(I.height=typeof t.height=="number"?`${t.height}px`:t.height),t.maxHeight&&(I.maxHeight=typeof t.maxHeight=="number"?`${t.maxHeight}px`:t.maxHeight),I}),N=()=>{if(!n.value)return;const I=n.value.offsetHeight-4,D=n.value.offsetWidth-4,H=n.value.scrollHeight,O=n.value.scrollWidth,h=I/H,C=D/O;M.value=h>=1?"0":`${I*h}px`,c.value=C>=1?"0":`${D*C}px`},L=I=>{if(!n.value)return;const D=n.value.offsetHeight,H=n.value.offsetWidth;y.value=n.value.scrollTop*100/D,k.value=n.value.scrollLeft*100/H,r("scroll",I)},A=I=>{var D;(D=n.value)==null||D.scrollTo(I)},K=I=>{n.value&&(n.value.scrollTop=I)},V=I=>{n.value&&(n.value.scrollLeft=I)};let E=null;return e.onMounted(()=>{t.native||(e.nextTick(N),t.noresize||(E=new ResizeObserver(N),a.value&&E.observe(a.value),window.addEventListener("resize",N)))}),e.onUnmounted(()=>{E&&E.disconnect(),window.removeEventListener("resize",N)}),i({scrollTo:A,setScrollTop:K,setScrollLeft:V,update:N}),(I,D)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l).b())},[e.createElementVNode("div",{ref_key:"wrapRef",ref:n,class:e.normalizeClass([e.unref(l).e("wrap"),s.wrapClass,{[e.unref(l).em("wrap","hidden-default")]:!s.native}]),style:e.normalizeStyle([w.value,{overflow:s.native?"auto":"hidden"}]),onScroll:L},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.tag),{ref_key:"resizeRef",ref:a,class:e.normalizeClass([e.unref(l).e("view"),s.viewClass]),style:e.normalizeStyle(s.viewStyle)},{default:e.withCtx(()=>[e.renderSlot(I.$slots,"default")]),_:3},8,["class","style"]))],38),!s.native&&M.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(l).e("bar"),e.unref(l).is("vertical")]),style:e.normalizeStyle({height:M.value,top:`${y.value}%`})},null,6)):e.createCommentVNode("",!0),!s.native&&c.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(l).e("bar"),e.unref(l).is("horizontal")]),style:e.normalizeStyle({width:c.value,left:`${k.value}%`})},null,6)):e.createCommentVNode("",!0)],2))}}),Bt=e.defineComponent({name:"XCollapse",__name:"index",props:{modelValue:{default:()=>[]},accordion:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(s,{emit:i}){const o=s,t=i,r=j.useNamespace("collapse"),l=e.ref([]);e.watch(()=>o.modelValue,a=>{Array.isArray(a)?l.value=a:a?l.value=[a]:l.value=[]},{immediate:!0});const n=a=>{if(o.accordion){const c=l.value.includes(a)?"":a;l.value=c?[c]:[],t("update:modelValue",c),t("change",c)}else{const c=l.value.indexOf(a);c>-1?l.value.splice(c,1):l.value.push(a),t("update:modelValue",l.value),t("change",l.value)}};return e.provide("collapse",{activeNames:l,handleItemClick:n}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r).b())},[e.renderSlot(a.$slots,"default")],2))}}),bt=e.defineComponent({name:"XCollapseItem",__name:"CollapseItem",props:{name:{},title:{},disabled:{type:Boolean}},setup(s){const i=s,o=j.useNamespace("collapse-item"),t=e.inject("collapse"),{activeNames:r,handleItemClick:l}=t,n=e.computed(()=>r.value.includes(i.name)),a=()=>{i.disabled||l(i.name)};return(c,M)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(o).b(),e.unref(o).is("active",n.value),e.unref(o).is("disabled",s.disabled)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("header")),onClick:a},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("arrow"))},[e.createVNode(e.unref(_),{name:"right",size:12})],2),e.renderSlot(c.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(s.title),1)])],2),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("content"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("content-box"))},[e.renderSlot(c.$slots,"default")],2)],2),[[e.vShow,n.value]])],2))}}),zt=["src","loading"],Et=["src"],te=.2,ne=8,Nt=e.defineComponent({name:"XImage",__name:"index",props:{src:{default:""},previewList:{default:()=>[]},initialIndex:{default:0},preview:{type:Boolean,default:!0},width:{},height:{},fit:{default:"cover"},error:{},placeholder:{},lazy:{type:Boolean,default:!1}},emits:["load","error"],setup(s,{emit:i}){const o=s,t=i,r=j.useNamespace("image"),l=e.ref(!0),n=e.ref(!1),a=e.ref(!1),c=e.ref(0),M=e.ref(1),k=e.ref(0),y=e.ref(0),w=e.ref(0),N=e.ref(!1),L=e.ref({x:0,y:0}),A=e.ref({x:0,y:0}),K=e.ref(null),V=e.computed(()=>({width:typeof o.width=="number"?`${o.width}px`:o.width,height:typeof o.height=="number"?`${o.height}px`:o.height,objectFit:o.fit})),E=e.computed(()=>o.previewList.length>0?o.previewList:[o.src]),I=e.computed(()=>E.value[c.value]),D=e.computed(()=>`translate(${y.value}px, ${w.value}px) scale(${M.value}) rotate(${k.value}deg)`),H=()=>{M.value=1,k.value=0,y.value=0,w.value=0,N.value=!1},O=$=>{l.value=!1,t("load",$)},h=$=>{l.value=!1,n.value=!0,t("error",$)},C=()=>{o.preview&&(c.value=o.initialIndex,H(),a.value=!0)},g=()=>{a.value=!1,H()},B=()=>{E.value.length<=1||(c.value=c.value>0?c.value-1:E.value.length-1)},x=()=>{E.value.length<=1||(c.value=c.value<E.value.length-1?c.value+1:0)},p=()=>{M.value=Math.min(ne,M.value*1.25)},b=()=>{M.value=Math.max(te,M.value/1.25),M.value<=1&&(y.value=0,w.value=0)},m=()=>H(),d=()=>{const $=K.value;if(!$||!$.naturalWidth)return;const R=$.getBoundingClientRect();R.width<=0||(M.value=Math.min(ne,Math.max(te,M.value*($.naturalWidth/R.width))))},u=()=>{k.value=(k.value+90)%360},v=()=>{const $=document.createElement("a");$.href=I.value,$.download="",$.target="_blank",$.rel="noopener",$.click()},f=$=>{$.preventDefault(),$.deltaY<0?p():b()},z=$=>{M.value<=1||(N.value=!0,L.value={x:$.clientX,y:$.clientY},A.value={x:y.value,y:w.value})},S=$=>{N.value&&(y.value=A.value.x+($.clientX-L.value.x),w.value=A.value.y+($.clientY-L.value.y))},T=()=>{N.value=!1},P=$=>{if(a.value)switch($.key){case"ArrowLeft":B();break;case"ArrowRight":x();break;case"Escape":g();break;case"+":case"=":p();break;case"-":b();break;case"r":case"R":u();break;case"0":H();break}};return typeof window<"u"&&window.addEventListener("keydown",P),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("keydown",P)}),e.watch(c,()=>H()),($,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r).b()),style:e.normalizeStyle({width:V.value.width,height:V.value.height})},[e.createElementVNode("img",{src:s.src,class:e.normalizeClass(e.unref(r).e("inner")),style:e.normalizeStyle(V.value),loading:s.lazy?"lazy":"eager",onLoad:O,onError:h,onClick:C},null,46,zt),l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).e("placeholder"))},[e.renderSlot($.$slots,"placeholder",{},()=>[e.createVNode(e.unref(_),{name:"loading",size:24})])],2)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(r).e("error"))},[e.renderSlot($.$slots,"error",{},()=>[e.createVNode(e.unref(_),{name:"image",size:24}),R[2]||(R[2]=e.createElementVNode("span",null,"加载失败",-1))])],2)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).e("preview")),onClick:g},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("preview-toolbar")),onClick:R[0]||(R[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-tool")),title:"放大",onClick:p},[...R[3]||(R[3]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"7"}),e.createElementVNode("path",{d:"M21 21l-4.35-4.35M11 8v6M8 11h6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-tool")),title:"缩小",onClick:b},[...R[4]||(R[4]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"7"}),e.createElementVNode("path",{d:"M21 21l-4.35-4.35M8 11h6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-tool")),title:"1:1 实际大小",onClick:d},[...R[5]||(R[5]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M9 3H3v6M15 3h6v6M9 21H3v-6M15 21h6v-6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-tool")),title:"适应窗口",onClick:m},[...R[6]||(R[6]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-tool")),title:"旋转",onClick:u},[...R[7]||(R[7]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M20 12a8 8 0 1 1-2.34-5.66M20 3v4h-4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-tool")),title:"下载",onClick:v},[...R[8]||(R[8]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(r).e("preview-close")),title:"关闭",onClick:e.withModifiers(g,["stop"])},[...R[9]||(R[9]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M18 6L6 18M6 6l12 12","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)],2),e.createElementVNode("img",{ref_key:"previewImgRef",ref:K,src:I.value,class:e.normalizeClass([e.unref(r).e("preview-image"),{"is-zoomable":M.value>1}]),style:e.normalizeStyle({transform:D.value}),draggable:!1,onClick:R[1]||(R[1]=e.withModifiers(()=>{},["stop"])),onWheel:e.withModifiers(f,["prevent"]),onMousedown:z,onMousemove:S,onMouseup:T,onMouseleave:T},null,46,Et),E.value.length>1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(r).e("preview-arrow"),e.unref(r).em("preview-arrow","left")]),onClick:e.withModifiers(B,["stop"])},[e.createVNode(e.unref(_),{name:"left",size:24})],2)):e.createCommentVNode("",!0),E.value.length>1?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass([e.unref(r).e("preview-arrow"),e.unref(r).em("preview-arrow","right")]),onClick:e.withModifiers(x,["stop"])},[e.createVNode(e.unref(_),{name:"right",size:24})],2)):e.createCommentVNode("",!0),E.value.length>1?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(r).e("preview-counter"))},e.toDisplayString(c.value+1)+" / "+e.toDisplayString(E.value.length),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)]))],6))}}),Vt=["onClick"],St=e.defineComponent({name:"XCalendar",__name:"index",props:{modelValue:{default:()=>new Date},range:{}},emits:["update:modelValue","select","change"],setup(s,{emit:i}){const o=s,t=i,r=j.useNamespace("calendar"),l=e.ref(o.modelValue.getFullYear()),n=e.ref(o.modelValue.getMonth()),a=["日","一","二","三","四","五","六"],c=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],M=new Date,k=e.computed(()=>{const E=[],I=new Date(l.value,n.value,1),D=new Date(l.value,n.value+1,0),H=I.getDay();for(let h=H-1;h>=0;h--){const C=new Date(l.value,n.value,-h);E.push({date:C,isCurrentMonth:!1,isToday:y(C,M),isSelected:y(C,o.modelValue)})}for(let h=1;h<=D.getDate();h++){const C=new Date(l.value,n.value,h);E.push({date:C,isCurrentMonth:!0,isToday:y(C,M),isSelected:y(C,o.modelValue)})}const O=42-E.length;for(let h=1;h<=O;h++){const C=new Date(l.value,n.value+1,h);E.push({date:C,isCurrentMonth:!1,isToday:y(C,M),isSelected:y(C,o.modelValue)})}return E}),y=(E,I)=>E.getFullYear()===I.getFullYear()&&E.getMonth()===I.getMonth()&&E.getDate()===I.getDate(),w=E=>{t("update:modelValue",E.date),t("select",E.date),t("change",E.date)},N=()=>{l.value--},L=()=>{l.value++},A=()=>{n.value===0?(n.value=11,l.value--):n.value--},K=()=>{n.value===11?(n.value=0,l.value++):n.value++},V=()=>{l.value=M.getFullYear(),n.value=M.getMonth(),t("update:modelValue",M),t("select",M)};return e.watch(()=>o.modelValue,E=>{l.value=E.getFullYear(),n.value=E.getMonth()}),(E,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("title"))},e.toDisplayString(l.value)+" 年 "+e.toDisplayString(c[n.value]),3),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("actions"))},[e.createElementVNode("button",{class:e.normalizeClass(e.unref(r).e("btn")),onClick:N},[e.createVNode(e.unref(_),{name:"d-arrow-left",size:12})],2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(r).e("btn")),onClick:A},[e.createVNode(e.unref(_),{name:"arrow-left",size:12})],2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(r).e("btn")),onClick:V},"今天",2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(r).e("btn")),onClick:K},[e.createVNode(e.unref(_),{name:"arrow-right",size:12})],2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(r).e("btn")),onClick:L},[e.createVNode(e.unref(_),{name:"d-arrow-right",size:12})],2)],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("weekdays"))},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(a,D=>e.createElementVNode("div",{key:D,class:e.normalizeClass(e.unref(r).e("weekday"))},e.toDisplayString(D),3)),64))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).e("body"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(D,H)=>(e.openBlock(),e.createElementBlock("div",{key:H,class:e.normalizeClass([e.unref(r).e("day"),e.unref(r).is("current-month",D.isCurrentMonth),e.unref(r).is("today",D.isToday),e.unref(r).is("selected",D.isSelected)]),onClick:O=>w(D)},[e.renderSlot(E.$slots,"default",{date:D.date,isCurrentMonth:D.isCurrentMonth},()=>[e.createTextVNode(e.toDisplayString(D.date.getDate()),1)])],10,Vt))),128))],2)],2))}}),Q=function(s,i){let r=s;const l=Z[i];let n=null,a=0,c=null;const M=[],k={},y=function(h,C){a=r*4+17,n=function(g){const B=new Array(g);for(let x=0;x<g;x+=1){B[x]=new Array(g);for(let p=0;p<g;p+=1)B[x][p]=null}return B}(a),w(0,0),w(a-7,0),w(0,a-7),A(),L(),V(h,C),r>=7&&K(h),c==null&&(c=D(r,l,M)),E(c,C)},w=function(h,C){for(let g=-1;g<=7;g+=1)if(!(h+g<=-1||a<=h+g))for(let B=-1;B<=7;B+=1)C+B<=-1||a<=C+B||(0<=g&&g<=6&&(B==0||B==6)||0<=B&&B<=6&&(g==0||g==6)||2<=g&&g<=4&&2<=B&&B<=4?n[h+g][C+B]=!0:n[h+g][C+B]=!1)},N=function(){let h=0,C=0;for(let g=0;g<8;g+=1){y(!0,g);const B=U.getLostPoint(k);(g==0||h>B)&&(h=B,C=g)}return C},L=function(){for(let h=8;h<a-8;h+=1)n[h][6]==null&&(n[h][6]=h%2==0);for(let h=8;h<a-8;h+=1)n[6][h]==null&&(n[6][h]=h%2==0)},A=function(){const h=U.getPatternPosition(r);for(let C=0;C<h.length;C+=1)for(let g=0;g<h.length;g+=1){const B=h[C],x=h[g];if(n[B][x]==null)for(let p=-2;p<=2;p+=1)for(let b=-2;b<=2;b+=1)p==-2||p==2||b==-2||b==2||p==0&&b==0?n[B+p][x+b]=!0:n[B+p][x+b]=!1}},K=function(h){const C=U.getBCHTypeNumber(r);for(let g=0;g<18;g+=1){const B=!h&&(C>>g&1)==1;n[Math.floor(g/3)][g%3+a-8-3]=B}for(let g=0;g<18;g+=1){const B=!h&&(C>>g&1)==1;n[g%3+a-8-3][Math.floor(g/3)]=B}},V=function(h,C){const g=l<<3|C,B=U.getBCHTypeInfo(g);for(let x=0;x<15;x+=1){const p=!h&&(B>>x&1)==1;x<6?n[x][8]=p:x<8?n[x+1][8]=p:n[a-15+x][8]=p}for(let x=0;x<15;x+=1){const p=!h&&(B>>x&1)==1;x<8?n[8][a-x-1]=p:x<9?n[8][15-x-1+1]=p:n[8][15-x-1]=p}n[a-8][8]=!h},E=function(h,C){let g=-1,B=a-1,x=7,p=0;const b=U.getMaskFunction(C);for(let m=a-1;m>0;m-=2)for(m==6&&(m-=1);;){for(let d=0;d<2;d+=1)if(n[B][m-d]==null){let u=!1;p<h.length&&(u=(h[p]>>>x&1)==1),b(B,m-d)&&(u=!u),n[B][m-d]=u,x-=1,x==-1&&(p+=1,x=7)}if(B+=g,B<0||a<=B){B-=g,g=-g;break}}},I=function(h,C){let g=0,B=0,x=0;const p=new Array(C.length),b=new Array(C.length);for(let v=0;v<C.length;v+=1){const f=C[v].dataCount,z=C[v].totalCount-f;B=Math.max(B,f),x=Math.max(x,z),p[v]=new Array(f);for(let $=0;$<p[v].length;$+=1)p[v][$]=255&h.getBuffer()[$+g];g+=f;const S=U.getErrorCorrectPolynomial(z),P=J(p[v],S.getLength()-1).mod(S);b[v]=new Array(S.getLength()-1);for(let $=0;$<b[v].length;$+=1){const R=$+P.getLength()-b[v].length;b[v][$]=R>=0?P.getAt(R):0}}let m=0;for(let v=0;v<C.length;v+=1)m+=C[v].totalCount;const d=new Array(m);let u=0;for(let v=0;v<B;v+=1)for(let f=0;f<C.length;f+=1)v<p[f].length&&(d[u]=p[f][v],u+=1);for(let v=0;v<x;v+=1)for(let f=0;f<C.length;f+=1)v<b[f].length&&(d[u]=b[f][v],u+=1);return d},D=function(h,C,g){const B=oe.getRSBlocks(h,C),x=le();for(let b=0;b<g.length;b+=1){const m=g[b];x.put(m.getMode(),4),x.put(m.getLength(),U.getLengthInBits(m.getMode(),h)),m.write(x)}let p=0;for(let b=0;b<B.length;b+=1)p+=B[b].dataCount;if(x.getLengthInBits()>p*8)throw"code length overflow. ("+x.getLengthInBits()+">"+p*8+")";for(x.getLengthInBits()+4<=p*8&&x.put(0,4);x.getLengthInBits()%8!=0;)x.putBit(!1);for(;!(x.getLengthInBits()>=p*8||(x.put(236,8),x.getLengthInBits()>=p*8));)x.put(17,8);return I(x,B)};k.addData=function(h,C){C=C||"Byte";let g=null;switch(C){case"Numeric":g=Dt(h);break;case"Alphanumeric":g=It(h);break;case"Byte":g=At(h);break;case"Kanji":g=Lt(h);break;default:throw"mode:"+C}M.push(g),c=null},k.isDark=function(h,C){if(h<0||a<=h||C<0||a<=C)throw h+","+C;return n[h][C]},k.getModuleCount=function(){return a},k.make=function(){if(r<1){let h=1;for(;h<40;h++){const C=oe.getRSBlocks(h,l),g=le();for(let x=0;x<M.length;x++){const p=M[x];g.put(p.getMode(),4),g.put(p.getLength(),U.getLengthInBits(p.getMode(),h)),p.write(g)}let B=0;for(let x=0;x<C.length;x++)B+=C[x].dataCount;if(g.getLengthInBits()<=B*8)break}r=h}y(!1,N())},k.createTableTag=function(h,C){h=h||2,C=typeof C>"u"?h*4:C;let g="";g+='<table style="',g+=" border-width: 0px; border-style: none;",g+=" border-collapse: collapse;",g+=" padding: 0px; margin: "+C+"px;",g+='">',g+="<tbody>";for(let B=0;B<k.getModuleCount();B+=1){g+="<tr>";for(let x=0;x<k.getModuleCount();x+=1)g+='<td style="',g+=" border-width: 0px; border-style: none;",g+=" border-collapse: collapse;",g+=" padding: 0px; margin: 0px;",g+=" width: "+h+"px;",g+=" height: "+h+"px;",g+=" background-color: ",g+=k.isDark(B,x)?"#000000":"#ffffff",g+=";",g+='"/>';g+="</tr>"}return g+="</tbody>",g+="</table>",g},k.createSvgTag=function(h,C,g,B){let x={};typeof arguments[0]=="object"&&(x=arguments[0],h=x.cellSize,C=x.margin,g=x.alt,B=x.title),h=h||2,C=typeof C>"u"?h*4:C,g=typeof g=="string"?{text:g}:g||{},g.text=g.text||null,g.id=g.text?g.id||"qrcode-description":null,B=typeof B=="string"?{text:B}:B||{},B.text=B.text||null,B.id=B.text?B.id||"qrcode-title":null;const p=k.getModuleCount()*h+C*2;let b,m,d,u,v="",f;for(f="l"+h+",0 0,"+h+" -"+h+",0 0,-"+h+"z ",v+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',v+=x.scalable?"":' width="'+p+'px" height="'+p+'px"',v+=' viewBox="0 0 '+p+" "+p+'" ',v+=' preserveAspectRatio="xMinYMin meet"',v+=B.text||g.text?' role="img" aria-labelledby="'+H([B.id,g.id].join(" ").trim())+'"':"",v+=">",v+=B.text?'<title id="'+H(B.id)+'">'+H(B.text)+"</title>":"",v+=g.text?'<description id="'+H(g.id)+'">'+H(g.text)+"</description>":"",v+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',v+='<path d="',d=0;d<k.getModuleCount();d+=1)for(u=d*h+C,b=0;b<k.getModuleCount();b+=1)k.isDark(d,b)&&(m=b*h+C,v+="M"+m+","+u+f);return v+='" stroke="transparent" fill="black"/>',v+="</svg>",v},k.createDataURL=function(h,C){h=h||2,C=typeof C>"u"?h*4:C;const g=k.getModuleCount()*h+C*2,B=C,x=g-C;return Ht(g,g,function(p,b){if(B<=p&&p<x&&B<=b&&b<x){const m=Math.floor((p-B)/h),d=Math.floor((b-B)/h);return k.isDark(d,m)?0:1}else return 1})},k.createImgTag=function(h,C,g){h=h||2,C=typeof C>"u"?h*4:C;const B=k.getModuleCount()*h+C*2;let x="";return x+="<img",x+=' src="',x+=k.createDataURL(h,C),x+='"',x+=' width="',x+=B,x+='"',x+=' height="',x+=B,x+='"',g&&(x+=' alt="',x+=H(g),x+='"'),x+="/>",x};const H=function(h){let C="";for(let g=0;g<h.length;g+=1){const B=h.charAt(g);switch(B){case"<":C+="<";break;case">":C+=">";break;case"&":C+="&";break;case'"':C+=""";break;default:C+=B;break}}return C},O=function(h){h=typeof h>"u"?1*2:h;const g=k.getModuleCount()*1+h*2,B=h,x=g-h;let p,b,m,d,u;const v={"██":"█","█ ":"▀"," █":"▄"," ":" "},f={"██":"▀","█ ":"▀"," █":" "," ":" "};let z="";for(p=0;p<g;p+=2){for(m=Math.floor((p-B)/1),d=Math.floor((p+1-B)/1),b=0;b<g;b+=1)u="█",B<=b&&b<x&&B<=p&&p<x&&k.isDark(m,Math.floor((b-B)/1))&&(u=" "),B<=b&&b<x&&B<=p+1&&p+1<x&&k.isDark(d,Math.floor((b-B)/1))?u+=" ":u+="█",z+=h<1&&p+1>=x?f[u]:v[u];z+=`
|
|
2
|
+
`}return g%2&&h>0?z.substring(0,z.length-g-1)+Array(g+1).join("▀"):z.substring(0,z.length-1)};return k.createASCII=function(h,C){if(h=h||1,h<2)return O(C);h-=1,C=typeof C>"u"?h*2:C;const g=k.getModuleCount()*h+C*2,B=C,x=g-C;let p,b,m,d;const u=Array(h+1).join("██"),v=Array(h+1).join(" ");let f="",z="";for(p=0;p<g;p+=1){for(m=Math.floor((p-B)/h),z="",b=0;b<g;b+=1)d=1,B<=b&&b<x&&B<=p&&p<x&&k.isDark(m,Math.floor((b-B)/h))&&(d=0),z+=d?u:v;for(m=0;m<h;m+=1)f+=z+`
|
|
3
|
+
`}return f.substring(0,f.length-1)},k.renderTo2dContext=function(h,C){C=C||2;const g=k.getModuleCount();for(let B=0;B<g;B++)for(let x=0;x<g;x++)h.fillStyle=k.isDark(B,x)?"black":"white",h.fillRect(x*C,B*C,C,C)},k};Q.stringToBytes=function(s){const i=[];for(let o=0;o<s.length;o+=1){const t=s.charCodeAt(o);i.push(t&255)}return i};Q.createStringToBytes=function(s,i){const o=function(){const r=$t(s),l=function(){const c=r.read();if(c==-1)throw"eof";return c};let n=0;const a={};for(;;){const c=r.read();if(c==-1)break;const M=l(),k=l(),y=l(),w=String.fromCharCode(c<<8|M),N=k<<8|y;a[w]=N,n+=1}if(n!=i)throw n+" != "+i;return a}(),t=63;return function(r){const l=[];for(let n=0;n<r.length;n+=1){const a=r.charCodeAt(n);if(a<128)l.push(a);else{const c=o[r.charAt(n)];typeof c=="number"?(c&255)==c?l.push(c):(l.push(c>>>8),l.push(c&255)):l.push(t)}}return l}};const W={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Z={L:1,M:0,Q:3,H:2},Y={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},U=function(){const s=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],i=1335,o=7973,t=21522,r={},l=function(n){let a=0;for(;n!=0;)a+=1,n>>>=1;return a};return r.getBCHTypeInfo=function(n){let a=n<<10;for(;l(a)-l(i)>=0;)a^=i<<l(a)-l(i);return(n<<10|a)^t},r.getBCHTypeNumber=function(n){let a=n<<12;for(;l(a)-l(o)>=0;)a^=o<<l(a)-l(o);return n<<12|a},r.getPatternPosition=function(n){return s[n-1]},r.getMaskFunction=function(n){switch(n){case Y.PATTERN000:return function(a,c){return(a+c)%2==0};case Y.PATTERN001:return function(a,c){return a%2==0};case Y.PATTERN010:return function(a,c){return c%3==0};case Y.PATTERN011:return function(a,c){return(a+c)%3==0};case Y.PATTERN100:return function(a,c){return(Math.floor(a/2)+Math.floor(c/3))%2==0};case Y.PATTERN101:return function(a,c){return a*c%2+a*c%3==0};case Y.PATTERN110:return function(a,c){return(a*c%2+a*c%3)%2==0};case Y.PATTERN111:return function(a,c){return(a*c%3+(a+c)%2)%2==0};default:throw"bad maskPattern:"+n}},r.getErrorCorrectPolynomial=function(n){let a=J([1],0);for(let c=0;c<n;c+=1)a=a.multiply(J([1,X.gexp(c)],0));return a},r.getLengthInBits=function(n,a){if(1<=a&&a<10)switch(n){case W.MODE_NUMBER:return 10;case W.MODE_ALPHA_NUM:return 9;case W.MODE_8BIT_BYTE:return 8;case W.MODE_KANJI:return 8;default:throw"mode:"+n}else if(a<27)switch(n){case W.MODE_NUMBER:return 12;case W.MODE_ALPHA_NUM:return 11;case W.MODE_8BIT_BYTE:return 16;case W.MODE_KANJI:return 10;default:throw"mode:"+n}else if(a<41)switch(n){case W.MODE_NUMBER:return 14;case W.MODE_ALPHA_NUM:return 13;case W.MODE_8BIT_BYTE:return 16;case W.MODE_KANJI:return 12;default:throw"mode:"+n}else throw"type:"+a},r.getLostPoint=function(n){const a=n.getModuleCount();let c=0;for(let y=0;y<a;y+=1)for(let w=0;w<a;w+=1){let N=0;const L=n.isDark(y,w);for(let A=-1;A<=1;A+=1)if(!(y+A<0||a<=y+A))for(let K=-1;K<=1;K+=1)w+K<0||a<=w+K||A==0&&K==0||L==n.isDark(y+A,w+K)&&(N+=1);N>5&&(c+=3+N-5)}for(let y=0;y<a-1;y+=1)for(let w=0;w<a-1;w+=1){let N=0;n.isDark(y,w)&&(N+=1),n.isDark(y+1,w)&&(N+=1),n.isDark(y,w+1)&&(N+=1),n.isDark(y+1,w+1)&&(N+=1),(N==0||N==4)&&(c+=3)}for(let y=0;y<a;y+=1)for(let w=0;w<a-6;w+=1)n.isDark(y,w)&&!n.isDark(y,w+1)&&n.isDark(y,w+2)&&n.isDark(y,w+3)&&n.isDark(y,w+4)&&!n.isDark(y,w+5)&&n.isDark(y,w+6)&&(c+=40);for(let y=0;y<a;y+=1)for(let w=0;w<a-6;w+=1)n.isDark(w,y)&&!n.isDark(w+1,y)&&n.isDark(w+2,y)&&n.isDark(w+3,y)&&n.isDark(w+4,y)&&!n.isDark(w+5,y)&&n.isDark(w+6,y)&&(c+=40);let M=0;for(let y=0;y<a;y+=1)for(let w=0;w<a;w+=1)n.isDark(w,y)&&(M+=1);const k=Math.abs(100*M/a/a-50)/5;return c+=k*10,c},r}(),X=function(){const s=new Array(256),i=new Array(256);for(let t=0;t<8;t+=1)s[t]=1<<t;for(let t=8;t<256;t+=1)s[t]=s[t-4]^s[t-5]^s[t-6]^s[t-8];for(let t=0;t<255;t+=1)i[s[t]]=t;const o={};return o.glog=function(t){if(t<1)throw"glog("+t+")";return i[t]},o.gexp=function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return s[t]},o}(),J=function(s,i){if(typeof s.length>"u")throw s.length+"/"+i;const o=function(){let r=0;for(;r<s.length&&s[r]==0;)r+=1;const l=new Array(s.length-r+i);for(let n=0;n<s.length-r;n+=1)l[n]=s[n+r];return l}(),t={};return t.getAt=function(r){return o[r]},t.getLength=function(){return o.length},t.multiply=function(r){const l=new Array(t.getLength()+r.getLength()-1);for(let n=0;n<t.getLength();n+=1)for(let a=0;a<r.getLength();a+=1)l[n+a]^=X.gexp(X.glog(t.getAt(n))+X.glog(r.getAt(a)));return J(l,0)},t.mod=function(r){if(t.getLength()-r.getLength()<0)return t;const l=X.glog(t.getAt(0))-X.glog(r.getAt(0)),n=new Array(t.getLength());for(let a=0;a<t.getLength();a+=1)n[a]=t.getAt(a);for(let a=0;a<r.getLength();a+=1)n[a]^=X.gexp(X.glog(r.getAt(a))+l);return J(n,0).mod(r)},t},oe=function(){const s=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],i=function(r,l){const n={};return n.totalCount=r,n.dataCount=l,n},o={},t=function(r,l){switch(l){case Z.L:return s[(r-1)*4+0];case Z.M:return s[(r-1)*4+1];case Z.Q:return s[(r-1)*4+2];case Z.H:return s[(r-1)*4+3];default:return}};return o.getRSBlocks=function(r,l){const n=t(r,l);if(typeof n>"u")throw"bad rs block @ typeNumber:"+r+"/errorCorrectionLevel:"+l;const a=n.length/3,c=[];for(let M=0;M<a;M+=1){const k=n[M*3+0],y=n[M*3+1],w=n[M*3+2];for(let N=0;N<k;N+=1)c.push(i(y,w))}return c},o}(),le=function(){const s=[];let i=0;const o={};return o.getBuffer=function(){return s},o.getAt=function(t){const r=Math.floor(t/8);return(s[r]>>>7-t%8&1)==1},o.put=function(t,r){for(let l=0;l<r;l+=1)o.putBit((t>>>r-l-1&1)==1)},o.getLengthInBits=function(){return i},o.putBit=function(t){const r=Math.floor(i/8);s.length<=r&&s.push(0),t&&(s[r]|=128>>>i%8),i+=1},o},Dt=function(s){const i=W.MODE_NUMBER,o=s,t={};t.getMode=function(){return i},t.getLength=function(n){return o.length},t.write=function(n){const a=o;let c=0;for(;c+2<a.length;)n.put(r(a.substring(c,c+3)),10),c+=3;c<a.length&&(a.length-c==1?n.put(r(a.substring(c,c+1)),4):a.length-c==2&&n.put(r(a.substring(c,c+2)),7))};const r=function(n){let a=0;for(let c=0;c<n.length;c+=1)a=a*10+l(n.charAt(c));return a},l=function(n){if("0"<=n&&n<="9")return n.charCodeAt(0)-48;throw"illegal char :"+n};return t},It=function(s){const i=W.MODE_ALPHA_NUM,o=s,t={};t.getMode=function(){return i},t.getLength=function(l){return o.length},t.write=function(l){const n=o;let a=0;for(;a+1<n.length;)l.put(r(n.charAt(a))*45+r(n.charAt(a+1)),11),a+=2;a<n.length&&l.put(r(n.charAt(a)),6)};const r=function(l){if("0"<=l&&l<="9")return l.charCodeAt(0)-48;if("A"<=l&&l<="Z")return l.charCodeAt(0)-65+10;switch(l){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+l}};return t},At=function(s){const i=W.MODE_8BIT_BYTE,o=Q.stringToBytes(s),t={};return t.getMode=function(){return i},t.getLength=function(r){return o.length},t.write=function(r){for(let l=0;l<o.length;l+=1)r.put(o[l],8)},t},Lt=function(s){const i=W.MODE_KANJI,o=Q.stringToBytes;(function(l,n){const a=o(l);if(a.length!=2||(a[0]<<8|a[1])!=n)throw"sjis not supported."})("友",38726);const t=o(s),r={};return r.getMode=function(){return i},r.getLength=function(l){return~~(t.length/2)},r.write=function(l){const n=t;let a=0;for(;a+1<n.length;){let c=(255&n[a])<<8|255&n[a+1];if(33088<=c&&c<=40956)c-=33088;else if(57408<=c&&c<=60351)c-=49472;else throw"illegal char at "+(a+1)+"/"+c;c=(c>>>8&255)*192+(c&255),l.put(c,13),a+=2}if(a<n.length)throw"illegal char at "+(a+1)},r},se=function(){const s=[],i={};return i.writeByte=function(o){s.push(o&255)},i.writeShort=function(o){i.writeByte(o),i.writeByte(o>>>8)},i.writeBytes=function(o,t,r){t=t||0,r=r||o.length;for(let l=0;l<r;l+=1)i.writeByte(o[l+t])},i.writeString=function(o){for(let t=0;t<o.length;t+=1)i.writeByte(o.charCodeAt(t))},i.toByteArray=function(){return s},i.toString=function(){let o="";o+="[";for(let t=0;t<s.length;t+=1)t>0&&(o+=","),o+=s[t];return o+="]",o},i},Tt=function(){let s=0,i=0,o=0,t="";const r={},l=function(a){t+=String.fromCharCode(n(a&63))},n=function(a){if(a<0)throw"n:"+a;if(a<26)return 65+a;if(a<52)return 97+(a-26);if(a<62)return 48+(a-52);if(a==62)return 43;if(a==63)return 47;throw"n:"+a};return r.writeByte=function(a){for(s=s<<8|a&255,i+=8,o+=1;i>=6;)l(s>>>i-6),i-=6},r.flush=function(){if(i>0&&(l(s<<6-i),s=0,i=0),o%3!=0){const a=3-o%3;for(let c=0;c<a;c+=1)t+="="}},r.toString=function(){return t},r},$t=function(s){const i=s;let o=0,t=0,r=0;const l={};l.read=function(){for(;r<8;){if(o>=i.length){if(r==0)return-1;throw"unexpected end of file./"+r}const c=i.charAt(o);if(o+=1,c=="=")return r=0,-1;if(c.match(/^\s$/))continue;t=t<<6|n(c.charCodeAt(0)),r+=6}const a=t>>>r-8&255;return r-=8,a};const n=function(a){if(65<=a&&a<=90)return a-65;if(97<=a&&a<=122)return a-97+26;if(48<=a&&a<=57)return a-48+52;if(a==43)return 62;if(a==47)return 63;throw"c:"+a};return l},Kt=function(s,i){const o=s,t=i,r=new Array(s*i),l={};l.setPixel=function(M,k,y){r[k*o+M]=y},l.write=function(M){M.writeString("GIF87a"),M.writeShort(o),M.writeShort(t),M.writeByte(128),M.writeByte(0),M.writeByte(0),M.writeByte(0),M.writeByte(0),M.writeByte(0),M.writeByte(255),M.writeByte(255),M.writeByte(255),M.writeString(","),M.writeShort(0),M.writeShort(0),M.writeShort(o),M.writeShort(t),M.writeByte(0);const k=2,y=a(k);M.writeByte(k);let w=0;for(;y.length-w>255;)M.writeByte(255),M.writeBytes(y,w,255),w+=255;M.writeByte(y.length-w),M.writeBytes(y,w,y.length-w),M.writeByte(0),M.writeString(";")};const n=function(M){const k=M;let y=0,w=0;const N={};return N.write=function(L,A){if(L>>>A)throw"length over";for(;y+A>=8;)k.writeByte(255&(L<<y|w)),A-=8-y,L>>>=8-y,w=0,y=0;w=L<<y|w,y=y+A},N.flush=function(){y>0&&k.writeByte(w)},N},a=function(M){const k=1<<M,y=(1<<M)+1;let w=M+1;const N=c();for(let E=0;E<k;E+=1)N.add(String.fromCharCode(E));N.add(String.fromCharCode(k)),N.add(String.fromCharCode(y));const L=se(),A=n(L);A.write(k,w);let K=0,V=String.fromCharCode(r[K]);for(K+=1;K<r.length;){const E=String.fromCharCode(r[K]);K+=1,N.contains(V+E)?V=V+E:(A.write(N.indexOf(V),w),N.size()<4095&&(N.size()==1<<w&&(w+=1),N.add(V+E)),V=E)}return A.write(N.indexOf(V),w),A.write(y,w),A.flush(),L.toByteArray()},c=function(){const M={};let k=0;const y={};return y.add=function(w){if(y.contains(w))throw"dup key:"+w;M[w]=k,k+=1},y.size=function(){return k},y.indexOf=function(w){return M[w]},y.contains=function(w){return typeof M[w]<"u"},y};return l},Ht=function(s,i,o){const t=Kt(s,i);for(let a=0;a<i;a+=1)for(let c=0;c<s;c+=1)t.setPixel(c,a,o(c,a));const r=se();t.write(r);const l=Tt(),n=r.toByteArray();for(let a=0;a<n.length;a+=1)l.writeByte(n[a]);return l.flush(),"data:image/gif;base64,"+l};Q.stringToBytes;const ee=4,Pt=e.defineComponent({name:"XQRCode",__name:"index",props:{value:{default:""},size:{default:128},bgColor:{default:"#ffffff"},fgColor:{default:"#000000"},level:{default:"M"},showDownload:{type:Boolean,default:!1}},emits:["ready","error"],setup(s,{emit:i}){const o=s,t=i,r=j.useNamespace("qrcode"),l=e.ref();Q.stringToBytes=k=>Array.from(new TextEncoder().encode(k));const n=(k,y)=>{const w=Q(0,y);w.addData(k),w.make();const N=w.getModuleCount(),L=[];for(let A=0;A<N;A++){const K=[];for(let V=0;V<N;V++)K.push(w.isDark(A,V));L.push(K)}return L},a=k=>{if(!l.value)return;const y=l.value.getContext("2d");if(!y)return;const w=k.length,N=o.size/(w+ee*2);l.value.width=o.size,l.value.height=o.size,y.fillStyle=o.bgColor,y.fillRect(0,0,o.size,o.size),y.fillStyle=o.fgColor;const L=Math.ceil(N);for(let A=0;A<w;A++)for(let K=0;K<w;K++)k[A][K]&&y.fillRect(Math.round((K+ee)*N),Math.round((A+ee)*N),L,L)},c=()=>{if(!(!l.value||!o.value))try{const k=n(o.value,o.level);a(k),t("ready",l.value)}catch(k){t("error",k)}},M=()=>{if(!l.value)return;const k=document.createElement("a");k.download="qrcode.png",k.href=l.value.toDataURL("image/png"),k.click()};return e.watch(()=>[o.value,o.size,o.bgColor,o.fgColor,o.level],()=>{c()}),e.onMounted(()=>{c()}),(k,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r).b())},[e.createElementVNode("canvas",{ref_key:"canvasRef",ref:l,class:e.normalizeClass(e.unref(r).e("canvas"))},null,2),s.showDownload?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(r).e("actions"))},[e.createElementVNode("button",{class:e.normalizeClass(e.unref(r).e("download")),onClick:M}," 下载二维码 ",2)],2)):e.createCommentVNode("",!0)],2))}}),Rt=e.defineComponent({name:"XVirtualScroll",__name:"index",props:{items:{default:()=>[]},itemSize:{default:50},height:{default:400},buffer:{default:5},virtual:{type:Boolean,default:!0}},emits:["scroll"],setup(s,{expose:i,emit:o}){const t=s,r=o,l=j.useNamespace("virtual-scroll"),n=e.ref(),a=e.ref(0),c=e.computed(()=>typeof t.height=="number"?`${t.height}px`:t.height),M=e.computed(()=>t.items.length*t.itemSize),k=e.computed(()=>{const E=typeof t.height=="number"?t.height:parseInt(t.height)||400;return Math.ceil(E/t.itemSize)+t.buffer*2}),y=e.computed(()=>{if(!t.virtual)return 0;const E=Math.floor(a.value/t.itemSize)-t.buffer;return Math.max(0,E)}),w=e.computed(()=>t.virtual?Math.min(t.items.length,y.value+k.value):t.items.length),N=e.computed(()=>t.virtual?t.items.slice(y.value,w.value).map((E,I)=>({...E,index:y.value+I})):t.items),L=e.computed(()=>y.value*t.itemSize),A=E=>{const I=E.target;a.value=I.scrollTop,r("scroll",a.value)};return i({scrollToIndex:E=>{n.value&&(n.value.scrollTop=E*t.itemSize)},scrollToBottom:()=>{n.value&&(n.value.scrollTop=M.value)}}),(E,I)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:n,class:e.normalizeClass(e.unref(l).b()),style:e.normalizeStyle({height:c.value}),onScroll:A},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("wrapper")),style:e.normalizeStyle({height:`${M.value}px`})},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content")),style:e.normalizeStyle({transform:`translateY(${L.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(D,H)=>(e.openBlock(),e.createElementBlock("div",{key:D.id??H,class:e.normalizeClass(e.unref(l).e("item")),style:e.normalizeStyle({height:`${s.itemSize}px`})},[e.renderSlot(E.$slots,"default",{item:D,index:D.index})],6))),128))],6)],6)],38))}}),jt=e.defineComponent({name:"XInfiniteScroll",__name:"index",props:{loading:{type:Boolean,default:!1},finished:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0},distance:{default:50},loadingText:{default:"加载中..."},finishedText:{default:"没有更多了"}},emits:["load"],setup(s,{emit:i}){const o=s,t=i,r=j.useNamespace("infinite-scroll"),l=e.ref(),n=e.ref();let a=null;const c=()=>{a&&a.disconnect(),a=new IntersectionObserver(M=>{M[0].isIntersecting&&!o.loading&&!o.finished&&t("load")},{rootMargin:`${o.distance}px`}),n.value&&a.observe(n.value)};return e.onMounted(()=>{c(),o.immediate&&!o.finished&&t("load")}),e.onBeforeUnmount(()=>{a&&a.disconnect()}),(M,k)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:l,class:e.normalizeClass(e.unref(r).b())},[e.renderSlot(M.$slots,"default"),e.createElementVNode("div",{ref_key:"observerRef",ref:n,class:e.normalizeClass(e.unref(r).e("footer"))},[s.loading?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(r).e("loading"))},[e.createVNode(e.unref(_),{name:"loading",size:16}),e.createElementVNode("span",null,e.toDisplayString(s.loadingText),1)],2)):s.finished?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(r).e("finished"))},e.toDisplayString(s.finishedText),3)):e.createCommentVNode("",!0)],2)],2))}}),Ot=st;exports.Avatar=yt;exports.Calendar=St;exports.Card=he;exports.Carousel=Qe;exports.CarouselItem=Ge;exports.Collapse=Bt;exports.CollapseItem=bt;exports.Descriptions=Ct;exports.DescriptionsItem=wt;exports.DynamicTable=Te;exports.Empty=Fe;exports.Image=Nt;exports.InfiniteScroll=jt;exports.Pagination=re;exports.Progress=ke;exports.QRCode=Pt;exports.Scrollbar=xt;exports.Table=rt;exports.TableColumn=Ot;exports.Tag=me;exports.Timeline=Ye;exports.TimelineItem=Ue;exports.Tree=Oe;exports.TreeNode=F;exports.TreeTable=gt;exports.TreeTableColumn=vt;exports.VirtualScroll=Rt;
|