UNPKG

veaury

Version:

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

1 lines 54.9 kB
import React__default,{createElement,Fragment,Component,forwardRef,lazy,createContext,useContext}from"react";import{reactive,getCurrentInstance,h,Fragment as Fragment$1,Teleport,createApp,defineAsyncComponent,provide,inject,Text,Comment}from"vue";import ReactDOM,{version,createPortal}from"react-dom";function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function asyncGeneratorStep(e,t,r,n,o,a,i){try{var c=e[a](i),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function _asyncToGenerator(c){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=c.apply(e,i);function o(e){asyncGeneratorStep(n,t,r,o,a,"next",e)}function a(e){asyncGeneratorStep(n,t,r,o,a,"throw",e)}o(void 0)})}}function _callSuper(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)!{}.hasOwnProperty.call(n,r)||(e[r]=n[r])}return e}).apply(null,arguments)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(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&&_setPrototypeOf(e,t)}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return c}}function _nonIterableRest(){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 _nonIterableSpread(){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 ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),a=0;a<o.length;a++)r=o[a],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n={};for(r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function _possibleConstructorReturn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return i};var u,i={},e=Object.prototype,s=e.hasOwnProperty,l=Object.defineProperty||function(e,t,r){e[t]=r.value},t="function"==typeof Symbol?Symbol:{},n=t.iterator||"@@iterator",r=t.asyncIterator||"@@asyncIterator",o=t.toStringTag||"@@toStringTag";function a(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(u){a=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var o,a,i,c,t=t&&t.prototype instanceof v?t:v,t=Object.create(t.prototype),n=new V(n||[]);return l(t,"_invoke",{value:(o=e,a=r,i=n,c=_,function(e,t){if(c===d)throw Error("Generator is already running");if(c===y){if("throw"===e)throw t;return{value:u,done:!0}}for(i.method=e,i.arg=t;;){var r=i.delegate;if(r){r=function e(t,r){var n=r.method,o=t.iterator[n];if(o===u)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=u,e(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;n=p(o,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=u),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}(r,i);if(r){if(r===h)continue;return r}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(c===_)throw c=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);c=d;r=p(o,a,i);if("normal"===r.type){if(c=i.done?y:f,r.arg===h)continue;return{value:r.arg,done:i.done}}"throw"===r.type&&(c=y,i.method="throw",i.arg=r.arg)}})}),t}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}i.wrap=c;var _="suspendedStart",f="suspendedYield",d="executing",y="completed",h={};function v(){}function m(){}function b(){}var t={},g=(a(t,n,function(){return this}),Object.getPrototypeOf),g=g&&g(g(I([]))),S=(g&&g!==e&&s.call(g,n)&&(t=g),b.prototype=v.prototype=Object.create(t));function j(e){["next","throw","return"].forEach(function(t){a(e,t,function(e){return this._invoke(t,e)})})}function R(i,c){var t;l(this,"_invoke",{value:function(r,n){function e(){return new c(function(e,t){!function t(e,r,n,o){var a,e=p(i[e],i,r);if("throw"!==e.type)return(r=(a=e.arg).value)&&"object"==typeof r&&s.call(r,"__await")?c.resolve(r.__await).then(function(e){t("next",e,n,o)},function(e){t("throw",e,n,o)}):c.resolve(r).then(function(e){a.value=e,n(a)},function(e){return t("throw",e,n,o)});o(e.arg)}(r,n,e,t)})}return t=t?t.then(e,e):e()}})}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function V(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function I(t){if(t||""===t){var r,e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return r=-1,(e=function e(){for(;++r<t.length;)if(s.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=u,e.done=!0,e}).next=e}throw new TypeError(typeof t+" is not iterable")}return l(S,"constructor",{value:m.prototype=b,configurable:!0}),l(b,"constructor",{value:m,configurable:!0}),m.displayName=a(b,o,"GeneratorFunction"),i.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,a(e,o,"GeneratorFunction")),e.prototype=Object.create(S),e},i.awrap=function(e){return{__await:e}},j(R.prototype),a(R.prototype,r,function(){return this}),i.AsyncIterator=R,i.async=function(e,t,r,n,o){void 0===o&&(o=Promise);var a=new R(c(e,t,r,n),o);return i.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},j(S),a(S,o,"Generator"),a(S,n,function(){return this}),a(S,"toString",function(){return"[object Generator]"}),i.keys=function(e){var t,r=Object(e),n=[];for(t in r)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},i.values=I,V.prototype={constructor:V,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&s.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=u)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function e(e,t){return a.type="throw",a.arg=r,n.next=e,t&&(n.method="next",n.arg=u),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var o=this.tryEntries[t],a=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var i=s.call(o,"catchLoc"),c=s.call(o,"finallyLoc");if(i&&c){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(i){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var a=(o=o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc?null:o)?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r,n,o=this.tryEntries[t];if(o.tryLoc===e)return"throw"===(r=o.completion).type&&(n=r.arg,C(o)),n}throw Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=u),h}},i}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==typeof e?e:e+""}function _typeof(e){return(_typeof="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 _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}var originOptions={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;return createElement(Fragment,null,t,(void 0===e?[]:e).map(function(e){var t=e.Portal;return createElement(t,{key:e.key})}))}},componentWrapAttrs:{"data-use-vue-component-wrap":"",style:{all:"unset"}},slotWrapAttrs:{"data-use-vue-slot-wrap":"",style:{all:"unset"}}}};function setOptions(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{react:{},vue:{}},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:originOptions,r=2<arguments.length?arguments[2]:void 0,t=(e.vue||(e.vue={}),e.react||(e.react={}),[t,_objectSpread2(_objectSpread2({},e),{},{react:_objectSpread2(_objectSpread2(_objectSpread2({},t.react),e.react),{},{componentWrapAttrs:_objectSpread2(_objectSpread2({},t.react.componentWrapAttrs),e.react.componentWrapAttrs),slotWrapAttrs:_objectSpread2(_objectSpread2({},t.react.slotWrapAttrs),e.react.slotWrapAttrs)}),vue:_objectSpread2(_objectSpread2(_objectSpread2({},t.vue),e.vue),{},{componentWrapAttrs:_objectSpread2(_objectSpread2({},t.vue.componentWrapAttrs),e.vue.componentWrapAttrs),slotWrapAttrs:_objectSpread2(_objectSpread2({},t.vue.slotWrapAttrs),e.vue.slotWrapAttrs)})})]);return r&&t.unshift({}),Object.assign.apply(this,t)}var domMethods=["getElementById","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","querySelector","querySelectorAll"],domTopObject={Document:{},Element:{}};function overwriteDomMethods(i){Object.keys(domTopObject).forEach(function(e){domMethods.forEach(function(o){var a=domTopObject[e][o]||window[e].prototype[o];a&&(domTopObject[e][o]=a,window[e].prototype[o]=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=a.apply(this,t);return n&&(n.constructor!==NodeList||n.constructor===NodeList&&0<n.length)?n:("getElementById"===(n=o)&&(n="querySelector",t=["#"+t[0]]),(domTopObject.Element[n]||Element.prototype[n]).apply(i,t))})})})}function recoverDomMethods(){Object.keys(domTopObject).forEach(function(t){domMethods.forEach(function(e){window[t].prototype[e]=domTopObject[t][e]})})}var _excluded=["ref"],_excluded2=["key"],_excluded3=["hashList"],ReactDOMMajorVersion=parseInt(version);function toRaws(e){return e}var FunctionComponentWrap=(()=>{function t(e){return _classCallCheck(this,t),_callSuper(this,t,[e])}return _inherits(t,Component),_createClass(t,[{key:"render",value:function(){var e=this.props.component,t=this.props.passedProps,t=(t.ref,_objectWithoutProperties(t,_excluded));return createElement(e,t,this.props.children)}}])})(),createReactContainer=function(_,f,d){var e=(()=>{function p(e){var t;return _classCallCheck(this,p),(t=_callSuper(this,p,[e])).state=_objectSpread2(_objectSpread2({},e),f.isSlots?{children:_}:{}),t.setRef=t.setRef.bind(t),t.vueInReactCall=t.vueInReactCall.bind(t),(t.__veauryVueWrapperRef__=d).__veauryVueInReactCall__=t.vueInReactCall,t}return _inherits(p,Component),_createClass(p,[{key:"reactPropsLinkToVueInstance",value:function(t){Object.keys(t).forEach(function(e){d[e]||(d[e]=t[e])}),Object.getOwnPropertyNames(t.__proto__).filter(function(e){return["constructor","render"].indexOf(e)<0}).forEach(function(e){d[e]||(d[e]=t[e])})}},{key:"setRef",value:function(e){var t=this;e&&(d.__veauryReactRef__=e,this.reactPropsLinkToVueInstance(e),Promise.resolve().then(function(){return t.reactPropsLinkToVueInstance(e)}),(this.setRef.current=e).__veauryVueWrapperRef__=d)}},{key:"createSlot",value:function(r){return{originVNode:r,inheritAttrs:!1,__fromReactSlot:!0,render:function(){var e,t;return 1===(null==(e=r=(r=(null==(t=this.$slots)||null==(e=t.default)?void 0:e.call(t))||r)instanceof Function?r(this):r)?void 0:e.length)&&null!=(t=r[0])&&t.data&&((e=this.$attrs).key,t=_objectWithoutProperties(e,_excluded2),r[0].props=_objectSpread2(_objectSpread2({},t),r[0].props)),r}}}},{key:"componentWillUnmount",value:function(){d.__veauryReactRef__&&(d.__veauryReactRef__.__veauryVueWrapperRef__=null,d.__veauryReactRef__=null)}},{key:"vueInReactCall",value:function(e){var r=this,n=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 applyVueInReact(r.createSlot(e instanceof Function?e:[e]),_objectSpread2(_objectSpread2(_objectSpread2({},f),n),{},{isSlots:!0,wrapInstance:d})).render({key:(null==e?void 0:e.key)||void 0})}):applyVueInReact(this.createSlot(e),_objectSpread2(_objectSpread2(_objectSpread2({},f),n),{},{isSlots:!0,wrapInstance:d})).render()}},{key:"render",value:function(){var e,t,r,i=this,n=this.state,o=n.hashList,a=_objectWithoutProperties(n,_excluded3),c={},u={};for(e in a)t=e,r=void 0,a.hasOwnProperty(t)&&null!=a[t]&&(a[t].__slot?(a[t].reactSlot?a[t]=a[t].reactSlot:(r=a[t],f.defaultSlotsFormatter&&a[t].__trueChildren?(a[t].__trueChildren.__top__=i.__veauryVueWrapperRef__,a[t]=f.defaultSlotsFormatter(a[t].__trueChildren,i.vueInReactCall,o),a[t]instanceof Array?a[t]=_toConsumableArray(a[t]):-1<["string","number"].indexOf(_typeof(a[t]))?a[t]=[a[t]]:"object"===_typeof(a[t])&&(a[t]=_objectSpread2({},a[t]))):a[t]=_objectSpread2({},applyVueInReact(i.createSlot(a[t]),_objectSpread2(_objectSpread2({},f),{},{isSlots:!0,wrapInstance:d})).render()),a[t].vueFunction=r),c[t]=a[t]):a[t].__scopedSlot&&(a[t]=a[t](i.createSlot),u[t]=a[t]));var s,l,n={};return n.ref=this.setRef,f.isSlots?this.state.children||this.props.children:(s=a,_.__syncUpdateForPureReactInVue&&Object.keys(_.__syncUpdateForPureReactInVue).map(function(n){var o,a;s[n]&&"function"==typeof s[n]&&(o=i.__veauryVueWrapperRef__,a=s[n],s[n]=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];o.__veaurySyncUpdateProps__(_.__syncUpdateForPureReactInVue[n].apply(this,t)),a.apply(this,t),o.macroTaskUpdate=!0,o.__veauryMountReactComponent__(!0,!0,{})})}),l=_objectSpread2(_objectSpread2(_objectSpread2({},s=f.defaultPropsFormatter?f.defaultPropsFormatter.call(this,s,this.vueInReactCall,o):s),c),u),Object.getPrototypeOf(_)!==Function.prototype&&("object"!==_typeof(_)||_.render)||p.catchVueRefs()?(Object.getPrototypeOf(_)===Function.prototype&&delete n.ref,createElement(_,_extends({},l,n))):createElement(FunctionComponentWrap,_extends({passedProps:l,component:_},n),l.children))}}],[{key:"catchVueRefs",value:function(){if(d.$parent)for(var e in d.$parent.$refs)if(d.$parent.$refs[e]===d)return!0;return!1}}])})();return _defineProperty(e,"displayName","applyReact_".concat(_.displayName||_.name||"Component")),e};function applyReactInVue(j){var R=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return j.__esModule&&j.default&&(j=j.default),R.isSlots&&(j=j()),R=setOptions(R,void 0,!0),{originReactComponent:j,setup:function(e,t){var r,n,o,a;if(!R.isSlots)return r={},n=reactive({}),o=getCurrentInstance(),"function"==typeof(a=R.useInjectPropsFromWrapper||j.__veauryInjectPropsFromWrapper__)&&("function"!=typeof(a=a.call(o.proxy,e))?(Object.assign(n,a),r.__veauryInjectedProps__=n):o.proxy.__veauryInjectedComputed__=a),r},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=h(R.react.componentWrap,_objectSpread2({ref:"react"},R.react.componentWrapAttrs||{}),this.VEAURY_Portals.map(function(e){return(0,e.Portal)(h,e.key)}));return this.__veauryCheckReactSlot__(this.$slots),e},methods:{__veauryCheckReactSlot__:function(n){var o=this;function a(e,t,r){return t[r]&&(e[r]=t[r],1)}"object"===_typeof(n)&&null!=n&&(n instanceof Array?n.forEach(function(e){o.__veauryCheckReactSlot__(e.children)}):Object.keys(n).forEach(function(e){var t,r,e=n[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!==Fragment$1||1!==(null==(r=t.children)?void 0:r.length)||a(e,r=t.children[0],"reactSlot")||a(e,r,"reactFunction")}}))},__veauryPushVuePortal__:function(e){var t=this.__veauryPortalKeyPool__.shift()||this.__veauryMaxPortalCount__++;this.VEAURY_Portals.push({Portal:e,key:t})},__veauryRemoveVuePortal__:function(r){var n,e=this.VEAURY_Portals.find(function(e,t){if(e.Portal===r)return n=t,!0});this.__veauryPortalKeyPool__.push(e.key),this.VEAURY_Portals.splice(n,1)},__veauryGetScopeSlot__:function(i,c,t){var u=this;function e(a){function e(){for(var e,t=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return i.reactFunction?i.reactFunction.apply(this,n):R.defaultSlotsFormatter?((e=i.apply(this,n)).__top__=u,(e=R.defaultSlotsFormatter(e,u.__veauryVueInReactCall__,c))instanceof Array||-1<_typeof(e).indexOf("string","number")?e=_toConsumableArray(e):"object"===_typeof(e)&&(e=_objectSpread2({},e)),e):applyVueInReact(a(function(){return i.apply(t,n)}),_objectSpread2(_objectSpread2({},R),{},{isSlots:!0,wrapInstance:u})).render()}return R.pureTransformer&&t?e.vueFunction=t:e.vueFunction=i,e}return e.__scopedSlot=!0,e},__veaurySyncUpdateProps__:function(e){this.__veauryReactInstance__&&this.__veauryReactInstance__.setState(e)},__veauryMountReactComponent__:function(m,b){var g=arguments,S=this;return _asyncToGenerator(_regeneratorRuntime().mark(function e(){var t,r,n,o,a,i,c,u,s,l,p,_,f,d,y,h,v;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=2<g.length&&void 0!==g[2]?g[2]:{},r={},n=[],(u=S.$.vnode.scopeId)&&(r[u]="",n.push(u)),o={},a={},m&&(null==b||!b.slot)){e.next=18;break}c=_regeneratorRuntime().mark(function e(t){var r;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(S.$slots.hasOwnProperty(t)&&null!=S.$slots[t]){e.next=2;break}return e.abrupt("return",0);case 2:if((r=R.react.vueNamedSlotsKey.find(function(e){return 0===t.indexOf(e)}))||"default"===t)return r=t.replace(new RegExp("^".concat(r)),""),o[r]=S.$slots[t],o[r].__slot=!0,e.abrupt("return",0);e.next=8;break;case 8:a[t]=S.__veauryGetScopeSlot__(S.$slots[t],n,null==(r=S.$.vnode)||null==(r=r.children)?void 0:r[t]);case 9:case"end":return e.stop()}},e)}),e.t0=_regeneratorRuntime().keys(S.$slots||{});case 10:if((e.t1=e.t0()).done){e.next=18;break}return u=e.t1.value,e.delegateYield(c(u),"t2",13);case 13:if(0===e.t2)return e.abrupt("continue",10);e.next=16;break;case 16:e.next=10;break;case 18:if((!m||null!=b&&b.slot)&&(s=_objectSpread2({},o),i=s.default,delete s.default),S.__veauryLast__=S.__veauryLast__||{},S.__veauryLast__.slot=S.__veauryLast__.slot||{},S.__veauryLast__.attrs=S.__veauryLast__.attrs||{},l={slot:function(){S.__veauryLast__.slot=_objectSpread2(_objectSpread2(_objectSpread2({},i?{children:i}:{children:null}),s),a)},attrs:function(){S.__veauryLast__.attrs=S.$attrs}},b&&Object.keys(b).forEach(function(e){return l[e]()}),m){e.next=64;break}if(S.__reactBoundedPromise__=new Promise(function(e){p=e}),S.__reactBoundedPromise__.resolve=p,l.slot(),l.attrs(),d=createReactContainer(j,R,S),_=createElement(d,_extends({},toRaws(S.$attrs),toRaws(S.__veauryInjectedProps__),{children:i},s,a,S.$attrs.class?{className:S.$attrs.class}:{},r,{hashList:n},S.$attrs.style?{style:S.$attrs.style}:{},{ref:function(e){S.__veauryReactInstance__=e,S.__reactBoundedPromise__.resolve(!0)}})),f=S.$refs.react,d=R.wrapInstance){e.next=47;break}y=S.$parent;case 35:if(y){if(y.parentReactWrapperRef)return d=y.parentReactWrapperRef,e.abrupt("break",45);e.next=39}else e.next=45;break;case 39:if(y.reactWrapperRef)return d=y.reactWrapperRef,e.abrupt("break",45);e.next=42;break;case 42:y=y.$parent,e.next=35;break;case 45:e.next=49;break;case 47:(d=R.wrapInstance).__veauryVueWrapperRef__=S;case 49:if(d)return S.parentReactWrapperRef=d,S.reactPortal=function(){return createPortal(_,f)},d.pushReactPortal(S.reactPortal),e.abrupt("return");e.next=54;break;case 54:if(17<ReactDOMMajorVersion)return void 0!==ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED&&(ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint=!0),h=R.react.createRoot||ReactDOM.createRoot,18<ReactDOMMajorVersion&&!h&&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."),S.__veauryReactApp__=h(f),S.__veauryReactApp__.render(_),e.abrupt("return");e.next=61;break;case 61:ReactDOM.render(_,f),e.next=71;break;case 64:return e.next=66,S.__reactBoundedPromise__;case 66:v=function(){S.__veauryReactInstance__.setState(function(t){return Object.keys(t).forEach(function(e){R.isSlots&&"children"===e||delete t[e]}),_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},S.__veauryCache__),toRaws(S.__veauryInjectedProps__)),!R.isSlots&&S.__veauryLast__.slot),toRaws(S.__veauryLast__.attrs))}),S.__veauryCache__=null},!S.microTaskUpdate||S.__veauryCache__||S.$nextTick(function(){v(),S.microTaskUpdate=!1}),S.macroTaskUpdate&&(clearTimeout(S.updateTimer),S.updateTimer=setTimeout(function(){clearTimeout(S.updateTimer),v(),S.macroTaskUpdate=!1})),S.__veauryCache__=_objectSpread2(_objectSpread2({},S.__veauryCache__||{}),_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},t),S.$attrs.class?{className:S.$attrs.class}:{}),_objectSpread2({},r)),{},{hashList:n},S.$attrs.style?{style:S.$attrs.style}:{})),S.macroTaskUpdate||S.microTaskUpdate||v();case 71:case"end":return e.stop()}},e)}))()}},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 e;clearTimeout(this.updateTimer),overwriteDomMethods(this.$refs.react),this.reactPortal?null!=(e=this.parentReactWrapperRef)&&e.removeReactPortal(this.reactPortal):17<ReactDOMMajorVersion?null!=(e=this.__veauryReactApp__)&&e.unmount():ReactDOM.unmountComponentAtNode(this.$refs.react),recoverDomMethods()},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 REACT_ALL_HANDLERS=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 lookupVueWrapperRef(e,t){for(var r=null==(e=t=(null==e?void 0:e._reactInternals)||(null==e?void 0:e._reactInternalFiber)||t)?void 0:e.return;r;){var n=r.stateNode;if(n=(null==n?void 0:n.parentVueWrapperRef)||(null==n?void 0:n.__veauryVueWrapperRef__))return n;r=r.return}}function createModifiers(e,t,r){var n={};return r.forEach(function(e){n[e]=!0}),e[("modelValue"===t?"model":t)+"Modifiers"]=n}function setVModel(e,t,r){var n=this,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"v-model";if(!(t instanceof Array))throw Error("[error:veaury] Parameter type error from '".concat(o,"', 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(o,"', a single v-model is an array, the second element of the array must be a setter function"));var a=t[1],i=("string"==typeof t[2]?(r=t[2],t[3]instanceof Array&&createModifiers(e,r,t[3])):t[2]instanceof Array&&createModifiers(e,r,t[2]),e["onUpdate:"+r]);e["onUpdate:"+r]="function"==typeof i?function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];i.apply(n,t),a.apply(n,t)}:a,e[r]=t[0]}function parseVModel(a){var i=this,r={},c=_objectSpread2({},a);return Object.keys(a).forEach(function(n){var o,e=n.match(/^onUpdate-([^-]+)/);if(e)delete c[n],o=r["onUpdate:".concat(e[1])],r["onUpdate:".concat(e[1])]="function"==typeof o?function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];o.apply(i,t),a[n].apply(i,t)}:a[n];else if(e=n.match(/^v-model($|:([^:]+)|-([^:]+))/))e=e[2]||e[3]||"modelValue",setVModel(r,a[n],e),delete c[n];else if("v-models"===n){if("object"!==_typeof(a[n])||a[n]instanceof Array)throw Error("[error:veaury] The parameter 'v-models' must be an object type, such as {[argumentKey]: singleVModel}");var t=a[n];Object.keys(t).forEach(function(e){setVModel(r,t[e],e,"v-models")}),delete c[n]}}),_objectSpread2(_objectSpread2({},c),r)}var _default=(()=>_createClass(function e(){_classCallCheck(this,e),_defineProperty(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 RenderReactNode(e,t){var r,e=e.node;if("function"==typeof e&&(e=e()),null!=(r=t)&&r.current||"function"==typeof t||null!=(r=t)&&r.toString().match(/^function/)||(t=null),-1<["string","number"].indexOf(_typeof(e)))return e;if(e instanceof Array){if(1!==e.length)return e;e=e[0]}return _objectSpread2(_objectSpread2({},e),{},{ref:t})}var Bridge=applyReactInVue(RenderReactNode);function WrapVue(e){return h(Bridge,{node:function(){return e.node}})}WrapVue.originReactComponent=forwardRef(RenderReactNode);var _excluded$1=["component","node"],_excluded2$1=["component","$slots","children","class","style"],_excluded3$1=["className","classname"],optionsName="veaury-options",random=new _default;function filterVueComponent(e,t){var r;return e="string"==typeof e&&t?null==(t=t.$)||null==(t=t.appContext)||null==(t=t.app)||null==(r=t.component)?void 0:r.call(t,e):e}function transferSlots(r){if(r)return Object.keys(r).forEach(function(e){var t=r[e];null!=t&&("function"==typeof t?(r[e]=t,r[e].reactFunction=t):(r[e]=function(){return t},r[e].reactSlot=t),t.vueFunction)&&(r[e].vueFunction=t.vueFunction)}),r}function VNodeBridge(e){var t;return null==(t=e.node)?void 0:t.call(e)}var VueContainer=forwardRef(function(e,t){var r,n=e.component,o=e.node,e=_objectWithoutProperties(e,_excluded$1);if(null==n&&null==o)return null;if(null!=o){if(o.$$typeof||"string"==typeof o||"number"==typeof o)return o;"function"!=typeof o&&(r=o,o=function(){return r})}var a,n=n||VNodeBridge,i=setOptions(e[optionsName]||{},void 0,!0),c=i.useInjectPropsFromWrapper||n.__veauryInjectPropsFromWrapper__;return i.isSlots||"function"==typeof c&&(a=c(e)),createElement(VueComponentLoader,_extends({},_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({component:n},o?{node:o}:{}),e),a),{},_defineProperty({},optionsName,i)),{ref:t}))}),VueComponentLoader=(()=>{function r(e){var t;return _classCallCheck(this,r),(t=_callSuper(this,r,[e])).state={portals:[]},t.__veauryPortalKeyPool__=[],t.__veauryMaxPortalCount__=0,t.__veauryCurrentVueComponent__=e.component,t.__veauryCreateVueInstance__=t.__veauryCreateVueInstance__.bind(t),t.__veauryVueComponentContainer__=t.createVueComponentContainer(),t}return _inherits(r,Component),_createClass(r,[{key:"pushReactPortal",value:function(e){var t=this.state.portals,r=this.__veauryPortalKeyPool__.shift()||this.__veauryMaxPortalCount__++;t.push({Portal:e,key:r}),this.setState({portals:t})}},{key:"removeReactPortal",value:function(r){var n,e=this.state.portals,t=e.find(function(e,t){if(e.Portal===r)return n=t,!0});this.__veauryPortalKeyPool__.push(t.key),e.splice(n,1),this.__veauryVueRef__&&this.setState({portals:e})}},{key:"createVueComponentContainer",value:function(){var t=this,r={},e=this.props[optionsName];return e.isSlots?(Object.keys(this.props).forEach(function(e){REACT_ALL_HANDLERS.has(e)&&"function"==typeof t.props[e]&&(r[e]=t.props[e])}),e.vue.slotWrapAttrs&&(r=_objectSpread2(_objectSpread2({},r),e.vue.slotWrapAttrs))):e.vue.componentWrapAttrs&&(r=_objectSpread2(_objectSpread2({},r),e.vue.componentWrapAttrs)),e.vue.componentWrapHOC(createElement("div",_extends({},e.vue.componentWrapAttrs,{ref:this.__veauryCreateVueInstance__,key:null})),r)}},{key:"shouldComponentUpdate",value:function(e,t,r){var n,o,a,i,c=this;return e===this.props||(n=e.component,o=void 0===(o=e["v-slots"])?null:o,a=e.children,e=_objectWithoutProperties(e,["component",optionsName,"v-slots","children"].map(_toPropertyKey)),this.__veauryCurrentVueComponent__!==n&&this.updateVueComponent(n),n.__fromReactSlot)||this.__veauryVueInstance__&&(a&&(o=o||{},"object"!==_typeof(a)||a instanceof Array||a.$$typeof?o.default=a:o=a),(i=this.__veauryVueInstance__.$data.$slots)&&Object.keys(i).forEach(function(e){delete i[e]}),o&&(i||(this.__veauryVueInstance__.$data.$slots={}),Object.assign(this.__veauryVueInstance__.$data.$slots,transferSlots(o))),Object.keys(this.__veauryVueInstance__.$data).forEach(function(e){"$slots"!==e&&delete c.__veauryVueInstance__.$data[e]}),this.__veauryVueInstance__)&&Object.assign(this.__veauryVueInstance__.$data,parseVModel(e)),!0}},{key:"componentWillUnmount",value:function(){this.vuePortal?this.parentVueWrapperRef.__veauryRemoveVuePortal__(this.vuePortal):(this.__veauryVueInstance__&&this.__veauryVueInstance__.$.appContext.app.unmount(),random.pool.delete(this.__veauryVueTargetId__),this.vueCreated=!1)}},{key:"componentDidMount",value:function(){this.__veauryCreateVueInstance__(this.vueContainerElement)}},{key:"__veauryCreateVueInstance__",value:function(e){var p,_,t,r,n,o,a,i,c=this;function u(e){this.__veauryVueInstance__||(this.__veauryVueInstance__=e)}this.vueCreated||(this.vueCreated=!0,(p=this).vueContainerElement=e,(t=this.props).component,_=t[optionsName],a=t.children,i=void 0===(i=t["v-slots"])?{}:i,t=_objectWithoutProperties(t,["component",optionsName,"children","v-slots"].map(_toPropertyKey)),a&&("object"!==_typeof(a)||a instanceof Array||a.$$typeof?i.default=a:i=a),(i=transferSlots(i))&&(t.$slots=i),u=u.bind(this),r=_objectSpread2({},parseVModel(t)),n={data:function(){return _.isSlots?{children:p.__veauryCurrentVueComponent__.originVNode}:r},created:function(){this.reactWrapperRef=p,u(this)},methods:{reactInVueCall:function(e){return(2<arguments.length?arguments[2]:void 0)&&e&&e[0]?e.map(function(e,t){return h(WrapVue,{node:e,key:(null==e||null==(e=e.data)?void 0:e.key)||t})}):h(WrapVue,{node:e})},getScopedSlots:function(s,e){var t,l=this,r=(this.getScopedSlots.__scopeSlots||(this.getScopedSlots.__scopeSlots={}),_objectSpread2({},e));for(t in r)(c=>{var e,u;!r.hasOwnProperty(c)||null==(e=r[c])||(r[c]=(u=e,function(){for(var e,t,r,n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return u.vueFunction?u.vueFunction.apply(l,a):(r=u.reactFunction,r=u.reactSlot||(null==r?void 0:r.apply(l,a)),n=_.defaultSlotsFormatter,null!=(e=l.getScopedSlots.__scopeSlots[c])&&null!=(e=e.component)&&null!=(e=e.ctx)&&e.__veauryReactInstance__?(t=l.getScopedSlots.__scopeSlots[c],Promise.resolve().then(function(){var e;null!=(e=t)&&null!=(e=e.component)&&null!=(e=e.ctx)&&null!=(e=e.__veauryReactInstance__)&&e.setState({children:u.apply(l,a)})})):(t=n&&r?[n(r,l.reactInVueCall)]:s(applyReactInVue(function(){return u.apply(l,a)},_objectSpread2(_objectSpread2({},_),{},{isSlots:!0,wrapInstance:p}))),l.getScopedSlots.__scopeSlots[c]=t),u.reactFunction?t.reactFunction=u.reactFunction:u.reactSlot&&(t.reactSlot=u.reactSlot),t)}),r[c].reactFunction=e)})(t);return r}},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=this,t=this.$data,r=(t.component,t.$slots),n=t.class,o=t.style,t=_objectWithoutProperties(t,_excluded2$1),a=this.getScopedSlots(h,_objectSpread2({},r)),r=t.className,i=t.classname,t=_objectWithoutProperties(t,_excluded3$1),c={};return Object.keys(a).forEach(function(e){var t=a[e];c[e]="function"==typeof t?t:function(){return t}}),h(filterVueComponent(p.__veauryCurrentVueComponent__,this),_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},t),n||r||i?{class:n||r||i}:{}),o?{style:o}:{}),{},{ref:"use_vue_wrapper"}),_objectSpread2({},_.isSlots&&this.children?{default:"function"==typeof this.children?this.children:function(){return e.children}}:_objectSpread2({},c)))}},e&&(o=random.getRandomId("__vue_wrapper_container_"),e.id=o,this.__veauryVueTargetId__=o,(a=_.wrapInstance)?(a=_.wrapInstance).reactWrapperRef=p:a=lookupVueWrapperRef(this),a&&document.getElementById(o)?(this.parentVueWrapperRef=a,this.vuePortal=function(e,t){return e(Teleport,{to:"#"+o,key:o},[e(Object.assign(n,{router:c._router}))])},a.__veauryPushVuePortal__(this.vuePortal)):(i=createApp(n),"function"==typeof _.beforeVueAppMount&&_.beforeVueAppMount(i),this.__veauryVueInstance__=i.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 createElement(this.__veauryVueComponentContainer__,{portals:this.state.portals})}}])})();function applyVueInReact(r){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=(r||console.warn("Component must be passed in applyVueInReact!"),r.__esModule&&r.default&&(r=r.default),forwardRef(function(e,t){return createElement(VueContainer,_extends({},e,{component:r,ref:t},_defineProperty({},optionsName,n)))}));return e.originVueComponent=r,e}function lazyVueInReact(e,t){return lazy(function(){return e().then(function(e){return{default:applyVueInReact(e.default,t)}})})}function lazyReactInVue(e,t){function r(){return n().then(function(e){return applyReactInVue(e.default,t)})}var n=e;"object"===_typeof(e)&&(n=e.loader);return defineAsyncComponent("object"===_typeof(e)?_objectSpread2(_objectSpread2({},e),{},{loader:r}):r)}function injectPropsFromWrapper(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}var _excluded$2=["children"];function createCrossingProviderForReactInVue(e){var r=createContext({});return[function(){return useContext(r)},applyReactInVue(function(e){var t=e.children,e=_objectWithoutProperties(e,_excluded$2);return createElement(r.Provider,{value:_objectSpread2({},e)},t)},{useInjectPropsFromWrapper:e}),r]}var random$1=new _default;function createCrossingProviderForVueInReact(e,r){return r=r||random$1.getRandomId("veauryCrossingProvide_"),[function(){return inject(r)},applyVueInReact({setup:function(e,t){return provide(r,t.attrs),function(){return h(t.slots.default)}}},{useInjectPropsFromWrapper:e})]}function createReactMissVue(e){var t=e.useVueInjection,e=e.beforeVueAppMount,t=_slicedToArray(createCrossingProviderForReactInVue(t),3),r=t[0],n=t[2];return[r,applyVueInReact(t[1],{beforeVueAppMount:e}),n]}function transformer(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=t.globalName,n=applyReactInVue(e,t.combinedOption||{});return n.install=function(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).globalName;return r&&e.component(t||r,n),n},n}function toCamelCase(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function formatStyle(t){var r;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,_defineProperty({},toCamelCase(t[0]),t[1])),e},{}):"object"===_typeof(t)?(r={},Object.keys(t).forEach(function(e){r[toCamelCase(e)]=t[e]}),r):{}:{}}function formatClass(t){return t?t instanceof Array?t:"string"==typeof t?(t=t.trim()).split(/\s+/):"object"===_typeof(t)?Object.keys(t).filter(function(e){return!!t[e]}):[]:[]}var _excluded$3=["ref"];function getChildInfo(r,e,o,a,i){var t=r.props||{},t=(t.ref,_objectWithoutProperties(t,_excluded$3)),c={},n=(Object.keys(r.children||{}).forEach(function(t){var n=r.children[t],e=originOptions.react.vueNamedSlotsKey.find(function(e){return 0===t.indexOf(e)});e||"default"===t?(e=t.replace(new RegExp("^".concat(e)),"").replace(/^default$/,"children"),c[e]=a.call(r.__top__,n(),o,i)):"function"==typeof n&&(c[t]=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.__reactArgs=t,a(n.apply(this,t),o,i)})}),{}),u=formatStyle(t.style),s=Array.from(new Set(formatClass(t.class))).join(" ");return 0<Object.keys(u).length&&(n.style=u),""!==s&&(n.className=s),Object.assign(t,_objectSpread2(_objectSpread2({},n),c)),delete t.class,"boolean"==typeof t.ref_for&&delete t.ref_for,t}function isTextOwner(e){return e.type===Text}var random$2=new _default;function DirectiveHOC(e,t){var r;return 0<(null==(r=e.dirs)?void 0:r.length)?createElement(FakeDirective,{vnode:e},t):t}var FakeDirective=(()=>{function r(e){var t;return _classCallCheck(this,r),(t=_callSuper(this,r,[e])).state={prevVnode:null,savedDirectives:[],ref:null,prevProps:e},t}return _inherits(r,Component),_createClass(r,[{key:"findDirectiveName",value:function(e){var r=e.dir,n=-1;return[this.state.savedDirectives.find(function(e,t){if(e.dir===r)return n=t,!0}),n]}},{key:"doDirective",value:function(){var u=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,r,n,o,a,i,c;e&&(c=(t=_slicedToArray(u.findDirectiveName(e),2))[0],t=t[1],r=(a=e.dir).created,n=a.beforeMount,o=a.mounted,i=a.beforeUpdate,a=a.updated,c?(s[t]=_objectSpread2(_objectSpread2(_objectSpread2({},c),e),{},{oldValue:c.oldValue}),c=[l,s[t],p,u.state.prevVnode],null!=i&&i.apply(null,c),null!=a&&a.apply(null,c),s[t].oldValue=e.value):(s.push(e),i=[l,e,p,null],null!=r&&r.apply(null,i),null!=n&&n.apply(null,i),null!=o&&o.apply(null,i),e.oldValue=e.value))}),this.setState({prevVnode:_objectSpread2({},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,i=this.props.vnode,e=this.state,c=e.savedDirectives,u=e.ref,s=e.prevVnode,e=i.dirs;e&&(e.forEach(function(e){var t,r,n,o;e&&(t=(o=_slicedToArray(a.findDirectiveName(e),2))[0])&&(r=(n=e.dir).beforeUnmount,n=n.unmounted,c[o[1]]=_objectSpread2(_objectSpread2({},t),e),o=[u,t,i,s],null!=r&&r.apply(null,o),null!=n)&&n.apply(null,o)}),this.setState({prevVnode:_objectSpread2({},i),savedDirectives:c}))}},{key:"render",value:function(){var e=this.props;e.vnode;return e.children}}])})();function couldBeClass(e,t){var r;return"function"==typeof e&&(r=e.toString(),void 0!==e.prototype)&&e.prototype.constructor===e&&("class"==r.slice(0,5)||2<=Object.getOwnPropertyNames(e.prototype).length||!/^function\s+\(|^function\s+anonymous\(/.test(r)&&(!(!t||!/^function\s+[A-Z]/.test(r))||!!/\b\(this\b|\bthis[\.\[]\b/.test(r)&&(!(t&&!/classCallCheck\(this/.test(r))||/^function\sdefault_\d+\s*\(/.test(r))))}function resolveRef(o,r){var e,n,t,a;return"function"!=typeof(null==(t=o.type)?void 0:t.originReactComponent)||couldBeClass(null==(t=o.type)?void 0:t.originReactComponent)?(null!=(t=o.ref)&&t.k?(e=null==(t=o.ref)?void 0:t.k,n=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=_objectSpread2({},o.ref.i.refs))[a]=e,o.ref.i.refs=t),n?n.value=e:o.ref.i.setupState&&a in o.ref.i.setupState&&(o.ref.i.setupState[a]=e),e&&(e.__syncUpdateProps=function(){r.__top__&&(o.__extraData=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r.__top__.__syncUpdateProps({}))})},e=new Proxy(e,{get:function(e,t){return e[t]},set:function(e,t,r){var n;return null!=(n=o.ref)&&null!=(n=n.i)&&n.refs&&a in(null==(n=o.ref)||null==(n=n.i)?void 0:n.refs)&&((n=_objectSpread2({},o.ref.i.refs))[t]=r,o.ref.i.refs=n),r}})),e):null}function addScopeId(t,e){return!e||e instanceof Array&&0===e.length||("string"==typeof e&&(e=[e]),(t=_objectSpread2({},t)).props=_objectSpread2({},t.props),e.forEach(function(e){t.props[e]=""})),t}var _excluded$4=["style","class"];function takeVueDomInReact(e,t,r,n,o,a,i){var c,u,s;return"all"===t||t instanceof Array||(t=t?[t]:[]),e.type===Fragment$1?o.call(i,e.children,r,a):"string"==typeof e.type&&("all"===t||-1<t.indexOf(e.type))?(t=resolveRef(e),s=(u=e.props||{}).style,c=u.class,u=_objectSpread2(_objectSpread2({},_objectWithoutProperties(u,_excluded$4)),{},{style:formatStyle(s),className:Array.from(new Set(formatClass(c))).join(" ")},t?{ref:t}:{}),(s=e.children||u.children)&&((s=-1<["string","number"].indexOf(_typeof(s))?[s]:_toConsumableArray(s)).__top__=i),DirectiveHOC(e,addScopeId(React__default.createElement(e.type,u,o.call(i,s,r,a)),e.scopeId))):r([e],null,n)}function pureInterceptProps(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},a=1<arguments.length?arguments[1]:void 0,i=2<arguments.length?arguments[2]:void 0;return i.__syncUpdateForPureReactInVue&&Object.keys(i.__syncUpdateForPureReactInVue).map(function(n){var o;e[n]&&"function"==typeof e[n]&&a.__top__&&(o=e[n],e[n]=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.__extraData=i.__syncUpdateForPureReactInVue[n].apply(this,t),a.__top__.__veaurySyncUpdateProps__({}),a.__top__.macroTaskUpdate=!0,o.apply(this,t),a.__top__&&Promise.resolve().then(function(){a.__extraData=null,a.__top__.__veauryMountReactComponent__(!0)})})}),e}function setChildKey(e,t,r){return!((e=e instanceof Array&&1===e.length?e[0]:e)instanceof Array)&&null==e.key&&1<t.length&&((e=_objectSpread2({},e)).key="_key_".concat(r)),e}function getDistinguishReactOrVue(e){var l=e.reactComponents,p=e.domTags,e=e.division,_=void 0===e||e;return function a(i,c,u){var s;return i&&i.forEach?(i.__top__||(i.__top__=this),s=[],i.forEach(function(e,t){if(e&&e.type!==Comment){if(null==(o=e.type)||!o.originReactComponent)return e.$$typeof||"string"==typeof e||"number"==typeof e?void s.push(e):isTextOwner(e)?void(""!==e.children.trim()&&s.push(e.children.trim())):void(e.type&&(addScopeId(o=setChildKey(takeVueDomInReact(e,p,c,_,a,u,i.__top__),i,t),e.scopeId),s.push(o)));var r,n,o=e.type.originReactComponent;addScopeId(r=setChildKey(r="all"===(l="all"===l||l instanceof Array?l:[l])||-1<l.indexOf(o)?(e.__top__=i.__top__,r=getChildInfo(e,"_key_".concat(t),c,a,u),n=resolveRef(e,i),e.children&&(e.children.__top__=i.__top__),DirectiveHOC(e,React__default.createElement(o,_objectSpread2(_objectSpread2(_objectSpread2({},pureInterceptProps(r,e,o)),e.__extraData||{}),n?{ref:n}:{})))):isTextOwner(e)?e.text:takeVueDomInReact(e,p,c,_,a,u),i,t),e.scopeId),s.push(r)}}),1===s.length?s[0]:s):i}}var NoWrapFunction=getDistinguishReactOrVue({reactComponents:"all",domTags:"all"});function applyPureReactInVue(e,t){return transformer(e,{combinedOption:_objectSpread2({pureTransformer:!0,defaultSlotsFormatter:NoWrapFunction,defaultPropsFormatter:function(t,o,a){var r={};return Object.keys(t).forEach(function(e){var n=t[e];n&&(n.vueFunction?(r[e]=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return NoWrapFunction(n.vueFunction.apply(this,t),o,a)},Object.defineProperty(r[e],"length",{get:function(){return n.vueFunction.length}})):n.vueSlot&&(r[e]=NoWrapFunction(n.vueSlot,o,a)))}),Object.assign(t,r)}},t)})}var NoWrapFunction$1=getDistinguishReactOrVue({reactComponents:"all",domTags:"all"});function getReactNode(e){return e=(e=[e="function"==typeof e?e():e]).flat(1/0),NoWrapFunction$1(e,function(e){return React__default.createElement(VueContainer,{node:e})})}function transformer$1(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};t.globalName;return applyVueInReact(e,t.combinedOption||{})}var _excluded$5=["ref","children","v-slots"];function getChildInfo$1(e,t,o,a,i){