Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@marvr/storyblok-rich-text-vue-renderer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marvr/storyblok-rich-text-vue-renderer - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

2

dist/storyblok-rich-text-vue-renderer.es.js

@@ -1,1 +0,1 @@

var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(t,e){const n=Object.create(null),r=t.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const o=r("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt");function s(t){if(y(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],o=s(b(r)?i(r):r);if(o)for(const t in o)e[t]=o[t]}return e}if(O(t))return t}const c=/;(?![^(]*\))/g,l=/:(.+)/;function i(t){const e={};return t.split(c).forEach((t=>{if(t){const n=t.split(l);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}function a(t){let e="";if(b(t))e=t;else if(y(t))for(let n=0;n<t.length;n++){const r=a(t[n]);r&&(e+=r+" ")}else if(O(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}const u={},f=()=>{},p=/^on[^a-z]/,d=t=>p.test(t),h=Object.assign,_=Object.prototype.hasOwnProperty,g=(t,e)=>_.call(t,e),y=Array.isArray,v=t=>"[object Map]"===I(t),E=t=>"function"==typeof t,b=t=>"string"==typeof t,S=t=>"symbol"==typeof t,O=t=>null!==t&&"object"==typeof t,m=Object.prototype.toString,I=t=>m.call(t),R=t=>b(t)&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,T=(t,e)=>t!==e&&(t==t||e==e),x=new WeakMap,k=[];let L;const w=Symbol(""),C=Symbol("");function A(t,e=u){(function(t){return t&&!0===t._isEffect})(t)&&(t=t.raw);const n=function(t,e){const n=function(){if(!n.active)return e.scheduler?void 0:t();if(!k.includes(n)){M(n);try{return D.push(P),P=!0,k.push(n),L=n,t()}finally{k.pop(),U(),L=k[k.length-1]}}};return n.id=N++,n.allowRecurse=!!e.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=t,n.deps=[],n.options=e,n}(t,e);return e.lazy||n(),n}let N=0;function M(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let P=!0;const D=[];function U(){const t=D.pop();P=void 0===t||t}function $(t,e,n){if(!P||void 0===L)return;let r=x.get(t);r||x.set(t,r=new Map);let o=r.get(n);o||r.set(n,o=new Set),o.has(L)||(o.add(L),L.deps.push(o))}function F(t,e,n,r,o,s){const c=x.get(t);if(!c)return;const l=new Set,i=t=>{t&&t.forEach((t=>{(t!==L||t.allowRecurse)&&l.add(t)}))};if("clear"===e)c.forEach(i);else if("length"===n&&y(t))c.forEach(((t,e)=>{("length"===e||e>=r)&&i(t)}));else switch(void 0!==n&&i(c.get(n)),e){case"add":y(t)?R(n)&&i(c.get("length")):(i(c.get(w)),v(t)&&i(c.get(C)));break;case"delete":y(t)||(i(c.get(w)),v(t)&&i(c.get(C)));break;case"set":v(t)&&i(c.get(w))}l.forEach((t=>{t.options.scheduler?t.options.scheduler(t):t()}))}const j=r("__proto__,__v_isRef,__isVue"),B=new Set(Object.getOwnPropertyNames(Symbol).map((t=>Symbol[t])).filter(S)),G=Y(),H=Y(!1,!0),K=Y(!0),z=Y(!0,!0),W={};function Y(t=!1,e=!1){return function(n,r,o){if("__v_isReactive"===r)return!t;if("__v_isReadonly"===r)return t;if("__v_raw"===r&&o===(t?e?St:bt:e?Et:vt).get(n))return n;const s=y(n);if(!t&&s&&g(W,r))return Reflect.get(W,r,o);const c=Reflect.get(n,r,o);if(S(r)?B.has(r):j(r))return c;if(t||$(n,0,r),e)return c;if(wt(c)){return!s||!R(r)?c.value:c}return O(c)?t?It(c):mt(c):c}}["includes","indexOf","lastIndexOf"].forEach((t=>{const e=Array.prototype[t];W[t]=function(...t){const n=Lt(this);for(let e=0,o=this.length;e<o;e++)$(n,0,e+"");const r=e.apply(n,t);return-1===r||!1===r?e.apply(n,t.map(Lt)):r}})),["push","pop","shift","unshift","splice"].forEach((t=>{const e=Array.prototype[t];W[t]=function(...t){D.push(P),P=!1;const n=e.apply(this,t);return U(),n}}));function Q(t=!1){return function(e,n,r,o){let s=e[n];if(!t&&(r=Lt(r),s=Lt(s),!y(e)&&wt(s)&&!wt(r)))return s.value=r,!0;const c=y(e)&&R(n)?Number(n)<e.length:g(e,n),l=Reflect.set(e,n,r,o);return e===Lt(o)&&(c?T(r,s)&&F(e,"set",n,r):F(e,"add",n,r)),l}}const V={get:G,set:Q(),deleteProperty:function(t,e){const n=g(t,e);t[e];const r=Reflect.deleteProperty(t,e);return r&&n&&F(t,"delete",e,void 0),r},has:function(t,e){const n=Reflect.has(t,e);return S(e)&&B.has(e)||$(t,0,e),n},ownKeys:function(t){return $(t,0,y(t)?"length":w),Reflect.ownKeys(t)}},q={get:K,set:(t,e)=>!0,deleteProperty:(t,e)=>!0};h({},V,{get:H,set:Q(!0)}),h({},q,{get:z});const X=t=>O(t)?mt(t):t,J=t=>O(t)?It(t):t,Z=t=>t,tt=t=>Reflect.getPrototypeOf(t);function et(t,e,n=!1,r=!1){const o=Lt(t=t.__v_raw),s=Lt(e);e!==s&&!n&&$(o,0,e),!n&&$(o,0,s);const{has:c}=tt(o),l=r?Z:n?J:X;return c.call(o,e)?l(t.get(e)):c.call(o,s)?l(t.get(s)):void 0}function nt(t,e=!1){const n=this.__v_raw,r=Lt(n),o=Lt(t);return t!==o&&!e&&$(r,0,t),!e&&$(r,0,o),t===o?n.has(t):n.has(t)||n.has(o)}function rt(t,e=!1){return t=t.__v_raw,!e&&$(Lt(t),0,w),Reflect.get(t,"size",t)}function ot(t){t=Lt(t);const e=Lt(this);return tt(e).has.call(e,t)||(e.add(t),F(e,"add",t,t)),this}function st(t,e){e=Lt(e);const n=Lt(this),{has:r,get:o}=tt(n);let s=r.call(n,t);s||(t=Lt(t),s=r.call(n,t));const c=o.call(n,t);return n.set(t,e),s?T(e,c)&&F(n,"set",t,e):F(n,"add",t,e),this}function ct(t){const e=Lt(this),{has:n,get:r}=tt(e);let o=n.call(e,t);o||(t=Lt(t),o=n.call(e,t)),r&&r.call(e,t);const s=e.delete(t);return o&&F(e,"delete",t,void 0),s}function lt(){const t=Lt(this),e=0!==t.size,n=t.clear();return e&&F(t,"clear",void 0,void 0),n}function it(t,e){return function(n,r){const o=this,s=o.__v_raw,c=Lt(s),l=e?Z:t?J:X;return!t&&$(c,0,w),s.forEach(((t,e)=>n.call(r,l(t),l(e),o)))}}function at(t,e,n){return function(...r){const o=this.__v_raw,s=Lt(o),c=v(s),l="entries"===t||t===Symbol.iterator&&c,i="keys"===t&&c,a=o[t](...r),u=n?Z:e?J:X;return!e&&$(s,0,i?C:w),{next(){const{value:t,done:e}=a.next();return e?{value:t,done:e}:{value:l?[u(t[0]),u(t[1])]:u(t),done:e}},[Symbol.iterator](){return this}}}}function ut(t){return function(...e){return"delete"!==t&&this}}const ft={get(t){return et(this,t)},get size(){return rt(this)},has:nt,add:ot,set:st,delete:ct,clear:lt,forEach:it(!1,!1)},pt={get(t){return et(this,t,!1,!0)},get size(){return rt(this)},has:nt,add:ot,set:st,delete:ct,clear:lt,forEach:it(!1,!0)},dt={get(t){return et(this,t,!0)},get size(){return rt(this,!0)},has(t){return nt.call(this,t,!0)},add:ut("add"),set:ut("set"),delete:ut("delete"),clear:ut("clear"),forEach:it(!0,!1)},ht={get(t){return et(this,t,!0,!0)},get size(){return rt(this,!0)},has(t){return nt.call(this,t,!0)},add:ut("add"),set:ut("set"),delete:ut("delete"),clear:ut("clear"),forEach:it(!0,!0)};function _t(t,e){const n=e?t?ht:pt:t?dt:ft;return(e,r,o)=>"__v_isReactive"===r?!t:"__v_isReadonly"===r?t:"__v_raw"===r?e:Reflect.get(g(n,r)&&r in e?n:e,r,o)}["keys","values","entries",Symbol.iterator].forEach((t=>{ft[t]=at(t,!1,!1),dt[t]=at(t,!0,!1),pt[t]=at(t,!1,!0),ht[t]=at(t,!0,!0)}));const gt={get:_t(!1,!1)},yt={get:_t(!0,!1)},vt=new WeakMap,Et=new WeakMap,bt=new WeakMap,St=new WeakMap;function Ot(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>I(t).slice(8,-1))(t))}function mt(t){return t&&t.__v_isReadonly?t:Rt(t,!1,V,gt,vt)}function It(t){return Rt(t,!0,q,yt,bt)}function Rt(t,e,n,r,o){if(!O(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const s=o.get(t);if(s)return s;const c=Ot(t);if(0===c)return t;const l=new Proxy(t,2===c?r:n);return o.set(t,l),l}function Tt(t){return xt(t)?Tt(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function kt(t){return Tt(t)||xt(t)}function Lt(t){return t&&Lt(t.__v_raw)||t}function wt(t){return Boolean(t&&!0===t.__v_isRef)}function Ct(t,e,n,r){let o;try{o=r?t(...r):t()}catch(s){Nt(s,e,n)}return o}function At(t,e,n,r){if(E(t)){const s=Ct(t,e,n,r);return s&&(O(o=s)&&E(o.then)&&E(o.catch))&&s.catch((t=>{Nt(t,e,n)})),s}var o;const s=[];for(let c=0;c<t.length;c++)s.push(At(t[c],e,n,r));return s}function Nt(t,e,n,r=!0){e&&e.vnode;if(e){let r=e.parent;const o=e.proxy,s=n;for(;r;){const e=r.ec;if(e)for(let n=0;n<e.length;n++)if(!1===e[n](t,o,s))return;r=r.parent}const c=e.appContext.config.errorHandler;if(c)return void Ct(c,null,10,[t,o,s])}!function(t,e,n,r=!0){console.error(t)}(t,0,0,r)}let Mt=!1,Pt=!1;const Dt=[];let Ut=0;const $t=[];let Ft=null,jt=0;const Bt=[];let Gt=null,Ht=0;const Kt=Promise.resolve();let zt=null,Wt=null;function Yt(t){const e=zt||Kt;return t?e.then(this?t.bind(this):t):e}function Qt(t){if(!(Dt.length&&Dt.includes(t,Mt&&t.allowRecurse?Ut+1:Ut)||t===Wt)){const e=function(t){let e=Ut+1,n=Dt.length;const r=Jt(t);for(;e<n;){const t=e+n>>>1;Jt(Dt[t])<r?e=t+1:n=t}return e}(t);e>-1?Dt.splice(e,0,t):Dt.push(t),Vt()}}function Vt(){Mt||Pt||(Pt=!0,zt=Kt.then(Zt))}function qt(t,e,n,r){y(t)?n.push(...t):e&&e.includes(t,t.allowRecurse?r+1:r)||n.push(t),Vt()}function Xt(t,e=null){if($t.length){for(Wt=e,Ft=[...new Set($t)],$t.length=0,jt=0;jt<Ft.length;jt++)Ft[jt]();Ft=null,jt=0,Wt=null,Xt(t,e)}}const Jt=t=>null==t.id?1/0:t.id;function Zt(t){Pt=!1,Mt=!0,Xt(t),Dt.sort(((t,e)=>Jt(t)-Jt(e)));try{for(Ut=0;Ut<Dt.length;Ut++){const t=Dt[Ut];t&&Ct(t,null,14)}}finally{Ut=0,Dt.length=0,function(t){if(Bt.length){const t=[...new Set(Bt)];if(Bt.length=0,Gt)return void Gt.push(...t);for(Gt=t,Gt.sort(((t,e)=>Jt(t)-Jt(e))),Ht=0;Ht<Gt.length;Ht++)Gt[Ht]();Gt=null,Ht=0}}(),Mt=!1,zt=null,(Dt.length||Bt.length)&&Zt(t)}}let te=0;const ee=t=>te+=t;function ne(t){if(E(t)&&(t=t()),y(t)){t=function(t){let e;for(let n=0;n<t.length;n++){const r=t[n];if(!pe(r))return;if(r.type!==fe||"v-if"===r.children){if(e)return;e=r}}return e}(t)}return ve(t)}const re={};function oe(t,e,{immediate:n,deep:r,flush:o,onTrack:s,onTrigger:c}=u,l=Ie){let i,a,p=!1;if(wt(t)?(i=()=>t.value,p=!!t._shallow):Tt(t)?(i=()=>t,r=!0):i=y(t)?()=>t.map((t=>wt(t)?t.value:Tt(t)?ce(t):E(t)?Ct(t,l,2,[l&&l.proxy]):void 0)):E(t)?e?()=>Ct(t,l,2,[l&&l.proxy]):()=>{if(!l||!l.isUnmounted)return a&&a(),At(t,l,3,[d])}:f,e&&r){const t=i;i=()=>ce(t())}let d=t=>{a=v.options.onStop=()=>{Ct(t,l,4)}},h=y(t)?[]:re;const _=()=>{if(v.active)if(e){const t=v();(r||p||T(t,h))&&(a&&a(),At(e,l,3,[t,h===re?void 0:h,d]),h=t)}else v()};let g;_.allowRecurse=!!e,g="sync"===o?_:"post"===o?()=>le(_,l&&l.suspense):()=>{!l||l.isMounted?function(t){qt(t,Ft,$t,jt)}(_):_()};const v=A(i,{lazy:!0,onTrack:s,onTrigger:c,scheduler:g});return function(t,e=Ie){e&&(e.effects||(e.effects=[])).push(t)}(v,l),e?n?_():h=v():"post"===o?le(v,l&&l.suspense):v(),()=>{var t;(t=v).active&&(M(t),t.options.onStop&&t.options.onStop(),t.active=!1),l&&((t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)})(l.effects,v)}}function se(t,e,n){const r=this.proxy;return oe(b(t)?()=>r[t]:t.bind(r),e.bind(r),n,this)}function ce(t,e=new Set){if(!O(t)||e.has(t))return t;if(e.add(t),wt(t))ce(t.value,e);else if(y(t))for(let n=0;n<t.length;n++)ce(t[n],e);else if("[object Set]"===I(t)||v(t))t.forEach((t=>{ce(t,e)}));else for(const n in t)ce(t[n],e);return t}const le=function(t,e){e&&e.pendingBranch?y(t)?e.effects.push(...t):e.effects.push(t):qt(t,Gt,Bt,Ht)},ie=Symbol();const ae=Symbol(void 0),ue=Symbol(void 0),fe=Symbol(void 0);function pe(t){return!!t&&!0===t.__v_isVNode}const de=({key:t})=>null!=t?t:null,he=({ref:t})=>null!=t?b(t)||wt(t)||E(t)?{i:null,r:t}:t:null,_e=function(t,e=null,n=null,r=0,o=null,c=!1){t&&t!==ie||(t=fe);if(pe(t)){const r=ge(t,e,!0);return n&&Ee(r,n),r}l=t,E(l)&&"__vccOpts"in l&&(t=t.__vccOpts);var l;if(e){(kt(e)||"__vInternal"in e)&&(e=h({},e));let{class:t,style:n}=e;t&&!b(t)&&(e.class=a(t)),O(n)&&(kt(n)&&!y(n)&&(n=h({},n)),e.style=s(n))}const i=b(t)?1:(t=>t.__isSuspense)(t)?128:(t=>t.__isTeleport)(t)?64:O(t)?4:E(t)?2:0,u={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&de(e),ref:e&&he(e),scopeId:null,slotScopeIds:null,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null};if(Ee(u,n),128&i){const{content:t,fallback:e}=function(t){const{shapeFlag:e,children:n}=t;let r,o;return 32&e?(r=ne(n.default),o=ne(n.fallback)):(r=ne(n),o=ve(null)),{content:r,fallback:o}}(u);u.ssContent=t,u.ssFallback=e}0;return u};function ge(t,e,n=!1){const{props:r,ref:o,patchFlag:c,children:l}=t,i=e?function(...t){const e=h({},t[0]);for(let n=1;n<t.length;n++){const r=t[n];for(const t in r)if("class"===t)e.class!==r.class&&(e.class=a([e.class,r.class]));else if("style"===t)e.style=s([e.style,r.style]);else if(d(t)){const n=e[t],o=r[t];n!==o&&(e[t]=n?[].concat(n,r[t]):o)}else""!==t&&(e[t]=r[t])}return e}(r||{},e):r;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:i,key:i&&de(i),ref:e&&e.ref?n&&o?y(o)?o.concat(he(e)):[o,he(e)]:he(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:l,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==ae?-1===c?16:16|c:c,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&ge(t.ssContent),ssFallback:t.ssFallback&&ge(t.ssFallback),el:t.el,anchor:t.anchor}}function ye(t=" ",e=0){return _e(ue,null,t,e)}function ve(t){return null==t||"boolean"==typeof t?_e(fe):y(t)?_e(ae,null,t):"object"==typeof t?null===t.el?t:ge(t):_e(ue,null,String(t))}function Ee(t,e){let n=0;const{shapeFlag:r}=t;if(null==e)e=null;else if(y(e))n=16;else if("object"==typeof e){if(1&r||64&r){const n=e.default;return void(n&&(n._c&&ee(1),Ee(t,n()),n._c&&ee(-1)))}{n=32;const t=e._;t||"__vInternal"in e||(e._ctx=null)}}else E(e)?(e={default:e,_ctx:null},n=32):(e=String(e),64&r?(n=16,e=[ye(e)]):n=8);t.children=e,t.shapeFlag|=n}function be(t,e,n){const r=n.appContext.config.optionMergeStrategies,{mixins:o,extends:s}=e;s&&be(t,s,n),o&&o.forEach((e=>be(t,e,n)));for(const c in e)r&&g(r,c)?t[c]=r[c](t[c],e[c],n.proxy,c):t[c]=e[c]}const Se=t=>t?4&t.vnode.shapeFlag?t.exposed?t.exposed:t.proxy:Se(t.parent):null,Oe=h(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Se(t.parent),$root:t=>Se(t.root),$emit:t=>t.emit,$options:t=>function(t){const e=t.type,{__merged:n,mixins:r,extends:o}=e;if(n)return n;const s=t.appContext.mixins;if(!s.length&&!r&&!o)return e;const c={};return s.forEach((e=>be(c,e,t))),be(c,e,t),e.__merged=c}(t),$forceUpdate:t=>()=>Qt(t.update),$nextTick:t=>Yt.bind(t.proxy),$watch:t=>se.bind(t)}),me={get({_:t},e){const{ctx:n,setupState:r,data:o,props:s,accessCache:c,type:l,appContext:i}=t;if("__v_skip"===e)return!0;let a;if("$"!==e[0]){const l=c[e];if(void 0!==l)switch(l){case 0:return r[e];case 1:return o[e];case 3:return n[e];case 2:return s[e]}else{if(r!==u&&g(r,e))return c[e]=0,r[e];if(o!==u&&g(o,e))return c[e]=1,o[e];if((a=t.propsOptions[0])&&g(a,e))return c[e]=2,s[e];if(n!==u&&g(n,e))return c[e]=3,n[e];c[e]=4}}const f=Oe[e];let p,d;return f?("$attrs"===e&&$(t,0,e),f(t)):(p=l.__cssModules)&&(p=p[e])?p:n!==u&&g(n,e)?(c[e]=3,n[e]):(d=i.config.globalProperties,g(d,e)?d[e]:void 0)},set({_:t},e,n){const{data:r,setupState:o,ctx:s}=t;if(o!==u&&g(o,e))o[e]=n;else if(r!==u&&g(r,e))r[e]=n;else if(g(t.props,e))return!1;return("$"!==e[0]||!(e.slice(1)in t))&&(s[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:o,propsOptions:s}},c){let l;return void 0!==n[c]||t!==u&&g(t,c)||e!==u&&g(e,c)||(l=s[0])&&g(l,c)||g(r,c)||g(Oe,c)||g(o.config.globalProperties,c)}};h({},me,{get(t,e){if(e!==Symbol.unscopables)return me.get(t,e,t)},has:(t,e)=>"_"!==e[0]&&!o(e)});let Ie=null;function Re(t,e,n){const r=arguments.length;return 2===r?O(e)&&!y(e)?pe(e)?_e(t,null,[e]):_e(t,e):_e(t,null,e):(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&pe(n)&&(n=[n]),_e(t,e,n))}var Te,xe;(xe=Te||(Te={})).DOCUMENT="doc",xe.HEADING="heading",xe.PARAGRAPH="paragraph",xe.QUOTE="blockquote",xe.OL_LIST="ordered_list",xe.UL_LIST="bullet_list",xe.LIST_ITEM="list_item",xe.CODE_BLOCK="code_block",xe.HR="horizontal_rule",xe.BR="hard_break",xe.IMAGE="image",xe.BOLD="bold",xe.STRONG="strong",xe.STRIKE="strike",xe.UNDERLINE="underline",xe.ITALIC="italic",xe.CODE="code",xe.LINK="link",xe.STYLED="styled",xe.TEXT="text",xe.COMPONENT="blok";const ke=[Te.DOCUMENT,Te.HEADING,Te.PARAGRAPH,Te.QUOTE,Te.OL_LIST,Te.UL_LIST,Te.LIST_ITEM,Te.CODE_BLOCK,Te.HR,Te.BR,Te.IMAGE];var Le,we,Ce,Ae;(we=Le||(Le={})).SELF="_self",we.BLANK="_blank",(Ae=Ce||(Ce={})).URL="url",Ae.STORY="story",Ae.ASSET="asset",Ae.EMAIL="email";const Ne={button1:({_uid:t,id:e,component:n,fields:r})=>Re("div",{_uid:t,id:e,component:n},r.title)},Me={[Te.DOCUMENT]:({children:t})=>t,[Te.HEADING]:({children:t,attrs:e})=>Re(`h${e.level}`,t),[Te.PARAGRAPH]:({children:t})=>Re("p",t),[Te.QUOTE]:({children:t})=>Re("blockquote",t),[Te.OL_LIST]:({children:t,attrs:e})=>Re("ol",t),[Te.UL_LIST]:({children:t})=>Re("ul",t),[Te.LIST_ITEM]:({children:t})=>Re("li",t),[Te.CODE_BLOCK]:({children:t,attrs:e})=>Re("pre",e,t),[Te.HR]:()=>Re("hr"),[Te.BR]:()=>Re("br"),[Te.IMAGE]:({attrs:t})=>Re("img",t),[Te.BOLD]:({text:t})=>Re("b",t),[Te.STRONG]:({text:t})=>Re("strong",t),[Te.STRIKE]:({text:t})=>Re("s",t),[Te.UNDERLINE]:({text:t})=>Re("u",t),[Te.ITALIC]:({text:t})=>Re("i",t),[Te.CODE]:({text:t})=>Re("code",t),[Te.LINK]:({text:t,attrs:e})=>{let n="";switch(e.linktype){case Ce.ASSET:case Ce.URL:n=e.href;break;case Ce.EMAIL:n=`mailto:${e.href}`;break;case Ce.STORY:const r=function(){const t=function(t){return b(t)?t:t||ie}("RouterLink");return"string"!=typeof t&&t}();return r?Re(r,{to:e.href,target:e.target},{default:()=>t}):Re("a",{href:n,target:e.target},t)}return Re("a",{href:e.href,target:e.target},t)},[Te.STYLED]:({text:t,attrs:e})=>Re("span",e,t),[Te.COMPONENT]:()=>Re("div","component")};const Pe=function(){const r=t=>function(t){return t.type===Te.TEXT}(t)?t.marks?t.marks.map((e=>c(e,t.text))):i(t):function(t){return ke.includes(t.type)}(t)?s(t):function(t){return t.type===Te.COMPONENT}(t)?l(t):Re("div","fallback node"),o=t=>{const e=[];return t.forEach((t=>{const n=r(t);Array.isArray(n)?n.forEach((t=>{e.push(t)})):e.push(n)})),e},s=t=>{switch(t.type){case Te.DOCUMENT:case Te.PARAGRAPH:case Te.QUOTE:case Te.UL_LIST:case Te.LIST_ITEM:return function(t){const e=Me[t.type],n=a(t);return e({children:n})}(t);case Te.HEADING:case Te.OL_LIST:case Te.CODE_BLOCK:return function(t){const e=Me[t.type],n=a(t);return e({children:n,attrs:t.attrs})}(t);case Te.HR:case Te.BR:return function(t){return(0,Me[t.type])()}(t);case Te.IMAGE:return function(t){return(0,Me[t.type])({attrs:t.attrs})}(t);default:return Re("div","fallback block")}},c=(t,e)=>{switch(t.type){case Te.BOLD:case Te.STRONG:case Te.STRIKE:case Te.UNDERLINE:case Te.ITALIC:case Te.CODE:return function(t,e){return(0,Me[t.type])({text:e})}(t,e);case Te.LINK:case Te.STYLED:return function(t,e){return(0,Me[t.type])({text:e,attrs:t.attrs})}(t,e);default:return Re("span","fallback mark")}},l=r=>{const o=[];return r.attrs.body.forEach((s=>{const c=s,{component:l,_uid:i}=c,a=((r,o)=>{var s={};for(var c in r)e.call(r,c)&&o.indexOf(c)<0&&(s[c]=r[c]);if(null!=r&&t)for(var c of t(r))o.indexOf(c)<0&&n.call(r,c)&&(s[c]=r[c]);return s})(c,["component","_uid"]),u=Ne[l];u?o.push(u({id:r.attrs.id,component:l,_uid:i,fields:a})):o.push(Me[Te.COMPONENT]())})),o},i=t=>ye(t.text),a=t=>t.content&&t.content.length?o(t.content):[];return{renderDocument:t=>Array.isArray(t)?o(t):r(t)}}();export{Pe as renderer};
var t=Object.defineProperty,e=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,c=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,l=(t,e)=>{for(var n in e||(e={}))o.call(e,n)&&c(t,n,e[n]);if(r)for(var n of r(e))s.call(e,n)&&c(t,n,e[n]);return t},i=(t,r)=>e(t,n(r)),a=(t,e)=>{var n={};for(var c in t)o.call(t,c)&&e.indexOf(c)<0&&(n[c]=t[c]);if(null!=t&&r)for(var c of r(t))e.indexOf(c)<0&&s.call(t,c)&&(n[c]=t[c]);return n};function u(t,e){const n=Object.create(null),r=t.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const f=u("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt");function p(t){if(I(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],o=p(x(r)?y(r):r);if(o)for(const t in o)e[t]=o[t]}return e}if(R(t))return t}const d=/;(?![^(]*\))/g,h=/:(.+)/;function y(t){const e={};return t.split(d).forEach((t=>{if(t){const n=t.split(h);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}function g(t){let e="";if(x(t))e=t;else if(I(t))for(let n=0;n<t.length;n++){const r=g(t[n]);r&&(e+=r+" ")}else if(R(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}const _={},v=()=>{},m=/^on[^a-z]/,b=t=>m.test(t),O=Object.assign,E=Object.prototype.hasOwnProperty,S=(t,e)=>E.call(t,e),I=Array.isArray,T=t=>"function"==typeof t,x=t=>"string"==typeof t,R=t=>null!==t&&"object"==typeof t,C=Object.prototype.toString,L=t=>C.call(t),A=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},N=/-(\w)/g,w=A((t=>t.replace(N,((t,e)=>e?e.toUpperCase():"")))),k=A((t=>t.charAt(0).toUpperCase()+t.slice(1))),P=(t,e)=>t!==e&&(t==t||e==e),D=new WeakMap,M=[];let U;function j(t,e=_){(function(t){return t&&!0===t._isEffect})(t)&&(t=t.raw);const n=function(t,e){const n=function(){if(!n.active)return t();if(!M.includes(n)){B(n);try{return G.push(F),F=!0,M.push(n),U=n,t()}finally{M.pop(),H(),U=M[M.length-1]}}};return n.id=$++,n.allowRecurse=!!e.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=t,n.deps=[],n.options=e,n}(t,e);return e.lazy||n(),n}let $=0;function B(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let F=!0;const G=[];function H(){const t=G.pop();F=void 0===t||t}function K(t){return z(t)?K(t.__v_raw):!(!t||!t.__v_isReactive)}function z(t){return!(!t||!t.__v_isReadonly)}function Y(t){return K(t)||z(t)}function Q(t){return((t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})})(t,"__v_skip",!0),t}function q(t){return Boolean(t&&!0===t.__v_isRef)}new Set(Object.getOwnPropertyNames(Symbol).map((t=>Symbol[t])).filter((t=>"symbol"==typeof t)));const V={get:(t,e,n)=>{return q(r=Reflect.get(t,e,n))?r.value:r;var r},set:(t,e,n,r)=>{const o=t[e];return q(o)&&!q(n)?(o.value=n,!0):Reflect.set(t,e,n,r)}};function X(t,e,n,r){let o;try{o=r?t(...r):t()}catch(s){W(s,e,n)}return o}function J(t,e,n,r){if(T(t)){const s=X(t,e,n,r);return s&&(R(o=s)&&T(o.then)&&T(o.catch))&&s.catch((t=>{W(t,e,n)})),s}var o;const s=[];for(let c=0;c<t.length;c++)s.push(J(t[c],e,n,r));return s}function W(t,e,n,r=!0){e&&e.vnode;if(e){let r=e.parent;const o=e.proxy,s=n;for(;r;){const e=r.ec;if(e)for(let n=0;n<e.length;n++)if(!1===e[n](t,o,s))return;r=r.parent}const c=e.appContext.config.errorHandler;if(c)return void X(c,null,10,[t,o,s])}!function(t,e,n,r=!0){console.error(t)}(t,0,0,r)}let Z=!1,tt=!1;const et=[];let nt=0;const rt=[];let ot=null,st=0;const ct=[];let lt=null,it=0;const at=Promise.resolve();let ut=null,ft=null;function pt(t){const e=ut||at;return t?e.then(this?t.bind(this):t):e}function dt(t){if(!(et.length&&et.includes(t,Z&&t.allowRecurse?nt+1:nt)||t===ft)){const e=function(t){let e=nt+1,n=et.length;const r=_t(t);for(;e<n;){const t=e+n>>>1;_t(et[t])<r?e=t+1:n=t}return e}(t);e>-1?et.splice(e,0,t):et.push(t),ht()}}function ht(){Z||tt||(tt=!0,ut=at.then(vt))}function yt(t,e,n,r){I(t)?n.push(...t):e&&e.includes(t,t.allowRecurse?r+1:r)||n.push(t),ht()}function gt(t,e=null){if(rt.length){for(ft=e,ot=[...new Set(rt)],rt.length=0,st=0;st<ot.length;st++)ot[st]();ot=null,st=0,ft=null,gt(t,e)}}const _t=t=>null==t.id?1/0:t.id;function vt(t){tt=!1,Z=!0,gt(t),et.sort(((t,e)=>_t(t)-_t(e)));try{for(nt=0;nt<et.length;nt++){const t=et[nt];t&&!1!==t.active&&X(t,null,14)}}finally{nt=0,et.length=0,function(t){if(ct.length){const t=[...new Set(ct)];if(ct.length=0,lt)return void lt.push(...t);for(lt=t,lt.sort(((t,e)=>_t(t)-_t(e))),it=0;it<lt.length;it++)lt[it]();lt=null,it=0}}(),Z=!1,ut=null,(et.length||rt.length||ct.length)&&vt(t)}}const mt={};function bt(t,e,{immediate:n,deep:r,flush:o,onTrack:s,onTrigger:c}=_,l=Yt){let i,a,u=!1,f=!1;if(q(t)?(i=()=>t.value,u=!!t._shallow):K(t)?(i=()=>t,r=!0):I(t)?(f=!0,u=t.some(K),i=()=>t.map((t=>q(t)?t.value:K(t)?Et(t):T(t)?X(t,l,2):void 0))):i=T(t)?e?()=>X(t,l,2):()=>{if(!l||!l.isUnmounted)return a&&a(),J(t,l,3,[p])}:v,e&&r){const t=i;i=()=>Et(t())}let p=t=>{a=g.options.onStop=()=>{X(t,l,4)}},d=f?[]:mt;const h=()=>{if(g.active)if(e){const t=g();(r||u||(f?t.some(((t,e)=>P(t,d[e]))):P(t,d)))&&(a&&a(),J(e,l,3,[t,d===mt?void 0:d,p]),d=t)}else g()};let y;h.allowRecurse=!!e,y="sync"===o?h:"post"===o?()=>Lt(h,l&&l.suspense):()=>{!l||l.isMounted?function(t){yt(t,ot,rt,st)}(h):h()};const g=j(i,{lazy:!0,onTrack:s,onTrigger:c,scheduler:y});return function(t,e=Yt){e&&(e.effects||(e.effects=[])).push(t)}(g,l),e?n?h():d=g():"post"===o?Lt(g,l&&l.suspense):g(),()=>{var t;(t=g).active&&(B(t),t.options.onStop&&t.options.onStop(),t.active=!1),l&&((t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)})(l.effects,g)}}function Ot(t,e,n){const r=this.proxy,o=x(t)?t.includes(".")?function(t,e){const n=e.split(".");return()=>{let e=t;for(let t=0;t<n.length&&e;t++)e=e[n[t]];return e}}(r,t):()=>r[t]:t.bind(r,r);let s;return T(e)?s=e:(s=e.handler,n=e),bt(o,s.bind(r),n,this)}function Et(t,e=new Set){if(!R(t)||t.__v_skip)return t;if((e=e||new Set).has(t))return t;if(e.add(t),q(t))Et(t.value,e);else if(I(t))for(let n=0;n<t.length;n++)Et(t[n],e);else if("[object Set]"===L(t)||(t=>"[object Map]"===L(t))(t))t.forEach((t=>{Et(t,e)}));else if((t=>"[object Object]"===L(t))(t))for(const n in t)Et(t[n],e);return t}function St(t,e,n,r=!1){const{mixins:o,extends:s}=e;s&&St(t,s,n,!0),o&&o.forEach((e=>St(t,e,n,!0)));for(const c in e)if(r&&"expose"===c);else{const r=It[c]||n&&n[c];t[c]=r?r(t[c],e[c]):e[c]}return t}const It={data:Tt,props:Ct,emits:Ct,methods:Ct,computed:Ct,beforeCreate:Rt,created:Rt,beforeMount:Rt,mounted:Rt,beforeUpdate:Rt,updated:Rt,beforeDestroy:Rt,destroyed:Rt,activated:Rt,deactivated:Rt,errorCaptured:Rt,serverPrefetch:Rt,components:Ct,directives:Ct,watch:function(t,e){if(!t)return e;if(!e)return t;const n=O(Object.create(null),t);for(const r in e)n[r]=Rt(t[r],e[r]);return n},provide:Tt,inject:function(t,e){return Ct(xt(t),xt(e))}};function Tt(t,e){return e?t?function(){return O(T(t)?t.call(this,this):t,T(e)?e.call(this,this):e)}:e:t}function xt(t){if(I(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function Rt(t,e){return t?[...new Set([].concat(t,e))]:e}function Ct(t,e){return t?O(O(Object.create(null),t),e):e}const Lt=function(t,e){e&&e.pendingBranch?I(t)?e.effects.push(...t):e.effects.push(t):yt(t,lt,ct,it)},At=Symbol();function Nt(t){return x(t)?function(t,e,n=!0,r=!1){const o=Yt;if(o){const n=o.type;if("components"===t){const t=Qt(n);if(t&&(t===e||t===w(e)||t===k(w(e))))return n}const s=wt(o[t]||n[t],e)||wt(o.appContext[t],e);return!s&&r?n:s}}("components",t,!1)||t:t||At}function wt(t,e){return t&&(t[e]||t[w(e)]||t[k(w(e))])}const kt=Symbol(void 0),Pt=Symbol(void 0),Dt=Symbol(void 0);function Mt(t){return!!t&&!0===t.__v_isVNode}const Ut=({key:t})=>null!=t?t:null,jt=({ref:t})=>null!=t?x(t)||q(t)||T(t)?{i:null,r:t}:t:null,$t=function(t,e=null,n=null,r=0,o=null,s=!1){t&&t!==At||(t=Dt);if(Mt(t)){const r=Bt(t,e,!0);return n&&Gt(r,n),r}c=t,T(c)&&"__vccOpts"in c&&(t=t.__vccOpts);var c;if(e){(Y(e)||"__vInternal"in e)&&(e=O({},e));let{class:t,style:n}=e;t&&!x(t)&&(e.class=g(t)),R(n)&&(Y(n)&&!I(n)&&(n=O({},n)),e.style=p(n))}const l=x(t)?1:(t=>t.__isSuspense)(t)?128:(t=>t.__isTeleport)(t)?64:R(t)?4:T(t)?2:0,i={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Ut(e),ref:e&&jt(e),scopeId:null,slotScopeIds:null,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,shapeFlag:l,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null};Gt(i,n),128&l&&t.normalize(i);0;return i};function Bt(t,e,n=!1){const{props:r,ref:o,patchFlag:s,children:c}=t,l=e?function(...t){const e=O({},t[0]);for(let n=1;n<t.length;n++){const r=t[n];for(const t in r)if("class"===t)e.class!==r.class&&(e.class=g([e.class,r.class]));else if("style"===t)e.style=p([e.style,r.style]);else if(b(t)){const n=e[t],o=r[t];n!==o&&(e[t]=n?[].concat(n,o):o)}else""!==t&&(e[t]=r[t])}return e}(r||{},e):r;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:l,key:l&&Ut(l),ref:e&&e.ref?n&&o?I(o)?o.concat(jt(e)):[o,jt(e)]:jt(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:c,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==kt?-1===s?16:16|s:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Bt(t.ssContent),ssFallback:t.ssFallback&&Bt(t.ssFallback),el:t.el,anchor:t.anchor}}function Ft(t=" ",e=0){return $t(Pt,null,t,e)}function Gt(t,e){let n=0;const{shapeFlag:r}=t;if(null==e)e=null;else if(I(e))n=16;else if("object"==typeof e){if(1&r||64&r){const n=e.default;return void(n&&(n._c&&(n._d=!1),Gt(t,n()),n._c&&(n._d=!0)))}{n=32;const t=e._;t||"__vInternal"in e||(e._ctx=null)}}else T(e)?(e={default:e,_ctx:null},n=32):(e=String(e),64&r?(n=16,e=[Ft(e)]):n=8);t.children=e,t.shapeFlag|=n}const Ht=t=>t?4&t.vnode.shapeFlag?function(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(K(e=Q(t.exposed))?e:new Proxy(e,V),{get:(e,n)=>n in e?e[n]:n in Kt?Kt[n](t):void 0}));var e}(t)||t.proxy:Ht(t.parent):null,Kt=O(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Ht(t.parent),$root:t=>Ht(t.root),$emit:t=>t.emit,$options:t=>function(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:o,optionsCache:s,config:{optionMergeStrategies:c}}=t.appContext,l=s.get(e);let i;return l?i=l:o.length||n||r?(i={},o.length&&o.forEach((t=>St(i,t,c,!0))),St(i,e,c)):i=e,s.set(e,i),i}(t),$forceUpdate:t=>()=>dt(t.update),$nextTick:t=>pt.bind(t.proxy),$watch:t=>Ot.bind(t)}),zt={get({_:t},e){const{ctx:n,setupState:r,data:o,props:s,accessCache:c,type:l,appContext:i}=t;let a;if("$"!==e[0]){const l=c[e];if(void 0!==l)switch(l){case 0:return r[e];case 1:return o[e];case 3:return n[e];case 2:return s[e]}else{if(r!==_&&S(r,e))return c[e]=0,r[e];if(o!==_&&S(o,e))return c[e]=1,o[e];if((a=t.propsOptions[0])&&S(a,e))return c[e]=2,s[e];if(n!==_&&S(n,e))return c[e]=3,n[e];c[e]=4}}const u=Kt[e];let f,p;return u?("$attrs"===e&&function(t,e,n){if(!F||void 0===U)return;let r=D.get(t);r||D.set(t,r=new Map);let o=r.get(n);o||r.set(n,o=new Set),o.has(U)||(o.add(U),U.deps.push(o))}(t,0,e),u(t)):(f=l.__cssModules)&&(f=f[e])?f:n!==_&&S(n,e)?(c[e]=3,n[e]):(p=i.config.globalProperties,S(p,e)?p[e]:void 0)},set({_:t},e,n){const{data:r,setupState:o,ctx:s}=t;if(o!==_&&S(o,e))o[e]=n;else if(r!==_&&S(r,e))r[e]=n;else if(S(t.props,e))return!1;return("$"!==e[0]||!(e.slice(1)in t))&&(s[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:o,propsOptions:s}},c){let l;return void 0!==n[c]||t!==_&&S(t,c)||e!==_&&S(e,c)||(l=s[0])&&S(l,c)||S(r,c)||S(Kt,c)||S(o.config.globalProperties,c)}};O({},zt,{get(t,e){if(e!==Symbol.unscopables)return zt.get(t,e,t)},has:(t,e)=>"_"!==e[0]&&!f(e)});let Yt=null;function Qt(t){return T(t)&&t.displayName||t.name}function qt(t,e,n){const r=arguments.length;return 2===r?R(e)&&!I(e)?Mt(e)?$t(t,null,[e]):$t(t,e):$t(t,null,e):(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&Mt(n)&&(n=[n]),$t(t,e,n))}var Vt,Xt;(Xt=Vt||(Vt={})).DOCUMENT="doc",Xt.HEADING="heading",Xt.PARAGRAPH="paragraph",Xt.QUOTE="blockquote",Xt.OL_LIST="ordered_list",Xt.UL_LIST="bullet_list",Xt.LIST_ITEM="list_item",Xt.CODE_BLOCK="code_block",Xt.HR="horizontal_rule",Xt.BR="hard_break",Xt.IMAGE="image",Xt.BOLD="bold",Xt.STRONG="strong",Xt.STRIKE="strike",Xt.UNDERLINE="underline",Xt.ITALIC="italic",Xt.CODE="code",Xt.LINK="link",Xt.STYLED="styled",Xt.TEXT="text",Xt.COMPONENT="blok";const Jt=[Vt.DOCUMENT,Vt.HEADING,Vt.PARAGRAPH,Vt.QUOTE,Vt.OL_LIST,Vt.UL_LIST,Vt.LIST_ITEM,Vt.CODE_BLOCK,Vt.HR,Vt.BR,Vt.IMAGE];var Wt,Zt,te,ee;function ne(t){const e=t=>function(t){return t.type===Vt.TEXT}(t)?t.marks?t.marks.map((e=>o(e,t.text))):c(t):function(t){return Jt.includes(t.type)}(t)?r(t):function(t){return t.type===Vt.COMPONENT}(t)?s(t):qt("div","fallback node"),n=t=>{const n=[];return t.forEach((t=>{const r=e(t);Array.isArray(r)?r.forEach((t=>{n.push(t)})):n.push(r)})),n},r=e=>{switch(e.type){case Vt.DOCUMENT:case Vt.PARAGRAPH:case Vt.QUOTE:case Vt.UL_LIST:case Vt.LIST_ITEM:return function(e){const n=t[e.type],r=l(e);if(re(n))return qt(n,null,{default:()=>r});return n({children:r})}(e);case Vt.HEADING:case Vt.OL_LIST:case Vt.CODE_BLOCK:return function(e){const n=t[e.type],r=l(e);if(re(n))return qt(n,e.attrs,{default:()=>r});return n({children:r,attrs:e.attrs})}(e);case Vt.HR:case Vt.BR:return function(e){const n=t[e.type];if(re(n))return qt(n);return n()}(e);case Vt.IMAGE:return function(e){const n=t[e.type];if(re(n))return qt(n,e.attrs);return n({attrs:e.attrs})}(e);default:return qt("div","fallback block")}},o=(e,n)=>{switch(e.type){case Vt.BOLD:case Vt.STRONG:case Vt.STRIKE:case Vt.UNDERLINE:case Vt.ITALIC:case Vt.CODE:return function(e,n){const r=t[e.type];if(re(r))return qt(r,{default:()=>n});return r({text:n})}(e,n);case Vt.LINK:case Vt.STYLED:return function(e,n){const r=t[e.type];if(re(r))return qt(r,e.attrs,{default:()=>n});return r({text:n,attrs:e.attrs})}(e,n);default:return qt("span","fallback mark")}},s=e=>{const n=[];return e.attrs.body.forEach((r=>{const o=r,{component:s,_uid:c}=o,l=a(o,["component","_uid"]),i=t.components[s];i?n.push(i({id:e.attrs.id,component:s,_uid:c,fields:l})):n.push(t[Vt.COMPONENT]())})),n},c=t=>Ft(t.text),l=t=>t.content&&t.content.length?n(t.content):[];return{renderDocument:t=>Array.isArray(t)?n(t):e(t)}}function re(t){return"function"!=typeof t&&!Mt(t)}(Zt=Wt||(Wt={})).SELF="_self",Zt.BLANK="_blank",(ee=te||(te={})).URL="url",ee.STORY="story",ee.ASSET="asset",ee.EMAIL="email";var oe,se=T(oe={name:"RichTextRenderer",props:{document:{type:Object,required:!0}},setup(t){const e=ae();return()=>e.renderDocument(t.document)}})?{setup:oe,name:oe.name}:oe;const ce={[Vt.DOCUMENT]:({children:t})=>t,[Vt.HEADING]:({children:t,attrs:e})=>qt(`h${e.level}`,t),[Vt.PARAGRAPH]:({children:t})=>qt("p",t),[Vt.QUOTE]:({children:t})=>qt("blockquote",t),[Vt.OL_LIST]:({children:t,attrs:e})=>qt("ol",t),[Vt.UL_LIST]:({children:t})=>qt("ul",t),[Vt.LIST_ITEM]:({children:t})=>qt("li",t),[Vt.CODE_BLOCK]:({children:t,attrs:e})=>qt("pre",e,t),[Vt.HR]:()=>qt("hr"),[Vt.BR]:()=>qt("br"),[Vt.IMAGE]:({attrs:t})=>qt("img",t),[Vt.BOLD]:({text:t})=>qt("b",t),[Vt.STRONG]:({text:t})=>qt("strong",t),[Vt.STRIKE]:({text:t})=>qt("s",t),[Vt.UNDERLINE]:({text:t})=>qt("u",t),[Vt.ITALIC]:({text:t})=>qt("i",t),[Vt.CODE]:({text:t})=>qt("code",t),[Vt.LINK]:({text:t,attrs:e})=>{let n="";switch(e.linktype){case te.ASSET:case te.URL:n=e.href;break;case te.EMAIL:n=`mailto:${e.href}`;break;case te.STORY:const r=function(){const t=Nt("RouterLink");return"string"!=typeof t&&t}();return r?qt(r,{to:e.href,target:e.target},{default:()=>t}):qt("a",{href:n,target:e.target},t)}return qt("a",{href:e.href,target:e.target},t)},[Vt.STYLED]:({text:t,attrs:e})=>qt("span",e,t),[Vt.COMPONENT]:()=>qt("div","component")};const le=Symbol("Rich Text Renderer"),ie=t=>({install(e){const n=ne((null==t?void 0:t.resolvers)||i(l({},ce),{components:{}}));e.provide(le,n)}});function ae(){const t=function(t,e,n=!1){const r=Yt||null;if(r){const o=null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(o&&t in o)return o[t];if(arguments.length>1)return n&&T(e)?e.call(r.proxy):e}}(le);if(!t)throw new Error("Rich Text Renderer not provided.");return t}function ue(t){const e=t,{components:n={}}=e,r=a(e,["components"]);return l(i(l({},ce),{components:n}),r)}export{se as RichTextRenderer,ue as defineResolvers,ie as plugin,ae as useRenderer};

@@ -1,1 +0,1 @@

var __getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__objRest=(t,e)=>{var n={};for(var r in t)__hasOwnProp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))e.indexOf(r)<0&&__propIsEnum.call(t,r)&&(n[r]=t[r]);return n};!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).StoryblokRichTextVueRenderer={})}(this,(function(t){"use strict";function e(t,e){const n=Object.create(null),r=t.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const n=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt");function r(t){if(_(t)){const e={};for(let n=0;n<t.length;n++){const o=t[n],s=r(v(o)?c(o):o);if(s)for(const t in s)e[t]=s[t]}return e}if(E(t))return t}const o=/;(?![^(]*\))/g,s=/:(.+)/;function c(t){const e={};return t.split(o).forEach((t=>{if(t){const n=t.split(s);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}function l(t){let e="";if(v(t))e=t;else if(_(t))for(let n=0;n<t.length;n++){const r=l(t[n]);r&&(e+=r+" ")}else if(E(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}const i={},a=()=>{},u=/^on[^a-z]/,f=t=>u.test(t),p=Object.assign,d=Object.prototype.hasOwnProperty,h=(t,e)=>d.call(t,e),_=Array.isArray,g=t=>"[object Map]"===O(t),y=t=>"function"==typeof t,v=t=>"string"==typeof t,b=t=>"symbol"==typeof t,E=t=>null!==t&&"object"==typeof t,S=Object.prototype.toString,O=t=>S.call(t),m=t=>v(t)&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,R=(t,e)=>t!==e&&(t==t||e==e),I=new WeakMap,T=[];let x;const w=Symbol(""),k=Symbol("");function L(t,e=i){(function(t){return t&&!0===t._isEffect})(t)&&(t=t.raw);const n=function(t,e){const n=function(){if(!n.active)return e.scheduler?void 0:t();if(!T.includes(n)){A(n);try{return M.push(N),N=!0,T.push(n),x=n,t()}finally{T.pop(),P(),x=T[T.length-1]}}};return n.id=C++,n.allowRecurse=!!e.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=t,n.deps=[],n.options=e,n}(t,e);return e.lazy||n(),n}let C=0;function A(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let N=!0;const M=[];function P(){const t=M.pop();N=void 0===t||t}function D(t,e,n){if(!N||void 0===x)return;let r=I.get(t);r||I.set(t,r=new Map);let o=r.get(n);o||r.set(n,o=new Set),o.has(x)||(o.add(x),x.deps.push(o))}function U(t,e,n,r,o,s){const c=I.get(t);if(!c)return;const l=new Set,i=t=>{t&&t.forEach((t=>{(t!==x||t.allowRecurse)&&l.add(t)}))};if("clear"===e)c.forEach(i);else if("length"===n&&_(t))c.forEach(((t,e)=>{("length"===e||e>=r)&&i(t)}));else switch(void 0!==n&&i(c.get(n)),e){case"add":_(t)?m(n)&&i(c.get("length")):(i(c.get(w)),g(t)&&i(c.get(k)));break;case"delete":_(t)||(i(c.get(w)),g(t)&&i(c.get(k)));break;case"set":g(t)&&i(c.get(w))}l.forEach((t=>{t.options.scheduler?t.options.scheduler(t):t()}))}const j=e("__proto__,__v_isRef,__isVue"),$=new Set(Object.getOwnPropertyNames(Symbol).map((t=>Symbol[t])).filter(b)),F=z(),B=z(!1,!0),G=z(!0),H=z(!0,!0),K={};function z(t=!1,e=!1){return function(n,r,o){if("__v_isReactive"===r)return!t;if("__v_isReadonly"===r)return t;if("__v_raw"===r&&o===(t?e?bt:vt:e?yt:gt).get(n))return n;const s=_(n);if(!t&&s&&h(K,r))return Reflect.get(K,r,o);const c=Reflect.get(n,r,o);if(b(r)?$.has(r):j(r))return c;if(t||D(n,0,r),e)return c;if(wt(c)){return!s||!m(r)?c.value:c}return E(c)?t?Ot(c):St(c):c}}["includes","indexOf","lastIndexOf"].forEach((t=>{const e=Array.prototype[t];K[t]=function(...t){const n=xt(this);for(let e=0,o=this.length;e<o;e++)D(n,0,e+"");const r=e.apply(n,t);return-1===r||!1===r?e.apply(n,t.map(xt)):r}})),["push","pop","shift","unshift","splice"].forEach((t=>{const e=Array.prototype[t];K[t]=function(...t){M.push(N),N=!1;const n=e.apply(this,t);return P(),n}}));function W(t=!1){return function(e,n,r,o){let s=e[n];if(!t&&(r=xt(r),s=xt(s),!_(e)&&wt(s)&&!wt(r)))return s.value=r,!0;const c=_(e)&&m(n)?Number(n)<e.length:h(e,n),l=Reflect.set(e,n,r,o);return e===xt(o)&&(c?R(r,s)&&U(e,"set",n,r):U(e,"add",n,r)),l}}const V={get:F,set:W(),deleteProperty:function(t,e){const n=h(t,e);t[e];const r=Reflect.deleteProperty(t,e);return r&&n&&U(t,"delete",e,void 0),r},has:function(t,e){const n=Reflect.has(t,e);return b(e)&&$.has(e)||D(t,0,e),n},ownKeys:function(t){return D(t,0,_(t)?"length":w),Reflect.ownKeys(t)}},Y={get:G,set:(t,e)=>!0,deleteProperty:(t,e)=>!0};p({},V,{get:B,set:W(!0)}),p({},Y,{get:H});const Q=t=>E(t)?St(t):t,q=t=>E(t)?Ot(t):t,X=t=>t,J=t=>Reflect.getPrototypeOf(t);function Z(t,e,n=!1,r=!1){const o=xt(t=t.__v_raw),s=xt(e);e!==s&&!n&&D(o,0,e),!n&&D(o,0,s);const{has:c}=J(o),l=r?X:n?q:Q;return c.call(o,e)?l(t.get(e)):c.call(o,s)?l(t.get(s)):void 0}function tt(t,e=!1){const n=this.__v_raw,r=xt(n),o=xt(t);return t!==o&&!e&&D(r,0,t),!e&&D(r,0,o),t===o?n.has(t):n.has(t)||n.has(o)}function et(t,e=!1){return t=t.__v_raw,!e&&D(xt(t),0,w),Reflect.get(t,"size",t)}function nt(t){t=xt(t);const e=xt(this);return J(e).has.call(e,t)||(e.add(t),U(e,"add",t,t)),this}function rt(t,e){e=xt(e);const n=xt(this),{has:r,get:o}=J(n);let s=r.call(n,t);s||(t=xt(t),s=r.call(n,t));const c=o.call(n,t);return n.set(t,e),s?R(e,c)&&U(n,"set",t,e):U(n,"add",t,e),this}function ot(t){const e=xt(this),{has:n,get:r}=J(e);let o=n.call(e,t);o||(t=xt(t),o=n.call(e,t)),r&&r.call(e,t);const s=e.delete(t);return o&&U(e,"delete",t,void 0),s}function st(){const t=xt(this),e=0!==t.size,n=t.clear();return e&&U(t,"clear",void 0,void 0),n}function ct(t,e){return function(n,r){const o=this,s=o.__v_raw,c=xt(s),l=e?X:t?q:Q;return!t&&D(c,0,w),s.forEach(((t,e)=>n.call(r,l(t),l(e),o)))}}function lt(t,e,n){return function(...r){const o=this.__v_raw,s=xt(o),c=g(s),l="entries"===t||t===Symbol.iterator&&c,i="keys"===t&&c,a=o[t](...r),u=n?X:e?q:Q;return!e&&D(s,0,i?k:w),{next(){const{value:t,done:e}=a.next();return e?{value:t,done:e}:{value:l?[u(t[0]),u(t[1])]:u(t),done:e}},[Symbol.iterator](){return this}}}}function it(t){return function(...e){return"delete"!==t&&this}}const at={get(t){return Z(this,t)},get size(){return et(this)},has:tt,add:nt,set:rt,delete:ot,clear:st,forEach:ct(!1,!1)},ut={get(t){return Z(this,t,!1,!0)},get size(){return et(this)},has:tt,add:nt,set:rt,delete:ot,clear:st,forEach:ct(!1,!0)},ft={get(t){return Z(this,t,!0)},get size(){return et(this,!0)},has(t){return tt.call(this,t,!0)},add:it("add"),set:it("set"),delete:it("delete"),clear:it("clear"),forEach:ct(!0,!1)},pt={get(t){return Z(this,t,!0,!0)},get size(){return et(this,!0)},has(t){return tt.call(this,t,!0)},add:it("add"),set:it("set"),delete:it("delete"),clear:it("clear"),forEach:ct(!0,!0)};function dt(t,e){const n=e?t?pt:ut:t?ft:at;return(e,r,o)=>"__v_isReactive"===r?!t:"__v_isReadonly"===r?t:"__v_raw"===r?e:Reflect.get(h(n,r)&&r in e?n:e,r,o)}["keys","values","entries",Symbol.iterator].forEach((t=>{at[t]=lt(t,!1,!1),ft[t]=lt(t,!0,!1),ut[t]=lt(t,!1,!0),pt[t]=lt(t,!0,!0)}));const ht={get:dt(!1,!1)},_t={get:dt(!0,!1)},gt=new WeakMap,yt=new WeakMap,vt=new WeakMap,bt=new WeakMap;function Et(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>O(t).slice(8,-1))(t))}function St(t){return t&&t.__v_isReadonly?t:mt(t,!1,V,ht,gt)}function Ot(t){return mt(t,!0,Y,_t,vt)}function mt(t,e,n,r,o){if(!E(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const s=o.get(t);if(s)return s;const c=Et(t);if(0===c)return t;const l=new Proxy(t,2===c?r:n);return o.set(t,l),l}function Rt(t){return It(t)?Rt(t.__v_raw):!(!t||!t.__v_isReactive)}function It(t){return!(!t||!t.__v_isReadonly)}function Tt(t){return Rt(t)||It(t)}function xt(t){return t&&xt(t.__v_raw)||t}function wt(t){return Boolean(t&&!0===t.__v_isRef)}function kt(t,e,n,r){let o;try{o=r?t(...r):t()}catch(s){Ct(s,e,n)}return o}function Lt(t,e,n,r){if(y(t)){const s=kt(t,e,n,r);return s&&(E(o=s)&&y(o.then)&&y(o.catch))&&s.catch((t=>{Ct(t,e,n)})),s}var o;const s=[];for(let c=0;c<t.length;c++)s.push(Lt(t[c],e,n,r));return s}function Ct(t,e,n,r=!0){e&&e.vnode;if(e){let r=e.parent;const o=e.proxy,s=n;for(;r;){const e=r.ec;if(e)for(let n=0;n<e.length;n++)if(!1===e[n](t,o,s))return;r=r.parent}const c=e.appContext.config.errorHandler;if(c)return void kt(c,null,10,[t,o,s])}!function(t,e,n,r=!0){console.error(t)}(t,0,0,r)}let At=!1,Nt=!1;const Mt=[];let Pt=0;const Dt=[];let Ut=null,jt=0;const $t=[];let Ft=null,Bt=0;const Gt=Promise.resolve();let Ht=null,Kt=null;function zt(t){const e=Ht||Gt;return t?e.then(this?t.bind(this):t):e}function Wt(t){if(!(Mt.length&&Mt.includes(t,At&&t.allowRecurse?Pt+1:Pt)||t===Kt)){const e=function(t){let e=Pt+1,n=Mt.length;const r=qt(t);for(;e<n;){const t=e+n>>>1;qt(Mt[t])<r?e=t+1:n=t}return e}(t);e>-1?Mt.splice(e,0,t):Mt.push(t),Vt()}}function Vt(){At||Nt||(Nt=!0,Ht=Gt.then(Xt))}function Yt(t,e,n,r){_(t)?n.push(...t):e&&e.includes(t,t.allowRecurse?r+1:r)||n.push(t),Vt()}function Qt(t,e=null){if(Dt.length){for(Kt=e,Ut=[...new Set(Dt)],Dt.length=0,jt=0;jt<Ut.length;jt++)Ut[jt]();Ut=null,jt=0,Kt=null,Qt(t,e)}}const qt=t=>null==t.id?1/0:t.id;function Xt(t){Nt=!1,At=!0,Qt(t),Mt.sort(((t,e)=>qt(t)-qt(e)));try{for(Pt=0;Pt<Mt.length;Pt++){const t=Mt[Pt];t&&kt(t,null,14)}}finally{Pt=0,Mt.length=0,function(t){if($t.length){const t=[...new Set($t)];if($t.length=0,Ft)return void Ft.push(...t);for(Ft=t,Ft.sort(((t,e)=>qt(t)-qt(e))),Bt=0;Bt<Ft.length;Bt++)Ft[Bt]();Ft=null,Bt=0}}(),At=!1,Ht=null,(Mt.length||$t.length)&&Xt(t)}}let Jt=0;const Zt=t=>Jt+=t;let te=null;function ee(t){if(y(t)&&(t=t()),_(t)){t=function(t){let e;for(let n=0;n<t.length;n++){const r=t[n];if(!fe(r))return;if(r.type!==ue||"v-if"===r.children){if(e)return;e=r}}return e}(t)}return ve(t)}const ne={};function re(t,e,{immediate:n,deep:r,flush:o,onTrack:s,onTrigger:c}=i,l=Re){let u,f,p=!1;if(wt(t)?(u=()=>t.value,p=!!t._shallow):Rt(t)?(u=()=>t,r=!0):u=_(t)?()=>t.map((t=>wt(t)?t.value:Rt(t)?se(t):y(t)?kt(t,l,2,[l&&l.proxy]):void 0)):y(t)?e?()=>kt(t,l,2,[l&&l.proxy]):()=>{if(!l||!l.isUnmounted)return f&&f(),Lt(t,l,3,[d])}:a,e&&r){const t=u;u=()=>se(t())}let d=t=>{f=b.options.onStop=()=>{kt(t,l,4)}},h=_(t)?[]:ne;const g=()=>{if(b.active)if(e){const t=b();(r||p||R(t,h))&&(f&&f(),Lt(e,l,3,[t,h===ne?void 0:h,d]),h=t)}else b()};let v;g.allowRecurse=!!e,v="sync"===o?g:"post"===o?()=>ce(g,l&&l.suspense):()=>{!l||l.isMounted?function(t){Yt(t,Ut,Dt,jt)}(g):g()};const b=L(u,{lazy:!0,onTrack:s,onTrigger:c,scheduler:v});return function(t,e=Re){e&&(e.effects||(e.effects=[])).push(t)}(b,l),e?n?g():h=b():"post"===o?ce(b,l&&l.suspense):b(),()=>{var t;(t=b).active&&(A(t),t.options.onStop&&t.options.onStop(),t.active=!1),l&&((t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)})(l.effects,b)}}function oe(t,e,n){const r=this.proxy;return re(v(t)?()=>r[t]:t.bind(r),e.bind(r),n,this)}function se(t,e=new Set){if(!E(t)||e.has(t))return t;if(e.add(t),wt(t))se(t.value,e);else if(_(t))for(let n=0;n<t.length;n++)se(t[n],e);else if("[object Set]"===O(t)||g(t))t.forEach((t=>{se(t,e)}));else for(const n in t)se(t[n],e);return t}const ce=function(t,e){e&&e.pendingBranch?_(t)?e.effects.push(...t):e.effects.push(t):Yt(t,Ft,$t,Bt)},le=Symbol();const ie=Symbol(void 0),ae=Symbol(void 0),ue=Symbol(void 0);function fe(t){return!!t&&!0===t.__v_isVNode}const pe="__vInternal",de=({key:t})=>null!=t?t:null,he=({ref:t})=>null!=t?v(t)||wt(t)||y(t)?{i:te,r:t}:t:null,_e=function(t,e=null,n=null,o=0,s=null,c=!1){t&&t!==le||(t=ue);if(fe(t)){const r=ge(t,e,!0);return n&&be(r,n),r}i=t,y(i)&&"__vccOpts"in i&&(t=t.__vccOpts);var i;if(e){(Tt(e)||pe in e)&&(e=p({},e));let{class:t,style:n}=e;t&&!v(t)&&(e.class=l(t)),E(n)&&(Tt(n)&&!_(n)&&(n=p({},n)),e.style=r(n))}const a=v(t)?1:(t=>t.__isSuspense)(t)?128:(t=>t.__isTeleport)(t)?64:E(t)?4:y(t)?2:0,u={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&de(e),ref:e&&he(e),scopeId:null,slotScopeIds:null,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null};if(be(u,n),128&a){const{content:t,fallback:e}=function(t){const{shapeFlag:e,children:n}=t;let r,o;return 32&e?(r=ee(n.default),o=ee(n.fallback)):(r=ee(n),o=ve(null)),{content:r,fallback:o}}(u);u.ssContent=t,u.ssFallback=e}0;return u};function ge(t,e,n=!1){const{props:o,ref:s,patchFlag:c,children:i}=t,a=e?function(...t){const e=p({},t[0]);for(let n=1;n<t.length;n++){const o=t[n];for(const t in o)if("class"===t)e.class!==o.class&&(e.class=l([e.class,o.class]));else if("style"===t)e.style=r([e.style,o.style]);else if(f(t)){const n=e[t],r=o[t];n!==r&&(e[t]=n?[].concat(n,o[t]):r)}else""!==t&&(e[t]=o[t])}return e}(o||{},e):o;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:a,key:a&&de(a),ref:e&&e.ref?n&&s?_(s)?s.concat(he(e)):[s,he(e)]:he(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:i,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==ie?-1===c?16:16|c:c,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&ge(t.ssContent),ssFallback:t.ssFallback&&ge(t.ssFallback),el:t.el,anchor:t.anchor}}function ye(t=" ",e=0){return _e(ae,null,t,e)}function ve(t){return null==t||"boolean"==typeof t?_e(ue):_(t)?_e(ie,null,t):"object"==typeof t?null===t.el?t:ge(t):_e(ae,null,String(t))}function be(t,e){let n=0;const{shapeFlag:r}=t;if(null==e)e=null;else if(_(e))n=16;else if("object"==typeof e){if(1&r||64&r){const n=e.default;return void(n&&(n._c&&Zt(1),be(t,n()),n._c&&Zt(-1)))}{n=32;const t=e._;t||pe in e||(e._ctx=te)}}else y(e)?(e={default:e,_ctx:te},n=32):(e=String(e),64&r?(n=16,e=[ye(e)]):n=8);t.children=e,t.shapeFlag|=n}function Ee(t,e,n){const r=n.appContext.config.optionMergeStrategies,{mixins:o,extends:s}=e;s&&Ee(t,s,n),o&&o.forEach((e=>Ee(t,e,n)));for(const c in e)r&&h(r,c)?t[c]=r[c](t[c],e[c],n.proxy,c):t[c]=e[c]}const Se=t=>t?4&t.vnode.shapeFlag?t.exposed?t.exposed:t.proxy:Se(t.parent):null,Oe=p(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Se(t.parent),$root:t=>Se(t.root),$emit:t=>t.emit,$options:t=>function(t){const e=t.type,{__merged:n,mixins:r,extends:o}=e;if(n)return n;const s=t.appContext.mixins;if(!s.length&&!r&&!o)return e;const c={};return s.forEach((e=>Ee(c,e,t))),Ee(c,e,t),e.__merged=c}(t),$forceUpdate:t=>()=>Wt(t.update),$nextTick:t=>zt.bind(t.proxy),$watch:t=>oe.bind(t)}),me={get({_:t},e){const{ctx:n,setupState:r,data:o,props:s,accessCache:c,type:l,appContext:a}=t;if("__v_skip"===e)return!0;let u;if("$"!==e[0]){const l=c[e];if(void 0!==l)switch(l){case 0:return r[e];case 1:return o[e];case 3:return n[e];case 2:return s[e]}else{if(r!==i&&h(r,e))return c[e]=0,r[e];if(o!==i&&h(o,e))return c[e]=1,o[e];if((u=t.propsOptions[0])&&h(u,e))return c[e]=2,s[e];if(n!==i&&h(n,e))return c[e]=3,n[e];c[e]=4}}const f=Oe[e];let p,d;return f?("$attrs"===e&&D(t,0,e),f(t)):(p=l.__cssModules)&&(p=p[e])?p:n!==i&&h(n,e)?(c[e]=3,n[e]):(d=a.config.globalProperties,h(d,e)?d[e]:void 0)},set({_:t},e,n){const{data:r,setupState:o,ctx:s}=t;if(o!==i&&h(o,e))o[e]=n;else if(r!==i&&h(r,e))r[e]=n;else if(h(t.props,e))return!1;return("$"!==e[0]||!(e.slice(1)in t))&&(s[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:o,propsOptions:s}},c){let l;return void 0!==n[c]||t!==i&&h(t,c)||e!==i&&h(e,c)||(l=s[0])&&h(l,c)||h(r,c)||h(Oe,c)||h(o.config.globalProperties,c)}};p({},me,{get(t,e){if(e!==Symbol.unscopables)return me.get(t,e,t)},has:(t,e)=>"_"!==e[0]&&!n(e)});let Re=null;function Ie(t,e,n){const r=arguments.length;return 2===r?E(e)&&!_(e)?fe(e)?_e(t,null,[e]):_e(t,e):_e(t,null,e):(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&fe(n)&&(n=[n]),_e(t,e,n))}var Te,xe;(xe=Te||(Te={})).DOCUMENT="doc",xe.HEADING="heading",xe.PARAGRAPH="paragraph",xe.QUOTE="blockquote",xe.OL_LIST="ordered_list",xe.UL_LIST="bullet_list",xe.LIST_ITEM="list_item",xe.CODE_BLOCK="code_block",xe.HR="horizontal_rule",xe.BR="hard_break",xe.IMAGE="image",xe.BOLD="bold",xe.STRONG="strong",xe.STRIKE="strike",xe.UNDERLINE="underline",xe.ITALIC="italic",xe.CODE="code",xe.LINK="link",xe.STYLED="styled",xe.TEXT="text",xe.COMPONENT="blok";const we=[Te.DOCUMENT,Te.HEADING,Te.PARAGRAPH,Te.QUOTE,Te.OL_LIST,Te.UL_LIST,Te.LIST_ITEM,Te.CODE_BLOCK,Te.HR,Te.BR,Te.IMAGE];var ke,Le,Ce,Ae;(Le=ke||(ke={})).SELF="_self",Le.BLANK="_blank",(Ae=Ce||(Ce={})).URL="url",Ae.STORY="story",Ae.ASSET="asset",Ae.EMAIL="email";const Ne={button1:({_uid:t,id:e,component:n,fields:r})=>Ie("div",{_uid:t,id:e,component:n},r.title)},Me={[Te.DOCUMENT]:({children:t})=>t,[Te.HEADING]:({children:t,attrs:e})=>Ie(`h${e.level}`,t),[Te.PARAGRAPH]:({children:t})=>Ie("p",t),[Te.QUOTE]:({children:t})=>Ie("blockquote",t),[Te.OL_LIST]:({children:t,attrs:e})=>Ie("ol",t),[Te.UL_LIST]:({children:t})=>Ie("ul",t),[Te.LIST_ITEM]:({children:t})=>Ie("li",t),[Te.CODE_BLOCK]:({children:t,attrs:e})=>Ie("pre",e,t),[Te.HR]:()=>Ie("hr"),[Te.BR]:()=>Ie("br"),[Te.IMAGE]:({attrs:t})=>Ie("img",t),[Te.BOLD]:({text:t})=>Ie("b",t),[Te.STRONG]:({text:t})=>Ie("strong",t),[Te.STRIKE]:({text:t})=>Ie("s",t),[Te.UNDERLINE]:({text:t})=>Ie("u",t),[Te.ITALIC]:({text:t})=>Ie("i",t),[Te.CODE]:({text:t})=>Ie("code",t),[Te.LINK]:({text:t,attrs:e})=>{let n="";switch(e.linktype){case Ce.ASSET:case Ce.URL:n=e.href;break;case Ce.EMAIL:n=`mailto:${e.href}`;break;case Ce.STORY:const r=function(){const t=function(t){return v(t)?t:t||le}("RouterLink");return"string"!=typeof t&&t}();return r?Ie(r,{to:e.href,target:e.target},{default:()=>t}):Ie("a",{href:n,target:e.target},t)}return Ie("a",{href:e.href,target:e.target},t)},[Te.STYLED]:({text:t,attrs:e})=>Ie("span",e,t),[Te.COMPONENT]:()=>Ie("div","component")};const Pe=function(){const t=t=>function(t){return t.type===Te.TEXT}(t)?t.marks?t.marks.map((e=>r(e,t.text))):s(t):function(t){return we.includes(t.type)}(t)?n(t):function(t){return t.type===Te.COMPONENT}(t)?o(t):Ie("div","fallback node"),e=e=>{const n=[];return e.forEach((e=>{const r=t(e);Array.isArray(r)?r.forEach((t=>{n.push(t)})):n.push(r)})),n},n=t=>{switch(t.type){case Te.DOCUMENT:case Te.PARAGRAPH:case Te.QUOTE:case Te.UL_LIST:case Te.LIST_ITEM:return function(t){const e=Me[t.type],n=c(t);return e({children:n})}(t);case Te.HEADING:case Te.OL_LIST:case Te.CODE_BLOCK:return function(t){const e=Me[t.type],n=c(t);return e({children:n,attrs:t.attrs})}(t);case Te.HR:case Te.BR:return function(t){return(0,Me[t.type])()}(t);case Te.IMAGE:return function(t){return(0,Me[t.type])({attrs:t.attrs})}(t);default:return Ie("div","fallback block")}},r=(t,e)=>{switch(t.type){case Te.BOLD:case Te.STRONG:case Te.STRIKE:case Te.UNDERLINE:case Te.ITALIC:case Te.CODE:return function(t,e){return(0,Me[t.type])({text:e})}(t,e);case Te.LINK:case Te.STYLED:return function(t,e){return(0,Me[t.type])({text:e,attrs:t.attrs})}(t,e);default:return Ie("span","fallback mark")}},o=t=>{const e=[];return t.attrs.body.forEach((n=>{const r=n,{component:o,_uid:s}=r,c=__objRest(r,["component","_uid"]),l=Ne[o];l?e.push(l({id:t.attrs.id,component:o,_uid:s,fields:c})):e.push(Me[Te.COMPONENT]())})),e},s=t=>ye(t.text),c=t=>t.content&&t.content.length?e(t.content):[];return{renderDocument:n=>Array.isArray(n)?e(n):t(n)}}();t.renderer=Pe,Object.defineProperty(t,"__esModule",{value:!0}),t[Symbol.toStringTag]="Module"}));
var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__objRest=(e,t)=>{var n={};for(var r in e)__hasOwnProp.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&__getOwnPropSymbols)for(var r of __getOwnPropSymbols(e))t.indexOf(r)<0&&__propIsEnum.call(e,r)&&(n[r]=e[r]);return n};!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).StoryblokRichTextVueRenderer={})}(this,(function(e){"use strict";function t(e,t){const n=Object.create(null),r=e.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt");function r(e){if(_(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],s=r(g(o)?c(o):o);if(s)for(const e in s)t[e]=s[e]}return t}if(m(e))return e}const o=/;(?![^(]*\))/g,s=/:(.+)/;function c(e){const t={};return e.split(o).forEach((e=>{if(e){const n=e.split(s);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function l(e){let t="";if(g(e))t=e;else if(_(e))for(let n=0;n<e.length;n++){const r=l(e[n]);r&&(t+=r+" ")}else if(m(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const i={},a=()=>{},u=/^on[^a-z]/,p=e=>u.test(e),f=Object.assign,d=Object.prototype.hasOwnProperty,h=(e,t)=>d.call(e,t),_=Array.isArray,y=e=>"function"==typeof e,g=e=>"string"==typeof e,m=e=>null!==e&&"object"==typeof e,b=Object.prototype.toString,O=e=>b.call(e),v=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},S=/-(\w)/g,E=v((e=>e.replace(S,((e,t)=>t?t.toUpperCase():"")))),T=v((e=>e.charAt(0).toUpperCase()+e.slice(1))),x=(e,t)=>e!==t&&(e==e||t==t),I=new WeakMap,R=[];let P;function C(e,t=i){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const n=function(e,t){const n=function(){if(!n.active)return e();if(!R.includes(n)){w(n);try{return A.push(N),N=!0,R.push(n),P=n,e()}finally{R.pop(),k(),P=R[R.length-1]}}};return n.id=L++,n.allowRecurse=!!t.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||n(),n}let L=0;function w(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let N=!0;const A=[];function k(){const e=A.pop();N=void 0===e||e}function D(e){return j(e)?D(e.__v_raw):!(!e||!e.__v_isReactive)}function j(e){return!(!e||!e.__v_isReadonly)}function M(e){return D(e)||j(e)}function U(e){return((e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})})(e,"__v_skip",!0),e}function $(e){return Boolean(e&&!0===e.__v_isRef)}new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter((e=>"symbol"==typeof e)));const B={get:(e,t,n)=>{return $(r=Reflect.get(e,t,n))?r.value:r;var r},set:(e,t,n,r)=>{const o=e[t];return $(o)&&!$(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function F(e,t,n,r){let o;try{o=r?e(...r):e()}catch(s){H(s,t,n)}return o}function G(e,t,n,r){if(y(e)){const s=F(e,t,n,r);return s&&(m(o=s)&&y(o.then)&&y(o.catch))&&s.catch((e=>{H(e,t,n)})),s}var o;const s=[];for(let c=0;c<e.length;c++)s.push(G(e[c],t,n,r));return s}function H(e,t,n,r=!0){t&&t.vnode;if(t){let r=t.parent;const o=t.proxy,s=n;for(;r;){const t=r.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,o,s))return;r=r.parent}const c=t.appContext.config.errorHandler;if(c)return void F(c,null,10,[e,o,s])}!function(e,t,n,r=!0){console.error(e)}(e,0,0,r)}let K=!1,V=!1;const z=[];let Y=0;const Q=[];let q=null,X=0;const J=[];let W=null,Z=0;const ee=Promise.resolve();let te=null,ne=null;function re(e){const t=te||ee;return e?t.then(this?e.bind(this):e):t}function oe(e){if(!(z.length&&z.includes(e,K&&e.allowRecurse?Y+1:Y)||e===ne)){const t=function(e){let t=Y+1,n=z.length;const r=ie(e);for(;t<n;){const e=t+n>>>1;ie(z[e])<r?t=e+1:n=e}return t}(e);t>-1?z.splice(t,0,e):z.push(e),se()}}function se(){K||V||(V=!0,te=ee.then(ae))}function ce(e,t,n,r){_(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?r+1:r)||n.push(e),se()}function le(e,t=null){if(Q.length){for(ne=t,q=[...new Set(Q)],Q.length=0,X=0;X<q.length;X++)q[X]();q=null,X=0,ne=null,le(e,t)}}const ie=e=>null==e.id?1/0:e.id;function ae(e){V=!1,K=!0,le(e),z.sort(((e,t)=>ie(e)-ie(t)));try{for(Y=0;Y<z.length;Y++){const e=z[Y];e&&!1!==e.active&&F(e,null,14)}}finally{Y=0,z.length=0,function(e){if(J.length){const e=[...new Set(J)];if(J.length=0,W)return void W.push(...e);for(W=e,W.sort(((e,t)=>ie(e)-ie(t))),Z=0;Z<W.length;Z++)W[Z]();W=null,Z=0}}(),K=!1,te=null,(z.length||Q.length||J.length)&&ae(e)}}let ue=null;const pe={};function fe(e,t,{immediate:n,deep:r,flush:o,onTrack:s,onTrigger:c}=i,l=Be){let u,p,f=!1,d=!1;if($(e)?(u=()=>e.value,f=!!e._shallow):D(e)?(u=()=>e,r=!0):_(e)?(d=!0,f=e.some(D),u=()=>e.map((e=>$(e)?e.value:D(e)?he(e):y(e)?F(e,l,2):void 0))):u=y(e)?t?()=>F(e,l,2):()=>{if(!l||!l.isUnmounted)return p&&p(),G(e,l,3,[h])}:a,t&&r){const e=u;u=()=>he(e())}let h=e=>{p=O.options.onStop=()=>{F(e,l,4)}},g=d?[]:pe;const m=()=>{if(O.active)if(t){const e=O();(r||f||(d?e.some(((e,t)=>x(e,g[t]))):x(e,g)))&&(p&&p(),G(t,l,3,[e,g===pe?void 0:g,h]),g=e)}else O()};let b;m.allowRecurse=!!t,b="sync"===o?m:"post"===o?()=>ve(m,l&&l.suspense):()=>{!l||l.isMounted?function(e){ce(e,q,Q,X)}(m):m()};const O=C(u,{lazy:!0,onTrack:s,onTrigger:c,scheduler:b});return function(e,t=Be){t&&(t.effects||(t.effects=[])).push(e)}(O,l),t?n?m():g=O():"post"===o?ve(O,l&&l.suspense):O(),()=>{var e;(e=O).active&&(w(e),e.options.onStop&&e.options.onStop(),e.active=!1),l&&((e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)})(l.effects,O)}}function de(e,t,n){const r=this.proxy,o=g(e)?e.includes(".")?function(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}(r,e):()=>r[e]:e.bind(r,r);let s;return y(t)?s=t:(s=t.handler,n=t),fe(o,s.bind(r),n,this)}function he(e,t=new Set){if(!m(e)||e.__v_skip)return e;if((t=t||new Set).has(e))return e;if(t.add(e),$(e))he(e.value,t);else if(_(e))for(let n=0;n<e.length;n++)he(e[n],t);else if("[object Set]"===O(e)||(e=>"[object Map]"===O(e))(e))e.forEach((e=>{he(e,t)}));else if((e=>"[object Object]"===O(e))(e))for(const n in e)he(e[n],t);return e}function _e(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&_e(e,s,n,!0),o&&o.forEach((t=>_e(e,t,n,!0)));for(const c in t)if(r&&"expose"===c);else{const r=ye[c]||n&&n[c];e[c]=r?r(e[c],t[c]):t[c]}return e}const ye={data:ge,props:Oe,emits:Oe,methods:Oe,computed:Oe,beforeCreate:be,created:be,beforeMount:be,mounted:be,beforeUpdate:be,updated:be,beforeDestroy:be,destroyed:be,activated:be,deactivated:be,errorCaptured:be,serverPrefetch:be,components:Oe,directives:Oe,watch:function(e,t){if(!e)return t;if(!t)return e;const n=f(Object.create(null),e);for(const r in t)n[r]=be(e[r],t[r]);return n},provide:ge,inject:function(e,t){return Oe(me(e),me(t))}};function ge(e,t){return t?e?function(){return f(y(e)?e.call(this,this):e,y(t)?t.call(this,this):t)}:t:e}function me(e){if(_(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function be(e,t){return e?[...new Set([].concat(e,t))]:t}function Oe(e,t){return e?f(f(Object.create(null),e),t):t}const ve=function(e,t){t&&t.pendingBranch?_(e)?t.effects.push(...e):t.effects.push(e):ce(e,W,J,Z)},Se="components",Ee=Symbol();function Te(e){return g(e)?function(e,t,n=!0,r=!1){const o=Be;if(o){const n=o.type;if(e===Se){const e=Fe(n);if(e&&(e===t||e===E(t)||e===T(E(t))))return n}const s=xe(o[e]||n[e],t)||xe(o.appContext[e],t);return!s&&r?n:s}}(Se,e,!1)||e:e||Ee}function xe(e,t){return e&&(e[t]||e[E(t)]||e[T(E(t))])}const Ie=Symbol(void 0),Re=Symbol(void 0),Pe=Symbol(void 0);function Ce(e){return!!e&&!0===e.__v_isVNode}const Le="__vInternal",we=({key:e})=>null!=e?e:null,Ne=({ref:e})=>null!=e?g(e)||$(e)||y(e)?{i:ue,r:e}:e:null,Ae=function(e,t=null,n=null,o=0,s=null,c=!1){e&&e!==Ee||(e=Pe);if(Ce(e)){const r=ke(e,t,!0);return n&&je(r,n),r}i=e,y(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){(M(t)||Le in t)&&(t=f({},t));let{class:e,style:n}=t;e&&!g(e)&&(t.class=l(e)),m(n)&&(M(n)&&!_(n)&&(n=f({},n)),t.style=r(n))}const a=g(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:m(e)?4:y(e)?2:0,u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&we(t),ref:t&&Ne(t),scopeId:null,slotScopeIds:null,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,shapeFlag:a,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null};je(u,n),128&a&&e.normalize(u);0;return u};function ke(e,t,n=!1){const{props:o,ref:s,patchFlag:c,children:i}=e,a=t?function(...e){const t=f({},e[0]);for(let n=1;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=l([t.class,o.class]));else if("style"===e)t.style=r([t.style,o.style]);else if(p(e)){const n=t[e],r=o[e];n!==r&&(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&we(a),ref:t&&t.ref?n&&s?_(s)?s.concat(Ne(t)):[s,Ne(t)]:Ne(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ie?-1===c?16:16|c:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ke(e.ssContent),ssFallback:e.ssFallback&&ke(e.ssFallback),el:e.el,anchor:e.anchor}}function De(e=" ",t=0){return Ae(Re,null,e,t)}function je(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(_(t))n=16;else if("object"==typeof t){if(1&r||64&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),je(e,n()),n._c&&(n._d=!0)))}{n=32;const e=t._;e||Le in t||(t._ctx=ue)}}else y(t)?(t={default:t,_ctx:ue},n=32):(t=String(t),64&r?(n=16,t=[De(t)]):n=8);e.children=t,e.shapeFlag|=n}const Me=e=>e?4&e.vnode.shapeFlag?function(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(D(t=U(e.exposed))?t:new Proxy(t,B),{get:(t,n)=>n in t?t[n]:n in Ue?Ue[n](e):void 0}));var t}(e)||e.proxy:Me(e.parent):null,Ue=f(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Me(e.parent),$root:e=>Me(e.root),$emit:e=>e.emit,$options:e=>function(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:c}}=e.appContext,l=s.get(t);let i;return l?i=l:o.length||n||r?(i={},o.length&&o.forEach((e=>_e(i,e,c,!0))),_e(i,t,c)):i=t,s.set(t,i),i}(e),$forceUpdate:e=>()=>oe(e.update),$nextTick:e=>re.bind(e.proxy),$watch:e=>de.bind(e)}),$e={get({_:e},t){const{ctx:n,setupState:r,data:o,props:s,accessCache:c,type:l,appContext:a}=e;let u;if("$"!==t[0]){const l=c[t];if(void 0!==l)switch(l){case 0:return r[t];case 1:return o[t];case 3:return n[t];case 2:return s[t]}else{if(r!==i&&h(r,t))return c[t]=0,r[t];if(o!==i&&h(o,t))return c[t]=1,o[t];if((u=e.propsOptions[0])&&h(u,t))return c[t]=2,s[t];if(n!==i&&h(n,t))return c[t]=3,n[t];c[t]=4}}const p=Ue[t];let f,d;return p?("$attrs"===t&&function(e,t,n){if(!N||void 0===P)return;let r=I.get(e);r||I.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new Set),o.has(P)||(o.add(P),P.deps.push(o))}(e,0,t),p(e)):(f=l.__cssModules)&&(f=f[t])?f:n!==i&&h(n,t)?(c[t]=3,n[t]):(d=a.config.globalProperties,h(d,t)?d[t]:void 0)},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;if(o!==i&&h(o,t))o[t]=n;else if(r!==i&&h(r,t))r[t]=n;else if(h(e.props,t))return!1;return("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},c){let l;return void 0!==n[c]||e!==i&&h(e,c)||t!==i&&h(t,c)||(l=s[0])&&h(l,c)||h(r,c)||h(Ue,c)||h(o.config.globalProperties,c)}};f({},$e,{get(e,t){if(t!==Symbol.unscopables)return $e.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!n(t)});let Be=null;function Fe(e){return y(e)&&e.displayName||e.name}function Ge(e,t,n){const r=arguments.length;return 2===r?m(t)&&!_(t)?Ce(t)?Ae(e,null,[t]):Ae(e,t):Ae(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&Ce(n)&&(n=[n]),Ae(e,t,n))}var He,Ke;(Ke=He||(He={})).DOCUMENT="doc",Ke.HEADING="heading",Ke.PARAGRAPH="paragraph",Ke.QUOTE="blockquote",Ke.OL_LIST="ordered_list",Ke.UL_LIST="bullet_list",Ke.LIST_ITEM="list_item",Ke.CODE_BLOCK="code_block",Ke.HR="horizontal_rule",Ke.BR="hard_break",Ke.IMAGE="image",Ke.BOLD="bold",Ke.STRONG="strong",Ke.STRIKE="strike",Ke.UNDERLINE="underline",Ke.ITALIC="italic",Ke.CODE="code",Ke.LINK="link",Ke.STYLED="styled",Ke.TEXT="text",Ke.COMPONENT="blok";const Ve=[He.DOCUMENT,He.HEADING,He.PARAGRAPH,He.QUOTE,He.OL_LIST,He.UL_LIST,He.LIST_ITEM,He.CODE_BLOCK,He.HR,He.BR,He.IMAGE];var ze,Ye,Qe,qe;function Xe(e){const t=e=>function(e){return e.type===He.TEXT}(e)?e.marks?e.marks.map((t=>o(t,e.text))):c(e):function(e){return Ve.includes(e.type)}(e)?r(e):function(e){return e.type===He.COMPONENT}(e)?s(e):Ge("div","fallback node"),n=e=>{const n=[];return e.forEach((e=>{const r=t(e);Array.isArray(r)?r.forEach((e=>{n.push(e)})):n.push(r)})),n},r=t=>{switch(t.type){case He.DOCUMENT:case He.PARAGRAPH:case He.QUOTE:case He.UL_LIST:case He.LIST_ITEM:return function(t){const n=e[t.type],r=l(t);if(Je(n))return Ge(n,null,{default:()=>r});return n({children:r})}(t);case He.HEADING:case He.OL_LIST:case He.CODE_BLOCK:return function(t){const n=e[t.type],r=l(t);if(Je(n))return Ge(n,t.attrs,{default:()=>r});return n({children:r,attrs:t.attrs})}(t);case He.HR:case He.BR:return function(t){const n=e[t.type];if(Je(n))return Ge(n);return n()}(t);case He.IMAGE:return function(t){const n=e[t.type];if(Je(n))return Ge(n,t.attrs);return n({attrs:t.attrs})}(t);default:return Ge("div","fallback block")}},o=(t,n)=>{switch(t.type){case He.BOLD:case He.STRONG:case He.STRIKE:case He.UNDERLINE:case He.ITALIC:case He.CODE:return function(t,n){const r=e[t.type];if(Je(r))return Ge(r,{default:()=>n});return r({text:n})}(t,n);case He.LINK:case He.STYLED:return function(t,n){const r=e[t.type];if(Je(r))return Ge(r,t.attrs,{default:()=>n});return r({text:n,attrs:t.attrs})}(t,n);default:return Ge("span","fallback mark")}},s=t=>{const n=[];return t.attrs.body.forEach((r=>{const o=r,{component:s,_uid:c}=o,l=__objRest(o,["component","_uid"]),i=e.components[s];i?n.push(i({id:t.attrs.id,component:s,_uid:c,fields:l})):n.push(e[He.COMPONENT]())})),n},c=e=>De(e.text),l=e=>e.content&&e.content.length?n(e.content):[];return{renderDocument:e=>Array.isArray(e)?n(e):t(e)}}function Je(e){return"function"!=typeof e&&!Ce(e)}(Ye=ze||(ze={})).SELF="_self",Ye.BLANK="_blank",(qe=Qe||(Qe={})).URL="url",qe.STORY="story",qe.ASSET="asset",qe.EMAIL="email";var We,Ze=y(We={name:"RichTextRenderer",props:{document:{type:Object,required:!0}},setup(e){const t=nt();return()=>t.renderDocument(e.document)}})?{setup:We,name:We.name}:We;const et={[He.DOCUMENT]:({children:e})=>e,[He.HEADING]:({children:e,attrs:t})=>Ge(`h${t.level}`,e),[He.PARAGRAPH]:({children:e})=>Ge("p",e),[He.QUOTE]:({children:e})=>Ge("blockquote",e),[He.OL_LIST]:({children:e,attrs:t})=>Ge("ol",e),[He.UL_LIST]:({children:e})=>Ge("ul",e),[He.LIST_ITEM]:({children:e})=>Ge("li",e),[He.CODE_BLOCK]:({children:e,attrs:t})=>Ge("pre",t,e),[He.HR]:()=>Ge("hr"),[He.BR]:()=>Ge("br"),[He.IMAGE]:({attrs:e})=>Ge("img",e),[He.BOLD]:({text:e})=>Ge("b",e),[He.STRONG]:({text:e})=>Ge("strong",e),[He.STRIKE]:({text:e})=>Ge("s",e),[He.UNDERLINE]:({text:e})=>Ge("u",e),[He.ITALIC]:({text:e})=>Ge("i",e),[He.CODE]:({text:e})=>Ge("code",e),[He.LINK]:({text:e,attrs:t})=>{let n="";switch(t.linktype){case Qe.ASSET:case Qe.URL:n=t.href;break;case Qe.EMAIL:n=`mailto:${t.href}`;break;case Qe.STORY:const r=function(){const e=Te("RouterLink");return"string"!=typeof e&&e}();return r?Ge(r,{to:t.href,target:t.target},{default:()=>e}):Ge("a",{href:n,target:t.target},e)}return Ge("a",{href:t.href,target:t.target},e)},[He.STYLED]:({text:e,attrs:t})=>Ge("span",t,e),[He.COMPONENT]:()=>Ge("div","component")};const tt=Symbol("Rich Text Renderer");function nt(){const e=function(e,t,n=!1){const r=Be||ue;if(r){const o=null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&y(t)?t.call(r.proxy):t}}(tt);if(!e)throw new Error("Rich Text Renderer not provided.");return e}e.RichTextRenderer=Ze,e.defineResolvers=function(e){const t=e,{components:n={}}=t,r=__objRest(t,["components"]);return __spreadValues(__spreadProps(__spreadValues({},et),{components:n}),r)},e.plugin=e=>({install(t){const n=Xe((null==e?void 0:e.resolvers)||__spreadProps(__spreadValues({},et),{components:{}}));t.provide(tt,n)}}),e.useRenderer=nt,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"}));
{
"name": "@marvr/storyblok-rich-text-vue-renderer",
"version": "3.0.0",
"version": "3.1.0",
"main": "./dist/storyblok-rich-text-vue-renderer.umd.js",

@@ -36,3 +36,3 @@ "module": "./dist/storyblok-rich-text-vue-renderer.es.js",

],
"gitHead": "43319c5a732de47e19a08a9f565a3b083593a67f"
"gitHead": "bcc4f0ab8dc2ebb8bd6344cc5f288420a36b3fff"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc