"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),d=require("../classNames.js"),h=require("../isValid.js"),u=require("../util.js"),g=t=>{const r=Object.keys(t),s={},o={},e={};for(let n=0,l=r.length;n<l;n++){const p=r[n];u.isOn(p)?(s[p[2].toLowerCase()+p.slice(3)]=t[p],o[p]=t[p]):e[p]=t[p]}return{onEvents:o,events:s,extraAttrs:e}},m=(t="",r=!1)=>{const s={},o=/;(?![^(]*\))/g,e=/:(.+)/;return typeof t=="object"?t:(t.split(o).forEach(n=>{if(n){const l=n.split(e);if(l.length>1){const p=r?u.camelize(l[0].trim()):l[0].trim();s[p]=l[1].trim()}}}),s)},v=(t,r)=>t[r]!==void 0,c=Symbol("skipFlatten"),f=(t=[],r=!0)=>{const s=Array.isArray(t)?t:[t],o=[];return s.forEach(e=>{Array.isArray(e)?o.push(...f(e,r)):e&&e.type===i.Fragment?e.key===c?o.push(e):o.push(...f(e.children,r)):e&&i.isVNode(e)?r&&!y(e)?o.push(e):r||o.push(e):h.default(e)&&o.push(e)}),o},E=(t,r="default",s={})=>{if(i.isVNode(t))return t.type===i.Fragment?r==="default"?f(t.children):[]:t.children&&t.children[r]?f(t.children[r](s)):[];{const o=t.$slots[r]&&t.$slots[r](s);return f(o)}},A=t=>{let r=t?.vnode?.el||t&&(t.$el||t);for(;r&&!r.tagName;)r=r.nextSibling;return r},S=t=>{const r={};if(t.$&&t.$.vnode){const s=t.$.vnode.props||{};Object.keys(t.$props).forEach(o=>{const e=t.$props[o],n=u.hyphenate(o);(e!==void 0||n in s)&&(r[o]=e)})}else if(i.isVNode(t)&&typeof t.type=="object"){const s=t.props||{},o={};Object.keys(s).forEach(n=>{o[u.camelize(n)]=s[n]});const e=t.type.props||{};Object.keys(e).forEach(n=>{const l=u.resolvePropValue(e,o,n,o[n]);(l!==void 0||n in o)&&(r[n]=l)})}return r},$=(t,r="default",s=t,o=!0)=>{let e;if(t.$){const n=t[r];if(n!==void 0)return typeof n=="function"&&o?n(s):n;e=t.$slots[r],e=o&&e?e(s):e}else if(i.isVNode(t)){const n=t.props&&t.props[r];if(n!==void 0&&t.props!==null)return typeof n=="function"&&o?n(s):n;t.type===i.Fragment?e=t.children:t.children&&t.children[r]&&(e=t.children[r],e=o&&e?e(s):e)}return Array.isArray(e)&&(e=f(e),e=e.length===1?e[0]:e,e=e.length===0?void 0:e),e};function b(t={},r=!0){let s={};return t.$?s={...s,...t.$attrs}:s={...s,...t.props},g(s)[r?"onEvents":"events"]}function C(t){const s=((i.isVNode(t)?t.props:t.$attrs)||{}).class||{};let o={};return typeof s=="string"?s.split(" ").forEach(e=>{o[e.trim()]=!0}):Array.isArray(s)?d.default(s).split(" ").forEach(e=>{o[e.trim()]=!0}):o={...o,...s},o}function F(t,r){let o=((i.isVNode(t)?t.props:t.$attrs)||{}).style||{};return typeof o=="string"&&(o=m(o,r)),o}function N(t){return t.length===1&&t[0].type===i.Fragment}function V(t){return t==null||t===""||Array.isArray(t)&&t.length===0}function y(t){return t&&(t.type===i.Comment||t.type===i.Fragment&&t.children.length===0||t.type===i.Text&&t.children.trim()==="")}function O(t){return t&&t.type===i.Text}function a(t=[]){const r=[];return t.forEach(s=>{Array.isArray(s)?r.push(...s):s?.type===i.Fragment?r.push(...a(s.children)):r.push(s)}),r.filter(s=>!y(s))}function P(t){if(t){const r=a(t);return r.length?r:void 0}else return t}function j(t){return Array.isArray(t)&&t.length===1&&(t=t[0]),t&&t.__v_isVNode&&typeof t.type!="symbol"}function k(t,r,s="default"){return r[s]??t[s]?.()}exports.camelize=u.camelize;exports.filterEmpty=a;exports.filterEmptyWithUndefined=P;exports.findDOMNode=A;exports.flattenChildren=f;exports.getClass=C;exports.getComponent=$;exports.getEvents=b;exports.getOptionProps=S;exports.getPropsSlot=k;exports.getSlot=E;exports.getStyle=F;exports.hasProp=v;exports.isEmptyContent=V;exports.isEmptyElement=y;exports.isFragment=N;exports.isStringElement=O;exports.isValidElement=j;exports.parseStyleText=m;exports.skipFlattenKey=c;exports.splitAttrs=g;
