UNPKG

veaury

Version:

Use React in Vue3 and Vue3 in React, And as perfect as possible!

2 lines (1 loc) 40.7 kB
((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("vue"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","vue","react-dom"],t):t((e=e||self).veaury={},e.React,e.Vue,e.ReactDOM)})(this,function(e,b,R,P){var S="default"in b?b.default:b,C="default"in P?P.default:P;function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n){t=i(t);var r=e,t=N()?Reflect.construct(t,n||[],i(e).constructor):t.apply(e,n);if(!t||"object"!=typeof t&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function u(e,t,n){return t&&U(e.prototype,t),n&&U(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(){return(I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}function D(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function V(e,t){if(null==e)return{};var n,r=((e,t)=>{if(null==e)return{};var n,r={};for(n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r})(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),a=0;a<o.length;a++)n=o[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function n(e,t){return(n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t){return(e=>{if(Array.isArray(e))return e})(e)||((e,t)=>{var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,u,i=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(s)throw o}}return i}})(e,t)||x(e,t)||(()=>{throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function d(e){return(e=>{if(Array.isArray(e))return r(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||x(e)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function l(e){e=((e,t)=>{if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==typeof e?e:e+""}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){var n;if(e)return"string"==typeof e?r(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}var E={react:{componentWrap:"div",slotWrap:"div",componentWrapAttrs:{__use_react_component_wrap:"",style:{all:"unset"}},slotWrapAttrs:{__use_react_slot_wrap:"",style:{all:"unset"}},vueNamedSlotsKey:["node:"]},vue:{componentWrapHOC:function(t){return function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).portals,e=void 0===e?[]:e;return b.createElement(b.Fragment,null,t,e.map(function(e){var t=e.Portal;return b.createElement(t,{key:e.key})}))}},componentWrapAttrs:{"data-use-vue-component-wrap":"",style:{all:"unset"}},slotWrapAttrs:{"data-use-vue-slot-wrap":"",style:{all:"unset"}}}};function p(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{react:{},vue:{}},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:E,n=2<arguments.length?arguments[2]:void 0,t=(e.vue||(e.vue={}),e.react||(e.react={}),[t,O(O({},e),{},{react:O(O(O({},t.react),e.react),{},{componentWrapAttrs:O(O({},t.react.componentWrapAttrs),e.react.componentWrapAttrs),slotWrapAttrs:O(O({},t.react.slotWrapAttrs),e.react.slotWrapAttrs)}),vue:O(O(O({},t.vue),e.vue),{},{componentWrapAttrs:O(O({},t.vue.componentWrapAttrs),e.vue.componentWrapAttrs),slotWrapAttrs:O(O({},t.vue.slotWrapAttrs),e.vue.slotWrapAttrs)})})]);return n&&t.unshift({}),Object.assign.apply(this,t)}var M=["getElementById","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","querySelector","querySelectorAll"],f={Document:{},Element:{}};function L(){Object.keys(f).forEach(function(t){M.forEach(function(e){window[t].prototype[e]=f[t][e]})})}var K=["ref"],B=["key"],Y=["hashList"],A=parseInt(P.version);function G(_,f,y){var e=(()=>{function p(e){var t;return a(this,p),(t=o(this,p,[e])).state=O(O({},e),f.isSlots?{children:_}:{}),t.setRef=t.setRef.bind(t),t.vueInReactCall=t.vueInReactCall.bind(t),(t.__veauryVueWrapperRef__=y).__veauryVueInReactCall__=t.vueInReactCall,t}return s(p,b.Component),u(p,[{key:"reactPropsLinkToVueInstance",value:function(t){Object.keys(t).forEach(function(e){y[e]||(y[e]=t[e])}),Object.getOwnPropertyNames(t.__proto__).filter(function(e){return["constructor","render"].indexOf(e)<0}).forEach(function(e){y[e]||(y[e]=t[e])})}},{key:"setRef",value:function(e){var t=this;e&&(y.__veauryReactRef__=e,this.reactPropsLinkToVueInstance(e),Promise.resolve().then(function(){return t.reactPropsLinkToVueInstance(e)}),(this.setRef.current=e).__veauryVueWrapperRef__=y)}},{key:"createSlot",value:function(n){return{originVNode:n,inheritAttrs:!1,__fromReactSlot:!0,render:function(){var e,t;return 1===(null==(e=n=(n=(null==(t=this.$slots)||null==(e=t.default)?void 0:e.call(t))||n)instanceof Function?n(this):n)?void 0:e.length)&&null!=(t=n[0])&&t.data&&((e=this.$attrs).key,t=V(e,B),n[0].props=O(O({},t),n[0].props)),n}}}},{key:"componentWillUnmount",value:function(){y.__veauryReactRef__&&(y.__veauryReactRef__.__veauryVueWrapperRef__=null,y.__veauryReactRef__=null)}},{key:"vueInReactCall",value:function(e){var n=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return(2<arguments.length?arguments[2]:void 0)&&e&&e[0]?e.map(function(e,t){return w(n.createSlot(e instanceof Function?e:[e]),O(O(O({},f),r),{},{isSlots:!0,wrapInstance:y})).render({key:(null==e?void 0:e.key)||void 0})}):w(this.createSlot(e),O(O(O({},f),r),{},{isSlots:!0,wrapInstance:y})).render()}},{key:"render",value:function(){var e,t,n,u=this,r=this.state,o=r.hashList,a=V(r,Y),i={},c={};for(e in a)t=e,n=void 0,a.hasOwnProperty(t)&&null!=a[t]&&(a[t].__slot?(a[t].reactSlot?a[t]=a[t].reactSlot:(n=a[t],f.defaultSlotsFormatter&&a[t].__trueChildren?(a[t].__trueChildren.__top__=u.__veauryVueWrapperRef__,a[t]=f.defaultSlotsFormatter(a[t].__trueChildren,u.vueInReactCall,o),a[t]instanceof Array?a[t]=d(a[t]):-1<["string","number"].indexOf(j(a[t]))?a[t]=[a[t]]:"object"===j(a[t])&&(a[t]=O({},a[t]))):a[t]=O({},w(u.createSlot(a[t]),O(O({},f),{},{isSlots:!0,wrapInstance:y})).render()),a[t].vueFunction=n),i[t]=a[t]):a[t].__scopedSlot&&(a[t]=a[t](u.createSlot),c[t]=a[t]));var s,l,r={};return r.ref=this.setRef,f.isSlots?this.state.children||this.props.children:(s=a,_.__syncUpdateForPureReactInVue&&Object.keys(_.__syncUpdateForPureReactInVue).map(function(r){var o,a;s[r]&&"function"==typeof s[r]&&(o=u.__veauryVueWrapperRef__,a=s[r],s[r]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.__veaurySyncUpdateProps__(_.__syncUpdateForPureReactInVue[r].apply(this,t)),a.apply(this,t),o.macroTaskUpdate=!0,o.__veauryMountReactComponent__(!0,!0,{})})}),l=O(O(O({},s=f.defaultPropsFormatter?f.defaultPropsFormatter.call(this,s,this.vueInReactCall,o):s),i),c),Object.getPrototypeOf(_)!==Function.prototype&&("object"!==j(_)||_.render)||p.catchVueRefs()?(Object.getPrototypeOf(_)===Function.prototype&&delete r.ref,b.createElement(_,I({},l,r))):b.createElement(q,I({passedProps:l,component:_},r),l.children))}}],[{key:"catchVueRefs",value:function(){if(y.$parent)for(var e in y.$parent.$refs)if(y.$parent.$refs[e]===y)return!0;return!1}}])})();return c(e,"displayName","applyReact_".concat(_.displayName||_.name||"Component")),e}var q=(()=>{function t(e){return a(this,t),o(this,t,[e])}return s(t,b.Component),u(t,[{key:"render",value:function(){var e=this.props.component,t=this.props.passedProps,t=(t.ref,V(t,K));return b.createElement(e,t,this.props.children)}}])})();function y(m){var g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return m.__esModule&&m.default&&(m=m.default),g.isSlots&&(m=m()),g=p(g,void 0,!0),{originReactComponent:m,setup:function(e,t){var n,r,o,a;if(!g.isSlots)return n={},r=R.reactive({}),o=R.getCurrentInstance(),"function"==typeof(a=g.useInjectPropsFromWrapper||m.__veauryInjectPropsFromWrapper__)&&("function"!=typeof(a=a.call(o.proxy,e))?(Object.assign(r,a),n.__veauryInjectedProps__=r):o.proxy.__veauryInjectedComputed__=a),n},data:function(){return{VEAURY_Portals:[]}},created:function(){this.__veauryPortalKeyPool__=[],this.__veauryMaxPortalCount__=0},computed:{__veauryInjectedProps__:function(){var e;return null==(e=this.__veauryInjectedComputed__)?void 0:e.call(this)}},render:function(){var e=R.h(g.react.componentWrap,O({ref:"react"},g.react.componentWrapAttrs||{}),this.VEAURY_Portals.map(function(e){return(0,e.Portal)(R.h,e.key)}));return this.__veauryCheckReactSlot__(this.$slots),e},methods:{__veauryCheckReactSlot__:function(r){var o=this;function a(e,t,n){return t[n]&&(e[n]=t[n],1)}"object"===j(r)&&null!=r&&(r instanceof Array?r.forEach(function(e){o.__veauryCheckReactSlot__(e.children)}):Object.keys(r).forEach(function(e){var t,n,e=r[e];if("function"==typeof e){try{t=e.apply(o,e.__reactArgs||[{}])}catch(e){return}(e.__trueChildren=t).forEach(function(e){e.children&&o.__veauryCheckReactSlot__(e.children)}),1!==t.length||a(e,t=t[0],"reactSlot")||a(e,t,"reactFunction")||t.type!==R.Fragment||1!==(null==(n=t.children)?void 0:n.length)||a(e,n=t.children[0],"reactSlot")||a(e,n,"reactFunction")}}))},__veauryPushVuePortal__:function(e){var t=this.__veauryPortalKeyPool__.shift()||this.__veauryMaxPortalCount__++;this.VEAURY_Portals.push({Portal:e,key:t})},__veauryRemoveVuePortal__:function(n){var r,e=this.VEAURY_Portals.find(function(e,t){if(e.Portal===n)return r=t,!0});this.__veauryPortalKeyPool__.push(e.key),this.VEAURY_Portals.splice(r,1)},__veauryGetScopeSlot__:function(u,i,t){var c=this;function e(a){function e(){for(var e,t=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return u.reactFunction?u.reactFunction.apply(this,r):g.defaultSlotsFormatter?((e=u.apply(this,r)).__top__=c,(e=g.defaultSlotsFormatter(e,c.__veauryVueInReactCall__,i))instanceof Array||-1<j(e).indexOf("string","number")?e=d(e):"object"===j(e)&&(e=O({},e)),e):w(a(function(){return u.apply(t,r)}),O(O({},g),{},{isSlots:!0,wrapInstance:c})).render()}return g.pureTransformer&&t?e.vueFunction=t:e.vueFunction=u,e}return e.__scopedSlot=!0,e},__veaurySyncUpdateProps__:function(e){this.__veauryReactInstance__&&this.__veauryReactInstance__.setState(e)},__veauryMountReactComponent__:function(e,t){var n,r,o=this,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},u={},i=[],c=this.$.vnode.scopeId,s=(c&&(u[c]="",i.push(c)),{}),l={};if(!e||null!=t&&t.slot)for(var p in this.$slots||{})(t=>{var e;o.$slots.hasOwnProperty(t)&&null!=o.$slots[t]&&((e=g.react.vueNamedSlotsKey.find(function(e){return 0===t.indexOf(e)}))||"default"===t?(e=t.replace(new RegExp("^".concat(e)),""),s[e]=o.$slots[t],s[e].__slot=!0):l[t]=o.__veauryGetScopeSlot__(o.$slots[t],i,null==(e=o.$.vnode)||null==(e=e.children)?void 0:e[t]))})(p);(!e||null!=t&&t.slot)&&(r=O({},s),n=r.default,delete r.default),this.__veauryLast__=this.__veauryLast__||{},this.__veauryLast__.slot=this.__veauryLast__.slot||{},this.__veauryLast__.attrs=this.__veauryLast__.attrs||{};var _={slot:function(){o.__veauryLast__.slot=O(O(O({},n?{children:n}:{children:null}),r),l)},attrs:function(){o.__veauryLast__.attrs=o.$attrs}};if(t&&Object.keys(t).forEach(function(e){return _[e]()}),e){var f=function(){o.__veauryReactInstance__&&o.__veauryReactInstance__.setState(function(t){return Object.keys(t).forEach(function(e){g.isSlots&&"children"===e||delete t[e]}),O(O(O(O({},o.__veauryCache__),o.__veauryInjectedProps__),!g.isSlots&&o.__veauryLast__.slot),o.__veauryLast__.attrs)}),o.__veauryCache__=null};!this.microTaskUpdate||this.__veauryCache__||this.$nextTick(function(){f(),o.microTaskUpdate=!1}),this.macroTaskUpdate&&(clearTimeout(this.updateTimer),this.updateTimer=setTimeout(function(){clearTimeout(o.updateTimer),f(),o.macroTaskUpdate=!1})),this.__veauryCache__=O(O({},this.__veauryCache__||{}),O(O(O(O({},a),this.$attrs.class?{className:this.$attrs.class}:{}),O({},u)),{},{hashList:i},this.$attrs.style?{style:this.$attrs.style}:{})),this.macroTaskUpdate||this.microTaskUpdate||f()}else{_.slot(),_.attrs();var c=G(m,g,this),y=b.createElement(c,I({},this.$attrs,this.__veauryInjectedProps__,{children:n},r,l,this.$attrs.class?{className:this.$attrs.class}:{},u,{hashList:i},this.$attrs.style?{style:this.$attrs.style}:{},{ref:function(e){return o.__veauryReactInstance__=e}})),d=this.$refs.react,v=g.wrapInstance;if(v)(v=g.wrapInstance).__veauryVueWrapperRef__=this;else for(var h=this.$parent;h;){if(h.parentReactWrapperRef){v=h.parentReactWrapperRef;break}if(h.reactWrapperRef){v=h.reactWrapperRef;break}h=h.$parent}v?(this.parentReactWrapperRef=v,this.reactPortal=function(){return P.createPortal(y,d)},v.pushReactPortal(this.reactPortal)):17<A?(void 0!==C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED&&(C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint=!0),t=g.react.createRoot||C.createRoot,18<A&&!t&&console.warn("'react-dom 19' no longer supports dynamically determining whether to use 'render' or 'createRoot'. In order to be compatible with 'react-dom 17' and previous versions, you need to manually configure 'createRoot' in the veaury configuration."),this.__veauryReactApp__=t(d),this.__veauryReactApp__.render(y)):C.render(y,d)}}},mounted:function(){var e=this;this.__VEAURY_IGNORE_STRANGE_UPDATE__=!0,Promise.resolve().then(function(){e.__VEAURY_IGNORE_STRANGE_UPDATE__=!1}),clearTimeout(this.updateTimer),this.__veauryMountReactComponent__()},beforeUnmount:function(){var u,e;clearTimeout(this.updateTimer),u=this.$refs.react,Object.keys(f).forEach(function(e){M.forEach(function(o){var a=f[e][o]||window[e].prototype[o];a&&(f[e][o]=a,window[e].prototype[o]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a.apply(this,t);return r&&(r.constructor!==NodeList||r.constructor===NodeList&&0<r.length)?r:("getElementById"===(r=o)&&(r="querySelector",t=["#"+t[0]]),(f.Element[r]||Element.prototype[r]).apply(u,t))})})}),this.reactPortal?null!=(e=this.parentReactWrapperRef)&&e.removeReactPortal(this.reactPortal):17<A?null!=(e=this.__veauryReactApp__)&&e.unmount():C.unmountComponentAtNode(this.$refs.react),L()},updated:function(){this.__VEAURY_IGNORE_STRANGE_UPDATE__||this.__veauryMountReactComponent__(!0,{slot:!0})},inheritAttrs:!1,watch:{$attrs:{handler:function(){this.__veauryMountReactComponent__(!0,{attrs:!0})},deep:!0},__veauryInjectedProps__:{handler:function(){this.__veauryMountReactComponent__(!0,{attrs:!0})},deep:!0}}}}var z=new Set(["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onChange","onInput","onInvalid","onReset","onSubmit","onError","onLoad","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onLoad","onError","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd","onToggle"]);function H(e,t,n){var r={};n.forEach(function(e){r[e]=!0}),e[("modelValue"===t?"model":t)+"Modifiers"]=r}function Z(e,t,n,r){var o=this,r=3<arguments.length&&void 0!==r?r:"v-model";if(!(t instanceof Array))throw Error("[error:veaury] Parameter type error from '".concat(r,"', a single v-model is an array, such as [val, setter, argumentKey, modifiers] or [val, setter, modifiers]"));if("function"!=typeof t[1])throw Error("[error:veaury] Parameter type error from '".concat(r,"', a single v-model is an array, the second element of the array must be a setter function"));var a=t[1],u=("string"==typeof t[2]?(n=t[2],t[3]instanceof Array&&H(e,n,t[3])):t[2]instanceof Array&&H(e,n,t[2]),e["onUpdate:"+n]);e["onUpdate:"+n]="function"==typeof u?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];u.apply(o,t),a.apply(o,t)}:a,e[n]=t[0]}function m(a){var u=this,n={},i=O({},a);return Object.keys(a).forEach(function(r){var o,e=r.match(/^onUpdate-([^-]+)/);if(e)delete i[r],o=n["onUpdate:".concat(e[1])],n["onUpdate:".concat(e[1])]="function"==typeof o?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.apply(u,t),a[r].apply(u,t)}:a[r];else if(e=r.match(/^v-model($|:([^:]+)|-([^:]+))/))e=e[2]||e[3]||"modelValue",Z(n,a[r],e),delete i[r];else if("v-models"===r){if("object"!==j(a[r])||a[r]instanceof Array)throw Error("[error:veaury] The parameter 'v-models' must be an object type, such as {[argumentKey]: singleVModel}");var t=a[r];Object.keys(t).forEach(function(e){Z(n,t[e],e,"v-models")}),delete i[r]}}),O(O({},i),n)}var t=(()=>u(function e(){a(this,e),c(this,"pool",new Set)},[{key:"getRandomId",value:function(e){var t=e+(Math.random()+"").substr(2);return this.pool.has(t)?this.getRandomId(e):(this.pool.add(t),t)}}]))();function J(e,t){var n,e=e.node;if("function"==typeof e&&(e=e()),null!=(n=t)&&n.current||"function"==typeof t||null!=(n=t)&&n.toString().match(/^function/)||(t=null),-1<["string","number"].indexOf(j(e)))return e;if(e instanceof Array){if(1!==e.length)return e;e=e[0]}return O(O({},e),{},{ref:t})}var Q=y(J);function v(e){return R.h(Q,{node:function(){return e.node}})}v.originReactComponent=b.forwardRef(J);var X=["component","node"],ee=["component","$slots","children","class","style"],te=["className","classname"],h="veaury-options",ne=new t;function re(n){if(n)return Object.keys(n).forEach(function(e){var t=n[e];null!=t&&("function"==typeof t?(n[e]=t,n[e].reactFunction=t):(n[e]=function(){return t},n[e].reactSlot=t),t.vueFunction)&&(n[e].vueFunction=t.vueFunction)}),n}function oe(e){var t;return null==(t=e.node)?void 0:t.call(e)}var g=b.forwardRef(function(e,t){var n,r=e.component,o=e.node,e=V(e,X);if(null==r&&null==o)return null;if(null!=o){if(o.$$typeof||"string"==typeof o||"number"==typeof o)return o;"function"!=typeof o&&(n=o,o=function(){return n})}var a,r=r||oe,u=p(e[h]||{},void 0,!0),i=u.useInjectPropsFromWrapper||r.__veauryInjectPropsFromWrapper__;return u.isSlots||"function"==typeof i&&(a=i(e)),b.createElement(ae,I({},O(O(O(O({component:r},o?{node:o}:{}),e),a),{},c({},h,u)),{ref:t}))}),ae=(()=>{function n(e){var t;return a(this,n),(t=o(this,n,[e])).state={portals:[]},t.__veauryPortalKeyPool__=[],t.__veauryMaxPortalCount__=0,t.__veauryCurrentVueComponent__=e.component,t.__veauryCreateVueInstance__=t.__veauryCreateVueInstance__.bind(t),t.__veauryVueComponentContainer__=t.createVueComponentContainer(),t}return s(n,b.Component),u(n,[{key:"pushReactPortal",value:function(e){var t=this.state.portals,n=this.__veauryPortalKeyPool__.shift()||this.__veauryMaxPortalCount__++;t.push({Portal:e,key:n}),this.setState({portals:t})}},{key:"removeReactPortal",value:function(n){var r,e=this.state.portals,t=e.find(function(e,t){if(e.Portal===n)return r=t,!0});this.__veauryPortalKeyPool__.push(t.key),e.splice(r,1),this.__veauryVueRef__&&this.setState({portals:e})}},{key:"createVueComponentContainer",value:function(){var t=this,n={},e=this.props[h];return e.isSlots?(Object.keys(this.props).forEach(function(e){z.has(e)&&"function"==typeof t.props[e]&&(n[e]=t.props[e])}),e.vue.slotWrapAttrs&&(n=O(O({},n),e.vue.slotWrapAttrs))):e.vue.componentWrapAttrs&&(n=O(O({},n),e.vue.componentWrapAttrs)),e.vue.componentWrapHOC(b.createElement("div",I({},e.vue.componentWrapAttrs,{ref:this.__veauryCreateVueInstance__,key:null})),n)}},{key:"shouldComponentUpdate",value:function(e,t,n){var r,o,a,u,i=this;return e===this.props||(r=e.component,o=void 0===(o=e["v-slots"])?null:o,a=e.children,e=V(e,["component",h,"v-slots","children"].map(l)),this.__veauryCurrentVueComponent__!==r&&this.updateVueComponent(r),r.__fromReactSlot)||this.__veauryVueInstance__&&(a&&(o=o||{},"object"!==j(a)||a instanceof Array||a.$$typeof?o.default=a:o=a),(u=this.__veauryVueInstance__.$data.$slots)&&Object.keys(u).forEach(function(e){delete u[e]}),o&&(u||(this.__veauryVueInstance__.$data.$slots={}),Object.assign(this.__veauryVueInstance__.$data.$slots,re(o))),Object.keys(this.__veauryVueInstance__.$data).forEach(function(e){"$slots"!==e&&delete i.__veauryVueInstance__.$data[e]}),this.__veauryVueInstance__)&&Object.assign(this.__veauryVueInstance__.$data,m(e)),!0}},{key:"componentWillUnmount",value:function(){this.vuePortal?this.parentVueWrapperRef.__veauryRemoveVuePortal__(this.vuePortal):(this.__veauryVueInstance__&&this.__veauryVueInstance__.$.appContext.app.unmount(),ne.pool.delete(this.__veauryVueTargetId__),this.vueCreated=!1)}},{key:"componentDidMount",value:function(){this.__veauryCreateVueInstance__(this.vueContainerElement)}},{key:"__veauryCreateVueInstance__",value:function(e){var p,_,t,n,r,o,a,u,i=this;function c(e){this.__veauryVueInstance__||(this.__veauryVueInstance__=e)}this.vueCreated||(this.vueCreated=!0,(p=this).vueContainerElement=e,(t=this.props).component,_=t[h],a=t.children,u=void 0===(u=t["v-slots"])?{}:u,t=V(t,["component",h,"children","v-slots"].map(l)),a&&("object"!==j(a)||a instanceof Array||a.$$typeof?u.default=a:u=a),(u=re(u))&&(t.$slots=u),c=c.bind(this),n=O({},m(t)),r={data:function(){return _.isSlots?{children:p.__veauryCurrentVueComponent__.originVNode}:n},created:function(){this.reactWrapperRef=p,c(this)},methods:{reactInVueCall:function(e){return(2<arguments.length?arguments[2]:void 0)&&e&&e[0]?e.map(function(e,t){return R.h(v,{node:e,key:(null==e||null==(e=e.data)?void 0:e.key)||t})}):R.h(v,{node:e})},getScopedSlots:function(s,e){var t,l=this,n=(this.getScopedSlots.__scopeSlots||(this.getScopedSlots.__scopeSlots={}),O({},e));for(t in n)(i=>{var e,c;!n.hasOwnProperty(i)||null==(e=n[i])||(n[i]=(c=e,function(){for(var e,t,n,r,o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];return c.vueFunction?c.vueFunction.apply(l,a):(n=c.reactFunction,n=c.reactSlot||(null==n?void 0:n.apply(l,a)),r=_.defaultSlotsFormatter,null!=(e=l.getScopedSlots.__scopeSlots[i])&&null!=(e=e.component)&&null!=(e=e.ctx)&&e.__veauryReactInstance__?(t=l.getScopedSlots.__scopeSlots[i],Promise.resolve().then(function(){var e;null!=(e=t)&&null!=(e=e.component)&&null!=(e=e.ctx)&&null!=(e=e.__veauryReactInstance__)&&e.setState({children:c.apply(l,a)})})):(t=r&&n?[r(n,l.reactInVueCall)]:s(y(function(){return c.apply(l,a)},O(O({},_),{},{isSlots:!0,wrapInstance:p}))),l.getScopedSlots.__scopeSlots[i]=t),c.reactFunction?t.reactFunction=c.reactFunction:c.reactSlot&&(t.reactSlot=c.reactSlot),t)}),n[i].reactFunction=e)})(t);return n}},mounted:function(){e.removeAttribute("id"),p.__veauryVueRef__=this.$refs.use_vue_wrapper,this.$refs.use_vue_wrapper.reactWrapperRef=p},beforeUnmount:function(){p.__veauryVueRef__=null,this.$refs.use_vue_wrapper.reactWrapperRef=null},render:function(){var e,t,n,r=this,o=this.$data,a=(o.component,o.$slots),u=o.class,i=o.style,o=V(o,ee),c=this.getScopedSlots(R.h,O({},a)),a=o.className,s=o.classname,o=V(o,te),l={};return Object.keys(c).forEach(function(e){var t=c[e];l[e]="function"==typeof t?t:function(){return t}}),R.h((e=p.__veauryCurrentVueComponent__,t=this,e="string"==typeof e&&t?null==(t=t.$)||null==(t=t.appContext)||null==(t=t.app)||null==(n=t.component)?void 0:n.call(t,e):e),O(O(O(O({},o),u||a||s?{class:u||a||s}:{}),i?{style:i}:{}),{},{ref:"use_vue_wrapper"}),O({},_.isSlots&&this.children?{default:"function"==typeof this.children?this.children:function(){return r.children}}:O({},l)))}},e&&(o=ne.getRandomId("__vue_wrapper_container_"),e.id=o,this.__veauryVueTargetId__=o,(a=_.wrapInstance)?(a=_.wrapInstance).reactWrapperRef=p:a=((e,t)=>{for(var n=null==(e=t=(null==e?void 0:e._reactInternals)||(null==e?void 0:e._reactInternalFiber)||t)?void 0:e.return;n;){var r=n.stateNode;if(r=(null==r?void 0:r.parentVueWrapperRef)||(null==r?void 0:r.__veauryVueWrapperRef__))return r;n=n.return}})(this),a&&document.getElementById(o)?(this.parentVueWrapperRef=a,this.vuePortal=function(e,t){return e(R.Teleport,{to:"#"+o,key:o},[e(Object.assign(r,{router:i._router}))])},a.__veauryPushVuePortal__(this.vuePortal)):(u=R.createApp(r),"function"==typeof _.beforeVueAppMount&&_.beforeVueAppMount(u),this.__veauryVueInstance__=u.mount(e))))}},{key:"updateVueComponent",value:function(e){this.__veauryVueInstance__&&(e.__fromReactSlot?this.__veauryVueInstance__.children="function"==typeof e.originVNode?e.originVNode:function(){return e.originVNode}:(this.__veauryCurrentVueComponent__=e,this.__veauryVueInstance__.$forceUpdate()))}},{key:"render",value:function(){return b.createElement(this.__veauryVueComponentContainer__,{portals:this.state.portals})}}])})();function w(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=(n||console.warn("Component must be passed in applyVueInReact!"),n.__esModule&&n.default&&(n=n.default),b.forwardRef(function(e,t){return b.createElement(g,I({},e,{component:n,ref:t},c({},h,r)))}));return e.originVueComponent=n,e}var ue=["children"];function ie(e){var n=b.createContext({});return[function(){return b.useContext(n)},y(function(e){var t=e.children,e=V(e,ue);return b.createElement(n.Provider,{value:O({},e)},t)},{useInjectPropsFromWrapper:e}),n]}var ce=new t;function se(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function k(t){var n;return t?"string"==typeof t?(t=t.trim()).split(/\s*;\s*/).reduce(function(e,t){return t&&2===(t=t.split(/\s*:\s*/)).length&&Object.assign(e,c({},se(t[0]),t[1])),e},{}):"object"===j(t)?(n={},Object.keys(t).forEach(function(e){n[se(e)]=t[e]}),n):{}:{}}function F(t){return t?t instanceof Array?t:"string"==typeof t?(t=t.trim()).split(/\s+/):"object"===j(t)?Object.keys(t).filter(function(e){return!!t[e]}):[]:[]}var le=["ref"];function pe(e){return e.type===R.Text}new t;function _e(e,t){var n;return 0<(null==(n=e.dirs)?void 0:n.length)?b.createElement(fe,{vnode:e},t):t}var fe=(()=>{function n(e){var t;return a(this,n),(t=o(this,n,[e])).state={prevVnode:null,savedDirectives:[],ref:null,prevProps:e},t}return s(n,b.Component),u(n,[{key:"findDirectiveName",value:function(e){var n=e.dir,r=-1;return[this.state.savedDirectives.find(function(e,t){if(e.dir===n)return r=t,!0}),r]}},{key:"doDirective",value:function(){var c=this,e=this.state,s=e.savedDirectives;if(!(l=e.ref)){for(var l=(this._reactInternals||this._reactInternalFiber).child;l&&5!==l.tag;)l=l.child;if(!l)return;l=l.stateNode}var p=this.props.vnode,e=p.dirs;e&&(e.forEach(function(e){var t,n,r,o,a,u,i;e&&(i=(t=_(c.findDirectiveName(e),2))[0],t=t[1],n=(a=e.dir).created,r=a.beforeMount,o=a.mounted,u=a.beforeUpdate,a=a.updated,i?(s[t]=O(O(O({},i),e),{},{oldValue:i.oldValue}),i=[l,s[t],p,c.state.prevVnode],null!=u&&u.apply(null,i),null!=a&&a.apply(null,i),s[t].oldValue=e.value):(s.push(e),u=[l,e,p,null],null!=n&&n.apply(null,u),null!=r&&r.apply(null,u),null!=o&&o.apply(null,u),e.oldValue=e.value))}),this.setState({prevVnode:O({},p),savedDirectives:s,ref:l}))}},{key:"componentDidMount",value:function(){this.doDirective()}},{key:"componentDidUpdate",value:function(e){e.vnode!==this.props.vnode&&this.doDirective()}},{key:"componentWillUnmount",value:function(){var a=this,u=this.props.vnode,e=this.state,i=e.savedDirectives,c=e.ref,s=e.prevVnode,e=u.dirs;e&&(e.forEach(function(e){var t,n,r,o;e&&(t=(o=_(a.findDirectiveName(e),2))[0])&&(n=(r=e.dir).beforeUnmount,r=r.unmounted,i[o[1]]=O(O({},t),e),o=[c,t,u,s],null!=n&&n.apply(null,o),null!=r)&&r.apply(null,o)}),this.setState({prevVnode:O({},u),savedDirectives:i}))}},{key:"render",value:function(){var e=this.props;e.vnode;return e.children}}])})();function ye(o,n){var e,r,t,a;return"function"!=typeof(null==(t=o.type)?void 0:t.originReactComponent)||((e,t)=>{var n;return"function"==typeof e&&(n=e.toString(),void 0!==e.prototype)?e.prototype.constructor===e&&("class"==n.slice(0,5)||2<=Object.getOwnPropertyNames(e.prototype).length||!/^function\s+\(|^function\s+anonymous\(/.test(n)&&(t&&/^function\s+[A-Z]/.test(n)||/\b\(this\b|\bthis[\.\[]\b/.test(n)&&(!t||/classCallCheck\(this/.test(n)||/^function\sdefault_\d+\s*\(/.test(n)))):void 0})(null==(t=o.type)?void 0:t.originReactComponent)?(null!=(t=o.ref)&&t.k?(e=null==(t=o.ref)?void 0:t.k,r=null==(t=o.ref)?void 0:t.r):e=null==(t=o.ref)?void 0:t.r,e&&"string"==typeof e&&(a=e,e=function(e){var t;null!=(t=o.ref)&&null!=(t=t.i)&&t.refs&&((t=O({},o.ref.i.refs))[a]=e,o.ref.i.refs=t),r?r.value=e:o.ref.i.setupState&&a in o.ref.i.setupState&&(o.ref.i.setupState[a]=e),e&&(e.__syncUpdateProps=function(){n.__top__&&(o.__extraData=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n.__top__.__syncUpdateProps({}))})},e=new Proxy(e,{get:function(e,t){return e[t]},set:function(e,t,n){var r;return null!=(r=o.ref)&&null!=(r=r.i)&&r.refs&&a in(null==(r=o.ref)||null==(r=r.i)?void 0:r.refs)&&((r=O({},o.ref.i.refs))[t]=n,o.ref.i.refs=r),n}})),e):null}function T(t,e){return!e||e instanceof Array&&0===e.length||("string"==typeof e&&(e=[e]),(t=O({},t)).props=O({},t.props),e.forEach(function(e){t.props[e]=""})),t}var de=["style","class"];function ve(e,t,n,r,o,a,u){var i,c,s;return"all"===t||t instanceof Array||(t=t?[t]:[]),e.type===R.Fragment?o.call(u,e.children,n,a):"string"==typeof e.type&&("all"===t||-1<t.indexOf(e.type))?(t=ye(e),s=(c=e.props||{}).style,i=c.class,c=O(O({},V(c,de)),{},{style:k(s),className:Array.from(new Set(F(i))).join(" ")},t?{ref:t}:{}),(s=e.children||c.children)&&((s=-1<["string","number"].indexOf(j(s))?[s]:d(s)).__top__=u),_e(e,T(S.createElement(e.type,c,o.call(u,s,n,a)),e.scopeId))):n([e],null,r)}function he(e,t,n){return!((e=e instanceof Array&&1===e.length?e[0]:e)instanceof Array)&&null==e.key&&1<t.length&&((e=O({},e)).key="_key_".concat(n)),e}function me(e){var h=e.reactComponents,m=e.domTags,e=e.division,g=void 0===e||e;return function _(f,y,d){var v;return f&&f.forEach?(f.__top__||(f.__top__=this),v=[],f.forEach(function(e,t){if(e&&e.type!==R.Comment){if(null==(p=e.type)||!p.originReactComponent)return e.$$typeof||"string"==typeof e||"number"==typeof e?void v.push(e):pe(e)?void(""!==e.children.trim()&&v.push(e.children.trim())):void(e.type&&(T(p=he(ve(e,m,y,g,_,d,f.__top__),f,t),e.scopeId),v.push(p)));var n,o,a,u,r,i,c,s,l,p=e.type.originReactComponent;T(c=he(c="all"===(h="all"===h||h instanceof Array?h:[h])||-1<h.indexOf(p)?(e.__top__=f.__top__,n=e,"_key_".concat(t),o=y,a=_,u=d,(r=n.props||{}).ref,r=V(r,le),i={},Object.keys(n.children||{}).forEach(function(t){var r=n.children[t],e=E.react.vueNamedSlotsKey.find(function(e){return 0===t.indexOf(e)});e||"default"===t?(e=t.replace(new RegExp("^".concat(e)),"").replace(/^default$/,"children"),i[e]=a.call(n.__top__,r(),o,u)):"function"==typeof r&&(i[t]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.__reactArgs=t,a(r.apply(this,t),o,u)})}),c={},s=k(r.style),l=Array.from(new Set(F(r.class))).join(" "),0<Object.keys(s).length&&(c.style=s),""!==l&&(c.className=l),Object.assign(r,O(O({},c),i)),delete r.class,"boolean"==typeof r.ref_for&&delete r.ref_for,s=r,l=ye(e,f),e.children&&(e.children.__top__=f.__top__),_e(e,S.createElement(p,O(O(O({},function(e,t,n){var a=0<arguments.length&&void 0!==e?e:{},u=1<arguments.length?t:void 0,i=2<arguments.length?n:void 0;return i.__syncUpdateForPureReactInVue&&Object.keys(i.__syncUpdateForPureReactInVue).map(function(r){var o;a[r]&&"function"==typeof a[r]&&u.__top__&&(o=a[r],a[r]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];u.__extraData=i.__syncUpdateForPureReactInVue[r].apply(this,t),u.__top__.__veaurySyncUpdateProps__({}),u.__top__.macroTaskUpdate=!0,o.apply(this,t),u.__top__&&Promise.resolve().then(function(){u.__extraData=null,u.__top__.__veauryMountReactComponent__(!0)})})}),a}(s,e,p)),e.__extraData||{}),l?{ref:l}:{})))):pe(e)?e.text:ve(e,m,y,g,_,d),f,t),e.scopeId),v.push(c)}}),1===v.length?v[0]:v):f}}var W=me({reactComponents:"all",domTags:"all"});function $(e,t){return function(e,t){var t=1<arguments.length&&void 0!==t?t:{},n=t.globalName,r=y(e,t.combinedOption||{});return r.install=function(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).globalName;return n&&e.component(t||n,r),r},r}(e,{combinedOption:O({pureTransformer:!0,defaultSlotsFormatter:W,defaultPropsFormatter:function(t,o,a){var n={};return Object.keys(t).forEach(function(e){var r=t[e];r&&(r.vueFunction?(n[e]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return W(r.vueFunction.apply(this,t),o,a)},Object.defineProperty(n[e],"length",{get:function(){return r.vueFunction.length}})):r.vueSlot&&(n[e]=W(r.vueSlot,o,a)))}),Object.assign(t,n)}},t)})}var ge=me({reactComponents:"all",domTags:"all"});var be=["ref","children","v-slots"];function Re(t){var e=t.ref;if(e)return"object"===j(e)?function(e){t.ref.current=e}:"function"==typeof e?e:void 0}var Pe=["style","class","children"];function Se(e,t,n,r,o,a){var u,i,c,s;return"all"===t||t instanceof Array||(t=t?[t]:[]),e.type===b.Fragment?o(null==(u=e.props)?void 0:u.children,n):"string"==typeof e.type&&("all"===t||-1<t.indexOf(e.type))?(u=Re(e),s=(t=e.props||{}).style,c=t.class,i=t.children,t=V(t,Pe),c=Array.from(new Set(F(c))).join(" "),s=k(s),t=O(O(O(O({},t),0===Object.keys(s).length?{}:{style:s}),c?{className:c}:{}),u?{ref:u}:{}),0===Object.keys(t).length&&(t=null),(s=i)&&((s=-1<["string","number"].indexOf(j(s))?[s]:s instanceof Array?d(s):O({},s)).__top__=a),R.h(e.type,t,o(s,n))):n([e],null,r)}function Ce(e){var d=e.vueComponents,v=e.domTags,e=e.division,h=void 0===e||e;return function p(_,f){if(null==_)return _;_ instanceof Array||(_=[_]);var y=[];return _.forEach(function(e,t){if((null==(s=e.type)||!s.originVueComponent)&&e.type!==g)return e.__v_isVNode||"string"==typeof e||"number"==typeof e?void y.push(e):void(e.type&&(s=Se(e,v,f,h,p,_.__top__),y.push(s)));var o,a,u,n,r,i,c,s=e.type.originVueComponent;if(e.type===g){if(!e.props.component)return void y.push(e.props.node);s=e.props.component,e=O({},e);var l=O({},e.props);delete l.component,e.props=l}t="all"===(d="all"===d||d instanceof Array?d:[d])||-1<d.indexOf(s)?((e=O({},e)).__top__=_.__top__,l=e,"_key_".concat(t),o=f,a=p,(l=l.props||{}).ref,t=l.children,n=void 0===(r=l["v-slots"])?{}:r,r=V(l,be),t&&("object"!==j(t)||t instanceof Array||t.$$typeof?n.default=t:n=t),i=null,Object.keys(n||{}).forEach(function(e){var r=n[e];(i=i||{})[e]=function(){if("function"==typeof r){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r=r.apply(this,t)}return a(r,o,u)}}),l={},t=k(r.style),c=Array.from(new Set(F(r.className))).join(" "),0<Object.keys(t).length&&(l.style=t),""!==c&&(l.class=c),Object.assign(r,O({},l)),delete r.className,c=(t={props:r=m(r),slots:i}).props,r=t.slots,Re(e),e.children&&(e.children.__top__=_.__top__),R.h(s,O({},c),r)):Se(e,v,f,h,p),y.push(t)}),1===(y=y.flat(1/0)).length?y[0]:y}}var Ie=Ce({vueComponents:"all",domTags:"all"});function Oe(e,t){return function(e,t){return(t=1<arguments.length&&void 0!==t?t:{}).globalName,w(e,t.combinedOption||{})}(e,{combinedOption:O({pureTransformer:!0,defaultSlotsFormatter:Ie},t)})}var Ve=Ce({reactComponents:"all",domTags:"all"});var je=["children"];var Ee=new t;e.REACT_ALL_HANDLERS=z,e.RenderReactNode=v,e.VueContainer=g,e.applyPureReactInVue=$,e.applyPureVueInReact=Oe,e.applyReactInVue=y,e.applyVueInReact=w,e.createCrossingProviderForPureReactInVue=function(e){var n=b.createContext({});return[function(){return b.useContext(n)},$(function(e){var t=e.children,e=V(e,je);return b.createElement(n.Provider,{value:O({},e)},t)},{useInjectPropsFromWrapper:e}),n]},e.createCrossingProviderForPureVueInReact=function(e,n){return n=n||Ee.getRandomId("veauryCrossingProvide_"),[function(){return R.inject(n)},Oe({setup:function(e,t){return R.provide(n,t.attrs),function(){return R.h(t.slots.default)}}},{useInjectPropsFromWrapper:e})]},e.createCrossingProviderForReactInVue=ie,e.createCrossingProviderForVueInReact=function(e,n){return n=n||ce.getRandomId("veauryCrossingProvide_"),[function(){return R.inject(n)},w({setup:function(e,t){return R.provide(n,t.attrs),function(){return R.h(t.slots.default)}}},{useInjectPropsFromWrapper:e})]},e.createReactMissVue=function(e){var t=e.useVueInjection,e=e.beforeVueAppMount,n=(t=_(ie(t),3))[0],r=t[2];return[n,w(t[1],{beforeVueAppMount:e}),r]},e.getReactNode=function(e){return e=(e=[e="function"==typeof e?e():e]).flat(1/0),ge(e,function(e){return S.createElement(g,{node:e})})},e.getVNode=function(e){return 1===(e=(e=[e="function"==typeof e?e():e]).flat(1/0)).length&&(e=e[0]),Ve(e,function(e){return R.h(v,{node:e})})},e.injectPropsFromWrapper=function(e,t){return console.warn("[veaury warn]: HOC injectPropsFromWrapper is deprecated! Try using 'useInjectPropsFromWrapper' in the options of 'applyReactInVue' or 'applyVueInReact'!"),"function"!=typeof e?console.warn("[veaury warn]: parameter 'injectionHook' is not a function"):t.__veauryInjectPropsFromWrapper__=e,t},e.injectSyncUpdateForPureReactInVue=function(e,t){e.__syncUpdateForPureReactInVue||(e.__syncUpdateForPureReactInVue={}),Object.assign(e.__syncUpdateForPureReactInVue,t)},e.lazyPureReactInVue=function(e,t){function n(){return r().then(function(e){return $(e.default,t)})}var r=e;return"object"===j(e)&&(r=e.loader),R.defineAsyncComponent("object"===j(e)?O(O({},e),{},{loader:n}):n)},e.lazyPureVueInReact=function(e,t){return b.lazy(function(){return e().then(function(e){return{default:Oe(e.default,t)}})})},e.lazyReactInVue=function(e,t){function n(){return r().then(function(e){return y(e.default,t)})}var r=e;return"object"===j(e)&&(r=e.loader),R.defineAsyncComponent("object"===j(e)?O(O({},e),{},{loader:n}):n)},e.lazyVueInReact=function(e,t){return b.lazy(function(){return e().then(function(e){return{default:w(e.default,t)}})})},e.setVeauryOptions=p,e.veauryOptions=E,Object.defineProperty(e,"__esModule",{value:!0})});