hive-react-kit 0.0.36 → 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -14,12 +14,12 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var uo;function Id(){return uo||(uo=1,process.env.NODE_ENV!=="production"&&(function(){function e(I){if(I==null)return null;if(typeof I=="function")return I.$$typeof===C?null:I.displayName||I.name||null;if(typeof I=="string")return I;switch(I){case b:return"Fragment";case v:return"Profiler";case g:return"StrictMode";case m:return"Suspense";case N:return"SuspenseList";case D:return"Activity"}if(typeof I=="object")switch(typeof I.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),I.$$typeof){case w:return"Portal";case k:return I.displayName||"Context";case _:return(I._context.displayName||"Context")+".Consumer";case y:var ie=I.render;return I=I.displayName,I||(I=ie.displayName||ie.name||"",I=I!==""?"ForwardRef("+I+")":"ForwardRef"),I;case j:return ie=I.displayName||null,ie!==null?ie:e(I.type)||"Memo";case A:ie=I._payload,I=I._init;try{return e(I(ie))}catch{}}return null}function a(I){return""+I}function i(I){try{a(I);var ie=!1}catch{ie=!0}if(ie){ie=console;var R=ie.error,V=typeof Symbol=="function"&&Symbol.toStringTag&&I[Symbol.toStringTag]||I.constructor.name||"Object";return R.call(ie,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",V),a(I)}}function s(I){if(I===b)return"<>";if(typeof I=="object"&&I!==null&&I.$$typeof===A)return"<...>";try{var ie=e(I);return ie?"<"+ie+">":"<...>"}catch{return"<...>"}}function r(){var I=T.A;return I===null?null:I.getOwner()}function n(){return Error("react-stack-top-frame")}function u(I){if(M.call(I,"key")){var ie=Object.getOwnPropertyDescriptor(I,"key").get;if(ie&&ie.isReactWarning)return!1}return I.key!==void 0}function c(I,ie){function R(){q||(q=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",ie))}R.isReactWarning=!0,Object.defineProperty(I,"key",{get:R,configurable:!0})}function d(){var I=e(this.type);return $[I]||($[I]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),I=this.props.ref,I!==void 0?I:null}function f(I,ie,R,V,J,fe){var Q=R.ref;return I={$$typeof:x,type:I,key:ie,props:R,_owner:V},(Q!==void 0?Q:null)!==null?Object.defineProperty(I,"ref",{enumerable:!1,get:d}):Object.defineProperty(I,"ref",{enumerable:!1,value:null}),I._store={},Object.defineProperty(I._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(I,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(I,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(I,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:fe}),Object.freeze&&(Object.freeze(I.props),Object.freeze(I)),I}function o(I,ie,R,V,J,fe){var Q=ie.children;if(Q!==void 0)if(V)if(W(Q)){for(V=0;V<Q.length;V++)h(Q[V]);Object.freeze&&Object.freeze(Q)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(Q);if(M.call(ie,"key")){Q=e(I);var ne=Object.keys(ie).filter(function(Ce){return Ce!=="key"});V=0<ne.length?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}",ae[Q+V]||(ne=0<ne.length?"{"+ne.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var uo;function Id(){return uo||(uo=1,process.env.NODE_ENV!=="production"&&(function(){function e(I){if(I==null)return null;if(typeof I=="function")return I.$$typeof===C?null:I.displayName||I.name||null;if(typeof I=="string")return I;switch(I){case b:return"Fragment";case v:return"Profiler";case g:return"StrictMode";case m:return"Suspense";case N:return"SuspenseList";case D:return"Activity"}if(typeof I=="object")switch(typeof I.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),I.$$typeof){case w:return"Portal";case _:return I.displayName||"Context";case k:return(I._context.displayName||"Context")+".Consumer";case y:var ie=I.render;return I=I.displayName,I||(I=ie.displayName||ie.name||"",I=I!==""?"ForwardRef("+I+")":"ForwardRef"),I;case j:return ie=I.displayName||null,ie!==null?ie:e(I.type)||"Memo";case A:ie=I._payload,I=I._init;try{return e(I(ie))}catch{}}return null}function a(I){return""+I}function i(I){try{a(I);var ie=!1}catch{ie=!0}if(ie){ie=console;var R=ie.error,V=typeof Symbol=="function"&&Symbol.toStringTag&&I[Symbol.toStringTag]||I.constructor.name||"Object";return R.call(ie,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",V),a(I)}}function s(I){if(I===b)return"<>";if(typeof I=="object"&&I!==null&&I.$$typeof===A)return"<...>";try{var ie=e(I);return ie?"<"+ie+">":"<...>"}catch{return"<...>"}}function r(){var I=O.A;return I===null?null:I.getOwner()}function n(){return Error("react-stack-top-frame")}function u(I){if($.call(I,"key")){var ie=Object.getOwnPropertyDescriptor(I,"key").get;if(ie&&ie.isReactWarning)return!1}return I.key!==void 0}function c(I,ie){function R(){q||(q=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",ie))}R.isReactWarning=!0,Object.defineProperty(I,"key",{get:R,configurable:!0})}function d(){var I=e(this.type);return M[I]||(M[I]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),I=this.props.ref,I!==void 0?I:null}function f(I,ie,R,V,J,fe){var Q=R.ref;return I={$$typeof:x,type:I,key:ie,props:R,_owner:V},(Q!==void 0?Q:null)!==null?Object.defineProperty(I,"ref",{enumerable:!1,get:d}):Object.defineProperty(I,"ref",{enumerable:!1,value:null}),I._store={},Object.defineProperty(I._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(I,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(I,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(I,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:fe}),Object.freeze&&(Object.freeze(I.props),Object.freeze(I)),I}function o(I,ie,R,V,J,fe){var Q=ie.children;if(Q!==void 0)if(V)if(H(Q)){for(V=0;V<Q.length;V++)h(Q[V]);Object.freeze&&Object.freeze(Q)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(Q);if($.call(ie,"key")){Q=e(I);var ne=Object.keys(ie).filter(function(Ce){return Ce!=="key"});V=0<ne.length?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}",ae[Q+V]||(ne=0<ne.length?"{"+ne.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,V,Q,ne,Q),ae[Q+V]=!0)}if(Q=null,R!==void 0&&(i(R),Q=""+R),u(ie)&&(i(ie.key),Q=""+ie.key),"key"in ie){R={};for(var xe in ie)xe!=="key"&&(R[xe]=ie[xe])}else R=ie;return Q&&c(R,typeof I=="function"?I.displayName||I.name||"Unknown":I),f(I,Q,R,r(),J,fe)}function h(I){l(I)?I._store&&(I._store.validated=1):typeof I=="object"&&I!==null&&I.$$typeof===A&&(I._payload.status==="fulfilled"?l(I._payload.value)&&I._payload.value._store&&(I._payload.value._store.validated=1):I._store&&(I._store.validated=1))}function l(I){return typeof I=="object"&&I!==null&&I.$$typeof===x}var p=P,x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),k=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),C=Symbol.for("react.client.reference"),T=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,W=Array.isArray,F=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(I){return I()}};var q,$={},Y=p.react_stack_bottom_frame.bind(p,n)(),X=F(s(n)),ae={};ga.Fragment=b,ga.jsx=function(I,ie,R){var V=1e4>T.recentlyCreatedOwnerStacks++;return o(I,ie,R,!1,V?Error("react-stack-top-frame"):Y,V?F(s(I)):X)},ga.jsxs=function(I,ie,R){var V=1e4>T.recentlyCreatedOwnerStacks++;return o(I,ie,R,!0,V?Error("react-stack-top-frame"):Y,V?F(s(I)):X)}})()),ga}var lo;function Fd(){return lo||(lo=1,process.env.NODE_ENV==="production"?pn.exports=Rd():pn.exports=Id()),pn.exports}var t=Fd();const sr={domain:"https://studio.3speak.tv",kThreeSpeakApiUrl:"https://studio.3speak.tv/mobile/api",userOwnerThumb:e=>`https://images.hive.blog/u/${e}/avatar`,graphQLServerUrl:"https://union.us-02.infra.3speak.tv"},ba=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class qd{commonFields=`
22
+ <%s key={someKey} {...props} />`,V,Q,ne,Q),ae[Q+V]=!0)}if(Q=null,R!==void 0&&(i(R),Q=""+R),u(ie)&&(i(ie.key),Q=""+ie.key),"key"in ie){R={};for(var xe in ie)xe!=="key"&&(R[xe]=ie[xe])}else R=ie;return Q&&c(R,typeof I=="function"?I.displayName||I.name||"Unknown":I),f(I,Q,R,r(),J,fe)}function h(I){l(I)?I._store&&(I._store.validated=1):typeof I=="object"&&I!==null&&I.$$typeof===A&&(I._payload.status==="fulfilled"?l(I._payload.value)&&I._payload.value._store&&(I._payload.value._store.validated=1):I._store&&(I._store.validated=1))}function l(I){return typeof I=="object"&&I!==null&&I.$$typeof===x}var p=P,x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),_=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),C=Symbol.for("react.client.reference"),O=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,H=Array.isArray,F=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(I){return I()}};var q,M={},Y=p.react_stack_bottom_frame.bind(p,n)(),X=F(s(n)),ae={};ga.Fragment=b,ga.jsx=function(I,ie,R){var V=1e4>O.recentlyCreatedOwnerStacks++;return o(I,ie,R,!1,V?Error("react-stack-top-frame"):Y,V?F(s(I)):X)},ga.jsxs=function(I,ie,R){var V=1e4>O.recentlyCreatedOwnerStacks++;return o(I,ie,R,!0,V?Error("react-stack-top-frame"):Y,V?F(s(I)):X)}})()),ga}var lo;function Fd(){return lo||(lo=1,process.env.NODE_ENV==="production"?pn.exports=Rd():pn.exports=Id()),pn.exports}var t=Fd();const sr={domain:"https://studio.3speak.tv",kThreeSpeakApiUrl:"https://studio.3speak.tv/mobile/api",userOwnerThumb:e=>`https://images.hive.blog/u/${e}/avatar`,graphQLServerUrl:"https://union.us-02.infra.3speak.tv"},ba=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class qd{commonFields=`
23
23
  items {
24
24
  created_at
25
25
  title
@@ -77,12 +77,12 @@ React keys must be passed directly to JSX without using spread:
77
77
  }
78
78
  }
79
79
  }
80
- `;try{const s=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:i,operationName:"TrendingTags"})});if(!s.ok)throw new Error(`GraphQL request failed: ${s.statusText}`);const r=await s.json();if(r.errors)throw new Error(`GraphQL error: ${r.errors.map(n=>n.message).join(", ")}`);return r.data?.trendingTags?.tags||[]}catch(s){throw console.error("Failed to fetch trending tags:",s),s}}convertGQLItemsToThreeSpeakVideos(a){return a.map(i=>{let s=null;try{typeof i.spkvideo=="string"?s=JSON.parse(i.spkvideo):s=i.spkvideo}catch(r){console.error("Error parsing spkvideo JSON",r)}return{title:i.title||"Untitled",owner:i.author?.username||"",permlink:i.permlink||"",created:new Date(i.created_at),category:i.tags&&i.tags.length>0?i.tags[0]:"general",duration:s?.duration||i.json_metadata?.raw?.video?.info?.duration||0,thumbnail:s?.thumbnail_url||i.json_metadata?.raw?.video?.info?.thumbnail,numOfUpvotes:i.stats?.num_votes,numOfComments:i.stats?.num_comments,hiveValue:i.stats?.total_hive_reward,active_votes:i.stats?.active_voters?.map(r=>({voter:r.voter,percent:r.percent,rshares:r.rshares,weight:r.weight}))||[]}})}async getContentStats(a,i){try{const s=await ba.call("condenser_api","get_content",[a,i]);return{numOfUpvotes:s?.net_votes??0,numOfComments:s?.children??0,hiveValue:s?.pending_payout_value?parseFloat(s.pending_payout_value):0}}catch{return{numOfUpvotes:0,numOfComments:0,hiveValue:0}}}async getActiveVotes(a,i){try{return await ba.call("condenser_api","get_active_votes",[a,i])}catch(s){return console.error("Error calling get_active_votes:",s),[]}}async getCommentsList(a,i){try{const s=await ba.call("bridge","get_discussion",[a,i]);return(Array.isArray(s)?s:s&&typeof s=="object"?Object.values(s):[]).map(n=>{const u=n.depth;if(typeof u=="string"){const d=parseInt(u,10);n.depth=Number.isFinite(d)?d:0}else(typeof u!="number"||!Number.isFinite(u))&&(n.depth=n.depth??0);const c=n.json_metadata;try{if(c&&typeof c=="string"){const d=c.trim();(d.startsWith("{")&&d.endsWith("}")||d.startsWith("[")&&d.endsWith("]"))&&(n.json_metadata_parsed=JSON.parse(d))}else c&&typeof c=="object"&&(n.json_metadata_parsed=c)}catch{console.warn(`Skipped invalid json_metadata for ${n.author}/${n.permlink}`)}return n})}catch(s){return console.error("Error fetching comments list:",s),[]}}async getMyVideos(a){const i=`${sr.domain}/mobile/api/my-videos`,s=await fetch(i,{method:"GET",headers:{"Content-Type":"application/json",Authorization:a}});if(s.ok){const r=await s.json();return Array.isArray(r)?r:[]}else throw console.error("Failed to fetch my videos:",s.statusText),new Error(`Failed to fetch my videos: ${s.status}`)}async getRankedPosts(a="trending",i="",s="hive.blog",r=20,n,u){try{const c={sort:a,tag:i,observer:s,limit:r};return n&&u&&(c.start_author=n,c.start_permlink=u),await ba.call("bridge","get_ranked_posts",c)}catch(c){return console.error("Error fetching ranked posts:",c),[]}}async getPostContent(a,i){try{return await ba.call("condenser_api","get_content",[a,i])}catch(s){return console.error("Error fetching post content:",s),null}}}const Ue=new qd,Br=e=>e?e.startsWith("Qm")||e.startsWith("baf")?`https://ipfs-3speak.b-cdn.net/ipfs/${e}`:e.startsWith("http")?e:e.startsWith("/")?`https://3speak.tv${e}`:e:"/placeholder.svg",kc=({video:e,onVideoClick:a,onAuthorClick:i,isGrid:s=!1})=>{const[r,n]=P.useState({numOfUpvotes:e.numOfUpvotes,numOfComments:e.numOfComments,hiveValue:e.hiveValue});P.useEffect(()=>{if(r.numOfUpvotes===void 0&&e.numOfUpvotes===void 0){let d=!0;return(async()=>{try{const f=await Ue.getContentStats(e.author||"",e.permlink||"");d&&n(f)}catch(f){console.error("Error fetching content stats for VideoCard:",f)}})(),()=>{d=!1}}else e.numOfUpvotes!==void 0&&n({numOfUpvotes:e.numOfUpvotes,numOfComments:e.numOfComments||0,hiveValue:e.hiveValue||0})},[e.author,e.permlink,r.numOfUpvotes,e.numOfUpvotes,e.numOfComments,e.hiveValue]);const u=d=>{if(!d)return"00:00";const f=Math.floor(d),o=Math.floor(f/3600),h=Math.floor(f%3600/60),l=f%60,p=x=>x.toString().padStart(2,"0");return f<60?`00:${p(l)}`:o===0?`${p(h)}:${p(l)}`:`${p(o)}:${p(h)}:${p(l)}`},c=d=>d==null?"":d>=1e6?`${(d/1e6).toFixed(1)}M`:d>=1e3?`${(d/1e3).toFixed(1)}K`:d.toString();return t.jsxs("div",{className:"group bg-card border border-border rounded-xl overflow-hidden shadow-card hover:shadow-card-hover transition-all duration-200 hover:-translate-y-1 cursor-pointer",children:[t.jsxs("div",{className:"relative aspect-video bg-muted overflow-hidden",onClick:()=>a(e),children:[t.jsx("img",{src:Br(e.thumbnail),alt:e.title,onError:d=>{d.target.src=`https://images.hive.blog/u/${e.author}/avatar`},className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),e.duration&&t.jsxs("div",{className:"absolute bottom-3 right-3 bg-black/80 text-white text-xs px-2 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[t.jsx(z.Clock,{className:"w-3 h-3"}),u(e.duration)]}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all duration-300 bg-black/20",children:t.jsx("div",{className:"bg-primary hover:bg-primary-hover rounded-full p-4 transform scale-75 group-hover:scale-100 transition-all duration-300 shadow-lg",children:t.jsx(z.Play,{className:"w-6 h-6 text-primary-foreground ml-0.5",fill:"currentColor"})})}),t.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-0 group-hover:opacity-30 transition-opacity duration-300"})]}),t.jsxs("div",{className:"p-4 space-y-3",children:[t.jsx("h3",{className:"font-semibold text-card-foreground line-clamp-2 group-hover:text-primary transition-colors cursor-pointer leading-tight",onClick:()=>a(e),children:e.title}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2 cursor-pointer hover:text-primary transition-colors group/author",onClick:()=>i(e.author),children:[t.jsx("img",{src:`https://images.hive.blog/u/${e.author}/avatar`,alt:e.author,className:"w-8 h-8 rounded-full object-cover border-2 border-border group-hover/author:border-primary transition-colors",onError:d=>{d.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("span",{className:"font-medium text-sm text-muted-foreground group-hover/author:text-primary transition-colors",children:["@",e.author]})]}),t.jsx("span",{className:"text-xs text-muted-foreground",children:ns.formatDistanceToNow(e.created,{addSuffix:!0})})]}),t.jsxs("div",{className:"flex items-center justify-between text-sm",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[r.numOfUpvotes!=null&&t.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[t.jsx(z.ThumbsUp,{className:"w-4 h-4"}),t.jsx("span",{children:c(r.numOfUpvotes)})]}),r.numOfComments!=null&&t.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4"}),t.jsx("span",{children:c(r.numOfComments)})]})]}),r.hiveValue!=null&&r.hiveValue>0&&t.jsxs("div",{className:"text-primary font-semibold",children:["$",r.hiveValue.toFixed(2)]})]}),e.category&&t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"inline-block bg-primary/10 text-primary text-xs px-2 py-1 rounded-full font-medium",children:e.category})})]})]})};var Ge=(e=>(e.HOME="home",e.TRENDING="trending",e.NEW_VIDEOS="newVideos",e.FIRST_UPLOADS="firstUploads",e.USER="user",e.COMMUNITY="community",e.RELATED="related",e.TAG_FEED="tag_feed",e.SEARCH="search",e))(Ge||{});const co=new Map,Nc=({title:e,author:a,permlink:i,createdAt:s,video:r,currentUser:n,isContentVoted:u=!1,description:c,onTapComment:d,onTapUpvote:f,onTapShare:o,onTapBookmark:h,onTapAuthor:l,onTapInfo:p})=>{const[x,w]=P.useState(r.numOfComments||0),[b,g]=P.useState(r.numOfUpvotes||0),[v,_]=P.useState(!1),[k,y]=P.useState(!1),[m,N]=P.useState(""),j=q=>{N(q),y(!0),setTimeout(()=>y(!1),3e3)},A=(q,$)=>`${q}:${$}`;P.useEffect(()=>{const q=A(a,i),$=co.get(q);$?(w($.comments),g($.upvotes)):(async()=>{const X=await Ue.getContentStats(a,i);g(X.numOfUpvotes),w(X.numOfComments),co.set(A(a,i),{comments:X.numOfComments,upvotes:X.numOfUpvotes})})()},[a,i]);const D=()=>{d?d(a,i):j("Comments feature coming soon!")},C=()=>{f?f(a,i):j("Upvote feature requires authentication!")},T=()=>{if(o)o(a,i);else{const q=`https://3speak.tv/user/${a}/${i}`;navigator.share?navigator.share({title:e,url:q}):(navigator.clipboard.writeText(q),j("Link copied to clipboard!"))}},M=()=>{h?h(a,i):(_(!v),j(v?"Removed from bookmarks":"Added to bookmarks"))},W=()=>l?.(a,i),F=()=>{p?p(a,i):j("Video details coming soon!")};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"p-6 bg-card border-b border-border",children:[t.jsx("h1",{className:"text-xl font-bold text-card-foreground mb-4 line-clamp-2",children:e}),t.jsxs("div",{className:"flex items-start gap-4",children:[t.jsx("button",{onClick:W,className:"flex-shrink-0 group",children:t.jsx("img",{src:`https://images.hive.blog/u/${a}/avatar`,alt:a,className:"w-12 h-12 rounded-full object-cover border-2 border-border group-hover:border-primary transition-all duration-200",onError:q=>{q.target.src=`https://ui-avatars.com/api/?name=${a}&background=random`}})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"flex items-center justify-between mb-4",children:t.jsxs("div",{children:[t.jsxs("button",{onClick:W,className:"font-semibold text-card-foreground hover:text-primary transition-colors text-base",children:["@",a]}),t.jsxs("div",{className:"flex items-center gap-4 mt-1 text-sm text-muted-foreground",children:[r.views&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Eye,{className:"w-4 h-4"}),t.jsxs("span",{children:[r.views.toLocaleString()," views"]})]}),s&&t.jsx("span",{children:ns.formatDistanceToNow(s,{addSuffix:!0})})]})]})}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsxs("button",{type:"button",onClick:F,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200","aria-label":"Show description",children:[t.jsx(z.Info,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:"Info"})]}),t.jsxs("button",{type:"button",onClick:D,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200","aria-label":"Show comments",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:x})]}),t.jsxs("button",{type:"button",onClick:C,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${u?"bg-primary/10 text-primary":"bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary"}`,"aria-label":"Show upvotes",children:[t.jsx(z.ThumbsUp,{className:`w-4 h-4 ${u?"fill-current":""}`}),t.jsx("span",{className:"text-sm font-medium",children:b})]}),t.jsxs("button",{type:"button",onClick:T,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-secondary/10 hover:text-secondary transition-all duration-200","aria-label":"Share video",children:[t.jsx(z.Share2,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:"Share"})]}),t.jsxs("button",{type:"button",onClick:M,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${v?"bg-error/10 text-error":"bg-muted text-muted-foreground hover:bg-error/10 hover:text-error"}`,"aria-label":"Bookmark video",children:[t.jsx(z.Heart,{className:`w-4 h-4 ${v?"fill-current":""}`}),t.jsx("span",{className:"text-sm font-medium",children:v?"Saved":"Save"})]})]}),(r.hiveValue||r.category)&&t.jsxs("div",{className:"flex items-center gap-4 mt-4 pt-4 border-t border-border",children:[r.hiveValue&&r.hiveValue>0&&t.jsx("div",{className:"flex items-center gap-1 text-success font-semibold",children:t.jsxs("span",{children:["$",r.hiveValue.toFixed(2)," earned"]})}),r.category&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Users,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground capitalize",children:r.category})]})]})]})]})]}),k&&t.jsx("div",{className:"fixed bottom-4 right-4 z-50 animate-slide-up",children:t.jsx("div",{className:"bg-card border border-border text-card-foreground rounded-lg px-4 py-3 shadow-lg max-w-sm",children:t.jsx("div",{className:"font-medium",children:m})})})]})},mn=new Map,ss=({feedType:e,username:a,communityId:i,tag:s,onVideoClick:r,onAuthorClick:n})=>{const[u,c]=P.useState([]),[d,f]=P.useState(!0),[o,h]=P.useState(!1),[l,p]=P.useState(null),[x,w]=P.useState(!0),[b,g]=P.useState(0),v=P.useMemo(()=>{switch(e){case Ge.USER:return`user:${a||""}`;case Ge.COMMUNITY:return`community:${i||""}`;case Ge.TAG_FEED:return`tag:${s||""}`;case Ge.SEARCH:return`search:${s||""}`;default:return e}},[e,a,i,s]),_=P.useCallback(async j=>{if(j.author?.username){if(!j.permlink)return null;let A=null;try{typeof j.spkvideo=="string"?A=JSON.parse(j.spkvideo):A=j.spkvideo}catch(T){console.error("Error parsing spkvideo JSON",T)}const D=Br(A?.thumbnail_url)||Br(j.json_metadata?.raw?.video?.info?.thumbnail),C=A?.duration||j.json_metadata?.raw?.video?.info?.duration||0;return{title:j.title||"Untitled",author:j.author.username,permlink:j.permlink,created:new Date(j.created_at),category:j.tags&&j.tags.length>0?j.tags[0]:"general",duration:C,thumbnail:D,numOfUpvotes:j.stats?.num_votes||j.numOfUpvotes,numOfComments:j.stats?.num_comments||j.numOfComments,hiveValue:j.stats?.total_hive_reward||j.hiveValue}}return j.owner?{title:j.title||"Untitled",author:j.owner,permlink:j.permlink||"",created:new Date(j.created||Date.now()),category:j.category||"general",duration:j.duration,thumbnail:Br(j.thumbnail),numOfUpvotes:j.numOfUpvotes,numOfComments:j.numOfComments,hiveValue:j.hiveValue}:null},[]),k=P.useCallback(async(j,A=!1)=>{try{let D=[];switch(e){case Ge.SEARCH:s&&(D=await Ue.getSearchFeed(s,j));break;case Ge.TAG_FEED:s&&(D=await Ue.getTaggedVideos(s,j));break;case Ge.HOME:D=await Ue.getHomeVideos(j);break;case Ge.TRENDING:D=await Ue.getTrendingVideos(j);break;case Ge.NEW_VIDEOS:D=await Ue.getNewVideos(j);break;case Ge.FIRST_UPLOADS:D=await Ue.getFirstUploadsVideos(j);break;case Ge.USER:a&&(D=await Ue.getUserVideos(a,j));break;case Ge.COMMUNITY:i&&(D=await Ue.getCommunityVideos(i,j));break;case Ge.RELATED:a&&(D=await Ue.getRelatedVideos(a,j));break}const T=(await Promise.all(D.map(_))).filter(M=>M!==null);A?(c(T),mn.set(v,T)):c(M=>{const W=[...M,...T];return mn.set(v,W),W}),w(D.length>=20),g(j+D.length),p(null)}catch(D){p(D instanceof Error?D.message:"Failed to load videos")}},[e,a,i,s,v,_]);P.useEffect(()=>{(async()=>{f(!0),c([]),g(0);const A=mn.get(v);A?.length&&(c(A),f(!1)),await k(0,!0),f(!1)})()},[v,k]);const y=P.useCallback(async()=>{o||!x||(h(!0),await k(b),h(!1))},[o,x,b,k]),m=P.useCallback(async()=>{mn.delete(v),f(!0),g(0),await k(0,!0),f(!1)},[v,k]);P.useEffect(()=>{const j=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-1e3&&y()};return window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)},[y]);const N=()=>t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:8}).map((j,A)=>t.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden animate-pulse",children:[t.jsx("div",{className:"aspect-video bg-muted"}),t.jsxs("div",{className:"p-4 space-y-3",children:[t.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-8 h-8 bg-muted rounded-full"}),t.jsx("div",{className:"h-3 bg-muted rounded w-20"})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("div",{className:"h-3 bg-muted rounded w-16"}),t.jsx("div",{className:"h-3 bg-muted rounded w-12"})]})]})]},A))});return d&&u.length===0?t.jsx(N,{}):l&&u.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"Failed to load videos"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:l}),t.jsxs("button",{onClick:m,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):u.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"No videos found"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:"Check back later for new content"}),t.jsxs("button",{onClick:m,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]})}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("h2",{className:"text-2xl font-bold text-card-foreground capitalize",children:[e.replace(/([A-Z])/g," $1").toLowerCase()," Videos"]}),t.jsxs("button",{onClick:m,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-3 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:u.map((j,A)=>t.jsx(kc,{video:j,onVideoClick:r,onAuthorClick:n,isGrid:!0},`${j.author}-${j.permlink}-${A}`))}),x&&t.jsx("div",{className:"flex justify-center pt-8",children:o?t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more videos..."]}):t.jsx("button",{onClick:y,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:"Load More Videos"})})]})};var js={},Sr={},Cr={},gn={exports:{}},fo;function Bd(){if(fo)return gn.exports;fo=1;const e=()=>{const a=Error.prepareStackTrace;Error.prepareStackTrace=(s,r)=>r;const i=new Error().stack.slice(1);return Error.prepareStackTrace=a,i};return gn.exports=e,gn.exports.default=e,gn.exports}var xa={},ho;function Vd(){if(ho)return xa;ho=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.inferLabel=void 0;const e=()=>{};return xa.inferLabel=e,xa}var Es={},bn={exports:{}},po;function ua(){return po||(po=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const i=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function s(m){return i.includes(m)}const r=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...i];function n(m){return r.includes(m)}const u=["null","undefined","string","number","bigint","boolean","symbol"];function c(m){return u.includes(m)}function d(m){return N=>typeof N===m}const{toString:f}=Object.prototype,o=m=>{const N=f.call(m).slice(8,-1);if(/HTML\w+Element/.test(N)&&l.domElement(m))return"HTMLElement";if(n(N))return N},h=m=>N=>o(N)===m;function l(m){if(m===null)return"null";switch(typeof m){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(l.observable(m))return"Observable";if(l.array(m))return"Array";if(l.buffer(m))return"Buffer";const N=o(m);if(N)return N;if(m instanceof String||m instanceof Boolean||m instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}l.undefined=d("undefined"),l.string=d("string");const p=d("number");l.number=m=>p(m)&&!l.nan(m),l.bigint=d("bigint"),l.function_=d("function"),l.null_=m=>m===null,l.class_=m=>l.function_(m)&&m.toString().startsWith("class "),l.boolean=m=>m===!0||m===!1,l.symbol=d("symbol"),l.numericString=m=>l.string(m)&&!l.emptyStringOrWhitespace(m)&&!Number.isNaN(Number(m)),l.array=(m,N)=>Array.isArray(m)?l.function_(N)?m.every(N):!0:!1,l.buffer=m=>{var N,j,A,D;return(D=(A=(j=(N=m)===null||N===void 0?void 0:N.constructor)===null||j===void 0?void 0:j.isBuffer)===null||A===void 0?void 0:A.call(j,m))!==null&&D!==void 0?D:!1},l.blob=m=>h("Blob")(m),l.nullOrUndefined=m=>l.null_(m)||l.undefined(m),l.object=m=>!l.null_(m)&&(typeof m=="object"||l.function_(m)),l.iterable=m=>{var N;return l.function_((N=m)===null||N===void 0?void 0:N[Symbol.iterator])},l.asyncIterable=m=>{var N;return l.function_((N=m)===null||N===void 0?void 0:N[Symbol.asyncIterator])},l.generator=m=>{var N,j;return l.iterable(m)&&l.function_((N=m)===null||N===void 0?void 0:N.next)&&l.function_((j=m)===null||j===void 0?void 0:j.throw)},l.asyncGenerator=m=>l.asyncIterable(m)&&l.function_(m.next)&&l.function_(m.throw),l.nativePromise=m=>h("Promise")(m);const x=m=>{var N,j;return l.function_((N=m)===null||N===void 0?void 0:N.then)&&l.function_((j=m)===null||j===void 0?void 0:j.catch)};l.promise=m=>l.nativePromise(m)||x(m),l.generatorFunction=h("GeneratorFunction"),l.asyncGeneratorFunction=m=>o(m)==="AsyncGeneratorFunction",l.asyncFunction=m=>o(m)==="AsyncFunction",l.boundFunction=m=>l.function_(m)&&!m.hasOwnProperty("prototype"),l.regExp=h("RegExp"),l.date=h("Date"),l.error=h("Error"),l.map=m=>h("Map")(m),l.set=m=>h("Set")(m),l.weakMap=m=>h("WeakMap")(m),l.weakSet=m=>h("WeakSet")(m),l.int8Array=h("Int8Array"),l.uint8Array=h("Uint8Array"),l.uint8ClampedArray=h("Uint8ClampedArray"),l.int16Array=h("Int16Array"),l.uint16Array=h("Uint16Array"),l.int32Array=h("Int32Array"),l.uint32Array=h("Uint32Array"),l.float32Array=h("Float32Array"),l.float64Array=h("Float64Array"),l.bigInt64Array=h("BigInt64Array"),l.bigUint64Array=h("BigUint64Array"),l.arrayBuffer=h("ArrayBuffer"),l.sharedArrayBuffer=h("SharedArrayBuffer"),l.dataView=h("DataView"),l.enumCase=(m,N)=>Object.values(N).includes(m),l.directInstanceOf=(m,N)=>Object.getPrototypeOf(m)===N.prototype,l.urlInstance=m=>h("URL")(m),l.urlString=m=>{if(!l.string(m))return!1;try{return new URL(m),!0}catch{return!1}},l.truthy=m=>!!m,l.falsy=m=>!m,l.nan=m=>Number.isNaN(m),l.primitive=m=>l.null_(m)||c(typeof m),l.integer=m=>Number.isInteger(m),l.safeInteger=m=>Number.isSafeInteger(m),l.plainObject=m=>{if(f.call(m)!=="[object Object]")return!1;const N=Object.getPrototypeOf(m);return N===null||N===Object.getPrototypeOf({})},l.typedArray=m=>s(o(m));const w=m=>l.safeInteger(m)&&m>=0;l.arrayLike=m=>!l.nullOrUndefined(m)&&!l.function_(m)&&w(m.length),l.inRange=(m,N)=>{if(l.number(N))return m>=Math.min(0,N)&&m<=Math.max(N,0);if(l.array(N)&&N.length===2)return m>=Math.min(...N)&&m<=Math.max(...N);throw new TypeError(`Invalid range: ${JSON.stringify(N)}`)};const b=1,g=["innerHTML","ownerDocument","style","attributes","nodeValue"];l.domElement=m=>l.object(m)&&m.nodeType===b&&l.string(m.nodeName)&&!l.plainObject(m)&&g.every(N=>N in m),l.observable=m=>{var N,j,A,D;return m?m===((j=(N=m)[Symbol.observable])===null||j===void 0?void 0:j.call(N))||m===((D=(A=m)["@@observable"])===null||D===void 0?void 0:D.call(A)):!1},l.nodeStream=m=>l.object(m)&&l.function_(m.pipe)&&!l.observable(m),l.infinite=m=>m===1/0||m===-1/0;const v=m=>N=>l.integer(N)&&Math.abs(N%2)===m;l.evenInteger=v(0),l.oddInteger=v(1),l.emptyArray=m=>l.array(m)&&m.length===0,l.nonEmptyArray=m=>l.array(m)&&m.length>0,l.emptyString=m=>l.string(m)&&m.length===0;const _=m=>l.string(m)&&!/\S/.test(m);l.emptyStringOrWhitespace=m=>l.emptyString(m)||_(m),l.nonEmptyString=m=>l.string(m)&&m.length>0,l.nonEmptyStringAndNotWhitespace=m=>l.string(m)&&!l.emptyStringOrWhitespace(m),l.emptyObject=m=>l.object(m)&&!l.map(m)&&!l.set(m)&&Object.keys(m).length===0,l.nonEmptyObject=m=>l.object(m)&&!l.map(m)&&!l.set(m)&&Object.keys(m).length>0,l.emptySet=m=>l.set(m)&&m.size===0,l.nonEmptySet=m=>l.set(m)&&m.size>0,l.emptyMap=m=>l.map(m)&&m.size===0,l.nonEmptyMap=m=>l.map(m)&&m.size>0,l.propertyKey=m=>l.any([l.string,l.number,l.symbol],m),l.formData=m=>h("FormData")(m),l.urlSearchParams=m=>h("URLSearchParams")(m);const k=(m,N,j)=>{if(!l.function_(N))throw new TypeError(`Invalid predicate: ${JSON.stringify(N)}`);if(j.length===0)throw new TypeError("Invalid number of values");return m.call(j,N)};l.any=(m,...N)=>(l.array(m)?m:[m]).some(A=>k(Array.prototype.some,A,N)),l.all=(m,...N)=>k(Array.prototype.every,m,N);const y=(m,N,j,A={})=>{if(!m){const{multipleValues:D}=A,C=D?`received values of types ${[...new Set(j.map(T=>`\`${l(T)}\``))].join(", ")}`:`received value of type \`${l(j)}\``;throw new TypeError(`Expected value which is \`${N}\`, ${C}.`)}};a.assert={undefined:m=>y(l.undefined(m),"undefined",m),string:m=>y(l.string(m),"string",m),number:m=>y(l.number(m),"number",m),bigint:m=>y(l.bigint(m),"bigint",m),function_:m=>y(l.function_(m),"Function",m),null_:m=>y(l.null_(m),"null",m),class_:m=>y(l.class_(m),"Class",m),boolean:m=>y(l.boolean(m),"boolean",m),symbol:m=>y(l.symbol(m),"symbol",m),numericString:m=>y(l.numericString(m),"string with a number",m),array:(m,N)=>{y(l.array(m),"Array",m),N&&m.forEach(N)},buffer:m=>y(l.buffer(m),"Buffer",m),blob:m=>y(l.blob(m),"Blob",m),nullOrUndefined:m=>y(l.nullOrUndefined(m),"null or undefined",m),object:m=>y(l.object(m),"Object",m),iterable:m=>y(l.iterable(m),"Iterable",m),asyncIterable:m=>y(l.asyncIterable(m),"AsyncIterable",m),generator:m=>y(l.generator(m),"Generator",m),asyncGenerator:m=>y(l.asyncGenerator(m),"AsyncGenerator",m),nativePromise:m=>y(l.nativePromise(m),"native Promise",m),promise:m=>y(l.promise(m),"Promise",m),generatorFunction:m=>y(l.generatorFunction(m),"GeneratorFunction",m),asyncGeneratorFunction:m=>y(l.asyncGeneratorFunction(m),"AsyncGeneratorFunction",m),asyncFunction:m=>y(l.asyncFunction(m),"AsyncFunction",m),boundFunction:m=>y(l.boundFunction(m),"Function",m),regExp:m=>y(l.regExp(m),"RegExp",m),date:m=>y(l.date(m),"Date",m),error:m=>y(l.error(m),"Error",m),map:m=>y(l.map(m),"Map",m),set:m=>y(l.set(m),"Set",m),weakMap:m=>y(l.weakMap(m),"WeakMap",m),weakSet:m=>y(l.weakSet(m),"WeakSet",m),int8Array:m=>y(l.int8Array(m),"Int8Array",m),uint8Array:m=>y(l.uint8Array(m),"Uint8Array",m),uint8ClampedArray:m=>y(l.uint8ClampedArray(m),"Uint8ClampedArray",m),int16Array:m=>y(l.int16Array(m),"Int16Array",m),uint16Array:m=>y(l.uint16Array(m),"Uint16Array",m),int32Array:m=>y(l.int32Array(m),"Int32Array",m),uint32Array:m=>y(l.uint32Array(m),"Uint32Array",m),float32Array:m=>y(l.float32Array(m),"Float32Array",m),float64Array:m=>y(l.float64Array(m),"Float64Array",m),bigInt64Array:m=>y(l.bigInt64Array(m),"BigInt64Array",m),bigUint64Array:m=>y(l.bigUint64Array(m),"BigUint64Array",m),arrayBuffer:m=>y(l.arrayBuffer(m),"ArrayBuffer",m),sharedArrayBuffer:m=>y(l.sharedArrayBuffer(m),"SharedArrayBuffer",m),dataView:m=>y(l.dataView(m),"DataView",m),enumCase:(m,N)=>y(l.enumCase(m,N),"EnumCase",m),urlInstance:m=>y(l.urlInstance(m),"URL",m),urlString:m=>y(l.urlString(m),"string with a URL",m),truthy:m=>y(l.truthy(m),"truthy",m),falsy:m=>y(l.falsy(m),"falsy",m),nan:m=>y(l.nan(m),"NaN",m),primitive:m=>y(l.primitive(m),"primitive",m),integer:m=>y(l.integer(m),"integer",m),safeInteger:m=>y(l.safeInteger(m),"integer",m),plainObject:m=>y(l.plainObject(m),"plain object",m),typedArray:m=>y(l.typedArray(m),"TypedArray",m),arrayLike:m=>y(l.arrayLike(m),"array-like",m),domElement:m=>y(l.domElement(m),"HTMLElement",m),observable:m=>y(l.observable(m),"Observable",m),nodeStream:m=>y(l.nodeStream(m),"Node.js Stream",m),infinite:m=>y(l.infinite(m),"infinite number",m),emptyArray:m=>y(l.emptyArray(m),"empty array",m),nonEmptyArray:m=>y(l.nonEmptyArray(m),"non-empty array",m),emptyString:m=>y(l.emptyString(m),"empty string",m),emptyStringOrWhitespace:m=>y(l.emptyStringOrWhitespace(m),"empty string or whitespace",m),nonEmptyString:m=>y(l.nonEmptyString(m),"non-empty string",m),nonEmptyStringAndNotWhitespace:m=>y(l.nonEmptyStringAndNotWhitespace(m),"non-empty string and not whitespace",m),emptyObject:m=>y(l.emptyObject(m),"empty object",m),nonEmptyObject:m=>y(l.nonEmptyObject(m),"non-empty object",m),emptySet:m=>y(l.emptySet(m),"empty set",m),nonEmptySet:m=>y(l.nonEmptySet(m),"non-empty set",m),emptyMap:m=>y(l.emptyMap(m),"empty map",m),nonEmptyMap:m=>y(l.nonEmptyMap(m),"non-empty map",m),propertyKey:m=>y(l.propertyKey(m),"PropertyKey",m),formData:m=>y(l.formData(m),"FormData",m),urlSearchParams:m=>y(l.urlSearchParams(m),"URLSearchParams",m),evenInteger:m=>y(l.evenInteger(m),"even integer",m),oddInteger:m=>y(l.oddInteger(m),"odd integer",m),directInstanceOf:(m,N)=>y(l.directInstanceOf(m,N),"T",m),inRange:(m,N)=>y(l.inRange(m,N),"in range",m),any:(m,...N)=>y(l.any(m,...N),"predicate returns truthy for any value",N,{multipleValues:!0}),all:(m,...N)=>y(l.all(m,...N),"predicate returns truthy for all values",N,{multipleValues:!0})},Object.defineProperties(l,{class:{value:l.class_},function:{value:l.function_},null:{value:l.null_}}),Object.defineProperties(a.assert,{class:{value:a.assert.class_},function:{value:a.assert.function_},null:{value:a.assert.null_}}),a.default=l,e.exports=l,e.exports.default=l,e.exports.assert=a.assert})(bn,bn.exports)),bn.exports}var ya={},va={},mo;function Ud(){if(mo)return va;mo=1,Object.defineProperty(va,"__esModule",{value:!0}),va.generateStackTrace=void 0;const e=()=>new RangeError("INTERNAL_OW_ERROR").stack;return va.generateStackTrace=e,va}var go;function Bi(){if(go)return ya;go=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.ArgumentError=void 0;const e=Ud(),a=(s,r)=>`${s.name}: ${s.message}
80
+ `;try{const s=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:i,operationName:"TrendingTags"})});if(!s.ok)throw new Error(`GraphQL request failed: ${s.statusText}`);const r=await s.json();if(r.errors)throw new Error(`GraphQL error: ${r.errors.map(n=>n.message).join(", ")}`);return r.data?.trendingTags?.tags||[]}catch(s){throw console.error("Failed to fetch trending tags:",s),s}}convertGQLItemsToThreeSpeakVideos(a){return a.map(i=>{let s=null;try{typeof i.spkvideo=="string"?s=JSON.parse(i.spkvideo):s=i.spkvideo}catch(r){console.error("Error parsing spkvideo JSON",r)}return{title:i.title||"Untitled",owner:i.author?.username||"",permlink:i.permlink||"",created:new Date(i.created_at),category:i.tags&&i.tags.length>0?i.tags[0]:"general",duration:s?.duration||i.json_metadata?.raw?.video?.info?.duration||0,thumbnail:s?.thumbnail_url||i.json_metadata?.raw?.video?.info?.thumbnail,numOfUpvotes:i.stats?.num_votes,numOfComments:i.stats?.num_comments,hiveValue:i.stats?.total_hive_reward,active_votes:i.stats?.active_voters?.map(r=>({voter:r.voter,percent:r.percent,rshares:r.rshares,weight:r.weight}))||[]}})}async getContentStats(a,i){try{const s=await ba.call("condenser_api","get_content",[a,i]);return{numOfUpvotes:s?.net_votes??0,numOfComments:s?.children??0,hiveValue:s?.pending_payout_value?parseFloat(s.pending_payout_value):0}}catch{return{numOfUpvotes:0,numOfComments:0,hiveValue:0}}}async getActiveVotes(a,i){try{return await ba.call("condenser_api","get_active_votes",[a,i])}catch(s){return console.error("Error calling get_active_votes:",s),[]}}async getCommentsList(a,i){try{const s=await ba.call("bridge","get_discussion",[a,i]);return(Array.isArray(s)?s:s&&typeof s=="object"?Object.values(s):[]).map(n=>{const u=n.depth;if(typeof u=="string"){const d=parseInt(u,10);n.depth=Number.isFinite(d)?d:0}else(typeof u!="number"||!Number.isFinite(u))&&(n.depth=n.depth??0);const c=n.json_metadata;try{if(c&&typeof c=="string"){const d=c.trim();(d.startsWith("{")&&d.endsWith("}")||d.startsWith("[")&&d.endsWith("]"))&&(n.json_metadata_parsed=JSON.parse(d))}else c&&typeof c=="object"&&(n.json_metadata_parsed=c)}catch{console.warn(`Skipped invalid json_metadata for ${n.author}/${n.permlink}`)}return n})}catch(s){return console.error("Error fetching comments list:",s),[]}}async getMyVideos(a){const i=`${sr.domain}/mobile/api/my-videos`,s=await fetch(i,{method:"GET",headers:{"Content-Type":"application/json",Authorization:a}});if(s.ok){const r=await s.json();return Array.isArray(r)?r:[]}else throw console.error("Failed to fetch my videos:",s.statusText),new Error(`Failed to fetch my videos: ${s.status}`)}async getRankedPosts(a="trending",i="",s="hive.blog",r=20,n,u){try{const c={sort:a,tag:i,observer:s,limit:r};return n&&u&&(c.start_author=n,c.start_permlink=u),await ba.call("bridge","get_ranked_posts",c)}catch(c){return console.error("Error fetching ranked posts:",c),[]}}async getPostContent(a,i){try{return await ba.call("condenser_api","get_content",[a,i])}catch(s){return console.error("Error fetching post content:",s),null}}}const Ue=new qd,Br=e=>e?e.startsWith("Qm")||e.startsWith("baf")?`https://ipfs-3speak.b-cdn.net/ipfs/${e}`:e.startsWith("http")?e:e.startsWith("/")?`https://3speak.tv${e}`:e:"/placeholder.svg",kc=({video:e,onVideoClick:a,onAuthorClick:i,isGrid:s=!1})=>{const[r,n]=P.useState({numOfUpvotes:e.numOfUpvotes,numOfComments:e.numOfComments,hiveValue:e.hiveValue});P.useEffect(()=>{if(r.numOfUpvotes===void 0&&e.numOfUpvotes===void 0){let d=!0;return(async()=>{try{const f=await Ue.getContentStats(e.author||"",e.permlink||"");d&&n(f)}catch(f){console.error("Error fetching content stats for VideoCard:",f)}})(),()=>{d=!1}}else e.numOfUpvotes!==void 0&&n({numOfUpvotes:e.numOfUpvotes,numOfComments:e.numOfComments||0,hiveValue:e.hiveValue||0})},[e.author,e.permlink,r.numOfUpvotes,e.numOfUpvotes,e.numOfComments,e.hiveValue]);const u=d=>{if(!d)return"00:00";const f=Math.floor(d),o=Math.floor(f/3600),h=Math.floor(f%3600/60),l=f%60,p=x=>x.toString().padStart(2,"0");return f<60?`00:${p(l)}`:o===0?`${p(h)}:${p(l)}`:`${p(o)}:${p(h)}:${p(l)}`},c=d=>d==null?"":d>=1e6?`${(d/1e6).toFixed(1)}M`:d>=1e3?`${(d/1e3).toFixed(1)}K`:d.toString();return t.jsxs("div",{className:"group bg-card border border-border rounded-xl overflow-hidden shadow-card hover:shadow-card-hover transition-all duration-200 hover:-translate-y-1 cursor-pointer",children:[t.jsxs("div",{className:"relative aspect-video bg-muted overflow-hidden",onClick:()=>a(e),children:[t.jsx("img",{src:Br(e.thumbnail),alt:e.title,onError:d=>{d.target.src=`https://images.hive.blog/u/${e.author}/avatar`},className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),e.duration&&t.jsxs("div",{className:"absolute bottom-3 right-3 bg-black/80 text-white text-xs px-2 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[t.jsx(z.Clock,{className:"w-3 h-3"}),u(e.duration)]}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-all duration-300 bg-black/20",children:t.jsx("div",{className:"bg-primary hover:bg-primary-hover rounded-full p-4 transform scale-75 group-hover:scale-100 transition-all duration-300 shadow-lg",children:t.jsx(z.Play,{className:"w-6 h-6 text-primary-foreground ml-0.5",fill:"currentColor"})})}),t.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-0 group-hover:opacity-30 transition-opacity duration-300"})]}),t.jsxs("div",{className:"p-4 space-y-3",children:[t.jsx("h3",{className:"font-semibold text-card-foreground line-clamp-2 group-hover:text-primary transition-colors cursor-pointer leading-tight",onClick:()=>a(e),children:e.title}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2 cursor-pointer hover:text-primary transition-colors group/author",onClick:()=>i(e.author),children:[t.jsx("img",{src:`https://images.hive.blog/u/${e.author}/avatar`,alt:e.author,className:"w-8 h-8 rounded-full object-cover border-2 border-border group-hover/author:border-primary transition-colors",onError:d=>{d.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("span",{className:"font-medium text-sm text-muted-foreground group-hover/author:text-primary transition-colors",children:["@",e.author]})]}),t.jsx("span",{className:"text-xs text-muted-foreground",children:ns.formatDistanceToNow(e.created,{addSuffix:!0})})]}),t.jsxs("div",{className:"flex items-center justify-between text-sm",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[r.numOfUpvotes!=null&&t.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[t.jsx(z.ThumbsUp,{className:"w-4 h-4"}),t.jsx("span",{children:c(r.numOfUpvotes)})]}),r.numOfComments!=null&&t.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground hover:text-primary transition-colors cursor-pointer",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4"}),t.jsx("span",{children:c(r.numOfComments)})]})]}),r.hiveValue!=null&&r.hiveValue>0&&t.jsxs("div",{className:"text-primary font-semibold",children:["$",r.hiveValue.toFixed(2)]})]}),e.category&&t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"inline-block bg-primary/10 text-primary text-xs px-2 py-1 rounded-full font-medium",children:e.category})})]})]})};var Ge=(e=>(e.HOME="home",e.TRENDING="trending",e.NEW_VIDEOS="newVideos",e.FIRST_UPLOADS="firstUploads",e.USER="user",e.COMMUNITY="community",e.RELATED="related",e.TAG_FEED="tag_feed",e.SEARCH="search",e))(Ge||{});const co=new Map,Nc=({title:e,author:a,permlink:i,createdAt:s,video:r,currentUser:n,isContentVoted:u=!1,description:c,onTapComment:d,onTapUpvote:f,onTapShare:o,onTapBookmark:h,onTapAuthor:l,onTapInfo:p})=>{const[x,w]=P.useState(r.numOfComments||0),[b,g]=P.useState(r.numOfUpvotes||0),[v,k]=P.useState(!1),[_,y]=P.useState(!1),[m,N]=P.useState(""),j=q=>{N(q),y(!0),setTimeout(()=>y(!1),3e3)},A=(q,M)=>`${q}:${M}`;P.useEffect(()=>{const q=A(a,i),M=co.get(q);M?(w(M.comments),g(M.upvotes)):(async()=>{const X=await Ue.getContentStats(a,i);g(X.numOfUpvotes),w(X.numOfComments),co.set(A(a,i),{comments:X.numOfComments,upvotes:X.numOfUpvotes})})()},[a,i]);const D=()=>{d?d(a,i):j("Comments feature coming soon!")},C=()=>{f?f(a,i):j("Upvote feature requires authentication!")},O=()=>{if(o)o(a,i);else{const q=`https://3speak.tv/user/${a}/${i}`;navigator.share?navigator.share({title:e,url:q}):(navigator.clipboard.writeText(q),j("Link copied to clipboard!"))}},$=()=>{h?h(a,i):(k(!v),j(v?"Removed from bookmarks":"Added to bookmarks"))},H=()=>l?.(a,i),F=()=>{p?p(a,i):j("Video details coming soon!")};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"p-6 bg-card border-b border-border",children:[t.jsx("h1",{className:"text-xl font-bold text-card-foreground mb-4 line-clamp-2",children:e}),t.jsxs("div",{className:"flex items-start gap-4",children:[t.jsx("button",{onClick:H,className:"flex-shrink-0 group",children:t.jsx("img",{src:`https://images.hive.blog/u/${a}/avatar`,alt:a,className:"w-12 h-12 rounded-full object-cover border-2 border-border group-hover:border-primary transition-all duration-200",onError:q=>{q.target.src=`https://ui-avatars.com/api/?name=${a}&background=random`}})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"flex items-center justify-between mb-4",children:t.jsxs("div",{children:[t.jsxs("button",{onClick:H,className:"font-semibold text-card-foreground hover:text-primary transition-colors text-base",children:["@",a]}),t.jsxs("div",{className:"flex items-center gap-4 mt-1 text-sm text-muted-foreground",children:[r.views&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Eye,{className:"w-4 h-4"}),t.jsxs("span",{children:[r.views.toLocaleString()," views"]})]}),s&&t.jsx("span",{children:ns.formatDistanceToNow(s,{addSuffix:!0})})]})]})}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsxs("button",{type:"button",onClick:F,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200","aria-label":"Show description",children:[t.jsx(z.Info,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:"Info"})]}),t.jsxs("button",{type:"button",onClick:D,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary transition-all duration-200","aria-label":"Show comments",children:[t.jsx(z.MessageCircle,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:x})]}),t.jsxs("button",{type:"button",onClick:C,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${u?"bg-primary/10 text-primary":"bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary"}`,"aria-label":"Show upvotes",children:[t.jsx(z.ThumbsUp,{className:`w-4 h-4 ${u?"fill-current":""}`}),t.jsx("span",{className:"text-sm font-medium",children:b})]}),t.jsxs("button",{type:"button",onClick:O,className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-muted text-muted-foreground hover:bg-secondary/10 hover:text-secondary transition-all duration-200","aria-label":"Share video",children:[t.jsx(z.Share2,{className:"w-4 h-4"}),t.jsx("span",{className:"text-sm font-medium",children:"Share"})]}),t.jsxs("button",{type:"button",onClick:$,className:`inline-flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200 ${v?"bg-error/10 text-error":"bg-muted text-muted-foreground hover:bg-error/10 hover:text-error"}`,"aria-label":"Bookmark video",children:[t.jsx(z.Heart,{className:`w-4 h-4 ${v?"fill-current":""}`}),t.jsx("span",{className:"text-sm font-medium",children:v?"Saved":"Save"})]})]}),(r.hiveValue||r.category)&&t.jsxs("div",{className:"flex items-center gap-4 mt-4 pt-4 border-t border-border",children:[r.hiveValue&&r.hiveValue>0&&t.jsx("div",{className:"flex items-center gap-1 text-success font-semibold",children:t.jsxs("span",{children:["$",r.hiveValue.toFixed(2)," earned"]})}),r.category&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Users,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground capitalize",children:r.category})]})]})]})]})]}),_&&t.jsx("div",{className:"fixed bottom-4 right-4 z-50 animate-slide-up",children:t.jsx("div",{className:"bg-card border border-border text-card-foreground rounded-lg px-4 py-3 shadow-lg max-w-sm",children:t.jsx("div",{className:"font-medium",children:m})})})]})},mn=new Map,ss=({feedType:e,username:a,communityId:i,tag:s,onVideoClick:r,onAuthorClick:n})=>{const[u,c]=P.useState([]),[d,f]=P.useState(!0),[o,h]=P.useState(!1),[l,p]=P.useState(null),[x,w]=P.useState(!0),[b,g]=P.useState(0),v=P.useMemo(()=>{switch(e){case Ge.USER:return`user:${a||""}`;case Ge.COMMUNITY:return`community:${i||""}`;case Ge.TAG_FEED:return`tag:${s||""}`;case Ge.SEARCH:return`search:${s||""}`;default:return e}},[e,a,i,s]),k=P.useCallback(async j=>{if(j.author?.username){if(!j.permlink)return null;let A=null;try{typeof j.spkvideo=="string"?A=JSON.parse(j.spkvideo):A=j.spkvideo}catch(O){console.error("Error parsing spkvideo JSON",O)}const D=Br(A?.thumbnail_url)||Br(j.json_metadata?.raw?.video?.info?.thumbnail),C=A?.duration||j.json_metadata?.raw?.video?.info?.duration||0;return{title:j.title||"Untitled",author:j.author.username,permlink:j.permlink,created:new Date(j.created_at),category:j.tags&&j.tags.length>0?j.tags[0]:"general",duration:C,thumbnail:D,numOfUpvotes:j.stats?.num_votes||j.numOfUpvotes,numOfComments:j.stats?.num_comments||j.numOfComments,hiveValue:j.stats?.total_hive_reward||j.hiveValue}}return j.owner?{title:j.title||"Untitled",author:j.owner,permlink:j.permlink||"",created:new Date(j.created||Date.now()),category:j.category||"general",duration:j.duration,thumbnail:Br(j.thumbnail),numOfUpvotes:j.numOfUpvotes,numOfComments:j.numOfComments,hiveValue:j.hiveValue}:null},[]),_=P.useCallback(async(j,A=!1)=>{try{let D=[];switch(e){case Ge.SEARCH:s&&(D=await Ue.getSearchFeed(s,j));break;case Ge.TAG_FEED:s&&(D=await Ue.getTaggedVideos(s,j));break;case Ge.HOME:D=await Ue.getHomeVideos(j);break;case Ge.TRENDING:D=await Ue.getTrendingVideos(j);break;case Ge.NEW_VIDEOS:D=await Ue.getNewVideos(j);break;case Ge.FIRST_UPLOADS:D=await Ue.getFirstUploadsVideos(j);break;case Ge.USER:a&&(D=await Ue.getUserVideos(a,j));break;case Ge.COMMUNITY:i&&(D=await Ue.getCommunityVideos(i,j));break;case Ge.RELATED:a&&(D=await Ue.getRelatedVideos(a,j));break}const O=(await Promise.all(D.map(k))).filter($=>$!==null);A?(c(O),mn.set(v,O)):c($=>{const H=[...$,...O];return mn.set(v,H),H}),w(D.length>=20),g(j+D.length),p(null)}catch(D){p(D instanceof Error?D.message:"Failed to load videos")}},[e,a,i,s,v,k]);P.useEffect(()=>{(async()=>{f(!0),c([]),g(0);const A=mn.get(v);A?.length&&(c(A),f(!1)),await _(0,!0),f(!1)})()},[v,_]);const y=P.useCallback(async()=>{o||!x||(h(!0),await _(b),h(!1))},[o,x,b,_]),m=P.useCallback(async()=>{mn.delete(v),f(!0),g(0),await _(0,!0),f(!1)},[v,_]);P.useEffect(()=>{const j=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-1e3&&y()};return window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)},[y]);const N=()=>t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:8}).map((j,A)=>t.jsxs("div",{className:"bg-card border border-border rounded-xl overflow-hidden animate-pulse",children:[t.jsx("div",{className:"aspect-video bg-muted"}),t.jsxs("div",{className:"p-4 space-y-3",children:[t.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-8 h-8 bg-muted rounded-full"}),t.jsx("div",{className:"h-3 bg-muted rounded w-20"})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("div",{className:"h-3 bg-muted rounded w-16"}),t.jsx("div",{className:"h-3 bg-muted rounded w-12"})]})]})]},A))});return d&&u.length===0?t.jsx(N,{}):l&&u.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"Failed to load videos"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:l}),t.jsxs("button",{onClick:m,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):u.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground mb-2",children:"No videos found"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:"Check back later for new content"}),t.jsxs("button",{onClick:m,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]})}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("h2",{className:"text-2xl font-bold text-card-foreground capitalize",children:[e.replace(/([A-Z])/g," $1").toLowerCase()," Videos"]}),t.jsxs("button",{onClick:m,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-3 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Refresh"]})]}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:u.map((j,A)=>t.jsx(kc,{video:j,onVideoClick:r,onAuthorClick:n,isGrid:!0},`${j.author}-${j.permlink}-${A}`))}),x&&t.jsx("div",{className:"flex justify-center pt-8",children:o?t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more videos..."]}):t.jsx("button",{onClick:y,className:"inline-flex items-center justify-center rounded-md border border-border bg-card px-4 py-2 text-sm font-medium text-card-foreground shadow-sm transition-colors hover:bg-card-hover focus:outline-none focus:ring-2 focus:ring-primary",children:"Load More Videos"})})]})};var js={},Sr={},Cr={},gn={exports:{}},fo;function Bd(){if(fo)return gn.exports;fo=1;const e=()=>{const a=Error.prepareStackTrace;Error.prepareStackTrace=(s,r)=>r;const i=new Error().stack.slice(1);return Error.prepareStackTrace=a,i};return gn.exports=e,gn.exports.default=e,gn.exports}var xa={},ho;function Vd(){if(ho)return xa;ho=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.inferLabel=void 0;const e=()=>{};return xa.inferLabel=e,xa}var Es={},bn={exports:{}},po;function ua(){return po||(po=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const i=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function s(m){return i.includes(m)}const r=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...i];function n(m){return r.includes(m)}const u=["null","undefined","string","number","bigint","boolean","symbol"];function c(m){return u.includes(m)}function d(m){return N=>typeof N===m}const{toString:f}=Object.prototype,o=m=>{const N=f.call(m).slice(8,-1);if(/HTML\w+Element/.test(N)&&l.domElement(m))return"HTMLElement";if(n(N))return N},h=m=>N=>o(N)===m;function l(m){if(m===null)return"null";switch(typeof m){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(l.observable(m))return"Observable";if(l.array(m))return"Array";if(l.buffer(m))return"Buffer";const N=o(m);if(N)return N;if(m instanceof String||m instanceof Boolean||m instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}l.undefined=d("undefined"),l.string=d("string");const p=d("number");l.number=m=>p(m)&&!l.nan(m),l.bigint=d("bigint"),l.function_=d("function"),l.null_=m=>m===null,l.class_=m=>l.function_(m)&&m.toString().startsWith("class "),l.boolean=m=>m===!0||m===!1,l.symbol=d("symbol"),l.numericString=m=>l.string(m)&&!l.emptyStringOrWhitespace(m)&&!Number.isNaN(Number(m)),l.array=(m,N)=>Array.isArray(m)?l.function_(N)?m.every(N):!0:!1,l.buffer=m=>{var N,j,A,D;return(D=(A=(j=(N=m)===null||N===void 0?void 0:N.constructor)===null||j===void 0?void 0:j.isBuffer)===null||A===void 0?void 0:A.call(j,m))!==null&&D!==void 0?D:!1},l.blob=m=>h("Blob")(m),l.nullOrUndefined=m=>l.null_(m)||l.undefined(m),l.object=m=>!l.null_(m)&&(typeof m=="object"||l.function_(m)),l.iterable=m=>{var N;return l.function_((N=m)===null||N===void 0?void 0:N[Symbol.iterator])},l.asyncIterable=m=>{var N;return l.function_((N=m)===null||N===void 0?void 0:N[Symbol.asyncIterator])},l.generator=m=>{var N,j;return l.iterable(m)&&l.function_((N=m)===null||N===void 0?void 0:N.next)&&l.function_((j=m)===null||j===void 0?void 0:j.throw)},l.asyncGenerator=m=>l.asyncIterable(m)&&l.function_(m.next)&&l.function_(m.throw),l.nativePromise=m=>h("Promise")(m);const x=m=>{var N,j;return l.function_((N=m)===null||N===void 0?void 0:N.then)&&l.function_((j=m)===null||j===void 0?void 0:j.catch)};l.promise=m=>l.nativePromise(m)||x(m),l.generatorFunction=h("GeneratorFunction"),l.asyncGeneratorFunction=m=>o(m)==="AsyncGeneratorFunction",l.asyncFunction=m=>o(m)==="AsyncFunction",l.boundFunction=m=>l.function_(m)&&!m.hasOwnProperty("prototype"),l.regExp=h("RegExp"),l.date=h("Date"),l.error=h("Error"),l.map=m=>h("Map")(m),l.set=m=>h("Set")(m),l.weakMap=m=>h("WeakMap")(m),l.weakSet=m=>h("WeakSet")(m),l.int8Array=h("Int8Array"),l.uint8Array=h("Uint8Array"),l.uint8ClampedArray=h("Uint8ClampedArray"),l.int16Array=h("Int16Array"),l.uint16Array=h("Uint16Array"),l.int32Array=h("Int32Array"),l.uint32Array=h("Uint32Array"),l.float32Array=h("Float32Array"),l.float64Array=h("Float64Array"),l.bigInt64Array=h("BigInt64Array"),l.bigUint64Array=h("BigUint64Array"),l.arrayBuffer=h("ArrayBuffer"),l.sharedArrayBuffer=h("SharedArrayBuffer"),l.dataView=h("DataView"),l.enumCase=(m,N)=>Object.values(N).includes(m),l.directInstanceOf=(m,N)=>Object.getPrototypeOf(m)===N.prototype,l.urlInstance=m=>h("URL")(m),l.urlString=m=>{if(!l.string(m))return!1;try{return new URL(m),!0}catch{return!1}},l.truthy=m=>!!m,l.falsy=m=>!m,l.nan=m=>Number.isNaN(m),l.primitive=m=>l.null_(m)||c(typeof m),l.integer=m=>Number.isInteger(m),l.safeInteger=m=>Number.isSafeInteger(m),l.plainObject=m=>{if(f.call(m)!=="[object Object]")return!1;const N=Object.getPrototypeOf(m);return N===null||N===Object.getPrototypeOf({})},l.typedArray=m=>s(o(m));const w=m=>l.safeInteger(m)&&m>=0;l.arrayLike=m=>!l.nullOrUndefined(m)&&!l.function_(m)&&w(m.length),l.inRange=(m,N)=>{if(l.number(N))return m>=Math.min(0,N)&&m<=Math.max(N,0);if(l.array(N)&&N.length===2)return m>=Math.min(...N)&&m<=Math.max(...N);throw new TypeError(`Invalid range: ${JSON.stringify(N)}`)};const b=1,g=["innerHTML","ownerDocument","style","attributes","nodeValue"];l.domElement=m=>l.object(m)&&m.nodeType===b&&l.string(m.nodeName)&&!l.plainObject(m)&&g.every(N=>N in m),l.observable=m=>{var N,j,A,D;return m?m===((j=(N=m)[Symbol.observable])===null||j===void 0?void 0:j.call(N))||m===((D=(A=m)["@@observable"])===null||D===void 0?void 0:D.call(A)):!1},l.nodeStream=m=>l.object(m)&&l.function_(m.pipe)&&!l.observable(m),l.infinite=m=>m===1/0||m===-1/0;const v=m=>N=>l.integer(N)&&Math.abs(N%2)===m;l.evenInteger=v(0),l.oddInteger=v(1),l.emptyArray=m=>l.array(m)&&m.length===0,l.nonEmptyArray=m=>l.array(m)&&m.length>0,l.emptyString=m=>l.string(m)&&m.length===0;const k=m=>l.string(m)&&!/\S/.test(m);l.emptyStringOrWhitespace=m=>l.emptyString(m)||k(m),l.nonEmptyString=m=>l.string(m)&&m.length>0,l.nonEmptyStringAndNotWhitespace=m=>l.string(m)&&!l.emptyStringOrWhitespace(m),l.emptyObject=m=>l.object(m)&&!l.map(m)&&!l.set(m)&&Object.keys(m).length===0,l.nonEmptyObject=m=>l.object(m)&&!l.map(m)&&!l.set(m)&&Object.keys(m).length>0,l.emptySet=m=>l.set(m)&&m.size===0,l.nonEmptySet=m=>l.set(m)&&m.size>0,l.emptyMap=m=>l.map(m)&&m.size===0,l.nonEmptyMap=m=>l.map(m)&&m.size>0,l.propertyKey=m=>l.any([l.string,l.number,l.symbol],m),l.formData=m=>h("FormData")(m),l.urlSearchParams=m=>h("URLSearchParams")(m);const _=(m,N,j)=>{if(!l.function_(N))throw new TypeError(`Invalid predicate: ${JSON.stringify(N)}`);if(j.length===0)throw new TypeError("Invalid number of values");return m.call(j,N)};l.any=(m,...N)=>(l.array(m)?m:[m]).some(A=>_(Array.prototype.some,A,N)),l.all=(m,...N)=>_(Array.prototype.every,m,N);const y=(m,N,j,A={})=>{if(!m){const{multipleValues:D}=A,C=D?`received values of types ${[...new Set(j.map(O=>`\`${l(O)}\``))].join(", ")}`:`received value of type \`${l(j)}\``;throw new TypeError(`Expected value which is \`${N}\`, ${C}.`)}};a.assert={undefined:m=>y(l.undefined(m),"undefined",m),string:m=>y(l.string(m),"string",m),number:m=>y(l.number(m),"number",m),bigint:m=>y(l.bigint(m),"bigint",m),function_:m=>y(l.function_(m),"Function",m),null_:m=>y(l.null_(m),"null",m),class_:m=>y(l.class_(m),"Class",m),boolean:m=>y(l.boolean(m),"boolean",m),symbol:m=>y(l.symbol(m),"symbol",m),numericString:m=>y(l.numericString(m),"string with a number",m),array:(m,N)=>{y(l.array(m),"Array",m),N&&m.forEach(N)},buffer:m=>y(l.buffer(m),"Buffer",m),blob:m=>y(l.blob(m),"Blob",m),nullOrUndefined:m=>y(l.nullOrUndefined(m),"null or undefined",m),object:m=>y(l.object(m),"Object",m),iterable:m=>y(l.iterable(m),"Iterable",m),asyncIterable:m=>y(l.asyncIterable(m),"AsyncIterable",m),generator:m=>y(l.generator(m),"Generator",m),asyncGenerator:m=>y(l.asyncGenerator(m),"AsyncGenerator",m),nativePromise:m=>y(l.nativePromise(m),"native Promise",m),promise:m=>y(l.promise(m),"Promise",m),generatorFunction:m=>y(l.generatorFunction(m),"GeneratorFunction",m),asyncGeneratorFunction:m=>y(l.asyncGeneratorFunction(m),"AsyncGeneratorFunction",m),asyncFunction:m=>y(l.asyncFunction(m),"AsyncFunction",m),boundFunction:m=>y(l.boundFunction(m),"Function",m),regExp:m=>y(l.regExp(m),"RegExp",m),date:m=>y(l.date(m),"Date",m),error:m=>y(l.error(m),"Error",m),map:m=>y(l.map(m),"Map",m),set:m=>y(l.set(m),"Set",m),weakMap:m=>y(l.weakMap(m),"WeakMap",m),weakSet:m=>y(l.weakSet(m),"WeakSet",m),int8Array:m=>y(l.int8Array(m),"Int8Array",m),uint8Array:m=>y(l.uint8Array(m),"Uint8Array",m),uint8ClampedArray:m=>y(l.uint8ClampedArray(m),"Uint8ClampedArray",m),int16Array:m=>y(l.int16Array(m),"Int16Array",m),uint16Array:m=>y(l.uint16Array(m),"Uint16Array",m),int32Array:m=>y(l.int32Array(m),"Int32Array",m),uint32Array:m=>y(l.uint32Array(m),"Uint32Array",m),float32Array:m=>y(l.float32Array(m),"Float32Array",m),float64Array:m=>y(l.float64Array(m),"Float64Array",m),bigInt64Array:m=>y(l.bigInt64Array(m),"BigInt64Array",m),bigUint64Array:m=>y(l.bigUint64Array(m),"BigUint64Array",m),arrayBuffer:m=>y(l.arrayBuffer(m),"ArrayBuffer",m),sharedArrayBuffer:m=>y(l.sharedArrayBuffer(m),"SharedArrayBuffer",m),dataView:m=>y(l.dataView(m),"DataView",m),enumCase:(m,N)=>y(l.enumCase(m,N),"EnumCase",m),urlInstance:m=>y(l.urlInstance(m),"URL",m),urlString:m=>y(l.urlString(m),"string with a URL",m),truthy:m=>y(l.truthy(m),"truthy",m),falsy:m=>y(l.falsy(m),"falsy",m),nan:m=>y(l.nan(m),"NaN",m),primitive:m=>y(l.primitive(m),"primitive",m),integer:m=>y(l.integer(m),"integer",m),safeInteger:m=>y(l.safeInteger(m),"integer",m),plainObject:m=>y(l.plainObject(m),"plain object",m),typedArray:m=>y(l.typedArray(m),"TypedArray",m),arrayLike:m=>y(l.arrayLike(m),"array-like",m),domElement:m=>y(l.domElement(m),"HTMLElement",m),observable:m=>y(l.observable(m),"Observable",m),nodeStream:m=>y(l.nodeStream(m),"Node.js Stream",m),infinite:m=>y(l.infinite(m),"infinite number",m),emptyArray:m=>y(l.emptyArray(m),"empty array",m),nonEmptyArray:m=>y(l.nonEmptyArray(m),"non-empty array",m),emptyString:m=>y(l.emptyString(m),"empty string",m),emptyStringOrWhitespace:m=>y(l.emptyStringOrWhitespace(m),"empty string or whitespace",m),nonEmptyString:m=>y(l.nonEmptyString(m),"non-empty string",m),nonEmptyStringAndNotWhitespace:m=>y(l.nonEmptyStringAndNotWhitespace(m),"non-empty string and not whitespace",m),emptyObject:m=>y(l.emptyObject(m),"empty object",m),nonEmptyObject:m=>y(l.nonEmptyObject(m),"non-empty object",m),emptySet:m=>y(l.emptySet(m),"empty set",m),nonEmptySet:m=>y(l.nonEmptySet(m),"non-empty set",m),emptyMap:m=>y(l.emptyMap(m),"empty map",m),nonEmptyMap:m=>y(l.nonEmptyMap(m),"non-empty map",m),propertyKey:m=>y(l.propertyKey(m),"PropertyKey",m),formData:m=>y(l.formData(m),"FormData",m),urlSearchParams:m=>y(l.urlSearchParams(m),"URLSearchParams",m),evenInteger:m=>y(l.evenInteger(m),"even integer",m),oddInteger:m=>y(l.oddInteger(m),"odd integer",m),directInstanceOf:(m,N)=>y(l.directInstanceOf(m,N),"T",m),inRange:(m,N)=>y(l.inRange(m,N),"in range",m),any:(m,...N)=>y(l.any(m,...N),"predicate returns truthy for any value",N,{multipleValues:!0}),all:(m,...N)=>y(l.all(m,...N),"predicate returns truthy for all values",N,{multipleValues:!0})},Object.defineProperties(l,{class:{value:l.class_},function:{value:l.function_},null:{value:l.null_}}),Object.defineProperties(a.assert,{class:{value:a.assert.class_},function:{value:a.assert.function_},null:{value:a.assert.null_}}),a.default=l,e.exports=l,e.exports.default=l,e.exports.assert=a.assert})(bn,bn.exports)),bn.exports}var ya={},va={},mo;function Ud(){if(mo)return va;mo=1,Object.defineProperty(va,"__esModule",{value:!0}),va.generateStackTrace=void 0;const e=()=>new RangeError("INTERNAL_OW_ERROR").stack;return va.generateStackTrace=e,va}var go;function Bi(){if(go)return ya;go=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.ArgumentError=void 0;const e=Ud(),a=(s,r)=>`${s.name}: ${s.message}
81
81
  ${r}`;class i extends Error{constructor(r,n,u=new Map){super(r),Object.defineProperty(this,"validationErrors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="ArgumentError",Error.captureStackTrace?Error.captureStackTrace(this,n):this.stack=a(this,(0,e.generateStackTrace)()),this.validationErrors=u}}return ya.ArgumentError=i,ya}var wa={},xn={},bo;function zd(){return bo||(bo=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.default=()=>Math.random().toString(16).slice(2)),xn}var xo;function Hd(){if(xo)return wa;xo=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.not=void 0;const e=zd(),a=Je(),i=s=>{const r=s.addValidator;return s.addValidator=n=>{const{validator:u,message:c,negatedMessage:d}=n,f=(0,e.default)();return n.message=(o,h)=>d?d(o,h):c(o,f).replace(/ to /,"$&not ").replace(f,h),n.validator=o=>!u(o),s[a.validatorSymbol].push(n),s.addValidator=r,s},s};return wa.not=i,wa}var As={},yo;function en(){return yo||(yo=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isPredicate=e.testSymbol=void 0,e.testSymbol=Symbol("test");const a=i=>!!i[e.testSymbol];e.isPredicate=a})(As)),As}var _a={},vo;function jc(){if(vo)return _a;vo=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.generateArgumentErrorMessage=void 0;const e=(a,i=!1)=>{const s=[],r=[...a.entries()],n=r.some(([,u])=>u.size!==1);if(r.length===1){const[,u]=r[0];if(!i&&u.size===1){const[c]=u;return c}for(const c of u)s.push(`${i?" - ":""}${c}`);return s.join(`
82
82
  `)}if(!n)return r.map(([,[u]])=>` - ${u}`).join(`
83
83
  `);for(const[u,c]of r){s.push(`Errors from the "${u}" predicate:`);for(const d of c)s.push(` - ${d}`)}return s.join(`
84
- `)};return _a.generateArgumentErrorMessage=e,_a}var wo;function Je(){return wo||(wo=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Predicate=e.validatorSymbol=void 0;const a=ua(),i=Bi(),s=Hd(),r=en(),n=jc();e.validatorSymbol=Symbol("validators");class u{constructor(d,f={}){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:{validators:[]}}),this.context={...this.context,...this.options};const o=this.type.charAt(0).toLowerCase()+this.type.slice(1);this.addValidator({message:(h,l)=>`Expected ${l?.slice(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${(0,a.default)(h)}\``,validator:h=>a.default[o](h)})}[r.testSymbol](d,f,o,h){const l=new Map;for(const{validator:p,message:x}of this.context.validators){if(this.options.optional===!0&&d===void 0)continue;let w;try{w=p(d)}catch(m){w=m}if(w===!0)continue;const b=a.default.function_(o)?o():o,g=b&&h?`\`${b}\``:b,v=g?`${this.type} ${g}`:this.type,_=b||this.type,k=l.get(_),y=x(d,v,w);k?k.add(y):l.set(_,new Set([y]))}if(l.size>0){const p=(0,n.generateArgumentErrorMessage)(l);throw new i.ArgumentError(p,f,l)}}get[e.validatorSymbol](){return this.context.validators}get not(){return(0,s.not)(this)}validate(d){return this.addValidator({message:(f,o,h)=>typeof h=="string"?`(${o}) ${h}`:h(o),validator:f=>{const{message:o,validator:h}=d(f);return h?!0:o}})}is(d){return this.addValidator({message:(f,o,h)=>h?`(${o}) ${h}`:`Expected ${o} \`${f}\` to pass custom validation function`,validator:d})}message(d){const{validators:f}=this.context;return f[f.length-1].message=(o,h)=>typeof d=="function"?d(o,h):d,this}addValidator(d){return this.context.validators.push(d),this}}e.Predicate=u})(Es)),Es}var yn={},Ss={},ka={},Cs,_o;function Wd(){return _o||(_o=1,Cs=function(e){return!isNaN(Date.parse(e))}),Cs}var ko;function Gd(){if(ko)return ka;ko=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.StringPredicate=void 0;const e=ua(),a=Wd(),i=Je();class s extends i.Predicate{constructor(n){super("string",n)}length(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have length \`${n}\`, got \`${u}\``,validator:u=>u.length===n})}minLength(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have a minimum length of \`${n}\`, got \`${u}\``,validator:u=>u.length>=n,negatedMessage:(u,c)=>`Expected ${c} to have a maximum length of \`${n-1}\`, got \`${u}\``})}maxLength(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have a maximum length of \`${n}\`, got \`${u}\``,validator:u=>u.length<=n,negatedMessage:(u,c)=>`Expected ${c} to have a minimum length of \`${n+1}\`, got \`${u}\``})}matches(n){return this.addValidator({message:(u,c)=>`Expected ${c} to match \`${n}\`, got \`${u}\``,validator:u=>n.test(u)})}startsWith(n){return this.addValidator({message:(u,c)=>`Expected ${c} to start with \`${n}\`, got \`${u}\``,validator:u=>u.startsWith(n)})}endsWith(n){return this.addValidator({message:(u,c)=>`Expected ${c} to end with \`${n}\`, got \`${u}\``,validator:u=>u.endsWith(n)})}includes(n){return this.addValidator({message:(u,c)=>`Expected ${c} to include \`${n}\`, got \`${u}\``,validator:u=>u.includes(n)})}oneOf(n){return this.addValidator({message:(u,c)=>{let d=JSON.stringify(n);if(n.length>10){const f=n.length-10;d=JSON.stringify(n.slice(0,10)).replace(/]$/,`,…+${f} more]`)}return`Expected ${c} to be one of \`${d}\`, got \`${u}\``},validator:u=>n.includes(u)})}get empty(){return this.addValidator({message:(n,u)=>`Expected ${u} to be empty, got \`${n}\``,validator:n=>n===""})}get nonEmpty(){return this.addValidator({message:(n,u)=>`Expected ${u} to not be empty`,validator:n=>n!==""})}equals(n){return this.addValidator({message:(u,c)=>`Expected ${c} to be equal to \`${n}\`, got \`${u}\``,validator:u=>u===n})}get alphanumeric(){return this.addValidator({message:(n,u)=>`Expected ${u} to be alphanumeric, got \`${n}\``,validator:n=>/^[a-z\d]+$/i.test(n)})}get alphabetical(){return this.addValidator({message:(n,u)=>`Expected ${u} to be alphabetical, got \`${n}\``,validator:n=>/^[a-z]+$/gi.test(n)})}get numeric(){return this.addValidator({message:(n,u)=>`Expected ${u} to be numeric, got \`${n}\``,validator:n=>/^[+-]?\d+$/i.test(n)})}get date(){return this.addValidator({message:(n,u)=>`Expected ${u} to be a date, got \`${n}\``,validator:a})}get lowercase(){return this.addValidator({message:(n,u)=>`Expected ${u} to be lowercase, got \`${n}\``,validator:n=>n.trim()!==""&&n===n.toLowerCase()})}get uppercase(){return this.addValidator({message:(n,u)=>`Expected ${u} to be uppercase, got \`${n}\``,validator:n=>n.trim()!==""&&n===n.toUpperCase()})}get url(){return this.addValidator({message:(n,u)=>`Expected ${u} to be a URL, got \`${n}\``,validator:e.default.urlString})}}return ka.StringPredicate=s,ka}var Na={},No;function Jd(){if(No)return Na;No=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.NumberPredicate=void 0;const e=ua(),a=Je();class i extends a.Predicate{constructor(r){super("number",r)}inRange(r,n){return this.addValidator({message:(u,c)=>`Expected ${c} to be in range [${r}..${n}], got ${u}`,validator:u=>e.default.inRange(u,[r,n])})}greaterThan(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be greater than ${r}, got ${n}`,validator:n=>n>r})}greaterThanOrEqual(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be greater than or equal to ${r}, got ${n}`,validator:n=>n>=r})}lessThan(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be less than ${r}, got ${n}`,validator:n=>n<r})}lessThanOrEqual(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be less than or equal to ${r}, got ${n}`,validator:n=>n<=r})}equal(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be equal to ${r}, got ${n}`,validator:n=>n===r})}oneOf(r){return this.addValidator({message:(n,u)=>{let c=JSON.stringify(r);if(r.length>10){const d=r.length-10;c=JSON.stringify(r.slice(0,10)).replace(/]$/,`,…+${d} more]`)}return`Expected ${u} to be one of \`${c}\`, got ${n}`},validator:n=>r.includes(n)})}get integer(){return this.addValidator({message:(r,n)=>`Expected ${n} to be an integer, got ${r}`,validator:r=>e.default.integer(r)})}get finite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be finite, got ${r}`,validator:r=>!e.default.infinite(r)})}get infinite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be infinite, got ${r}`,validator:r=>e.default.infinite(r)})}get positive(){return this.addValidator({message:(r,n)=>`Expected ${n} to be positive, got ${r}`,validator:r=>r>0})}get negative(){return this.addValidator({message:(r,n)=>`Expected ${n} to be negative, got ${r}`,validator:r=>r<0})}get integerOrInfinite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be an integer or infinite, got ${r}`,validator:r=>e.default.integer(r)||e.default.infinite(r)})}get uint8(){return this.integer.inRange(0,255)}get uint16(){return this.integer.inRange(0,65535)}get uint32(){return this.integer.inRange(0,4294967295)}get int8(){return this.integer.inRange(-128,127)}get int16(){return this.integer.inRange(-32768,32767)}get int32(){return this.integer.inRange(-2147483648,2147483647)}}return Na.NumberPredicate=i,Na}var ja={},jo;function Yd(){if(jo)return ja;jo=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.BigIntPredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("bigint",s)}}return ja.BigIntPredicate=a,ja}var Ea={},Eo;function Zd(){if(Eo)return Ea;Eo=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.BooleanPredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("boolean",s)}get true(){return this.addValidator({message:(s,r)=>`Expected ${r} to be true, got ${s}`,validator:s=>s})}get false(){return this.addValidator({message:(s,r)=>`Expected ${r} to be false, got ${s}`,validator:s=>!s})}}return Ea.BooleanPredicate=a,Ea}var Aa={},Xa={exports:{}};Xa.exports;var Ao;function is(){return Ao||(Ao=1,(function(e,a){var i=200,s="__lodash_hash_undefined__",r=1,n=2,u=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",o="[object Boolean]",h="[object Date]",l="[object Error]",p="[object Function]",x="[object GeneratorFunction]",w="[object Map]",b="[object Number]",g="[object Null]",v="[object Object]",_="[object Promise]",k="[object Proxy]",y="[object RegExp]",m="[object Set]",N="[object String]",j="[object Symbol]",A="[object Undefined]",D="[object WeakMap]",C="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",W="[object Float64Array]",F="[object Int8Array]",q="[object Int16Array]",$="[object Int32Array]",Y="[object Uint8Array]",X="[object Uint8ClampedArray]",ae="[object Uint16Array]",I="[object Uint32Array]",ie=/[\\^$.*+?()[\]{}|]/g,R=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,J={};J[M]=J[W]=J[F]=J[q]=J[$]=J[Y]=J[X]=J[ae]=J[I]=!0,J[c]=J[d]=J[C]=J[o]=J[T]=J[h]=J[l]=J[p]=J[w]=J[b]=J[v]=J[y]=J[m]=J[N]=J[D]=!1;var fe=typeof gr=="object"&&gr&&gr.Object===Object&&gr,Q=typeof self=="object"&&self&&self.Object===Object&&self,ne=fe||Q||Function("return this")(),xe=a&&!a.nodeType&&a,Ce=xe&&!0&&e&&!e.nodeType&&e,Z=Ce&&Ce.exports===xe,te=Z&&fe.process,ee=(function(){try{return te&&te.binding&&te.binding("util")}catch{}})(),le=ee&&ee.isTypedArray;function be(O,U){for(var K=-1,ue=O==null?0:O.length,Te=0,ye=[];++K<ue;){var Ie=O[K];U(Ie,K,O)&&(ye[Te++]=Ie)}return ye}function me(O,U){for(var K=-1,ue=U.length,Te=O.length;++K<ue;)O[Te+K]=U[K];return O}function ke(O,U){for(var K=-1,ue=O==null?0:O.length;++K<ue;)if(U(O[K],K,O))return!0;return!1}function pe(O,U){for(var K=-1,ue=Array(O);++K<O;)ue[K]=U(K);return ue}function Ye(O){return function(U){return O(U)}}function we(O,U){return O.has(U)}function de(O,U){return O?.[U]}function Ee(O){var U=-1,K=Array(O.size);return O.forEach(function(ue,Te){K[++U]=[Te,ue]}),K}function Oe(O,U){return function(K){return O(U(K))}}function Be(O){var U=-1,K=Array(O.size);return O.forEach(function(ue){K[++U]=ue}),K}var St=Array.prototype,Jt=Function.prototype,Ze=Object.prototype,Yt=ne["__core-js_shared__"],vr=Jt.toString,Qe=Ze.hasOwnProperty,Ct=(function(){var O=/[^.]+$/.exec(Yt&&Yt.keys&&Yt.keys.IE_PROTO||"");return O?"Symbol(src)_1."+O:""})(),xt=Ze.toString,or=RegExp("^"+vr.call(Qe).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Zt=Z?ne.Buffer:void 0,Dt=ne.Symbol,yt=ne.Uint8Array,Tt=Ze.propertyIsEnumerable,Gr=St.splice,ft=Dt?Dt.toStringTag:void 0,wr=Object.getOwnPropertySymbols,E=Zt?Zt.isBuffer:void 0,S=Oe(Object.keys,Object),L=Lt(ne,"DataView"),H=Lt(ne,"Map"),re=Lt(ne,"Promise"),he=Lt(ne,"Set"),Ne=Lt(ne,"WeakMap"),Se=Lt(Object,"create"),ht=tt(L),at=tt(H),Xe=tt(re),vt=tt(he),wt=tt(Ne),_t=Dt?Dt.prototype:void 0,et=_t?_t.valueOf:void 0;function ze(O){var U=-1,K=O==null?0:O.length;for(this.clear();++U<K;){var ue=O[U];this.set(ue[0],ue[1])}}function Bt(){this.__data__=Se?Se(null):{},this.size=0}function $e(O){var U=this.has(O)&&delete this.__data__[O];return this.size-=U?1:0,U}function Ot(O){var U=this.__data__;if(Se){var K=U[O];return K===s?void 0:K}return Qe.call(U,O)?U[O]:void 0}function Vt(O){var U=this.__data__;return Se?U[O]!==void 0:Qe.call(U,O)}function pt(O,U){var K=this.__data__;return this.size+=this.has(O)?0:1,K[O]=Se&&U===void 0?s:U,this}ze.prototype.clear=Bt,ze.prototype.delete=$e,ze.prototype.get=Ot,ze.prototype.has=Vt,ze.prototype.set=pt;function Pt(O){var U=-1,K=O==null?0:O.length;for(this.clear();++U<K;){var ue=O[U];this.set(ue[0],ue[1])}}function Xt(){this.__data__=[],this.size=0}function on(O){var U=this.__data__,K=Le(U,O);if(K<0)return!1;var ue=U.length-1;return K==ue?U.pop():Gr.call(U,K,1),--this.size,!0}function ws(O){var U=this.__data__,K=Le(U,O);return K<0?void 0:U[K][1]}function Jr(O){return Le(this.__data__,O)>-1}function ca(O,U){var K=this.__data__,ue=Le(K,O);return ue<0?(++this.size,K.push([O,U])):K[ue][1]=U,this}Pt.prototype.clear=Xt,Pt.prototype.delete=on,Pt.prototype.get=ws,Pt.prototype.has=Jr,Pt.prototype.set=ca;function Ut(O){var U=-1,K=O==null?0:O.length;for(this.clear();++U<K;){var ue=O[U];this.set(ue[0],ue[1])}}function un(){this.size=0,this.__data__={hash:new ze,map:new(H||Pt),string:new ze}}function ln(O){var U=je(this,O).delete(O);return this.size-=U?1:0,U}function _r(O){return je(this,O).get(O)}function cn(O){return je(this,O).has(O)}function _s(O,U){var K=je(this,O),ue=K.size;return K.set(O,U),this.size+=K.size==ue?0:1,this}Ut.prototype.clear=un,Ut.prototype.delete=ln,Ut.prototype.get=_r,Ut.prototype.has=cn,Ut.prototype.set=_s;function B(O){var U=-1,K=O==null?0:O.length;for(this.__data__=new Ut;++U<K;)this.add(O[U])}function G(O){return this.__data__.set(O,s),this}function se(O){return this.__data__.has(O)}B.prototype.add=B.prototype.push=G,B.prototype.has=se;function oe(O){var U=this.__data__=new Pt(O);this.size=U.size}function De(){this.__data__=new Pt,this.size=0}function _e(O){var U=this.__data__,K=U.delete(O);return this.size=U.size,K}function Pe(O){return this.__data__.get(O)}function Re(O){return this.__data__.has(O)}function mt(O,U){var K=this.__data__;if(K instanceof Pt){var ue=K.__data__;if(!H||ue.length<i-1)return ue.push([O,U]),this.size=++K.size,this;K=this.__data__=new Ut(ue)}return K.set(O,U),this.size=K.size,this}oe.prototype.clear=De,oe.prototype.delete=_e,oe.prototype.get=Pe,oe.prototype.has=Re,oe.prototype.set=mt;function Fe(O,U){var K=dr(O),ue=!K&&Xr(O),Te=!K&&!ue&&fr(O),ye=!K&&!ue&&!Te&&so(O),Ie=K||ue||Te||ye,We=Ie?pe(O.length,String):[],Ke=We.length;for(var Me in O)Qe.call(O,Me)&&!(Ie&&(Me=="length"||Te&&(Me=="offset"||Me=="parent")||ye&&(Me=="buffer"||Me=="byteLength"||Me=="byteOffset")||$t(Me,Ke)))&&We.push(Me);return We}function Le(O,U){for(var K=O.length;K--;)if(ha(O[K][0],U))return K;return-1}function kt(O,U,K){var ue=U(O);return dr(O)?ue:me(ue,K(O))}function nt(O){return O==null?O===void 0?A:g:ft&&ft in Object(O)?zt(O):cr(O)}function He(O){return pa(O)&&nt(O)==c}function Nt(O,U,K,ue,Te){return O===U?!0:O==null||U==null||!pa(O)&&!pa(U)?O!==O&&U!==U:ur(O,U,K,ue,Nt,Te)}function ur(O,U,K,ue,Te,ye){var Ie=dr(O),We=dr(U),Ke=Ie?d:qe(O),Me=We?d:qe(U);Ke=Ke==c?v:Ke,Me=Me==c?v:Me;var gt=Ke==v,Mt=Me==v,rt=Ke==Me;if(rt&&fr(O)){if(!fr(U))return!1;Ie=!0,gt=!1}if(rt&&!gt)return ye||(ye=new oe),Ie||so(O)?da(O,U,K,ue,Te,ye):ks(O,U,Ke,K,ue,Te,ye);if(!(K&r)){var jt=gt&&Qe.call(O,"__wrapped__"),Et=Mt&&Qe.call(U,"__wrapped__");if(jt||Et){var hr=jt?O.value():O,Kt=Et?U.value():U;return ye||(ye=new oe),Te(hr,Kt,K,ue,ye)}}return rt?(ye||(ye=new oe),Ns(O,U,K,ue,Te,ye)):!1}function Yr(O){if(!no(O)||Nr(O))return!1;var U=jr(O)?or:R;return U.test(tt(O))}function lr(O){return pa(O)&&Er(O.length)&&!!J[nt(O)]}function kr(O){if(!Zr(O))return S(O);var U=[];for(var K in Object(O))Qe.call(O,K)&&K!="constructor"&&U.push(K);return U}function da(O,U,K,ue,Te,ye){var Ie=K&r,We=O.length,Ke=U.length;if(We!=Ke&&!(Ie&&Ke>We))return!1;var Me=ye.get(O);if(Me&&ye.get(U))return Me==U;var gt=-1,Mt=!0,rt=K&n?new B:void 0;for(ye.set(O,U),ye.set(U,O);++gt<We;){var jt=O[gt],Et=U[gt];if(ue)var hr=Ie?ue(Et,jt,gt,U,O,ye):ue(jt,Et,gt,O,U,ye);if(hr!==void 0){if(hr)continue;Mt=!1;break}if(rt){if(!ke(U,function(Kt,Ar){if(!we(rt,Ar)&&(jt===Kt||Te(jt,Kt,K,ue,ye)))return rt.push(Ar)})){Mt=!1;break}}else if(!(jt===Et||Te(jt,Et,K,ue,ye))){Mt=!1;break}}return ye.delete(O),ye.delete(U),Mt}function ks(O,U,K,ue,Te,ye,Ie){switch(K){case T:if(O.byteLength!=U.byteLength||O.byteOffset!=U.byteOffset)return!1;O=O.buffer,U=U.buffer;case C:return!(O.byteLength!=U.byteLength||!ye(new yt(O),new yt(U)));case o:case h:case b:return ha(+O,+U);case l:return O.name==U.name&&O.message==U.message;case y:case N:return O==U+"";case w:var We=Ee;case m:var Ke=ue&r;if(We||(We=Be),O.size!=U.size&&!Ke)return!1;var Me=Ie.get(O);if(Me)return Me==U;ue|=n,Ie.set(O,U);var gt=da(We(O),We(U),ue,Te,ye,Ie);return Ie.delete(O),gt;case j:if(et)return et.call(O)==et.call(U)}return!1}function Ns(O,U,K,ue,Te,ye){var Ie=K&r,We=Ae(O),Ke=We.length,Me=Ae(U),gt=Me.length;if(Ke!=gt&&!Ie)return!1;for(var Mt=Ke;Mt--;){var rt=We[Mt];if(!(Ie?rt in U:Qe.call(U,rt)))return!1}var jt=ye.get(O);if(jt&&ye.get(U))return jt==U;var Et=!0;ye.set(O,U),ye.set(U,O);for(var hr=Ie;++Mt<Ke;){rt=We[Mt];var Kt=O[rt],Ar=U[rt];if(ue)var io=Ie?ue(Ar,Kt,rt,U,O,ye):ue(Kt,Ar,rt,O,U,ye);if(!(io===void 0?Kt===Ar||Te(Kt,Ar,K,ue,ye):io)){Et=!1;break}hr||(hr=rt=="constructor")}if(Et&&!hr){var fn=O.constructor,hn=U.constructor;fn!=hn&&"constructor"in O&&"constructor"in U&&!(typeof fn=="function"&&fn instanceof fn&&typeof hn=="function"&&hn instanceof hn)&&(Et=!1)}return ye.delete(O),ye.delete(U),Et}function Ae(O){return kt(O,Pd,fa)}function je(O,U){var K=O.__data__;return Ht(U)?K[typeof U=="string"?"string":"hash"]:K.map}function Lt(O,U){var K=de(O,U);return Yr(K)?K:void 0}function zt(O){var U=Qe.call(O,ft),K=O[ft];try{O[ft]=void 0;var ue=!0}catch{}var Te=xt.call(O);return ue&&(U?O[ft]=K:delete O[ft]),Te}var fa=wr?function(O){return O==null?[]:(O=Object(O),be(wr(O),function(U){return Tt.call(O,U)}))}:Ld,qe=nt;(L&&qe(new L(new ArrayBuffer(1)))!=T||H&&qe(new H)!=w||re&&qe(re.resolve())!=_||he&&qe(new he)!=m||Ne&&qe(new Ne)!=D)&&(qe=function(O){var U=nt(O),K=U==v?O.constructor:void 0,ue=K?tt(K):"";if(ue)switch(ue){case ht:return T;case at:return w;case Xe:return _;case vt:return m;case wt:return D}return U});function $t(O,U){return U=U??u,!!U&&(typeof O=="number"||V.test(O))&&O>-1&&O%1==0&&O<U}function Ht(O){var U=typeof O;return U=="string"||U=="number"||U=="symbol"||U=="boolean"?O!=="__proto__":O===null}function Nr(O){return!!Ct&&Ct in O}function Zr(O){var U=O&&O.constructor,K=typeof U=="function"&&U.prototype||Ze;return O===K}function cr(O){return xt.call(O)}function tt(O){if(O!=null){try{return vr.call(O)}catch{}try{return O+""}catch{}}return""}function ha(O,U){return O===U||O!==O&&U!==U}var Xr=He((function(){return arguments})())?He:function(O){return pa(O)&&Qe.call(O,"callee")&&!Tt.call(O,"callee")},dr=Array.isArray;function Kr(O){return O!=null&&Er(O.length)&&!jr(O)}var fr=E||$d;function dn(O,U){return Nt(O,U)}function jr(O){if(!no(O))return!1;var U=nt(O);return U==p||U==x||U==f||U==k}function Er(O){return typeof O=="number"&&O>-1&&O%1==0&&O<=u}function no(O){var U=typeof O;return O!=null&&(U=="object"||U=="function")}function pa(O){return O!=null&&typeof O=="object"}var so=le?Ye(le):lr;function Pd(O){return Kr(O)?Fe(O):kr(O)}function Ld(){return[]}function $d(){return!1}e.exports=dn})(Xa,Xa.exports)),Xa.exports}var Dr={},vn={},So;function os(){if(So)return vn;So=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=en();function a(i,s,r,n=!0){r[e.testSymbol](i,a,s,n)}return vn.default=a,vn}var Co;function Ec(){if(Co)return Dr;Co=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.exact=Dr.partial=void 0;const e=ua(),a=os(),i=en();function s(n,u,c){try{for(const d of Object.keys(u)){const f=c?`${c}.${d}`:d;if((0,i.isPredicate)(u[d]))(0,a.default)(n[d],f,u[d]);else if(e.default.plainObject(u[d])){const o=s(n[d],u[d],f);if(o!==!0)return o}}return!0}catch(d){return d.message}}Dr.partial=s;function r(n,u,c,d){try{const f=new Set(Object.keys(n));for(const o of Object.keys(u)){f.delete(o);const h=c?`${c}.${o}`:o;if((0,i.isPredicate)(u[o]))(0,a.default)(n[o],h,u[o]);else if(e.default.plainObject(u[o])){if(!Object.prototype.hasOwnProperty.call(n,o))return`Expected \`${h}\` to exist`;const l=r(n[o],u[o],h);if(l!==!0)return l}}if(f.size>0){const o=[...f.keys()][0],h=c?`${c}.${o}`:o;return`Did not expect ${d?"element":"property"} \`${h}\` to exist, got \`${n[o]}\``}return!0}catch(f){return f.message}}return Dr.exact=r,Dr}var wn={},Do;function us(){if(Do)return wn;Do=1,Object.defineProperty(wn,"__esModule",{value:!0});const e=os();return wn.default=(a,i,s)=>{try{for(const r of a)(0,e.default)(r,i,s,!1);return!0}catch(r){return r.message}},wn}var To;function Xd(){if(To)return Aa;To=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.ArrayPredicate=void 0;const e=is(),a=Je(),i=Ec(),s=us();class r extends a.Predicate{constructor(u){super("array",u)}length(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have length \`${u}\`, got \`${c.length}\``,validator:c=>c.length===u})}minLength(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum length of \`${u}\`, got \`${c.length}\``,validator:c=>c.length>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum length of \`${u-1}\`, got \`${c.length}\``})}maxLength(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum length of \`${u}\`, got \`${c.length}\``,validator:c=>c.length<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum length of \`${u+1}\`, got \`${c.length}\``})}startsWith(u){return this.addValidator({message:(c,d)=>`Expected ${d} to start with \`${u}\`, got \`${c[0]}\``,validator:c=>c[0]===u})}endsWith(u){return this.addValidator({message:(c,d)=>`Expected ${d} to end with \`${u}\`, got \`${c[c.length-1]}\``,validator:c=>c[c.length-1]===u})}includes(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to include all elements of \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>u.every(d=>c.includes(d))})}includesAny(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to include any element of \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>u.some(d=>c.includes(d))})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify(u)}\``,validator:u=>u.length===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.length>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>e(c,u)})}ofType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,s.default)(c,"values",u)})}exactShape(u){const c=u;return this.addValidator({message:(d,f,o)=>`${o.replace("Expected","Expected element")} in ${f}`,validator:d=>(0,i.exact)(d,c,void 0,!0)})}}return Aa.ArrayPredicate=r,Aa}var Sa={},Ds,Oo;function Kd(){return Oo||(Oo=1,Ds=e=>{const a=typeof e;return e!==null&&(a==="object"||a==="function")}),Ds}var Ts,Po;function Qd(){if(Po)return Ts;Po=1;const e=Kd(),a=new Set(["__proto__","prototype","constructor"]),i=r=>!r.some(n=>a.has(n));function s(r){const n=r.split("."),u=[];for(let c=0;c<n.length;c++){let d=n[c];for(;d[d.length-1]==="\\"&&n[c+1]!==void 0;)d=d.slice(0,-1)+".",d+=n[++c];u.push(d)}return i(u)?u:[]}return Ts={get(r,n,u){if(!e(r)||typeof n!="string")return u===void 0?r:u;const c=s(n);if(c.length!==0){for(let d=0;d<c.length;d++)if(r=r[c[d]],r==null){if(d!==c.length-1)return u;break}return r===void 0?u:r}},set(r,n,u){if(!e(r)||typeof n!="string")return r;const c=r,d=s(n);for(let f=0;f<d.length;f++){const o=d[f];e(r[o])||(r[o]={}),f===d.length-1&&(r[o]=u),r=r[o]}return c},delete(r,n){if(!e(r)||typeof n!="string")return!1;const u=s(n);for(let c=0;c<u.length;c++){const d=u[c];if(c===u.length-1)return delete r[d],!0;if(r=r[d],!e(r))return!1}},has(r,n){if(!e(r)||typeof n!="string")return!1;const u=s(n);if(u.length===0)return!1;for(let c=0;c<u.length;c++)if(e(r)){if(!(u[c]in r))return!1;r=r[u[c]]}else return!1;return!0}},Ts}var _n={},Lo;function tn(){return Lo||(Lo=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.default=(e,a,i=5)=>{const s=[];for(const r of a)if(!e.has(r)&&(s.push(r),s.length===i))return s;return s.length===0?!0:s}),_n}var kn={},$o;function e0(){if($o)return kn;$o=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=ua(),a=os(),i=(s,r)=>e.default.plainObject(s)?Object.values(s).every(n=>i(n,r)):((0,a.default)(s,"deep values",r,!1),!0);return kn.default=(s,r)=>{try{return i(s,r)}catch(n){return n.message}},kn}var Mo;function t0(){if(Mo)return Sa;Mo=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.ObjectPredicate=void 0;const e=ua(),a=Qd(),i=is(),s=tn(),r=us(),n=e0(),u=Ec(),c=Je();class d extends c.Predicate{constructor(o){super("object",o)}get plain(){return this.addValidator({message:(o,h)=>`Expected ${h} to be a plain object`,validator:o=>e.default.plainObject(o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(o)}\``,validator:o=>Object.keys(o).length===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>Object.keys(o).length>0})}valuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>(0,r.default)(Object.values(h),"values",o)})}deepValuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>(0,n.default)(h,o)})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(o)}\`, got \`${JSON.stringify(h)}\``,validator:h=>i(h,o)})}instanceOf(o){return this.addValidator({message:(h,l)=>{var p;let{name:x}=(p=h?.constructor)!==null&&p!==void 0?p:{};return(!x||x==="Object")&&(x=JSON.stringify(h)),`Expected ${l} \`${x}\` to be of type \`${o.name}\``},validator:h=>h instanceof o})}hasKeys(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have keys \`${JSON.stringify(p)}\``,validator:h=>(0,s.default)({has:l=>a.has(h,l)},o)})}hasAnyKeys(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any key of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>a.has(h,l))})}partialShape(o){return this.addValidator({message:(h,l,p)=>`${p.replace("Expected","Expected property")} in ${l}`,validator:h=>(0,u.partial)(h,o)})}exactShape(o){return this.addValidator({message:(h,l,p)=>`${p.replace("Expected","Expected property")} in ${l}`,validator:h=>(0,u.exact)(h,o)})}}return Sa.ObjectPredicate=d,Sa}var Ca={},Ro;function r0(){if(Ro)return Ca;Ro=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.DatePredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("date",s)}before(s){return this.addValidator({message:(r,n)=>`Expected ${n} ${r.toISOString()} to be before ${s.toISOString()}`,validator:r=>r.getTime()<s.getTime()})}after(s){return this.addValidator({message:(r,n)=>`Expected ${n} ${r.toISOString()} to be after ${s.toISOString()}`,validator:r=>r.getTime()>s.getTime()})}}return Ca.DatePredicate=a,Ca}var Da={},Io;function a0(){if(Io)return Da;Io=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.ErrorPredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("error",s)}name(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have name \`${s}\`, got \`${r.name}\``,validator:r=>r.name===s})}message(s){return this.addValidator({message:(r,n)=>`Expected ${n} message to be \`${s}\`, got \`${r.message}\``,validator:r=>r.message===s})}messageIncludes(s){return this.addValidator({message:(r,n)=>`Expected ${n} message to include \`${s}\`, got \`${r.message}\``,validator:r=>r.message.includes(s)})}hasKeys(...s){return this.addValidator({message:(r,n)=>`Expected ${n} message to have keys \`${s.join("`, `")}\``,validator:r=>s.every(n=>Object.prototype.hasOwnProperty.call(r,n))})}instanceOf(s){return this.addValidator({message:(r,n)=>`Expected ${n} \`${r.name}\` to be of type \`${s.name}\``,validator:r=>r instanceof s})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}return Da.ErrorPredicate=a,Da}var Ta={},Fo;function n0(){if(Fo)return Ta;Fo=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.MapPredicate=void 0;const e=is(),a=tn(),i=us(),s=Je();class r extends s.Predicate{constructor(u){super("Map",u)}size(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have size \`${u}\`, got \`${c.size}\``,validator:c=>c.size===u})}minSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum size of \`${u-1}\`, got \`${c.size}\``})}maxSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum size of \`${u+1}\`, got \`${c.size}\``})}hasKeys(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have keys \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(c,u)})}hasAnyKeys(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any key of \`${JSON.stringify(u)}\``,validator:c=>u.some(d=>c.has(d))})}hasValues(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have values \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(new Set(c.values()),u)})}hasAnyValues(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any value of \`${JSON.stringify(u)}\``,validator:c=>{const d=new Set(c.values());return u.some(f=>d.has(f))}})}keysOfType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c.keys(),"keys",u)})}valuesOfType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c.values(),"values",u)})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify([...u])}\``,validator:u=>u.size===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.size>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify([...u])}\`, got \`${JSON.stringify([...c])}\``,validator:c=>e(c,u)})}}return Ta.MapPredicate=r,Ta}var Oa={},qo;function s0(){if(qo)return Oa;qo=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.WeakMapPredicate=void 0;const e=tn(),a=Je();class i extends a.Predicate{constructor(r){super("WeakMap",r)}hasKeys(...r){return this.addValidator({message:(n,u,c)=>`Expected ${u} to have keys \`${JSON.stringify(c)}\``,validator:n=>(0,e.default)(n,r)})}hasAnyKeys(...r){return this.addValidator({message:(n,u)=>`Expected ${u} to have any key of \`${JSON.stringify(r)}\``,validator:n=>r.some(u=>n.has(u))})}}return Oa.WeakMapPredicate=i,Oa}var Pa={},Bo;function i0(){if(Bo)return Pa;Bo=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.SetPredicate=void 0;const e=is(),a=tn(),i=us(),s=Je();class r extends s.Predicate{constructor(u){super("Set",u)}size(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have size \`${u}\`, got \`${c.size}\``,validator:c=>c.size===u})}minSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum size of \`${u-1}\`, got \`${c.size}\``})}maxSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum size of \`${u+1}\`, got \`${c.size}\``})}has(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have items \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(c,u)})}hasAny(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any item of \`${JSON.stringify(u)}\``,validator:c=>u.some(d=>c.has(d))})}ofType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c,"values",u)})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify([...u])}\``,validator:u=>u.size===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.size>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify([...u])}\`, got \`${JSON.stringify([...c])}\``,validator:c=>e(c,u)})}}return Pa.SetPredicate=r,Pa}var La={},Vo;function o0(){if(Vo)return La;Vo=1,Object.defineProperty(La,"__esModule",{value:!0}),La.WeakSetPredicate=void 0;const e=tn(),a=Je();class i extends a.Predicate{constructor(r){super("WeakSet",r)}has(...r){return this.addValidator({message:(n,u,c)=>`Expected ${u} to have items \`${JSON.stringify(c)}\``,validator:n=>(0,e.default)(n,r)})}hasAny(...r){return this.addValidator({message:(n,u)=>`Expected ${u} to have any item of \`${JSON.stringify(r)}\``,validator:n=>r.some(u=>n.has(u))})}}return La.WeakSetPredicate=i,La}var $a={},Uo;function u0(){if(Uo)return $a;Uo=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.TypedArrayPredicate=void 0;const e=Je();class a extends e.Predicate{byteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===s})}minByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=s,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s-1}\`, got \`${r.byteLength}\``})}maxByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=s,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s+1}\`, got \`${r.byteLength}\``})}length(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have length \`${s}\`, got \`${r.length}\``,validator:r=>r.length===s})}minLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum length of \`${s}\`, got \`${r.length}\``,validator:r=>r.length>=s,negatedMessage:(r,n)=>`Expected ${n} to have a maximum length of \`${s-1}\`, got \`${r.length}\``})}maxLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum length of \`${s}\`, got \`${r.length}\``,validator:r=>r.length<=s,negatedMessage:(r,n)=>`Expected ${n} to have a minimum length of \`${s+1}\`, got \`${r.length}\``})}}return $a.TypedArrayPredicate=a,$a}var Ma={},zo;function l0(){if(zo)return Ma;zo=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.ArrayBufferPredicate=void 0;const e=Je();class a extends e.Predicate{byteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===s})}minByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=s,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s-1}\`, got \`${r.byteLength}\``})}maxByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=s,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s+1}\`, got \`${r.byteLength}\``})}}return Ma.ArrayBufferPredicate=a,Ma}var Ra={},Ho;function c0(){if(Ho)return Ra;Ho=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.DataViewPredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("DataView",s)}byteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===s})}minByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=s,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s-1}\`, got \`${r.byteLength}\``})}maxByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=s,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s+1}\`, got \`${r.byteLength}\``})}}return Ra.DataViewPredicate=a,Ra}var Ia={},Wo;function d0(){if(Wo)return Ia;Wo=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.AnyPredicate=void 0;const e=Bi(),a=en(),i=jc();class s{constructor(n,u={}){Object.defineProperty(this,"predicates",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:u})}[a.testSymbol](n,u,c,d){const f=new Map;for(const o of this.predicates)try{u(n,c,o,d);return}catch(h){if(n===void 0&&this.options.optional===!0)return;if(h instanceof e.ArgumentError)for(const[l,p]of h.validationErrors.entries()){const x=f.get(l);f.set(l,new Set([...x??[],...p]))}}if(f.size>0){const o=(0,i.generateArgumentErrorMessage)(f,!0);throw new e.ArgumentError(`Any predicate failed with the following errors:
85
- ${o}`,u,f)}}}return Ia.AnyPredicate=s,Ia}var Go;function Pi(){return Go||(Go=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnyPredicate=e.DataViewPredicate=e.ArrayBufferPredicate=e.TypedArrayPredicate=e.WeakSetPredicate=e.SetPredicate=e.WeakMapPredicate=e.MapPredicate=e.ErrorPredicate=e.DatePredicate=e.ObjectPredicate=e.ArrayPredicate=e.BooleanPredicate=e.BigIntPredicate=e.NumberPredicate=e.StringPredicate=void 0;const a=Gd();Object.defineProperty(e,"StringPredicate",{enumerable:!0,get:function(){return a.StringPredicate}});const i=Jd();Object.defineProperty(e,"NumberPredicate",{enumerable:!0,get:function(){return i.NumberPredicate}});const s=Yd();Object.defineProperty(e,"BigIntPredicate",{enumerable:!0,get:function(){return s.BigIntPredicate}});const r=Zd();Object.defineProperty(e,"BooleanPredicate",{enumerable:!0,get:function(){return r.BooleanPredicate}});const n=Je(),u=Xd();Object.defineProperty(e,"ArrayPredicate",{enumerable:!0,get:function(){return u.ArrayPredicate}});const c=t0();Object.defineProperty(e,"ObjectPredicate",{enumerable:!0,get:function(){return c.ObjectPredicate}});const d=r0();Object.defineProperty(e,"DatePredicate",{enumerable:!0,get:function(){return d.DatePredicate}});const f=a0();Object.defineProperty(e,"ErrorPredicate",{enumerable:!0,get:function(){return f.ErrorPredicate}});const o=n0();Object.defineProperty(e,"MapPredicate",{enumerable:!0,get:function(){return o.MapPredicate}});const h=s0();Object.defineProperty(e,"WeakMapPredicate",{enumerable:!0,get:function(){return h.WeakMapPredicate}});const l=i0();Object.defineProperty(e,"SetPredicate",{enumerable:!0,get:function(){return l.SetPredicate}});const p=o0();Object.defineProperty(e,"WeakSetPredicate",{enumerable:!0,get:function(){return p.WeakSetPredicate}});const x=u0();Object.defineProperty(e,"TypedArrayPredicate",{enumerable:!0,get:function(){return x.TypedArrayPredicate}});const w=l0();Object.defineProperty(e,"ArrayBufferPredicate",{enumerable:!0,get:function(){return w.ArrayBufferPredicate}});const b=c0();Object.defineProperty(e,"DataViewPredicate",{enumerable:!0,get:function(){return b.DataViewPredicate}});const g=d0();Object.defineProperty(e,"AnyPredicate",{enumerable:!0,get:function(){return g.AnyPredicate}}),e.default=(v,_)=>(Object.defineProperties(v,{string:{get:()=>new a.StringPredicate(_)},number:{get:()=>new i.NumberPredicate(_)},bigint:{get:()=>new s.BigIntPredicate(_)},boolean:{get:()=>new r.BooleanPredicate(_)},undefined:{get:()=>new n.Predicate("undefined",_)},null:{get:()=>new n.Predicate("null",_)},nullOrUndefined:{get:()=>new n.Predicate("nullOrUndefined",_)},nan:{get:()=>new n.Predicate("nan",_)},symbol:{get:()=>new n.Predicate("symbol",_)},array:{get:()=>new u.ArrayPredicate(_)},object:{get:()=>new c.ObjectPredicate(_)},date:{get:()=>new d.DatePredicate(_)},error:{get:()=>new f.ErrorPredicate(_)},map:{get:()=>new o.MapPredicate(_)},weakMap:{get:()=>new h.WeakMapPredicate(_)},set:{get:()=>new l.SetPredicate(_)},weakSet:{get:()=>new p.WeakSetPredicate(_)},function:{get:()=>new n.Predicate("Function",_)},buffer:{get:()=>new n.Predicate("Buffer",_)},regExp:{get:()=>new n.Predicate("RegExp",_)},promise:{get:()=>new n.Predicate("Promise",_)},typedArray:{get:()=>new x.TypedArrayPredicate("TypedArray",_)},int8Array:{get:()=>new x.TypedArrayPredicate("Int8Array",_)},uint8Array:{get:()=>new x.TypedArrayPredicate("Uint8Array",_)},uint8ClampedArray:{get:()=>new x.TypedArrayPredicate("Uint8ClampedArray",_)},int16Array:{get:()=>new x.TypedArrayPredicate("Int16Array",_)},uint16Array:{get:()=>new x.TypedArrayPredicate("Uint16Array",_)},int32Array:{get:()=>new x.TypedArrayPredicate("Int32Array",_)},uint32Array:{get:()=>new x.TypedArrayPredicate("Uint32Array",_)},float32Array:{get:()=>new x.TypedArrayPredicate("Float32Array",_)},float64Array:{get:()=>new x.TypedArrayPredicate("Float64Array",_)},arrayBuffer:{get:()=>new w.ArrayBufferPredicate("ArrayBuffer",_)},sharedArrayBuffer:{get:()=>new w.ArrayBufferPredicate("SharedArrayBuffer",_)},dataView:{get:()=>new b.DataViewPredicate(_)},iterable:{get:()=>new n.Predicate("Iterable",_)},any:{value:(...k)=>new g.AnyPredicate(k,_)}}),v)})(Ss)),Ss}var Jo;function f0(){if(Jo)return yn;Jo=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Pi();return yn.default=a=>(Object.defineProperties(a,{optional:{get:()=>(0,e.default)({},{optional:!0})}}),a),yn}var Yo;function rn(){return Yo||(Yo=1,(function(e){var a=Cr&&Cr.__createBinding||(Object.create?(function(p,x,w,b){b===void 0&&(b=w);var g=Object.getOwnPropertyDescriptor(x,w);(!g||("get"in g?!x.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return x[w]}}),Object.defineProperty(p,b,g)}):(function(p,x,w,b){b===void 0&&(b=w),p[b]=x[w]})),i=Cr&&Cr.__exportStar||function(p,x){for(var w in p)w!=="default"&&!Object.prototype.hasOwnProperty.call(x,w)&&a(x,p,w)};Object.defineProperty(e,"__esModule",{value:!0}),e.ArgumentError=e.Predicate=void 0;const s=Bd(),r=Vd(),n=Je();Object.defineProperty(e,"Predicate",{enumerable:!0,get:function(){return n.Predicate}});const u=en(),c=f0(),d=Pi(),f=os(),o=(p,x,w)=>{if(!(0,u.isPredicate)(x)&&typeof x!="string")throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof x}\``);if((0,u.isPredicate)(x)){const b=(0,s.default)();(0,f.default)(p,()=>(0,r.inferLabel)(b),x);return}(0,f.default)(p,x,w)};Object.defineProperties(o,{isValid:{value:(p,x)=>{try{return(0,f.default)(p,"",x),!0}catch{return!1}}},create:{value:(p,x)=>(w,b)=>{if((0,u.isPredicate)(p)){const g=(0,s.default)();(0,f.default)(w,b??(()=>(0,r.inferLabel)(g)),p);return}(0,f.default)(w,b??p,x)}}});const h=(0,d.default)((0,c.default)(o));e.default=h,i(Pi(),e);var l=Bi();Object.defineProperty(e,"ArgumentError",{enumerable:!0,get:function(){return l.ArgumentError}})})(Cr)),Cr}var Nn;function Ac(e){return Nn=Nn||document.createElement("textarea"),Nn.innerHTML="&"+e+";",Nn.value}function h0(e){return Object.prototype.toString.call(e)}function p0(e){return h0(e)==="[object String]"}var m0=Object.prototype.hasOwnProperty;function Sc(e,a){return e?m0.call(e,a):!1}function Vi(e){var a=[].slice.call(arguments,1);return a.forEach(function(i){if(i){if(typeof i!="object")throw new TypeError(i+"must be object");Object.keys(i).forEach(function(s){e[s]=i[s]})}}),e}var g0=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function ia(e){return e.indexOf("\\")<0?e:e.replace(g0,"$1")}function Ui(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function es(e){if(e>65535){e-=65536;var a=55296+(e>>10),i=56320+(e&1023);return String.fromCharCode(a,i)}return String.fromCharCode(e)}var b0=/&([a-z#][a-z0-9]{1,31});/gi,x0=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;function y0(e,a){var i=0,s=Ac(a);return a!==s?s:a.charCodeAt(0)===35&&x0.test(a)&&(i=a[1].toLowerCase()==="x"?parseInt(a.slice(2),16):parseInt(a.slice(1),10),Ui(i))?es(i):e}function br(e){return e.indexOf("&")<0?e:e.replace(b0,y0)}var v0=/[&<>"]/,w0=/[&<>"]/g,_0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function k0(e){return _0[e]}function ut(e){return v0.test(e)?e.replace(w0,k0):e}var N0=Object.freeze({isString:p0,has:Sc,assign:Vi,unescapeMd:ia,isValidEntityCode:Ui,fromCodePoint:es,replaceEntities:br,escapeHtml:ut}),ce={};ce.blockquote_open=function(){return`<blockquote>
84
+ `)};return _a.generateArgumentErrorMessage=e,_a}var wo;function Je(){return wo||(wo=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Predicate=e.validatorSymbol=void 0;const a=ua(),i=Bi(),s=Hd(),r=en(),n=jc();e.validatorSymbol=Symbol("validators");class u{constructor(d,f={}){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:{validators:[]}}),this.context={...this.context,...this.options};const o=this.type.charAt(0).toLowerCase()+this.type.slice(1);this.addValidator({message:(h,l)=>`Expected ${l?.slice(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${(0,a.default)(h)}\``,validator:h=>a.default[o](h)})}[r.testSymbol](d,f,o,h){const l=new Map;for(const{validator:p,message:x}of this.context.validators){if(this.options.optional===!0&&d===void 0)continue;let w;try{w=p(d)}catch(m){w=m}if(w===!0)continue;const b=a.default.function_(o)?o():o,g=b&&h?`\`${b}\``:b,v=g?`${this.type} ${g}`:this.type,k=b||this.type,_=l.get(k),y=x(d,v,w);_?_.add(y):l.set(k,new Set([y]))}if(l.size>0){const p=(0,n.generateArgumentErrorMessage)(l);throw new i.ArgumentError(p,f,l)}}get[e.validatorSymbol](){return this.context.validators}get not(){return(0,s.not)(this)}validate(d){return this.addValidator({message:(f,o,h)=>typeof h=="string"?`(${o}) ${h}`:h(o),validator:f=>{const{message:o,validator:h}=d(f);return h?!0:o}})}is(d){return this.addValidator({message:(f,o,h)=>h?`(${o}) ${h}`:`Expected ${o} \`${f}\` to pass custom validation function`,validator:d})}message(d){const{validators:f}=this.context;return f[f.length-1].message=(o,h)=>typeof d=="function"?d(o,h):d,this}addValidator(d){return this.context.validators.push(d),this}}e.Predicate=u})(Es)),Es}var yn={},Ss={},ka={},Cs,_o;function Wd(){return _o||(_o=1,Cs=function(e){return!isNaN(Date.parse(e))}),Cs}var ko;function Gd(){if(ko)return ka;ko=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.StringPredicate=void 0;const e=ua(),a=Wd(),i=Je();class s extends i.Predicate{constructor(n){super("string",n)}length(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have length \`${n}\`, got \`${u}\``,validator:u=>u.length===n})}minLength(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have a minimum length of \`${n}\`, got \`${u}\``,validator:u=>u.length>=n,negatedMessage:(u,c)=>`Expected ${c} to have a maximum length of \`${n-1}\`, got \`${u}\``})}maxLength(n){return this.addValidator({message:(u,c)=>`Expected ${c} to have a maximum length of \`${n}\`, got \`${u}\``,validator:u=>u.length<=n,negatedMessage:(u,c)=>`Expected ${c} to have a minimum length of \`${n+1}\`, got \`${u}\``})}matches(n){return this.addValidator({message:(u,c)=>`Expected ${c} to match \`${n}\`, got \`${u}\``,validator:u=>n.test(u)})}startsWith(n){return this.addValidator({message:(u,c)=>`Expected ${c} to start with \`${n}\`, got \`${u}\``,validator:u=>u.startsWith(n)})}endsWith(n){return this.addValidator({message:(u,c)=>`Expected ${c} to end with \`${n}\`, got \`${u}\``,validator:u=>u.endsWith(n)})}includes(n){return this.addValidator({message:(u,c)=>`Expected ${c} to include \`${n}\`, got \`${u}\``,validator:u=>u.includes(n)})}oneOf(n){return this.addValidator({message:(u,c)=>{let d=JSON.stringify(n);if(n.length>10){const f=n.length-10;d=JSON.stringify(n.slice(0,10)).replace(/]$/,`,…+${f} more]`)}return`Expected ${c} to be one of \`${d}\`, got \`${u}\``},validator:u=>n.includes(u)})}get empty(){return this.addValidator({message:(n,u)=>`Expected ${u} to be empty, got \`${n}\``,validator:n=>n===""})}get nonEmpty(){return this.addValidator({message:(n,u)=>`Expected ${u} to not be empty`,validator:n=>n!==""})}equals(n){return this.addValidator({message:(u,c)=>`Expected ${c} to be equal to \`${n}\`, got \`${u}\``,validator:u=>u===n})}get alphanumeric(){return this.addValidator({message:(n,u)=>`Expected ${u} to be alphanumeric, got \`${n}\``,validator:n=>/^[a-z\d]+$/i.test(n)})}get alphabetical(){return this.addValidator({message:(n,u)=>`Expected ${u} to be alphabetical, got \`${n}\``,validator:n=>/^[a-z]+$/gi.test(n)})}get numeric(){return this.addValidator({message:(n,u)=>`Expected ${u} to be numeric, got \`${n}\``,validator:n=>/^[+-]?\d+$/i.test(n)})}get date(){return this.addValidator({message:(n,u)=>`Expected ${u} to be a date, got \`${n}\``,validator:a})}get lowercase(){return this.addValidator({message:(n,u)=>`Expected ${u} to be lowercase, got \`${n}\``,validator:n=>n.trim()!==""&&n===n.toLowerCase()})}get uppercase(){return this.addValidator({message:(n,u)=>`Expected ${u} to be uppercase, got \`${n}\``,validator:n=>n.trim()!==""&&n===n.toUpperCase()})}get url(){return this.addValidator({message:(n,u)=>`Expected ${u} to be a URL, got \`${n}\``,validator:e.default.urlString})}}return ka.StringPredicate=s,ka}var Na={},No;function Jd(){if(No)return Na;No=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.NumberPredicate=void 0;const e=ua(),a=Je();class i extends a.Predicate{constructor(r){super("number",r)}inRange(r,n){return this.addValidator({message:(u,c)=>`Expected ${c} to be in range [${r}..${n}], got ${u}`,validator:u=>e.default.inRange(u,[r,n])})}greaterThan(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be greater than ${r}, got ${n}`,validator:n=>n>r})}greaterThanOrEqual(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be greater than or equal to ${r}, got ${n}`,validator:n=>n>=r})}lessThan(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be less than ${r}, got ${n}`,validator:n=>n<r})}lessThanOrEqual(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be less than or equal to ${r}, got ${n}`,validator:n=>n<=r})}equal(r){return this.addValidator({message:(n,u)=>`Expected ${u} to be equal to ${r}, got ${n}`,validator:n=>n===r})}oneOf(r){return this.addValidator({message:(n,u)=>{let c=JSON.stringify(r);if(r.length>10){const d=r.length-10;c=JSON.stringify(r.slice(0,10)).replace(/]$/,`,…+${d} more]`)}return`Expected ${u} to be one of \`${c}\`, got ${n}`},validator:n=>r.includes(n)})}get integer(){return this.addValidator({message:(r,n)=>`Expected ${n} to be an integer, got ${r}`,validator:r=>e.default.integer(r)})}get finite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be finite, got ${r}`,validator:r=>!e.default.infinite(r)})}get infinite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be infinite, got ${r}`,validator:r=>e.default.infinite(r)})}get positive(){return this.addValidator({message:(r,n)=>`Expected ${n} to be positive, got ${r}`,validator:r=>r>0})}get negative(){return this.addValidator({message:(r,n)=>`Expected ${n} to be negative, got ${r}`,validator:r=>r<0})}get integerOrInfinite(){return this.addValidator({message:(r,n)=>`Expected ${n} to be an integer or infinite, got ${r}`,validator:r=>e.default.integer(r)||e.default.infinite(r)})}get uint8(){return this.integer.inRange(0,255)}get uint16(){return this.integer.inRange(0,65535)}get uint32(){return this.integer.inRange(0,4294967295)}get int8(){return this.integer.inRange(-128,127)}get int16(){return this.integer.inRange(-32768,32767)}get int32(){return this.integer.inRange(-2147483648,2147483647)}}return Na.NumberPredicate=i,Na}var ja={},jo;function Yd(){if(jo)return ja;jo=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.BigIntPredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("bigint",s)}}return ja.BigIntPredicate=a,ja}var Ea={},Eo;function Zd(){if(Eo)return Ea;Eo=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.BooleanPredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("boolean",s)}get true(){return this.addValidator({message:(s,r)=>`Expected ${r} to be true, got ${s}`,validator:s=>s})}get false(){return this.addValidator({message:(s,r)=>`Expected ${r} to be false, got ${s}`,validator:s=>!s})}}return Ea.BooleanPredicate=a,Ea}var Aa={},Xa={exports:{}};Xa.exports;var Ao;function is(){return Ao||(Ao=1,(function(e,a){var i=200,s="__lodash_hash_undefined__",r=1,n=2,u=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",o="[object Boolean]",h="[object Date]",l="[object Error]",p="[object Function]",x="[object GeneratorFunction]",w="[object Map]",b="[object Number]",g="[object Null]",v="[object Object]",k="[object Promise]",_="[object Proxy]",y="[object RegExp]",m="[object Set]",N="[object String]",j="[object Symbol]",A="[object Undefined]",D="[object WeakMap]",C="[object ArrayBuffer]",O="[object DataView]",$="[object Float32Array]",H="[object Float64Array]",F="[object Int8Array]",q="[object Int16Array]",M="[object Int32Array]",Y="[object Uint8Array]",X="[object Uint8ClampedArray]",ae="[object Uint16Array]",I="[object Uint32Array]",ie=/[\\^$.*+?()[\]{}|]/g,R=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,J={};J[$]=J[H]=J[F]=J[q]=J[M]=J[Y]=J[X]=J[ae]=J[I]=!0,J[c]=J[d]=J[C]=J[o]=J[O]=J[h]=J[l]=J[p]=J[w]=J[b]=J[v]=J[y]=J[m]=J[N]=J[D]=!1;var fe=typeof gr=="object"&&gr&&gr.Object===Object&&gr,Q=typeof self=="object"&&self&&self.Object===Object&&self,ne=fe||Q||Function("return this")(),xe=a&&!a.nodeType&&a,Ce=xe&&!0&&e&&!e.nodeType&&e,Z=Ce&&Ce.exports===xe,te=Z&&fe.process,ee=(function(){try{return te&&te.binding&&te.binding("util")}catch{}})(),le=ee&&ee.isTypedArray;function be(T,U){for(var K=-1,ue=T==null?0:T.length,Te=0,ye=[];++K<ue;){var Ie=T[K];U(Ie,K,T)&&(ye[Te++]=Ie)}return ye}function me(T,U){for(var K=-1,ue=U.length,Te=T.length;++K<ue;)T[Te+K]=U[K];return T}function ke(T,U){for(var K=-1,ue=T==null?0:T.length;++K<ue;)if(U(T[K],K,T))return!0;return!1}function pe(T,U){for(var K=-1,ue=Array(T);++K<T;)ue[K]=U(K);return ue}function Ye(T){return function(U){return T(U)}}function we(T,U){return T.has(U)}function de(T,U){return T?.[U]}function Ee(T){var U=-1,K=Array(T.size);return T.forEach(function(ue,Te){K[++U]=[Te,ue]}),K}function Oe(T,U){return function(K){return T(U(K))}}function Be(T){var U=-1,K=Array(T.size);return T.forEach(function(ue){K[++U]=ue}),K}var St=Array.prototype,Jt=Function.prototype,Ze=Object.prototype,Yt=ne["__core-js_shared__"],vr=Jt.toString,Qe=Ze.hasOwnProperty,Ct=(function(){var T=/[^.]+$/.exec(Yt&&Yt.keys&&Yt.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""})(),xt=Ze.toString,or=RegExp("^"+vr.call(Qe).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Zt=Z?ne.Buffer:void 0,Dt=ne.Symbol,yt=ne.Uint8Array,Tt=Ze.propertyIsEnumerable,Gr=St.splice,ft=Dt?Dt.toStringTag:void 0,wr=Object.getOwnPropertySymbols,E=Zt?Zt.isBuffer:void 0,S=Oe(Object.keys,Object),L=$t(ne,"DataView"),W=$t(ne,"Map"),re=$t(ne,"Promise"),he=$t(ne,"Set"),Ne=$t(ne,"WeakMap"),Se=$t(Object,"create"),ht=tt(L),at=tt(W),Xe=tt(re),vt=tt(he),wt=tt(Ne),_t=Dt?Dt.prototype:void 0,et=_t?_t.valueOf:void 0;function ze(T){var U=-1,K=T==null?0:T.length;for(this.clear();++U<K;){var ue=T[U];this.set(ue[0],ue[1])}}function Bt(){this.__data__=Se?Se(null):{},this.size=0}function Le(T){var U=this.has(T)&&delete this.__data__[T];return this.size-=U?1:0,U}function Ot(T){var U=this.__data__;if(Se){var K=U[T];return K===s?void 0:K}return Qe.call(U,T)?U[T]:void 0}function Vt(T){var U=this.__data__;return Se?U[T]!==void 0:Qe.call(U,T)}function pt(T,U){var K=this.__data__;return this.size+=this.has(T)?0:1,K[T]=Se&&U===void 0?s:U,this}ze.prototype.clear=Bt,ze.prototype.delete=Le,ze.prototype.get=Ot,ze.prototype.has=Vt,ze.prototype.set=pt;function Pt(T){var U=-1,K=T==null?0:T.length;for(this.clear();++U<K;){var ue=T[U];this.set(ue[0],ue[1])}}function Xt(){this.__data__=[],this.size=0}function on(T){var U=this.__data__,K=$e(U,T);if(K<0)return!1;var ue=U.length-1;return K==ue?U.pop():Gr.call(U,K,1),--this.size,!0}function ws(T){var U=this.__data__,K=$e(U,T);return K<0?void 0:U[K][1]}function Jr(T){return $e(this.__data__,T)>-1}function ca(T,U){var K=this.__data__,ue=$e(K,T);return ue<0?(++this.size,K.push([T,U])):K[ue][1]=U,this}Pt.prototype.clear=Xt,Pt.prototype.delete=on,Pt.prototype.get=ws,Pt.prototype.has=Jr,Pt.prototype.set=ca;function Ut(T){var U=-1,K=T==null?0:T.length;for(this.clear();++U<K;){var ue=T[U];this.set(ue[0],ue[1])}}function un(){this.size=0,this.__data__={hash:new ze,map:new(W||Pt),string:new ze}}function ln(T){var U=je(this,T).delete(T);return this.size-=U?1:0,U}function _r(T){return je(this,T).get(T)}function cn(T){return je(this,T).has(T)}function _s(T,U){var K=je(this,T),ue=K.size;return K.set(T,U),this.size+=K.size==ue?0:1,this}Ut.prototype.clear=un,Ut.prototype.delete=ln,Ut.prototype.get=_r,Ut.prototype.has=cn,Ut.prototype.set=_s;function B(T){var U=-1,K=T==null?0:T.length;for(this.__data__=new Ut;++U<K;)this.add(T[U])}function G(T){return this.__data__.set(T,s),this}function se(T){return this.__data__.has(T)}B.prototype.add=B.prototype.push=G,B.prototype.has=se;function oe(T){var U=this.__data__=new Pt(T);this.size=U.size}function De(){this.__data__=new Pt,this.size=0}function _e(T){var U=this.__data__,K=U.delete(T);return this.size=U.size,K}function Pe(T){return this.__data__.get(T)}function Re(T){return this.__data__.has(T)}function mt(T,U){var K=this.__data__;if(K instanceof Pt){var ue=K.__data__;if(!W||ue.length<i-1)return ue.push([T,U]),this.size=++K.size,this;K=this.__data__=new Ut(ue)}return K.set(T,U),this.size=K.size,this}oe.prototype.clear=De,oe.prototype.delete=_e,oe.prototype.get=Pe,oe.prototype.has=Re,oe.prototype.set=mt;function Fe(T,U){var K=dr(T),ue=!K&&Xr(T),Te=!K&&!ue&&fr(T),ye=!K&&!ue&&!Te&&so(T),Ie=K||ue||Te||ye,We=Ie?pe(T.length,String):[],Ke=We.length;for(var Me in T)Qe.call(T,Me)&&!(Ie&&(Me=="length"||Te&&(Me=="offset"||Me=="parent")||ye&&(Me=="buffer"||Me=="byteLength"||Me=="byteOffset")||Lt(Me,Ke)))&&We.push(Me);return We}function $e(T,U){for(var K=T.length;K--;)if(ha(T[K][0],U))return K;return-1}function kt(T,U,K){var ue=U(T);return dr(T)?ue:me(ue,K(T))}function nt(T){return T==null?T===void 0?A:g:ft&&ft in Object(T)?zt(T):cr(T)}function He(T){return pa(T)&&nt(T)==c}function Nt(T,U,K,ue,Te){return T===U?!0:T==null||U==null||!pa(T)&&!pa(U)?T!==T&&U!==U:ur(T,U,K,ue,Nt,Te)}function ur(T,U,K,ue,Te,ye){var Ie=dr(T),We=dr(U),Ke=Ie?d:qe(T),Me=We?d:qe(U);Ke=Ke==c?v:Ke,Me=Me==c?v:Me;var gt=Ke==v,Mt=Me==v,rt=Ke==Me;if(rt&&fr(T)){if(!fr(U))return!1;Ie=!0,gt=!1}if(rt&&!gt)return ye||(ye=new oe),Ie||so(T)?da(T,U,K,ue,Te,ye):ks(T,U,Ke,K,ue,Te,ye);if(!(K&r)){var jt=gt&&Qe.call(T,"__wrapped__"),Et=Mt&&Qe.call(U,"__wrapped__");if(jt||Et){var hr=jt?T.value():T,Kt=Et?U.value():U;return ye||(ye=new oe),Te(hr,Kt,K,ue,ye)}}return rt?(ye||(ye=new oe),Ns(T,U,K,ue,Te,ye)):!1}function Yr(T){if(!no(T)||Nr(T))return!1;var U=jr(T)?or:R;return U.test(tt(T))}function lr(T){return pa(T)&&Er(T.length)&&!!J[nt(T)]}function kr(T){if(!Zr(T))return S(T);var U=[];for(var K in Object(T))Qe.call(T,K)&&K!="constructor"&&U.push(K);return U}function da(T,U,K,ue,Te,ye){var Ie=K&r,We=T.length,Ke=U.length;if(We!=Ke&&!(Ie&&Ke>We))return!1;var Me=ye.get(T);if(Me&&ye.get(U))return Me==U;var gt=-1,Mt=!0,rt=K&n?new B:void 0;for(ye.set(T,U),ye.set(U,T);++gt<We;){var jt=T[gt],Et=U[gt];if(ue)var hr=Ie?ue(Et,jt,gt,U,T,ye):ue(jt,Et,gt,T,U,ye);if(hr!==void 0){if(hr)continue;Mt=!1;break}if(rt){if(!ke(U,function(Kt,Ar){if(!we(rt,Ar)&&(jt===Kt||Te(jt,Kt,K,ue,ye)))return rt.push(Ar)})){Mt=!1;break}}else if(!(jt===Et||Te(jt,Et,K,ue,ye))){Mt=!1;break}}return ye.delete(T),ye.delete(U),Mt}function ks(T,U,K,ue,Te,ye,Ie){switch(K){case O:if(T.byteLength!=U.byteLength||T.byteOffset!=U.byteOffset)return!1;T=T.buffer,U=U.buffer;case C:return!(T.byteLength!=U.byteLength||!ye(new yt(T),new yt(U)));case o:case h:case b:return ha(+T,+U);case l:return T.name==U.name&&T.message==U.message;case y:case N:return T==U+"";case w:var We=Ee;case m:var Ke=ue&r;if(We||(We=Be),T.size!=U.size&&!Ke)return!1;var Me=Ie.get(T);if(Me)return Me==U;ue|=n,Ie.set(T,U);var gt=da(We(T),We(U),ue,Te,ye,Ie);return Ie.delete(T),gt;case j:if(et)return et.call(T)==et.call(U)}return!1}function Ns(T,U,K,ue,Te,ye){var Ie=K&r,We=Ae(T),Ke=We.length,Me=Ae(U),gt=Me.length;if(Ke!=gt&&!Ie)return!1;for(var Mt=Ke;Mt--;){var rt=We[Mt];if(!(Ie?rt in U:Qe.call(U,rt)))return!1}var jt=ye.get(T);if(jt&&ye.get(U))return jt==U;var Et=!0;ye.set(T,U),ye.set(U,T);for(var hr=Ie;++Mt<Ke;){rt=We[Mt];var Kt=T[rt],Ar=U[rt];if(ue)var io=Ie?ue(Ar,Kt,rt,U,T,ye):ue(Kt,Ar,rt,T,U,ye);if(!(io===void 0?Kt===Ar||Te(Kt,Ar,K,ue,ye):io)){Et=!1;break}hr||(hr=rt=="constructor")}if(Et&&!hr){var fn=T.constructor,hn=U.constructor;fn!=hn&&"constructor"in T&&"constructor"in U&&!(typeof fn=="function"&&fn instanceof fn&&typeof hn=="function"&&hn instanceof hn)&&(Et=!1)}return ye.delete(T),ye.delete(U),Et}function Ae(T){return kt(T,Pd,fa)}function je(T,U){var K=T.__data__;return Ht(U)?K[typeof U=="string"?"string":"hash"]:K.map}function $t(T,U){var K=de(T,U);return Yr(K)?K:void 0}function zt(T){var U=Qe.call(T,ft),K=T[ft];try{T[ft]=void 0;var ue=!0}catch{}var Te=xt.call(T);return ue&&(U?T[ft]=K:delete T[ft]),Te}var fa=wr?function(T){return T==null?[]:(T=Object(T),be(wr(T),function(U){return Tt.call(T,U)}))}:$d,qe=nt;(L&&qe(new L(new ArrayBuffer(1)))!=O||W&&qe(new W)!=w||re&&qe(re.resolve())!=k||he&&qe(new he)!=m||Ne&&qe(new Ne)!=D)&&(qe=function(T){var U=nt(T),K=U==v?T.constructor:void 0,ue=K?tt(K):"";if(ue)switch(ue){case ht:return O;case at:return w;case Xe:return k;case vt:return m;case wt:return D}return U});function Lt(T,U){return U=U??u,!!U&&(typeof T=="number"||V.test(T))&&T>-1&&T%1==0&&T<U}function Ht(T){var U=typeof T;return U=="string"||U=="number"||U=="symbol"||U=="boolean"?T!=="__proto__":T===null}function Nr(T){return!!Ct&&Ct in T}function Zr(T){var U=T&&T.constructor,K=typeof U=="function"&&U.prototype||Ze;return T===K}function cr(T){return xt.call(T)}function tt(T){if(T!=null){try{return vr.call(T)}catch{}try{return T+""}catch{}}return""}function ha(T,U){return T===U||T!==T&&U!==U}var Xr=He((function(){return arguments})())?He:function(T){return pa(T)&&Qe.call(T,"callee")&&!Tt.call(T,"callee")},dr=Array.isArray;function Kr(T){return T!=null&&Er(T.length)&&!jr(T)}var fr=E||Ld;function dn(T,U){return Nt(T,U)}function jr(T){if(!no(T))return!1;var U=nt(T);return U==p||U==x||U==f||U==_}function Er(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=u}function no(T){var U=typeof T;return T!=null&&(U=="object"||U=="function")}function pa(T){return T!=null&&typeof T=="object"}var so=le?Ye(le):lr;function Pd(T){return Kr(T)?Fe(T):kr(T)}function $d(){return[]}function Ld(){return!1}e.exports=dn})(Xa,Xa.exports)),Xa.exports}var Dr={},vn={},So;function os(){if(So)return vn;So=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=en();function a(i,s,r,n=!0){r[e.testSymbol](i,a,s,n)}return vn.default=a,vn}var Co;function Ec(){if(Co)return Dr;Co=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.exact=Dr.partial=void 0;const e=ua(),a=os(),i=en();function s(n,u,c){try{for(const d of Object.keys(u)){const f=c?`${c}.${d}`:d;if((0,i.isPredicate)(u[d]))(0,a.default)(n[d],f,u[d]);else if(e.default.plainObject(u[d])){const o=s(n[d],u[d],f);if(o!==!0)return o}}return!0}catch(d){return d.message}}Dr.partial=s;function r(n,u,c,d){try{const f=new Set(Object.keys(n));for(const o of Object.keys(u)){f.delete(o);const h=c?`${c}.${o}`:o;if((0,i.isPredicate)(u[o]))(0,a.default)(n[o],h,u[o]);else if(e.default.plainObject(u[o])){if(!Object.prototype.hasOwnProperty.call(n,o))return`Expected \`${h}\` to exist`;const l=r(n[o],u[o],h);if(l!==!0)return l}}if(f.size>0){const o=[...f.keys()][0],h=c?`${c}.${o}`:o;return`Did not expect ${d?"element":"property"} \`${h}\` to exist, got \`${n[o]}\``}return!0}catch(f){return f.message}}return Dr.exact=r,Dr}var wn={},Do;function us(){if(Do)return wn;Do=1,Object.defineProperty(wn,"__esModule",{value:!0});const e=os();return wn.default=(a,i,s)=>{try{for(const r of a)(0,e.default)(r,i,s,!1);return!0}catch(r){return r.message}},wn}var To;function Xd(){if(To)return Aa;To=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.ArrayPredicate=void 0;const e=is(),a=Je(),i=Ec(),s=us();class r extends a.Predicate{constructor(u){super("array",u)}length(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have length \`${u}\`, got \`${c.length}\``,validator:c=>c.length===u})}minLength(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum length of \`${u}\`, got \`${c.length}\``,validator:c=>c.length>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum length of \`${u-1}\`, got \`${c.length}\``})}maxLength(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum length of \`${u}\`, got \`${c.length}\``,validator:c=>c.length<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum length of \`${u+1}\`, got \`${c.length}\``})}startsWith(u){return this.addValidator({message:(c,d)=>`Expected ${d} to start with \`${u}\`, got \`${c[0]}\``,validator:c=>c[0]===u})}endsWith(u){return this.addValidator({message:(c,d)=>`Expected ${d} to end with \`${u}\`, got \`${c[c.length-1]}\``,validator:c=>c[c.length-1]===u})}includes(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to include all elements of \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>u.every(d=>c.includes(d))})}includesAny(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to include any element of \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>u.some(d=>c.includes(d))})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify(u)}\``,validator:u=>u.length===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.length>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify(u)}\`, got \`${JSON.stringify(c)}\``,validator:c=>e(c,u)})}ofType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,s.default)(c,"values",u)})}exactShape(u){const c=u;return this.addValidator({message:(d,f,o)=>`${o.replace("Expected","Expected element")} in ${f}`,validator:d=>(0,i.exact)(d,c,void 0,!0)})}}return Aa.ArrayPredicate=r,Aa}var Sa={},Ds,Oo;function Kd(){return Oo||(Oo=1,Ds=e=>{const a=typeof e;return e!==null&&(a==="object"||a==="function")}),Ds}var Ts,Po;function Qd(){if(Po)return Ts;Po=1;const e=Kd(),a=new Set(["__proto__","prototype","constructor"]),i=r=>!r.some(n=>a.has(n));function s(r){const n=r.split("."),u=[];for(let c=0;c<n.length;c++){let d=n[c];for(;d[d.length-1]==="\\"&&n[c+1]!==void 0;)d=d.slice(0,-1)+".",d+=n[++c];u.push(d)}return i(u)?u:[]}return Ts={get(r,n,u){if(!e(r)||typeof n!="string")return u===void 0?r:u;const c=s(n);if(c.length!==0){for(let d=0;d<c.length;d++)if(r=r[c[d]],r==null){if(d!==c.length-1)return u;break}return r===void 0?u:r}},set(r,n,u){if(!e(r)||typeof n!="string")return r;const c=r,d=s(n);for(let f=0;f<d.length;f++){const o=d[f];e(r[o])||(r[o]={}),f===d.length-1&&(r[o]=u),r=r[o]}return c},delete(r,n){if(!e(r)||typeof n!="string")return!1;const u=s(n);for(let c=0;c<u.length;c++){const d=u[c];if(c===u.length-1)return delete r[d],!0;if(r=r[d],!e(r))return!1}},has(r,n){if(!e(r)||typeof n!="string")return!1;const u=s(n);if(u.length===0)return!1;for(let c=0;c<u.length;c++)if(e(r)){if(!(u[c]in r))return!1;r=r[u[c]]}else return!1;return!0}},Ts}var _n={},$o;function tn(){return $o||($o=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.default=(e,a,i=5)=>{const s=[];for(const r of a)if(!e.has(r)&&(s.push(r),s.length===i))return s;return s.length===0?!0:s}),_n}var kn={},Lo;function e0(){if(Lo)return kn;Lo=1,Object.defineProperty(kn,"__esModule",{value:!0});const e=ua(),a=os(),i=(s,r)=>e.default.plainObject(s)?Object.values(s).every(n=>i(n,r)):((0,a.default)(s,"deep values",r,!1),!0);return kn.default=(s,r)=>{try{return i(s,r)}catch(n){return n.message}},kn}var Mo;function t0(){if(Mo)return Sa;Mo=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.ObjectPredicate=void 0;const e=ua(),a=Qd(),i=is(),s=tn(),r=us(),n=e0(),u=Ec(),c=Je();class d extends c.Predicate{constructor(o){super("object",o)}get plain(){return this.addValidator({message:(o,h)=>`Expected ${h} to be a plain object`,validator:o=>e.default.plainObject(o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(o)}\``,validator:o=>Object.keys(o).length===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>Object.keys(o).length>0})}valuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>(0,r.default)(Object.values(h),"values",o)})}deepValuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>(0,n.default)(h,o)})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(o)}\`, got \`${JSON.stringify(h)}\``,validator:h=>i(h,o)})}instanceOf(o){return this.addValidator({message:(h,l)=>{var p;let{name:x}=(p=h?.constructor)!==null&&p!==void 0?p:{};return(!x||x==="Object")&&(x=JSON.stringify(h)),`Expected ${l} \`${x}\` to be of type \`${o.name}\``},validator:h=>h instanceof o})}hasKeys(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have keys \`${JSON.stringify(p)}\``,validator:h=>(0,s.default)({has:l=>a.has(h,l)},o)})}hasAnyKeys(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any key of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>a.has(h,l))})}partialShape(o){return this.addValidator({message:(h,l,p)=>`${p.replace("Expected","Expected property")} in ${l}`,validator:h=>(0,u.partial)(h,o)})}exactShape(o){return this.addValidator({message:(h,l,p)=>`${p.replace("Expected","Expected property")} in ${l}`,validator:h=>(0,u.exact)(h,o)})}}return Sa.ObjectPredicate=d,Sa}var Ca={},Ro;function r0(){if(Ro)return Ca;Ro=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.DatePredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("date",s)}before(s){return this.addValidator({message:(r,n)=>`Expected ${n} ${r.toISOString()} to be before ${s.toISOString()}`,validator:r=>r.getTime()<s.getTime()})}after(s){return this.addValidator({message:(r,n)=>`Expected ${n} ${r.toISOString()} to be after ${s.toISOString()}`,validator:r=>r.getTime()>s.getTime()})}}return Ca.DatePredicate=a,Ca}var Da={},Io;function a0(){if(Io)return Da;Io=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.ErrorPredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("error",s)}name(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have name \`${s}\`, got \`${r.name}\``,validator:r=>r.name===s})}message(s){return this.addValidator({message:(r,n)=>`Expected ${n} message to be \`${s}\`, got \`${r.message}\``,validator:r=>r.message===s})}messageIncludes(s){return this.addValidator({message:(r,n)=>`Expected ${n} message to include \`${s}\`, got \`${r.message}\``,validator:r=>r.message.includes(s)})}hasKeys(...s){return this.addValidator({message:(r,n)=>`Expected ${n} message to have keys \`${s.join("`, `")}\``,validator:r=>s.every(n=>Object.prototype.hasOwnProperty.call(r,n))})}instanceOf(s){return this.addValidator({message:(r,n)=>`Expected ${n} \`${r.name}\` to be of type \`${s.name}\``,validator:r=>r instanceof s})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}return Da.ErrorPredicate=a,Da}var Ta={},Fo;function n0(){if(Fo)return Ta;Fo=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.MapPredicate=void 0;const e=is(),a=tn(),i=us(),s=Je();class r extends s.Predicate{constructor(u){super("Map",u)}size(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have size \`${u}\`, got \`${c.size}\``,validator:c=>c.size===u})}minSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum size of \`${u-1}\`, got \`${c.size}\``})}maxSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum size of \`${u+1}\`, got \`${c.size}\``})}hasKeys(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have keys \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(c,u)})}hasAnyKeys(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any key of \`${JSON.stringify(u)}\``,validator:c=>u.some(d=>c.has(d))})}hasValues(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have values \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(new Set(c.values()),u)})}hasAnyValues(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any value of \`${JSON.stringify(u)}\``,validator:c=>{const d=new Set(c.values());return u.some(f=>d.has(f))}})}keysOfType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c.keys(),"keys",u)})}valuesOfType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c.values(),"values",u)})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify([...u])}\``,validator:u=>u.size===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.size>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify([...u])}\`, got \`${JSON.stringify([...c])}\``,validator:c=>e(c,u)})}}return Ta.MapPredicate=r,Ta}var Oa={},qo;function s0(){if(qo)return Oa;qo=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.WeakMapPredicate=void 0;const e=tn(),a=Je();class i extends a.Predicate{constructor(r){super("WeakMap",r)}hasKeys(...r){return this.addValidator({message:(n,u,c)=>`Expected ${u} to have keys \`${JSON.stringify(c)}\``,validator:n=>(0,e.default)(n,r)})}hasAnyKeys(...r){return this.addValidator({message:(n,u)=>`Expected ${u} to have any key of \`${JSON.stringify(r)}\``,validator:n=>r.some(u=>n.has(u))})}}return Oa.WeakMapPredicate=i,Oa}var Pa={},Bo;function i0(){if(Bo)return Pa;Bo=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.SetPredicate=void 0;const e=is(),a=tn(),i=us(),s=Je();class r extends s.Predicate{constructor(u){super("Set",u)}size(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have size \`${u}\`, got \`${c.size}\``,validator:c=>c.size===u})}minSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a minimum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size>=u,negatedMessage:(c,d)=>`Expected ${d} to have a maximum size of \`${u-1}\`, got \`${c.size}\``})}maxSize(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have a maximum size of \`${u}\`, got \`${c.size}\``,validator:c=>c.size<=u,negatedMessage:(c,d)=>`Expected ${d} to have a minimum size of \`${u+1}\`, got \`${c.size}\``})}has(...u){return this.addValidator({message:(c,d,f)=>`Expected ${d} to have items \`${JSON.stringify(f)}\``,validator:c=>(0,a.default)(c,u)})}hasAny(...u){return this.addValidator({message:(c,d)=>`Expected ${d} to have any item of \`${JSON.stringify(u)}\``,validator:c=>u.some(d=>c.has(d))})}ofType(u){return this.addValidator({message:(c,d,f)=>`(${d}) ${f}`,validator:c=>(0,i.default)(c,"values",u)})}get empty(){return this.addValidator({message:(u,c)=>`Expected ${c} to be empty, got \`${JSON.stringify([...u])}\``,validator:u=>u.size===0})}get nonEmpty(){return this.addValidator({message:(u,c)=>`Expected ${c} to not be empty`,validator:u=>u.size>0})}deepEqual(u){return this.addValidator({message:(c,d)=>`Expected ${d} to be deeply equal to \`${JSON.stringify([...u])}\`, got \`${JSON.stringify([...c])}\``,validator:c=>e(c,u)})}}return Pa.SetPredicate=r,Pa}var $a={},Vo;function o0(){if(Vo)return $a;Vo=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.WeakSetPredicate=void 0;const e=tn(),a=Je();class i extends a.Predicate{constructor(r){super("WeakSet",r)}has(...r){return this.addValidator({message:(n,u,c)=>`Expected ${u} to have items \`${JSON.stringify(c)}\``,validator:n=>(0,e.default)(n,r)})}hasAny(...r){return this.addValidator({message:(n,u)=>`Expected ${u} to have any item of \`${JSON.stringify(r)}\``,validator:n=>r.some(u=>n.has(u))})}}return $a.WeakSetPredicate=i,$a}var La={},Uo;function u0(){if(Uo)return La;Uo=1,Object.defineProperty(La,"__esModule",{value:!0}),La.TypedArrayPredicate=void 0;const e=Je();class a extends e.Predicate{byteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===s})}minByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=s,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s-1}\`, got \`${r.byteLength}\``})}maxByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=s,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s+1}\`, got \`${r.byteLength}\``})}length(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have length \`${s}\`, got \`${r.length}\``,validator:r=>r.length===s})}minLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum length of \`${s}\`, got \`${r.length}\``,validator:r=>r.length>=s,negatedMessage:(r,n)=>`Expected ${n} to have a maximum length of \`${s-1}\`, got \`${r.length}\``})}maxLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum length of \`${s}\`, got \`${r.length}\``,validator:r=>r.length<=s,negatedMessage:(r,n)=>`Expected ${n} to have a minimum length of \`${s+1}\`, got \`${r.length}\``})}}return La.TypedArrayPredicate=a,La}var Ma={},zo;function l0(){if(zo)return Ma;zo=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.ArrayBufferPredicate=void 0;const e=Je();class a extends e.Predicate{byteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===s})}minByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=s,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s-1}\`, got \`${r.byteLength}\``})}maxByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=s,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s+1}\`, got \`${r.byteLength}\``})}}return Ma.ArrayBufferPredicate=a,Ma}var Ra={},Ho;function c0(){if(Ho)return Ra;Ho=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.DataViewPredicate=void 0;const e=Je();class a extends e.Predicate{constructor(s){super("DataView",s)}byteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength===s})}minByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength>=s,negatedMessage:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s-1}\`, got \`${r.byteLength}\``})}maxByteLength(s){return this.addValidator({message:(r,n)=>`Expected ${n} to have a maximum byte length of \`${s}\`, got \`${r.byteLength}\``,validator:r=>r.byteLength<=s,negatedMessage:(r,n)=>`Expected ${n} to have a minimum byte length of \`${s+1}\`, got \`${r.byteLength}\``})}}return Ra.DataViewPredicate=a,Ra}var Ia={},Wo;function d0(){if(Wo)return Ia;Wo=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.AnyPredicate=void 0;const e=Bi(),a=en(),i=jc();class s{constructor(n,u={}){Object.defineProperty(this,"predicates",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:u})}[a.testSymbol](n,u,c,d){const f=new Map;for(const o of this.predicates)try{u(n,c,o,d);return}catch(h){if(n===void 0&&this.options.optional===!0)return;if(h instanceof e.ArgumentError)for(const[l,p]of h.validationErrors.entries()){const x=f.get(l);f.set(l,new Set([...x??[],...p]))}}if(f.size>0){const o=(0,i.generateArgumentErrorMessage)(f,!0);throw new e.ArgumentError(`Any predicate failed with the following errors:
85
+ ${o}`,u,f)}}}return Ia.AnyPredicate=s,Ia}var Go;function Pi(){return Go||(Go=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnyPredicate=e.DataViewPredicate=e.ArrayBufferPredicate=e.TypedArrayPredicate=e.WeakSetPredicate=e.SetPredicate=e.WeakMapPredicate=e.MapPredicate=e.ErrorPredicate=e.DatePredicate=e.ObjectPredicate=e.ArrayPredicate=e.BooleanPredicate=e.BigIntPredicate=e.NumberPredicate=e.StringPredicate=void 0;const a=Gd();Object.defineProperty(e,"StringPredicate",{enumerable:!0,get:function(){return a.StringPredicate}});const i=Jd();Object.defineProperty(e,"NumberPredicate",{enumerable:!0,get:function(){return i.NumberPredicate}});const s=Yd();Object.defineProperty(e,"BigIntPredicate",{enumerable:!0,get:function(){return s.BigIntPredicate}});const r=Zd();Object.defineProperty(e,"BooleanPredicate",{enumerable:!0,get:function(){return r.BooleanPredicate}});const n=Je(),u=Xd();Object.defineProperty(e,"ArrayPredicate",{enumerable:!0,get:function(){return u.ArrayPredicate}});const c=t0();Object.defineProperty(e,"ObjectPredicate",{enumerable:!0,get:function(){return c.ObjectPredicate}});const d=r0();Object.defineProperty(e,"DatePredicate",{enumerable:!0,get:function(){return d.DatePredicate}});const f=a0();Object.defineProperty(e,"ErrorPredicate",{enumerable:!0,get:function(){return f.ErrorPredicate}});const o=n0();Object.defineProperty(e,"MapPredicate",{enumerable:!0,get:function(){return o.MapPredicate}});const h=s0();Object.defineProperty(e,"WeakMapPredicate",{enumerable:!0,get:function(){return h.WeakMapPredicate}});const l=i0();Object.defineProperty(e,"SetPredicate",{enumerable:!0,get:function(){return l.SetPredicate}});const p=o0();Object.defineProperty(e,"WeakSetPredicate",{enumerable:!0,get:function(){return p.WeakSetPredicate}});const x=u0();Object.defineProperty(e,"TypedArrayPredicate",{enumerable:!0,get:function(){return x.TypedArrayPredicate}});const w=l0();Object.defineProperty(e,"ArrayBufferPredicate",{enumerable:!0,get:function(){return w.ArrayBufferPredicate}});const b=c0();Object.defineProperty(e,"DataViewPredicate",{enumerable:!0,get:function(){return b.DataViewPredicate}});const g=d0();Object.defineProperty(e,"AnyPredicate",{enumerable:!0,get:function(){return g.AnyPredicate}}),e.default=(v,k)=>(Object.defineProperties(v,{string:{get:()=>new a.StringPredicate(k)},number:{get:()=>new i.NumberPredicate(k)},bigint:{get:()=>new s.BigIntPredicate(k)},boolean:{get:()=>new r.BooleanPredicate(k)},undefined:{get:()=>new n.Predicate("undefined",k)},null:{get:()=>new n.Predicate("null",k)},nullOrUndefined:{get:()=>new n.Predicate("nullOrUndefined",k)},nan:{get:()=>new n.Predicate("nan",k)},symbol:{get:()=>new n.Predicate("symbol",k)},array:{get:()=>new u.ArrayPredicate(k)},object:{get:()=>new c.ObjectPredicate(k)},date:{get:()=>new d.DatePredicate(k)},error:{get:()=>new f.ErrorPredicate(k)},map:{get:()=>new o.MapPredicate(k)},weakMap:{get:()=>new h.WeakMapPredicate(k)},set:{get:()=>new l.SetPredicate(k)},weakSet:{get:()=>new p.WeakSetPredicate(k)},function:{get:()=>new n.Predicate("Function",k)},buffer:{get:()=>new n.Predicate("Buffer",k)},regExp:{get:()=>new n.Predicate("RegExp",k)},promise:{get:()=>new n.Predicate("Promise",k)},typedArray:{get:()=>new x.TypedArrayPredicate("TypedArray",k)},int8Array:{get:()=>new x.TypedArrayPredicate("Int8Array",k)},uint8Array:{get:()=>new x.TypedArrayPredicate("Uint8Array",k)},uint8ClampedArray:{get:()=>new x.TypedArrayPredicate("Uint8ClampedArray",k)},int16Array:{get:()=>new x.TypedArrayPredicate("Int16Array",k)},uint16Array:{get:()=>new x.TypedArrayPredicate("Uint16Array",k)},int32Array:{get:()=>new x.TypedArrayPredicate("Int32Array",k)},uint32Array:{get:()=>new x.TypedArrayPredicate("Uint32Array",k)},float32Array:{get:()=>new x.TypedArrayPredicate("Float32Array",k)},float64Array:{get:()=>new x.TypedArrayPredicate("Float64Array",k)},arrayBuffer:{get:()=>new w.ArrayBufferPredicate("ArrayBuffer",k)},sharedArrayBuffer:{get:()=>new w.ArrayBufferPredicate("SharedArrayBuffer",k)},dataView:{get:()=>new b.DataViewPredicate(k)},iterable:{get:()=>new n.Predicate("Iterable",k)},any:{value:(..._)=>new g.AnyPredicate(_,k)}}),v)})(Ss)),Ss}var Jo;function f0(){if(Jo)return yn;Jo=1,Object.defineProperty(yn,"__esModule",{value:!0});const e=Pi();return yn.default=a=>(Object.defineProperties(a,{optional:{get:()=>(0,e.default)({},{optional:!0})}}),a),yn}var Yo;function rn(){return Yo||(Yo=1,(function(e){var a=Cr&&Cr.__createBinding||(Object.create?(function(p,x,w,b){b===void 0&&(b=w);var g=Object.getOwnPropertyDescriptor(x,w);(!g||("get"in g?!x.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return x[w]}}),Object.defineProperty(p,b,g)}):(function(p,x,w,b){b===void 0&&(b=w),p[b]=x[w]})),i=Cr&&Cr.__exportStar||function(p,x){for(var w in p)w!=="default"&&!Object.prototype.hasOwnProperty.call(x,w)&&a(x,p,w)};Object.defineProperty(e,"__esModule",{value:!0}),e.ArgumentError=e.Predicate=void 0;const s=Bd(),r=Vd(),n=Je();Object.defineProperty(e,"Predicate",{enumerable:!0,get:function(){return n.Predicate}});const u=en(),c=f0(),d=Pi(),f=os(),o=(p,x,w)=>{if(!(0,u.isPredicate)(x)&&typeof x!="string")throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof x}\``);if((0,u.isPredicate)(x)){const b=(0,s.default)();(0,f.default)(p,()=>(0,r.inferLabel)(b),x);return}(0,f.default)(p,x,w)};Object.defineProperties(o,{isValid:{value:(p,x)=>{try{return(0,f.default)(p,"",x),!0}catch{return!1}}},create:{value:(p,x)=>(w,b)=>{if((0,u.isPredicate)(p)){const g=(0,s.default)();(0,f.default)(w,b??(()=>(0,r.inferLabel)(g)),p);return}(0,f.default)(w,b??p,x)}}});const h=(0,d.default)((0,c.default)(o));e.default=h,i(Pi(),e);var l=Bi();Object.defineProperty(e,"ArgumentError",{enumerable:!0,get:function(){return l.ArgumentError}})})(Cr)),Cr}var Nn;function Ac(e){return Nn=Nn||document.createElement("textarea"),Nn.innerHTML="&"+e+";",Nn.value}function h0(e){return Object.prototype.toString.call(e)}function p0(e){return h0(e)==="[object String]"}var m0=Object.prototype.hasOwnProperty;function Sc(e,a){return e?m0.call(e,a):!1}function Vi(e){var a=[].slice.call(arguments,1);return a.forEach(function(i){if(i){if(typeof i!="object")throw new TypeError(i+"must be object");Object.keys(i).forEach(function(s){e[s]=i[s]})}}),e}var g0=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function ia(e){return e.indexOf("\\")<0?e:e.replace(g0,"$1")}function Ui(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function es(e){if(e>65535){e-=65536;var a=55296+(e>>10),i=56320+(e&1023);return String.fromCharCode(a,i)}return String.fromCharCode(e)}var b0=/&([a-z#][a-z0-9]{1,31});/gi,x0=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;function y0(e,a){var i=0,s=Ac(a);return a!==s?s:a.charCodeAt(0)===35&&x0.test(a)&&(i=a[1].toLowerCase()==="x"?parseInt(a.slice(2),16):parseInt(a.slice(1),10),Ui(i))?es(i):e}function br(e){return e.indexOf("&")<0?e:e.replace(b0,y0)}var v0=/[&<>"]/,w0=/[&<>"]/g,_0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function k0(e){return _0[e]}function ut(e){return v0.test(e)?e.replace(w0,k0):e}var N0=Object.freeze({isString:p0,has:Sc,assign:Vi,unescapeMd:ia,isValidEntityCode:Ui,fromCodePoint:es,replaceEntities:br,escapeHtml:ut}),ce={};ce.blockquote_open=function(){return`<blockquote>
86
86
  `};ce.blockquote_close=function(e,a){return"</blockquote>"+Vr(e,a)};ce.code=function(e,a){return e[a].block?"<pre><code>"+ut(e[a].content)+"</code></pre>"+Vr(e,a):"<code>"+ut(e[a].content)+"</code>"};ce.fence=function(e,a,i,s,r){var n=e[a],u="",c=i.langPrefix,d="",f,o,h;if(n.params){if(f=n.params.split(/\s+/g),o=f.join(" "),Sc(r.rules.fence_custom,f[0]))return r.rules.fence_custom[f[0]](e,a,i,s,r);d=ut(br(ia(o))),u=' class="'+c+d+'"'}return i.highlight?h=i.highlight.apply(i.highlight,[n.content].concat(f))||ut(n.content):h=ut(n.content),"<pre><code"+u+">"+h+"</code></pre>"+Vr(e,a)};ce.fence_custom={};ce.heading_open=function(e,a){return"<h"+e[a].hLevel+">"};ce.heading_close=function(e,a){return"</h"+e[a].hLevel+`>
87
87
  `};ce.hr=function(e,a,i){return(i.xhtmlOut?"<hr />":"<hr>")+Vr(e,a)};ce.bullet_list_open=function(){return`<ul>
88
88
  `};ce.bullet_list_close=function(e,a){return"</ul>"+Vr(e,a)};ce.list_item_open=function(){return"<li>"};ce.list_item_close=function(){return`</li>
@@ -111,30 +111,30 @@ ${o}`,u,f)}}}return Ia.AnyPredicate=s,Ia}var Go;function Pi(){return Go||(Go=1,(
111
111
  `};ce.dt_close=function(){return`</dt>
112
112
  `};ce.dd_close=function(){return`</dd>
113
113
  `};function Cc(e,a){return++a>=e.length-2?a:e[a].type==="paragraph_open"&&e[a].tight&&e[a+1].type==="inline"&&e[a+1].content.length===0&&e[a+2].type==="paragraph_close"&&e[a+2].tight?Cc(e,a+2):a}var Vr=ce.getBreak=function(a,i){return i=Cc(a,i),i<a.length&&a[i].type==="list_item_close"?"":`
114
- `};function zi(){this.rules=Vi({},ce),this.getBreak=ce.getBreak}zi.prototype.renderInline=function(e,a,i){for(var s=this.rules,r=e.length,n=0,u="";r--;)u+=s[e[n].type](e,n++,a,i,this);return u};zi.prototype.render=function(e,a,i){for(var s=this.rules,r=e.length,n=-1,u="";++n<r;)e[n].type==="inline"?u+=this.renderInline(e[n].children,a,i):u+=s[e[n].type](e,n,a,i,this);return u};function bt(){this.__rules__=[],this.__cache__=null}bt.prototype.__find__=function(e){for(var a=this.__rules__.length,i=-1;a--;)if(this.__rules__[++i].name===e)return i;return-1};bt.prototype.__compile__=function(){var e=this,a=[""];e.__rules__.forEach(function(i){i.enabled&&i.alt.forEach(function(s){a.indexOf(s)<0&&a.push(s)})}),e.__cache__={},a.forEach(function(i){e.__cache__[i]=[],e.__rules__.forEach(function(s){s.enabled&&(i&&s.alt.indexOf(i)<0||e.__cache__[i].push(s.fn))})})};bt.prototype.at=function(e,a,i){var s=this.__find__(e),r=i||{};if(s===-1)throw new Error("Parser rule not found: "+e);this.__rules__[s].fn=a,this.__rules__[s].alt=r.alt||[],this.__cache__=null};bt.prototype.before=function(e,a,i,s){var r=this.__find__(e),n=s||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r,0,{name:a,enabled:!0,fn:i,alt:n.alt||[]}),this.__cache__=null};bt.prototype.after=function(e,a,i,s){var r=this.__find__(e),n=s||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r+1,0,{name:a,enabled:!0,fn:i,alt:n.alt||[]}),this.__cache__=null};bt.prototype.push=function(e,a,i){var s=i||{};this.__rules__.push({name:e,enabled:!0,fn:a,alt:s.alt||[]}),this.__cache__=null};bt.prototype.enable=function(e,a){e=Array.isArray(e)?e:[e],a&&this.__rules__.forEach(function(i){i.enabled=!1}),e.forEach(function(i){var s=this.__find__(i);if(s<0)throw new Error("Rules manager: invalid rule name "+i);this.__rules__[s].enabled=!0},this),this.__cache__=null};bt.prototype.disable=function(e){e=Array.isArray(e)?e:[e],e.forEach(function(a){var i=this.__find__(a);if(i<0)throw new Error("Rules manager: invalid rule name "+a);this.__rules__[i].enabled=!1},this),this.__cache__=null};bt.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function j0(e){e.inlineMode?e.tokens.push({type:"inline",content:e.src.replace(/\n/g," ").trim(),level:0,lines:[0,1],children:[]}):e.block.parse(e.src,e.options,e.env,e.tokens)}function Ur(e,a,i,s,r){this.src=e,this.env=s,this.options=i,this.parser=a,this.tokens=r,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.isInLabel=!1,this.linkLevel=0,this.linkContent="",this.labelUnmatchedScopes=0}Ur.prototype.pushPending=function(){this.tokens.push({type:"text",content:this.pending,level:this.pendingLevel}),this.pending=""};Ur.prototype.push=function(e){this.pending&&this.pushPending(),this.tokens.push(e),this.pendingLevel=this.level};Ur.prototype.cacheSet=function(e,a){for(var i=this.cache.length;i<=e;i++)this.cache.push(0);this.cache[e]=a};Ur.prototype.cacheGet=function(e){return e<this.cache.length?this.cache[e]:0};function Qa(e,a){var i,s,r,n=-1,u=e.posMax,c=e.pos,d=e.isInLabel;if(e.isInLabel)return-1;if(e.labelUnmatchedScopes)return e.labelUnmatchedScopes--,-1;for(e.pos=a+1,e.isInLabel=!0,i=1;e.pos<u;){if(r=e.src.charCodeAt(e.pos),r===91)i++;else if(r===93&&(i--,i===0)){s=!0;break}e.parser.skipToken(e)}return s?(n=e.pos,e.labelUnmatchedScopes=0):e.labelUnmatchedScopes=i-1,e.pos=c,e.isInLabel=d,n}function E0(e,a,i,s){var r,n,u,c,d,f;if(e.charCodeAt(0)!==42||e.charCodeAt(1)!==91||e.indexOf("]:")===-1||(r=new Ur(e,a,i,s,[]),n=Qa(r,1),n<0||e.charCodeAt(n+1)!==58))return-1;for(c=r.posMax,u=n+2;u<c&&r.src.charCodeAt(u)!==10;u++);return d=e.slice(2,n),f=e.slice(n+2,u).trim(),f.length===0?-1:(s.abbreviations||(s.abbreviations={}),typeof s.abbreviations[":"+d]>"u"&&(s.abbreviations[":"+d]=f),u)}function A0(e){var a=e.tokens,i,s,r,n;if(!e.inlineMode){for(i=1,s=a.length-1;i<s;i++)if(a[i-1].type==="paragraph_open"&&a[i].type==="inline"&&a[i+1].type==="paragraph_close"){for(r=a[i].content;r.length&&(n=E0(r,e.inline,e.options,e.env),!(n<0));)r=r.slice(n).trim();a[i].content=r,r.length||(a[i-1].tight=!0,a[i+1].tight=!0)}}}function Li(e){var a=br(e);try{a=decodeURI(a)}catch{}return encodeURI(a)}function Dc(e,a){var i,s,r,n=a,u=e.posMax;if(e.src.charCodeAt(a)===60){for(a++;a<u;){if(i=e.src.charCodeAt(a),i===10)return!1;if(i===62)return r=Li(ia(e.src.slice(n+1,a))),e.parser.validateLink(r)?(e.pos=a+1,e.linkContent=r,!0):!1;if(i===92&&a+1<u){a+=2;continue}a++}return!1}for(s=0;a<u&&(i=e.src.charCodeAt(a),!(i===32||i<32||i===127));){if(i===92&&a+1<u){a+=2;continue}if(i===40&&(s++,s>1)||i===41&&(s--,s<0))break;a++}return n===a||(r=ia(e.src.slice(n,a)),!e.parser.validateLink(r))?!1:(e.linkContent=r,e.pos=a,!0)}function Tc(e,a){var i,s=a,r=e.posMax,n=e.src.charCodeAt(a);if(n!==34&&n!==39&&n!==40)return!1;for(a++,n===40&&(n=41);a<r;){if(i=e.src.charCodeAt(a),i===n)return e.pos=a+1,e.linkContent=ia(e.src.slice(s+1,a)),!0;if(i===92&&a+1<r){a+=2;continue}a++}return!1}function Oc(e){return e.trim().replace(/\s+/g," ").toUpperCase()}function S0(e,a,i,s){var r,n,u,c,d,f,o,h,l;if(e.charCodeAt(0)!==91||e.indexOf("]:")===-1||(r=new Ur(e,a,i,s,[]),n=Qa(r,0),n<0||e.charCodeAt(n+1)!==58))return-1;for(c=r.posMax,u=n+2;u<c&&(d=r.src.charCodeAt(u),!(d!==32&&d!==10));u++);if(!Dc(r,u))return-1;for(o=r.linkContent,u=r.pos,f=u,u=u+1;u<c&&(d=r.src.charCodeAt(u),!(d!==32&&d!==10));u++);for(u<c&&f!==u&&Tc(r,u)?(h=r.linkContent,u=r.pos):(h="",u=f);u<c&&r.src.charCodeAt(u)===32;)u++;return u<c&&r.src.charCodeAt(u)!==10?-1:(l=Oc(e.slice(1,n)),typeof s.references[l]>"u"&&(s.references[l]={title:h,href:o}),u)}function C0(e){var a=e.tokens,i,s,r,n;if(e.env.references=e.env.references||{},!e.inlineMode){for(i=1,s=a.length-1;i<s;i++)if(a[i].type==="inline"&&a[i-1].type==="paragraph_open"&&a[i+1].type==="paragraph_close"){for(r=a[i].content;r.length&&(n=S0(r,e.inline,e.options,e.env),!(n<0));)r=r.slice(n).trim();a[i].content=r,r.length||(a[i-1].tight=!0,a[i+1].tight=!0)}}}function D0(e){var a=e.tokens,i,s,r;for(s=0,r=a.length;s<r;s++)i=a[s],i.type==="inline"&&e.inline.parse(i.content,e.options,e.env,i.children)}function T0(e){var a,i,s,r,n,u,c,d,f,o=0,h=!1,l={};if(e.env.footnotes&&(e.tokens=e.tokens.filter(function(p){return p.type==="footnote_reference_open"?(h=!0,d=[],f=p.label,!1):p.type==="footnote_reference_close"?(h=!1,l[":"+f]=d,!1):(h&&d.push(p),!h)}),!!e.env.footnotes.list)){for(u=e.env.footnotes.list,e.tokens.push({type:"footnote_block_open",level:o++}),a=0,i=u.length;a<i;a++){for(e.tokens.push({type:"footnote_open",id:a,level:o++}),u[a].tokens?(c=[],c.push({type:"paragraph_open",tight:!1,level:o++}),c.push({type:"inline",content:"",level:o,children:u[a].tokens}),c.push({type:"paragraph_close",tight:!1,level:--o})):u[a].label&&(c=l[":"+u[a].label]),e.tokens=e.tokens.concat(c),e.tokens[e.tokens.length-1].type==="paragraph_close"?n=e.tokens.pop():n=null,r=u[a].count>0?u[a].count:1,s=0;s<r;s++)e.tokens.push({type:"footnote_anchor",id:a,subId:s,level:o});n&&e.tokens.push(n),e.tokens.push({type:"footnote_close",level:--o})}e.tokens.push({type:"footnote_block_close",level:--o})}}var Zo=`
115
- ()[]'".,!?-`;function Os(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1")}function O0(e){var a,i,s,r,n,u,c,d,f,o,h,l,p=e.tokens;if(e.env.abbreviations){for(e.env.abbrRegExp||(l="(^|["+Zo.split("").map(Os).join("")+"])("+Object.keys(e.env.abbreviations).map(function(x){return x.substr(1)}).sort(function(x,w){return w.length-x.length}).map(Os).join("|")+")($|["+Zo.split("").map(Os).join("")+"])",e.env.abbrRegExp=new RegExp(l,"g")),o=e.env.abbrRegExp,i=0,s=p.length;i<s;i++)if(p[i].type==="inline"){for(r=p[i].children,a=r.length-1;a>=0;a--)if(n=r[a],n.type==="text"){for(d=0,u=n.content,o.lastIndex=0,f=n.level,c=[];h=o.exec(u);)o.lastIndex>d&&c.push({type:"text",content:u.slice(d,h.index+h[1].length),level:f}),c.push({type:"abbr_open",title:e.env.abbreviations[":"+h[2]],level:f++}),c.push({type:"text",content:h[2],level:f}),c.push({type:"abbr_close",level:--f}),d=o.lastIndex-h[3].length;c.length&&(d<u.length&&c.push({type:"text",content:u.slice(d),level:f}),p[i].children=r=[].concat(r.slice(0,a),c,r.slice(a+1)))}}}}var P0=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,L0=/\((c|tm|r|p)\)/ig,$0={c:"©",r:"®",p:"§",tm:"™"};function M0(e){return e.indexOf("(")<0?e:e.replace(L0,function(a,i){return $0[i.toLowerCase()]})}function R0(e){var a,i,s,r,n;if(e.options.typographer){for(n=e.tokens.length-1;n>=0;n--)if(e.tokens[n].type==="inline")for(r=e.tokens[n].children,a=r.length-1;a>=0;a--)i=r[a],i.type==="text"&&(s=i.content,s=M0(s),P0.test(s)&&(s=s.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/mg,"$1—$2").replace(/(^|\s)--(\s|$)/mg,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/mg,"$1–$2")),i.content=s)}}var I0=/['"]/,Xo=/['"]/g,F0=/[-\s()\[\]]/,Ko="’";function Qo(e,a){return a<0||a>=e.length?!1:!F0.test(e[a])}function ea(e,a,i){return e.substr(0,a)+i+e.substr(a+1)}function q0(e){var a,i,s,r,n,u,c,d,f,o,h,l,p,x,w,b,g;if(e.options.typographer){for(g=[],w=e.tokens.length-1;w>=0;w--)if(e.tokens[w].type==="inline"){for(b=e.tokens[w].children,g.length=0,a=0;a<b.length;a++)if(i=b[a],!(i.type!=="text"||I0.test(i.text))){for(c=b[a].level,p=g.length-1;p>=0&&!(g[p].level<=c);p--);g.length=p+1,s=i.content,n=0,u=s.length;e:for(;n<u&&(Xo.lastIndex=n,r=Xo.exec(s),!!r);){if(d=!Qo(s,r.index-1),n=r.index+1,x=r[0]==="'",f=!Qo(s,n),!f&&!d){x&&(i.content=ea(i.content,r.index,Ko));continue}if(h=!f,l=!d,l){for(p=g.length-1;p>=0&&(o=g[p],!(g[p].level<c));p--)if(o.single===x&&g[p].level===c){o=g[p],x?(b[o.token].content=ea(b[o.token].content,o.pos,e.options.quotes[2]),i.content=ea(i.content,r.index,e.options.quotes[3])):(b[o.token].content=ea(b[o.token].content,o.pos,e.options.quotes[0]),i.content=ea(i.content,r.index,e.options.quotes[1])),g.length=p;continue e}}h?g.push({token:a,pos:r.index,single:x,level:c}):l&&x&&(i.content=ea(i.content,r.index,Ko))}}}}}var Ps=[["block",j0],["abbr",A0],["references",C0],["inline",D0],["footnote_tail",T0],["abbr2",O0],["replacements",R0],["smartquotes",q0]];function Pc(){this.options={},this.ruler=new bt;for(var e=0;e<Ps.length;e++)this.ruler.push(Ps[e][0],Ps[e][1])}Pc.prototype.process=function(e){var a,i,s;for(s=this.ruler.getRules(""),a=0,i=s.length;a<i;a++)s[a](e)};function zr(e,a,i,s,r){var n,u,c,d,f,o,h;for(this.src=e,this.parser=a,this.options=i,this.env=s,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",u=this.src,o=0,h=!1,c=d=o=0,f=u.length;d<f;d++){if(n=u.charCodeAt(d),!h)if(n===32){o++;continue}else h=!0;(n===10||d===f-1)&&(n!==10&&d++,this.bMarks.push(c),this.eMarks.push(d),this.tShift.push(o),h=!1,o=0,c=d+1)}this.bMarks.push(u.length),this.eMarks.push(u.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}zr.prototype.isEmpty=function(a){return this.bMarks[a]+this.tShift[a]>=this.eMarks[a]};zr.prototype.skipEmptyLines=function(a){for(var i=this.lineMax;a<i&&!(this.bMarks[a]+this.tShift[a]<this.eMarks[a]);a++);return a};zr.prototype.skipSpaces=function(a){for(var i=this.src.length;a<i&&this.src.charCodeAt(a)===32;a++);return a};zr.prototype.skipChars=function(a,i){for(var s=this.src.length;a<s&&this.src.charCodeAt(a)===i;a++);return a};zr.prototype.skipCharsBack=function(a,i,s){if(a<=s)return a;for(;a>s;)if(i!==this.src.charCodeAt(--a))return a+1;return a};zr.prototype.getLines=function(a,i,s,r){var n,u,c,d,f,o=a;if(a>=i)return"";if(o+1===i)return u=this.bMarks[o]+Math.min(this.tShift[o],s),c=r?this.eMarks[o]+1:this.eMarks[o],this.src.slice(u,c);for(d=new Array(i-a),n=0;o<i;o++,n++)f=this.tShift[o],f>s&&(f=s),f<0&&(f=0),u=this.bMarks[o]+f,o+1<i||r?c=this.eMarks[o]+1:c=this.eMarks[o],d[n]=this.src.slice(u,c);return d.join("")};function B0(e,a,i){var s,r;if(e.tShift[a]-e.blkIndent<4)return!1;for(r=s=a+1;s<i;){if(e.isEmpty(s)){s++;continue}if(e.tShift[s]-e.blkIndent>=4){s++,r=s;continue}break}return e.line=s,e.tokens.push({type:"code",content:e.getLines(a,r,4+e.blkIndent,!0),block:!0,lines:[a,e.line],level:e.level}),!0}function V0(e,a,i,s){var r,n,u,c,d,f=!1,o=e.bMarks[a]+e.tShift[a],h=e.eMarks[a];if(o+3>h||(r=e.src.charCodeAt(o),r!==126&&r!==96)||(d=o,o=e.skipChars(o,r),n=o-d,n<3)||(u=e.src.slice(o,h).trim(),u.indexOf("`")>=0))return!1;if(s)return!0;for(c=a;c++,!(c>=i||(o=d=e.bMarks[c]+e.tShift[c],h=e.eMarks[c],o<h&&e.tShift[c]<e.blkIndent));)if(e.src.charCodeAt(o)===r&&!(e.tShift[c]-e.blkIndent>=4)&&(o=e.skipChars(o,r),!(o-d<n)&&(o=e.skipSpaces(o),!(o<h)))){f=!0;break}return n=e.tShift[a],e.line=c+(f?1:0),e.tokens.push({type:"fence",params:u,content:e.getLines(a+1,c,n,!0),lines:[a,e.line],level:e.level}),!0}function U0(e,a,i,s){var r,n,u,c,d,f,o,h,l,p,x,w=e.bMarks[a]+e.tShift[a],b=e.eMarks[a];if(w>b||e.src.charCodeAt(w++)!==62||e.level>=e.options.maxNesting)return!1;if(s)return!0;for(e.src.charCodeAt(w)===32&&w++,d=e.blkIndent,e.blkIndent=0,c=[e.bMarks[a]],e.bMarks[a]=w,w=w<b?e.skipSpaces(w):w,n=w>=b,u=[e.tShift[a]],e.tShift[a]=w-e.bMarks[a],h=e.parser.ruler.getRules("blockquote"),r=a+1;r<i&&(w=e.bMarks[r]+e.tShift[r],b=e.eMarks[r],!(w>=b));r++){if(e.src.charCodeAt(w++)===62){e.src.charCodeAt(w)===32&&w++,c.push(e.bMarks[r]),e.bMarks[r]=w,w=w<b?e.skipSpaces(w):w,n=w>=b,u.push(e.tShift[r]),e.tShift[r]=w-e.bMarks[r];continue}if(n)break;for(x=!1,l=0,p=h.length;l<p;l++)if(h[l](e,r,i,!0)){x=!0;break}if(x)break;c.push(e.bMarks[r]),u.push(e.tShift[r]),e.tShift[r]=-1337}for(f=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:o=[a,0],level:e.level++}),e.parser.tokenize(e,a,r),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=f,o[1]=e.line,l=0;l<u.length;l++)e.bMarks[l+a]=c[l],e.tShift[l+a]=u[l];return e.blkIndent=d,!0}function z0(e,a,i,s){var r,n,u,c=e.bMarks[a],d=e.eMarks[a];if(c+=e.tShift[a],c>d||(r=e.src.charCodeAt(c++),r!==42&&r!==45&&r!==95))return!1;for(n=1;c<d;){if(u=e.src.charCodeAt(c++),u!==r&&u!==32)return!1;u===r&&n++}return n<3?!1:(s||(e.line=a+1,e.tokens.push({type:"hr",lines:[a,e.line],level:e.level})),!0)}function eu(e,a){var i,s,r;return s=e.bMarks[a]+e.tShift[a],r=e.eMarks[a],s>=r||(i=e.src.charCodeAt(s++),i!==42&&i!==45&&i!==43)||s<r&&e.src.charCodeAt(s)!==32?-1:s}function tu(e,a){var i,s=e.bMarks[a]+e.tShift[a],r=e.eMarks[a];if(s+1>=r||(i=e.src.charCodeAt(s++),i<48||i>57))return-1;for(;;){if(s>=r)return-1;if(i=e.src.charCodeAt(s++),!(i>=48&&i<=57)){if(i===41||i===46)break;return-1}}return s<r&&e.src.charCodeAt(s)!==32?-1:s}function H0(e,a){var i,s,r=e.level+2;for(i=a+2,s=e.tokens.length-2;i<s;i++)e.tokens[i].level===r&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].tight=!0,e.tokens[i].tight=!0,i+=2)}function W0(e,a,i,s){var r,n,u,c,d,f,o,h,l,p,x,w,b,g,v,_,k,y,m=!0,N,j,A,D;if((h=tu(e,a))>=0)b=!0;else if((h=eu(e,a))>=0)b=!1;else return!1;if(e.level>=e.options.maxNesting)return!1;if(w=e.src.charCodeAt(h-1),s)return!0;for(v=e.tokens.length,b?(o=e.bMarks[a]+e.tShift[a],x=Number(e.src.substr(o,h-o-1)),e.tokens.push({type:"ordered_list_open",order:x,lines:k=[a,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:k=[a,0],level:e.level++}),r=a,_=!1,N=e.parser.ruler.getRules("list");r<i&&(g=e.skipSpaces(h),l=e.eMarks[r],g>=l?p=1:p=g-h,p>4&&(p=1),p<1&&(p=1),n=h-e.bMarks[r]+p,e.tokens.push({type:"list_item_open",lines:y=[a,0],level:e.level++}),c=e.blkIndent,d=e.tight,u=e.tShift[a],f=e.parentType,e.tShift[a]=g-e.bMarks[a],e.blkIndent=n,e.tight=!0,e.parentType="list",e.parser.tokenize(e,a,i,!0),(!e.tight||_)&&(m=!1),_=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=c,e.tShift[a]=u,e.tight=d,e.parentType=f,e.tokens.push({type:"list_item_close",level:--e.level}),r=a=e.line,y[1]=r,g=e.bMarks[a],!(r>=i||e.isEmpty(r)||e.tShift[r]<e.blkIndent));){for(D=!1,j=0,A=N.length;j<A;j++)if(N[j](e,r,i,!0)){D=!0;break}if(D)break;if(b){if(h=tu(e,r),h<0)break}else if(h=eu(e,r),h<0)break;if(w!==e.src.charCodeAt(h-1))break}return e.tokens.push({type:b?"ordered_list_close":"bullet_list_close",level:--e.level}),k[1]=r,e.line=r,m&&H0(e,v),!0}function G0(e,a,i,s){var r,n,u,c,d,f=e.bMarks[a]+e.tShift[a],o=e.eMarks[a];if(f+4>o||e.src.charCodeAt(f)!==91||e.src.charCodeAt(f+1)!==94||e.level>=e.options.maxNesting)return!1;for(c=f+2;c<o;c++){if(e.src.charCodeAt(c)===32)return!1;if(e.src.charCodeAt(c)===93)break}return c===f+2||c+1>=o||e.src.charCodeAt(++c)!==58?!1:(s||(c++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),d=e.src.slice(f+2,c-2),e.env.footnotes.refs[":"+d]=-1,e.tokens.push({type:"footnote_reference_open",label:d,level:e.level++}),r=e.bMarks[a],n=e.tShift[a],u=e.parentType,e.tShift[a]=e.skipSpaces(c)-c,e.bMarks[a]=c,e.blkIndent+=4,e.parentType="footnote",e.tShift[a]<e.blkIndent&&(e.tShift[a]+=e.blkIndent,e.bMarks[a]-=e.blkIndent),e.parser.tokenize(e,a,i,!0),e.parentType=u,e.blkIndent-=4,e.tShift[a]=n,e.bMarks[a]=r,e.tokens.push({type:"footnote_reference_close",level:--e.level})),!0)}function J0(e,a,i,s){var r,n,u,c=e.bMarks[a]+e.tShift[a],d=e.eMarks[a];if(c>=d||(r=e.src.charCodeAt(c),r!==35||c>=d))return!1;for(n=1,r=e.src.charCodeAt(++c);r===35&&c<d&&n<=6;)n++,r=e.src.charCodeAt(++c);return n>6||c<d&&r!==32?!1:(s||(d=e.skipCharsBack(d,32,c),u=e.skipCharsBack(d,35,c),u>c&&e.src.charCodeAt(u-1)===32&&(d=u),e.line=a+1,e.tokens.push({type:"heading_open",hLevel:n,lines:[a,e.line],level:e.level}),c<d&&e.tokens.push({type:"inline",content:e.src.slice(c,d).trim(),level:e.level+1,lines:[a,e.line],children:[]}),e.tokens.push({type:"heading_close",hLevel:n,level:e.level})),!0)}function Y0(e,a,i){var s,r,n,u=a+1;return u>=i||e.tShift[u]<e.blkIndent||e.tShift[u]-e.blkIndent>3||(r=e.bMarks[u]+e.tShift[u],n=e.eMarks[u],r>=n)||(s=e.src.charCodeAt(r),s!==45&&s!==61)||(r=e.skipChars(r,s),r=e.skipSpaces(r),r<n)?!1:(r=e.bMarks[a]+e.tShift[a],e.line=u+1,e.tokens.push({type:"heading_open",hLevel:s===61?1:2,lines:[a,e.line],level:e.level}),e.tokens.push({type:"inline",content:e.src.slice(r,e.eMarks[a]).trim(),level:e.level+1,lines:[a,e.line-1],children:[]}),e.tokens.push({type:"heading_close",hLevel:s===61?1:2,level:e.level}),!0)}var Lc={};["article","aside","button","blockquote","body","canvas","caption","col","colgroup","dd","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","iframe","li","map","object","ol","output","p","pre","progress","script","section","style","table","tbody","td","textarea","tfoot","th","tr","thead","ul","video"].forEach(function(e){Lc[e]=!0});var Z0=/^<([a-zA-Z]{1,15})[\s\/>]/,X0=/^<\/([a-zA-Z]{1,15})[\s>]/;function K0(e){var a=e|32;return a>=97&&a<=122}function Q0(e,a,i,s){var r,n,u,c=e.bMarks[a],d=e.eMarks[a],f=e.tShift[a];if(c+=f,!e.options.html||f>3||c+2>=d||e.src.charCodeAt(c)!==60)return!1;if(r=e.src.charCodeAt(c+1),r===33||r===63){if(s)return!0}else if(r===47||K0(r)){if(r===47){if(n=e.src.slice(c,d).match(X0),!n)return!1}else if(n=e.src.slice(c,d).match(Z0),!n)return!1;if(Lc[n[1].toLowerCase()]!==!0)return!1;if(s)return!0}else return!1;for(u=a+1;u<e.lineMax&&!e.isEmpty(u);)u++;return e.line=u,e.tokens.push({type:"htmlblock",level:e.level,lines:[a,e.line],content:e.getLines(a,u,0,!0)}),!0}function Ls(e,a){var i=e.bMarks[a]+e.blkIndent,s=e.eMarks[a];return e.src.substr(i,s-i)}function ef(e,a,i,s){var r,n,u,c,d,f,o,h,l,p,x;if(a+2>i||(d=a+1,e.tShift[d]<e.blkIndent)||(u=e.bMarks[d]+e.tShift[d],u>=e.eMarks[d])||(r=e.src.charCodeAt(u),r!==124&&r!==45&&r!==58)||(n=Ls(e,a+1),!/^[-:| ]+$/.test(n))||(f=n.split("|"),f<=2))return!1;for(h=[],c=0;c<f.length;c++){if(l=f[c].trim(),!l){if(c===0||c===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(l))return!1;l.charCodeAt(l.length-1)===58?h.push(l.charCodeAt(0)===58?"center":"right"):l.charCodeAt(0)===58?h.push("left"):h.push("")}if(n=Ls(e,a).trim(),n.indexOf("|")===-1||(f=n.replace(/^\||\|$/g,"").split("|"),h.length!==f.length))return!1;if(s)return!0;for(e.tokens.push({type:"table_open",lines:p=[a,0],level:e.level++}),e.tokens.push({type:"thead_open",lines:[a,a+1],level:e.level++}),e.tokens.push({type:"tr_open",lines:[a,a+1],level:e.level++}),c=0;c<f.length;c++)e.tokens.push({type:"th_open",align:h[c],lines:[a,a+1],level:e.level++}),e.tokens.push({type:"inline",content:f[c].trim(),lines:[a,a+1],level:e.level,children:[]}),e.tokens.push({type:"th_close",level:--e.level});for(e.tokens.push({type:"tr_close",level:--e.level}),e.tokens.push({type:"thead_close",level:--e.level}),e.tokens.push({type:"tbody_open",lines:x=[a+2,0],level:e.level++}),d=a+2;d<i&&!(e.tShift[d]<e.blkIndent||(n=Ls(e,d).trim(),n.indexOf("|")===-1));d++){for(f=n.replace(/^\||\|$/g,"").split("|"),e.tokens.push({type:"tr_open",level:e.level++}),c=0;c<f.length;c++)e.tokens.push({type:"td_open",align:h[c],level:e.level++}),o=f[c].substring(f[c].charCodeAt(0)===124?1:0,f[c].charCodeAt(f[c].length-1)===124?f[c].length-1:f[c].length).trim(),e.tokens.push({type:"inline",content:o,level:e.level,children:[]}),e.tokens.push({type:"td_close",level:--e.level});e.tokens.push({type:"tr_close",level:--e.level})}return e.tokens.push({type:"tbody_close",level:--e.level}),e.tokens.push({type:"table_close",level:--e.level}),p[1]=x[1]=d,e.line=d,!0}function jn(e,a){var i,s,r=e.bMarks[a]+e.tShift[a],n=e.eMarks[a];return r>=n||(s=e.src.charCodeAt(r++),s!==126&&s!==58)||(i=e.skipSpaces(r),r===i)||i>=n?-1:i}function tf(e,a){var i,s,r=e.level+2;for(i=a+2,s=e.tokens.length-2;i<s;i++)e.tokens[i].level===r&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].tight=!0,e.tokens[i].tight=!0,i+=2)}function rf(e,a,i,s){var r,n,u,c,d,f,o,h,l,p,x,w,b,g;if(s)return e.ddIndent<0?!1:jn(e,a)>=0;if(o=a+1,e.isEmpty(o)&&++o>i||e.tShift[o]<e.blkIndent||(r=jn(e,o),r<0)||e.level>=e.options.maxNesting)return!1;f=e.tokens.length,e.tokens.push({type:"dl_open",lines:d=[a,0],level:e.level++}),u=a,n=o;e:for(;;){for(g=!0,b=!1,e.tokens.push({type:"dt_open",lines:[u,u],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(u,u+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[u,u],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:c=[o,0],level:e.level++}),w=e.tight,l=e.ddIndent,h=e.blkIndent,x=e.tShift[n],p=e.parentType,e.blkIndent=e.ddIndent=e.tShift[n]+2,e.tShift[n]=r-e.bMarks[n],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,n,i,!0),(!e.tight||b)&&(g=!1),b=e.line-n>1&&e.isEmpty(e.line-1),e.tShift[n]=x,e.tight=w,e.parentType=p,e.blkIndent=h,e.ddIndent=l,e.tokens.push({type:"dd_close",level:--e.level}),c[1]=o=e.line,o>=i||e.tShift[o]<e.blkIndent)break e;if(r=jn(e,o),r<0)break;n=o}if(o>=i||(u=o,e.isEmpty(u))||e.tShift[u]<e.blkIndent||(n=u+1,n>=i)||(e.isEmpty(n)&&n++,n>=i)||e.tShift[n]<e.blkIndent||(r=jn(e,n),r<0))break}return e.tokens.push({type:"dl_close",level:--e.level}),d[1]=o,e.line=o,g&&tf(e,f),!0}function af(e,a){var i,s,r,n,u,c=a+1,d;if(i=e.lineMax,c<i&&!e.isEmpty(c)){for(d=e.parser.ruler.getRules("paragraph");c<i&&!e.isEmpty(c);c++)if(!(e.tShift[c]-e.blkIndent>3)){for(r=!1,n=0,u=d.length;n<u;n++)if(d[n](e,c,i,!0)){r=!0;break}if(r)break}}return s=e.getLines(a,c,e.blkIndent,!1).trim(),e.line=c,s.length&&(e.tokens.push({type:"paragraph_open",tight:!1,lines:[a,e.line],level:e.level}),e.tokens.push({type:"inline",content:s,level:e.level+1,lines:[a,e.line],children:[]}),e.tokens.push({type:"paragraph_close",tight:!1,level:e.level})),!0}var En=[["code",B0],["fences",V0,["paragraph","blockquote","list"]],["blockquote",U0,["paragraph","blockquote","list"]],["hr",z0,["paragraph","blockquote","list"]],["list",W0,["paragraph","blockquote"]],["footnote",G0,["paragraph"]],["heading",J0,["paragraph","blockquote"]],["lheading",Y0],["htmlblock",Q0,["paragraph","blockquote"]],["table",ef,["paragraph"]],["deflist",rf,["paragraph"]],["paragraph",af]];function Hi(){this.ruler=new bt;for(var e=0;e<En.length;e++)this.ruler.push(En[e][0],En[e][1],{alt:(En[e][2]||[]).slice()})}Hi.prototype.tokenize=function(e,a,i){for(var s=this.ruler.getRules(""),r=s.length,n=a,u=!1,c,d;n<i&&(e.line=n=e.skipEmptyLines(n),!(n>=i||e.tShift[n]<e.blkIndent));){for(d=0;d<r&&(c=s[d](e,n,i,!1),!c);d++);if(e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),n=e.line,n<i&&e.isEmpty(n)){if(u=!0,n++,n<i&&e.parentType==="list"&&e.isEmpty(n))break;e.line=n}}};var nf=/[\n\t]/g,sf=/\r[\n\u0085]|[\u2424\u2028\u0085]/g,of=/\u00a0/g;Hi.prototype.parse=function(e,a,i,s){var r,n=0,u=0;if(!e)return[];e=e.replace(of," "),e=e.replace(sf,`
116
- `),e.indexOf(" ")>=0&&(e=e.replace(nf,function(c,d){var f;return e.charCodeAt(d)===10?(n=d+1,u=0,c):(f=" ".slice((d-n-u)%4),u=d-n+1,f)})),r=new zr(e,this,a,i,s),this.tokenize(r,r.line,r.lineMax)};function uf(e){switch(e){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}function lf(e,a){for(var i=e.pos;i<e.posMax&&!uf(e.src.charCodeAt(i));)i++;return i===e.pos?!1:(a||(e.pending+=e.src.slice(e.pos,i)),e.pos=i,!0)}function cf(e,a){var i,s,r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;if(i=e.pending.length-1,s=e.posMax,!a)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){for(var n=i-2;n>=0;n--)if(e.pending.charCodeAt(n)!==32){e.pending=e.pending.substring(0,n+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(r++;r<s&&e.src.charCodeAt(r)===32;)r++;return e.pos=r,!0}var Wi=[];for(var ru=0;ru<256;ru++)Wi.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Wi[e.charCodeAt(0)]=1});function df(e,a){var i,s=e.pos,r=e.posMax;if(e.src.charCodeAt(s)!==92)return!1;if(s++,s<r){if(i=e.src.charCodeAt(s),i<256&&Wi[i]!==0)return a||(e.pending+=e.src[s]),e.pos+=2,!0;if(i===10){for(a||e.push({type:"hardbreak",level:e.level}),s++;s<r&&e.src.charCodeAt(s)===32;)s++;return e.pos=s,!0}}return a||(e.pending+="\\"),e.pos++,!0}function ff(e,a){var i,s,r,n,u,c=e.pos,d=e.src.charCodeAt(c);if(d!==96)return!1;for(i=c,c++,s=e.posMax;c<s&&e.src.charCodeAt(c)===96;)c++;for(r=e.src.slice(i,c),n=u=c;(n=e.src.indexOf("`",u))!==-1;){for(u=n+1;u<s&&e.src.charCodeAt(u)===96;)u++;if(u-n===r.length)return a||e.push({type:"code",content:e.src.slice(c,n).replace(/[ \n]+/g," ").trim(),block:!1,level:e.level}),e.pos=u,!0}return a||(e.pending+=r),e.pos+=r.length,!0}function hf(e,a){var i,s,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==126||a||u+4>=n||e.src.charCodeAt(u+1)!==126||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===126)||d===126||d===32||d===10)return!1;for(s=u+2;s<n&&e.src.charCodeAt(s)===126;)s++;if(s>u+3)return e.pos+=s-u,a||(e.pending+=e.src.slice(u,s)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===126&&e.src.charCodeAt(e.pos+1)===126&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==126&&c!==126&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){i=!0;break}e.parser.skipToken(e)}return i?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"del_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"del_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function pf(e,a){var i,s,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==43||a||u+4>=n||e.src.charCodeAt(u+1)!==43||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===43)||d===43||d===32||d===10)return!1;for(s=u+2;s<n&&e.src.charCodeAt(s)===43;)s++;if(s!==u+2)return e.pos+=s-u,a||(e.pending+=e.src.slice(u,s)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===43&&e.src.charCodeAt(e.pos+1)===43&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==43&&c!==43&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){i=!0;break}e.parser.skipToken(e)}return i?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"ins_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"ins_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function mf(e,a){var i,s,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==61||a||u+4>=n||e.src.charCodeAt(u+1)!==61||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===61)||d===61||d===32||d===10)return!1;for(s=u+2;s<n&&e.src.charCodeAt(s)===61;)s++;if(s!==u+2)return e.pos+=s-u,a||(e.pending+=e.src.slice(u,s)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===61&&e.src.charCodeAt(e.pos+1)===61&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==61&&c!==61&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){i=!0;break}e.parser.skipToken(e)}return i?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"mark_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"mark_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function au(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function nu(e,a){var i=a,s,r,n,u=!0,c=!0,d=e.posMax,f=e.src.charCodeAt(a);for(s=a>0?e.src.charCodeAt(a-1):-1;i<d&&e.src.charCodeAt(i)===f;)i++;return i>=d&&(u=!1),n=i-a,n>=4?u=c=!1:(r=i<d?e.src.charCodeAt(i):-1,(r===32||r===10)&&(u=!1),(s===32||s===10)&&(c=!1),f===95&&(au(s)&&(u=!1),au(r)&&(c=!1))),{can_open:u,can_close:c,delims:n}}function gf(e,a){var i,s,r,n,u,c,d,f=e.posMax,o=e.pos,h=e.src.charCodeAt(o);if(h!==95&&h!==42||a)return!1;if(d=nu(e,o),i=d.delims,!d.can_open)return e.pos+=i,a||(e.pending+=e.src.slice(o,e.pos)),!0;if(e.level>=e.options.maxNesting)return!1;for(e.pos=o+i,c=[i];e.pos<f;){if(e.src.charCodeAt(e.pos)===h){if(d=nu(e,e.pos),s=d.delims,d.can_close){for(n=c.pop(),u=s;n!==u;){if(u<n){c.push(n-u);break}if(u-=n,c.length===0)break;e.pos+=n,n=c.pop()}if(c.length===0){i=n,r=!0;break}e.pos+=s;continue}d.can_open&&c.push(s),e.pos+=s;continue}e.parser.skipToken(e)}return r?(e.posMax=e.pos,e.pos=o+i,a||((i===2||i===3)&&e.push({type:"strong_open",level:e.level++}),(i===1||i===3)&&e.push({type:"em_open",level:e.level++}),e.parser.tokenize(e),(i===1||i===3)&&e.push({type:"em_close",level:--e.level}),(i===2||i===3)&&e.push({type:"strong_close",level:--e.level})),e.pos=e.posMax+i,e.posMax=f,!0):(e.pos=o,!1)}var bf=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function xf(e,a){var i,s,r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==126||a||n+2>=r||e.level>=e.options.maxNesting)return!1;for(e.pos=n+1;e.pos<r;){if(e.src.charCodeAt(e.pos)===126){i=!0;break}e.parser.skipToken(e)}return!i||n+1===e.pos||(s=e.src.slice(n+1,e.pos),s.match(/(^|[^\\])(\\\\)*\s/))?(e.pos=n,!1):(e.posMax=e.pos,e.pos=n+1,a||e.push({type:"sub",level:e.level,content:s.replace(bf,"$1")}),e.pos=e.posMax+1,e.posMax=r,!0)}var yf=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function vf(e,a){var i,s,r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==94||a||n+2>=r||e.level>=e.options.maxNesting)return!1;for(e.pos=n+1;e.pos<r;){if(e.src.charCodeAt(e.pos)===94){i=!0;break}e.parser.skipToken(e)}return!i||n+1===e.pos||(s=e.src.slice(n+1,e.pos),s.match(/(^|[^\\])(\\\\)*\s/))?(e.pos=n,!1):(e.posMax=e.pos,e.pos=n+1,a||e.push({type:"sup",level:e.level,content:s.replace(yf,"$1")}),e.pos=e.posMax+1,e.posMax=r,!0)}function wf(e,a){var i,s,r,n,u,c,d,f,o=!1,h=e.pos,l=e.posMax,p=e.pos,x=e.src.charCodeAt(p);if(x===33&&(o=!0,x=e.src.charCodeAt(++p)),x!==91||e.level>=e.options.maxNesting||(i=p+1,s=Qa(e,p),s<0))return!1;if(c=s+1,c<l&&e.src.charCodeAt(c)===40){for(c++;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c>=l)return!1;for(p=c,Dc(e,c)?(n=e.linkContent,c=e.pos):n="",p=c;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<l&&p!==c&&Tc(e,c))for(u=e.linkContent,c=e.pos;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);else u="";if(c>=l||e.src.charCodeAt(c)!==41)return e.pos=h,!1;c++}else{if(e.linkLevel>0)return!1;for(;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<l&&e.src.charCodeAt(c)===91&&(p=c+1,c=Qa(e,c),c>=0?r=e.src.slice(p,c++):c=p-1),r||(typeof r>"u"&&(c=s+1),r=e.src.slice(i,s)),d=e.env.references[Oc(r)],!d)return e.pos=h,!1;n=d.href,u=d.title}return a||(e.pos=i,e.posMax=s,o?e.push({type:"image",src:n,title:u,alt:e.src.substr(i,s-i),level:e.level}):(e.push({type:"link_open",href:n,title:u,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=c,e.posMax=l,!0}function _f(e,a){var i,s,r,n,u=e.posMax,c=e.pos;return c+2>=u||e.src.charCodeAt(c)!==94||e.src.charCodeAt(c+1)!==91||e.level>=e.options.maxNesting||(i=c+2,s=Qa(e,c+1),s<0)?!1:(a||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),r=e.env.footnotes.list.length,e.pos=i,e.posMax=s,e.push({type:"footnote_ref",id:r,level:e.level}),e.linkLevel++,n=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[r]={tokens:e.tokens.splice(n)},e.linkLevel--),e.pos=s+1,e.posMax=u,!0)}function kf(e,a){var i,s,r,n,u=e.posMax,c=e.pos;if(c+3>u||!e.env.footnotes||!e.env.footnotes.refs||e.src.charCodeAt(c)!==91||e.src.charCodeAt(c+1)!==94||e.level>=e.options.maxNesting)return!1;for(s=c+2;s<u;s++){if(e.src.charCodeAt(s)===32||e.src.charCodeAt(s)===10)return!1;if(e.src.charCodeAt(s)===93)break}return s===c+2||s>=u||(s++,i=e.src.slice(c+2,s-1),typeof e.env.footnotes.refs[":"+i]>"u")?!1:(a||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+i]<0?(r=e.env.footnotes.list.length,e.env.footnotes.list[r]={label:i,count:0},e.env.footnotes.refs[":"+i]=r):r=e.env.footnotes.refs[":"+i],n=e.env.footnotes.list[r].count,e.env.footnotes.list[r].count++,e.push({type:"footnote_ref",id:r,subId:n,level:e.level})),e.pos=s,e.posMax=u,!0)}var Nf=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"],jf=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,Ef=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;function Af(e,a){var i,s,r,n,u,c=e.pos;return e.src.charCodeAt(c)!==60||(i=e.src.slice(c),i.indexOf(">")<0)?!1:(s=i.match(Ef),s?Nf.indexOf(s[1].toLowerCase())<0||(n=s[0].slice(1,-1),u=Li(n),!e.parser.validateLink(n))?!1:(a||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:n,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=s[0].length,!0):(r=i.match(jf),r?(n=r[0].slice(1,-1),u=Li("mailto:"+n),e.parser.validateLink(u)?(a||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:n,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=r[0].length,!0):!1):!1))}function ls(e,a){return e=e.source,a=a||"",function i(s,r){return s?(r=r.source||r,e=e.replace(s,r),i):new RegExp(e,a)}}var Sf=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,Cf=/[^"'=<>`\x00-\x20]+/,Df=/'[^']*'/,Tf=/"[^"]*"/,Of=ls(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",Cf)("single_quoted",Df)("double_quoted",Tf)(),Pf=ls(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",Sf)("attr_value",Of)(),Lf=ls(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",Pf)(),$f=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,Mf=/<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,Rf=/<[?].*?[?]>/,If=/<![A-Z]+\s+[^>]*>/,Ff=/<!\[CDATA\[[\s\S]*?\]\]>/,qf=ls(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",Lf)("close_tag",$f)("comment",Mf)("processing",Rf)("declaration",If)("cdata",Ff)();function Bf(e){var a=e|32;return a>=97&&a<=122}function Vf(e,a){var i,s,r,n=e.pos;return!e.options.html||(r=e.posMax,e.src.charCodeAt(n)!==60||n+2>=r)||(i=e.src.charCodeAt(n+1),i!==33&&i!==63&&i!==47&&!Bf(i))||(s=e.src.slice(n).match(qf),!s)?!1:(a||e.push({type:"htmltag",content:e.src.slice(n,n+s[0].length),level:e.level}),e.pos+=s[0].length,!0)}var Uf=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,zf=/^&([a-z][a-z0-9]{1,31});/i;function Hf(e,a){var i,s,r,n=e.pos,u=e.posMax;if(e.src.charCodeAt(n)!==38)return!1;if(n+1<u){if(i=e.src.charCodeAt(n+1),i===35){if(r=e.src.slice(n).match(Uf),r)return a||(s=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),e.pending+=Ui(s)?es(s):es(65533)),e.pos+=r[0].length,!0}else if(r=e.src.slice(n).match(zf),r){var c=Ac(r[1]);if(r[1]!==c)return a||(e.pending+=c),e.pos+=r[0].length,!0}}return a||(e.pending+="&"),e.pos++,!0}var $s=[["text",lf],["newline",cf],["escape",df],["backticks",ff],["del",hf],["ins",pf],["mark",mf],["emphasis",gf],["sub",xf],["sup",vf],["links",wf],["footnote_inline",_f],["footnote_ref",kf],["autolink",Af],["htmltag",Vf],["entity",Hf]];function cs(){this.ruler=new bt;for(var e=0;e<$s.length;e++)this.ruler.push($s[e][0],$s[e][1]);this.validateLink=Wf}cs.prototype.skipToken=function(e){var a=this.ruler.getRules(""),i=a.length,s=e.pos,r,n;if((n=e.cacheGet(s))>0){e.pos=n;return}for(r=0;r<i;r++)if(a[r](e,!0)){e.cacheSet(s,e.pos);return}e.pos++,e.cacheSet(s,e.pos)};cs.prototype.tokenize=function(e){for(var a=this.ruler.getRules(""),i=a.length,s=e.posMax,r,n;e.pos<s;){for(n=0;n<i&&(r=a[n](e,!1),!r);n++);if(r){if(e.pos>=s)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};cs.prototype.parse=function(e,a,i,s){var r=new Ur(e,this,a,i,s);this.tokenize(r)};function Wf(e){var a=["vbscript","javascript","file","data"],i=e.trim().toLowerCase();return i=br(i),!(i.indexOf(":")!==-1&&a.indexOf(i.split(":")[0])!==-1)}var Gf={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","replacements","smartquotes","references","abbr2","footnote_tail"]},block:{rules:["blockquote","code","fences","footnote","heading","hr","htmlblock","lheading","list","paragraph","table"]},inline:{rules:["autolink","backticks","del","emphasis","entity","escape","footnote_ref","htmltag","links","newline","text"]}}},Jf={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},Yf={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","abbr2"]},block:{rules:["blockquote","code","fences","heading","hr","htmlblock","lheading","list","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","htmltag","links","newline","text"]}}},Zf={default:Gf,full:Jf,commonmark:Yf};function $c(e,a,i){this.src=a,this.env=i,this.options=e.options,this.tokens=[],this.inlineMode=!1,this.inline=e.inline,this.block=e.block,this.renderer=e.renderer,this.typographer=e.typographer}function yr(e,a){typeof e!="string"&&(a=e,e="default"),a&&a.linkify!=null&&console.warn(`linkify option is removed. Use linkify plugin instead:
114
+ `};function zi(){this.rules=Vi({},ce),this.getBreak=ce.getBreak}zi.prototype.renderInline=function(e,a,i){for(var s=this.rules,r=e.length,n=0,u="";r--;)u+=s[e[n].type](e,n++,a,i,this);return u};zi.prototype.render=function(e,a,i){for(var s=this.rules,r=e.length,n=-1,u="";++n<r;)e[n].type==="inline"?u+=this.renderInline(e[n].children,a,i):u+=s[e[n].type](e,n,a,i,this);return u};function bt(){this.__rules__=[],this.__cache__=null}bt.prototype.__find__=function(e){for(var a=this.__rules__.length,i=-1;a--;)if(this.__rules__[++i].name===e)return i;return-1};bt.prototype.__compile__=function(){var e=this,a=[""];e.__rules__.forEach(function(i){i.enabled&&i.alt.forEach(function(s){a.indexOf(s)<0&&a.push(s)})}),e.__cache__={},a.forEach(function(i){e.__cache__[i]=[],e.__rules__.forEach(function(s){s.enabled&&(i&&s.alt.indexOf(i)<0||e.__cache__[i].push(s.fn))})})};bt.prototype.at=function(e,a,i){var s=this.__find__(e),r=i||{};if(s===-1)throw new Error("Parser rule not found: "+e);this.__rules__[s].fn=a,this.__rules__[s].alt=r.alt||[],this.__cache__=null};bt.prototype.before=function(e,a,i,s){var r=this.__find__(e),n=s||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r,0,{name:a,enabled:!0,fn:i,alt:n.alt||[]}),this.__cache__=null};bt.prototype.after=function(e,a,i,s){var r=this.__find__(e),n=s||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r+1,0,{name:a,enabled:!0,fn:i,alt:n.alt||[]}),this.__cache__=null};bt.prototype.push=function(e,a,i){var s=i||{};this.__rules__.push({name:e,enabled:!0,fn:a,alt:s.alt||[]}),this.__cache__=null};bt.prototype.enable=function(e,a){e=Array.isArray(e)?e:[e],a&&this.__rules__.forEach(function(i){i.enabled=!1}),e.forEach(function(i){var s=this.__find__(i);if(s<0)throw new Error("Rules manager: invalid rule name "+i);this.__rules__[s].enabled=!0},this),this.__cache__=null};bt.prototype.disable=function(e){e=Array.isArray(e)?e:[e],e.forEach(function(a){var i=this.__find__(a);if(i<0)throw new Error("Rules manager: invalid rule name "+a);this.__rules__[i].enabled=!1},this),this.__cache__=null};bt.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function j0(e){e.inlineMode?e.tokens.push({type:"inline",content:e.src.replace(/\n/g," ").trim(),level:0,lines:[0,1],children:[]}):e.block.parse(e.src,e.options,e.env,e.tokens)}function Ur(e,a,i,s,r){this.src=e,this.env=s,this.options=i,this.parser=a,this.tokens=r,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.isInLabel=!1,this.linkLevel=0,this.linkContent="",this.labelUnmatchedScopes=0}Ur.prototype.pushPending=function(){this.tokens.push({type:"text",content:this.pending,level:this.pendingLevel}),this.pending=""};Ur.prototype.push=function(e){this.pending&&this.pushPending(),this.tokens.push(e),this.pendingLevel=this.level};Ur.prototype.cacheSet=function(e,a){for(var i=this.cache.length;i<=e;i++)this.cache.push(0);this.cache[e]=a};Ur.prototype.cacheGet=function(e){return e<this.cache.length?this.cache[e]:0};function Qa(e,a){var i,s,r,n=-1,u=e.posMax,c=e.pos,d=e.isInLabel;if(e.isInLabel)return-1;if(e.labelUnmatchedScopes)return e.labelUnmatchedScopes--,-1;for(e.pos=a+1,e.isInLabel=!0,i=1;e.pos<u;){if(r=e.src.charCodeAt(e.pos),r===91)i++;else if(r===93&&(i--,i===0)){s=!0;break}e.parser.skipToken(e)}return s?(n=e.pos,e.labelUnmatchedScopes=0):e.labelUnmatchedScopes=i-1,e.pos=c,e.isInLabel=d,n}function E0(e,a,i,s){var r,n,u,c,d,f;if(e.charCodeAt(0)!==42||e.charCodeAt(1)!==91||e.indexOf("]:")===-1||(r=new Ur(e,a,i,s,[]),n=Qa(r,1),n<0||e.charCodeAt(n+1)!==58))return-1;for(c=r.posMax,u=n+2;u<c&&r.src.charCodeAt(u)!==10;u++);return d=e.slice(2,n),f=e.slice(n+2,u).trim(),f.length===0?-1:(s.abbreviations||(s.abbreviations={}),typeof s.abbreviations[":"+d]>"u"&&(s.abbreviations[":"+d]=f),u)}function A0(e){var a=e.tokens,i,s,r,n;if(!e.inlineMode){for(i=1,s=a.length-1;i<s;i++)if(a[i-1].type==="paragraph_open"&&a[i].type==="inline"&&a[i+1].type==="paragraph_close"){for(r=a[i].content;r.length&&(n=E0(r,e.inline,e.options,e.env),!(n<0));)r=r.slice(n).trim();a[i].content=r,r.length||(a[i-1].tight=!0,a[i+1].tight=!0)}}}function $i(e){var a=br(e);try{a=decodeURI(a)}catch{}return encodeURI(a)}function Dc(e,a){var i,s,r,n=a,u=e.posMax;if(e.src.charCodeAt(a)===60){for(a++;a<u;){if(i=e.src.charCodeAt(a),i===10)return!1;if(i===62)return r=$i(ia(e.src.slice(n+1,a))),e.parser.validateLink(r)?(e.pos=a+1,e.linkContent=r,!0):!1;if(i===92&&a+1<u){a+=2;continue}a++}return!1}for(s=0;a<u&&(i=e.src.charCodeAt(a),!(i===32||i<32||i===127));){if(i===92&&a+1<u){a+=2;continue}if(i===40&&(s++,s>1)||i===41&&(s--,s<0))break;a++}return n===a||(r=ia(e.src.slice(n,a)),!e.parser.validateLink(r))?!1:(e.linkContent=r,e.pos=a,!0)}function Tc(e,a){var i,s=a,r=e.posMax,n=e.src.charCodeAt(a);if(n!==34&&n!==39&&n!==40)return!1;for(a++,n===40&&(n=41);a<r;){if(i=e.src.charCodeAt(a),i===n)return e.pos=a+1,e.linkContent=ia(e.src.slice(s+1,a)),!0;if(i===92&&a+1<r){a+=2;continue}a++}return!1}function Oc(e){return e.trim().replace(/\s+/g," ").toUpperCase()}function S0(e,a,i,s){var r,n,u,c,d,f,o,h,l;if(e.charCodeAt(0)!==91||e.indexOf("]:")===-1||(r=new Ur(e,a,i,s,[]),n=Qa(r,0),n<0||e.charCodeAt(n+1)!==58))return-1;for(c=r.posMax,u=n+2;u<c&&(d=r.src.charCodeAt(u),!(d!==32&&d!==10));u++);if(!Dc(r,u))return-1;for(o=r.linkContent,u=r.pos,f=u,u=u+1;u<c&&(d=r.src.charCodeAt(u),!(d!==32&&d!==10));u++);for(u<c&&f!==u&&Tc(r,u)?(h=r.linkContent,u=r.pos):(h="",u=f);u<c&&r.src.charCodeAt(u)===32;)u++;return u<c&&r.src.charCodeAt(u)!==10?-1:(l=Oc(e.slice(1,n)),typeof s.references[l]>"u"&&(s.references[l]={title:h,href:o}),u)}function C0(e){var a=e.tokens,i,s,r,n;if(e.env.references=e.env.references||{},!e.inlineMode){for(i=1,s=a.length-1;i<s;i++)if(a[i].type==="inline"&&a[i-1].type==="paragraph_open"&&a[i+1].type==="paragraph_close"){for(r=a[i].content;r.length&&(n=S0(r,e.inline,e.options,e.env),!(n<0));)r=r.slice(n).trim();a[i].content=r,r.length||(a[i-1].tight=!0,a[i+1].tight=!0)}}}function D0(e){var a=e.tokens,i,s,r;for(s=0,r=a.length;s<r;s++)i=a[s],i.type==="inline"&&e.inline.parse(i.content,e.options,e.env,i.children)}function T0(e){var a,i,s,r,n,u,c,d,f,o=0,h=!1,l={};if(e.env.footnotes&&(e.tokens=e.tokens.filter(function(p){return p.type==="footnote_reference_open"?(h=!0,d=[],f=p.label,!1):p.type==="footnote_reference_close"?(h=!1,l[":"+f]=d,!1):(h&&d.push(p),!h)}),!!e.env.footnotes.list)){for(u=e.env.footnotes.list,e.tokens.push({type:"footnote_block_open",level:o++}),a=0,i=u.length;a<i;a++){for(e.tokens.push({type:"footnote_open",id:a,level:o++}),u[a].tokens?(c=[],c.push({type:"paragraph_open",tight:!1,level:o++}),c.push({type:"inline",content:"",level:o,children:u[a].tokens}),c.push({type:"paragraph_close",tight:!1,level:--o})):u[a].label&&(c=l[":"+u[a].label]),e.tokens=e.tokens.concat(c),e.tokens[e.tokens.length-1].type==="paragraph_close"?n=e.tokens.pop():n=null,r=u[a].count>0?u[a].count:1,s=0;s<r;s++)e.tokens.push({type:"footnote_anchor",id:a,subId:s,level:o});n&&e.tokens.push(n),e.tokens.push({type:"footnote_close",level:--o})}e.tokens.push({type:"footnote_block_close",level:--o})}}var Zo=`
115
+ ()[]'".,!?-`;function Os(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1")}function O0(e){var a,i,s,r,n,u,c,d,f,o,h,l,p=e.tokens;if(e.env.abbreviations){for(e.env.abbrRegExp||(l="(^|["+Zo.split("").map(Os).join("")+"])("+Object.keys(e.env.abbreviations).map(function(x){return x.substr(1)}).sort(function(x,w){return w.length-x.length}).map(Os).join("|")+")($|["+Zo.split("").map(Os).join("")+"])",e.env.abbrRegExp=new RegExp(l,"g")),o=e.env.abbrRegExp,i=0,s=p.length;i<s;i++)if(p[i].type==="inline"){for(r=p[i].children,a=r.length-1;a>=0;a--)if(n=r[a],n.type==="text"){for(d=0,u=n.content,o.lastIndex=0,f=n.level,c=[];h=o.exec(u);)o.lastIndex>d&&c.push({type:"text",content:u.slice(d,h.index+h[1].length),level:f}),c.push({type:"abbr_open",title:e.env.abbreviations[":"+h[2]],level:f++}),c.push({type:"text",content:h[2],level:f}),c.push({type:"abbr_close",level:--f}),d=o.lastIndex-h[3].length;c.length&&(d<u.length&&c.push({type:"text",content:u.slice(d),level:f}),p[i].children=r=[].concat(r.slice(0,a),c,r.slice(a+1)))}}}}var P0=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,$0=/\((c|tm|r|p)\)/ig,L0={c:"©",r:"®",p:"§",tm:"™"};function M0(e){return e.indexOf("(")<0?e:e.replace($0,function(a,i){return L0[i.toLowerCase()]})}function R0(e){var a,i,s,r,n;if(e.options.typographer){for(n=e.tokens.length-1;n>=0;n--)if(e.tokens[n].type==="inline")for(r=e.tokens[n].children,a=r.length-1;a>=0;a--)i=r[a],i.type==="text"&&(s=i.content,s=M0(s),P0.test(s)&&(s=s.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/mg,"$1—$2").replace(/(^|\s)--(\s|$)/mg,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/mg,"$1–$2")),i.content=s)}}var I0=/['"]/,Xo=/['"]/g,F0=/[-\s()\[\]]/,Ko="’";function Qo(e,a){return a<0||a>=e.length?!1:!F0.test(e[a])}function ea(e,a,i){return e.substr(0,a)+i+e.substr(a+1)}function q0(e){var a,i,s,r,n,u,c,d,f,o,h,l,p,x,w,b,g;if(e.options.typographer){for(g=[],w=e.tokens.length-1;w>=0;w--)if(e.tokens[w].type==="inline"){for(b=e.tokens[w].children,g.length=0,a=0;a<b.length;a++)if(i=b[a],!(i.type!=="text"||I0.test(i.text))){for(c=b[a].level,p=g.length-1;p>=0&&!(g[p].level<=c);p--);g.length=p+1,s=i.content,n=0,u=s.length;e:for(;n<u&&(Xo.lastIndex=n,r=Xo.exec(s),!!r);){if(d=!Qo(s,r.index-1),n=r.index+1,x=r[0]==="'",f=!Qo(s,n),!f&&!d){x&&(i.content=ea(i.content,r.index,Ko));continue}if(h=!f,l=!d,l){for(p=g.length-1;p>=0&&(o=g[p],!(g[p].level<c));p--)if(o.single===x&&g[p].level===c){o=g[p],x?(b[o.token].content=ea(b[o.token].content,o.pos,e.options.quotes[2]),i.content=ea(i.content,r.index,e.options.quotes[3])):(b[o.token].content=ea(b[o.token].content,o.pos,e.options.quotes[0]),i.content=ea(i.content,r.index,e.options.quotes[1])),g.length=p;continue e}}h?g.push({token:a,pos:r.index,single:x,level:c}):l&&x&&(i.content=ea(i.content,r.index,Ko))}}}}}var Ps=[["block",j0],["abbr",A0],["references",C0],["inline",D0],["footnote_tail",T0],["abbr2",O0],["replacements",R0],["smartquotes",q0]];function Pc(){this.options={},this.ruler=new bt;for(var e=0;e<Ps.length;e++)this.ruler.push(Ps[e][0],Ps[e][1])}Pc.prototype.process=function(e){var a,i,s;for(s=this.ruler.getRules(""),a=0,i=s.length;a<i;a++)s[a](e)};function zr(e,a,i,s,r){var n,u,c,d,f,o,h;for(this.src=e,this.parser=a,this.options=i,this.env=s,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",u=this.src,o=0,h=!1,c=d=o=0,f=u.length;d<f;d++){if(n=u.charCodeAt(d),!h)if(n===32){o++;continue}else h=!0;(n===10||d===f-1)&&(n!==10&&d++,this.bMarks.push(c),this.eMarks.push(d),this.tShift.push(o),h=!1,o=0,c=d+1)}this.bMarks.push(u.length),this.eMarks.push(u.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}zr.prototype.isEmpty=function(a){return this.bMarks[a]+this.tShift[a]>=this.eMarks[a]};zr.prototype.skipEmptyLines=function(a){for(var i=this.lineMax;a<i&&!(this.bMarks[a]+this.tShift[a]<this.eMarks[a]);a++);return a};zr.prototype.skipSpaces=function(a){for(var i=this.src.length;a<i&&this.src.charCodeAt(a)===32;a++);return a};zr.prototype.skipChars=function(a,i){for(var s=this.src.length;a<s&&this.src.charCodeAt(a)===i;a++);return a};zr.prototype.skipCharsBack=function(a,i,s){if(a<=s)return a;for(;a>s;)if(i!==this.src.charCodeAt(--a))return a+1;return a};zr.prototype.getLines=function(a,i,s,r){var n,u,c,d,f,o=a;if(a>=i)return"";if(o+1===i)return u=this.bMarks[o]+Math.min(this.tShift[o],s),c=r?this.eMarks[o]+1:this.eMarks[o],this.src.slice(u,c);for(d=new Array(i-a),n=0;o<i;o++,n++)f=this.tShift[o],f>s&&(f=s),f<0&&(f=0),u=this.bMarks[o]+f,o+1<i||r?c=this.eMarks[o]+1:c=this.eMarks[o],d[n]=this.src.slice(u,c);return d.join("")};function B0(e,a,i){var s,r;if(e.tShift[a]-e.blkIndent<4)return!1;for(r=s=a+1;s<i;){if(e.isEmpty(s)){s++;continue}if(e.tShift[s]-e.blkIndent>=4){s++,r=s;continue}break}return e.line=s,e.tokens.push({type:"code",content:e.getLines(a,r,4+e.blkIndent,!0),block:!0,lines:[a,e.line],level:e.level}),!0}function V0(e,a,i,s){var r,n,u,c,d,f=!1,o=e.bMarks[a]+e.tShift[a],h=e.eMarks[a];if(o+3>h||(r=e.src.charCodeAt(o),r!==126&&r!==96)||(d=o,o=e.skipChars(o,r),n=o-d,n<3)||(u=e.src.slice(o,h).trim(),u.indexOf("`")>=0))return!1;if(s)return!0;for(c=a;c++,!(c>=i||(o=d=e.bMarks[c]+e.tShift[c],h=e.eMarks[c],o<h&&e.tShift[c]<e.blkIndent));)if(e.src.charCodeAt(o)===r&&!(e.tShift[c]-e.blkIndent>=4)&&(o=e.skipChars(o,r),!(o-d<n)&&(o=e.skipSpaces(o),!(o<h)))){f=!0;break}return n=e.tShift[a],e.line=c+(f?1:0),e.tokens.push({type:"fence",params:u,content:e.getLines(a+1,c,n,!0),lines:[a,e.line],level:e.level}),!0}function U0(e,a,i,s){var r,n,u,c,d,f,o,h,l,p,x,w=e.bMarks[a]+e.tShift[a],b=e.eMarks[a];if(w>b||e.src.charCodeAt(w++)!==62||e.level>=e.options.maxNesting)return!1;if(s)return!0;for(e.src.charCodeAt(w)===32&&w++,d=e.blkIndent,e.blkIndent=0,c=[e.bMarks[a]],e.bMarks[a]=w,w=w<b?e.skipSpaces(w):w,n=w>=b,u=[e.tShift[a]],e.tShift[a]=w-e.bMarks[a],h=e.parser.ruler.getRules("blockquote"),r=a+1;r<i&&(w=e.bMarks[r]+e.tShift[r],b=e.eMarks[r],!(w>=b));r++){if(e.src.charCodeAt(w++)===62){e.src.charCodeAt(w)===32&&w++,c.push(e.bMarks[r]),e.bMarks[r]=w,w=w<b?e.skipSpaces(w):w,n=w>=b,u.push(e.tShift[r]),e.tShift[r]=w-e.bMarks[r];continue}if(n)break;for(x=!1,l=0,p=h.length;l<p;l++)if(h[l](e,r,i,!0)){x=!0;break}if(x)break;c.push(e.bMarks[r]),u.push(e.tShift[r]),e.tShift[r]=-1337}for(f=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:o=[a,0],level:e.level++}),e.parser.tokenize(e,a,r),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=f,o[1]=e.line,l=0;l<u.length;l++)e.bMarks[l+a]=c[l],e.tShift[l+a]=u[l];return e.blkIndent=d,!0}function z0(e,a,i,s){var r,n,u,c=e.bMarks[a],d=e.eMarks[a];if(c+=e.tShift[a],c>d||(r=e.src.charCodeAt(c++),r!==42&&r!==45&&r!==95))return!1;for(n=1;c<d;){if(u=e.src.charCodeAt(c++),u!==r&&u!==32)return!1;u===r&&n++}return n<3?!1:(s||(e.line=a+1,e.tokens.push({type:"hr",lines:[a,e.line],level:e.level})),!0)}function eu(e,a){var i,s,r;return s=e.bMarks[a]+e.tShift[a],r=e.eMarks[a],s>=r||(i=e.src.charCodeAt(s++),i!==42&&i!==45&&i!==43)||s<r&&e.src.charCodeAt(s)!==32?-1:s}function tu(e,a){var i,s=e.bMarks[a]+e.tShift[a],r=e.eMarks[a];if(s+1>=r||(i=e.src.charCodeAt(s++),i<48||i>57))return-1;for(;;){if(s>=r)return-1;if(i=e.src.charCodeAt(s++),!(i>=48&&i<=57)){if(i===41||i===46)break;return-1}}return s<r&&e.src.charCodeAt(s)!==32?-1:s}function H0(e,a){var i,s,r=e.level+2;for(i=a+2,s=e.tokens.length-2;i<s;i++)e.tokens[i].level===r&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].tight=!0,e.tokens[i].tight=!0,i+=2)}function W0(e,a,i,s){var r,n,u,c,d,f,o,h,l,p,x,w,b,g,v,k,_,y,m=!0,N,j,A,D;if((h=tu(e,a))>=0)b=!0;else if((h=eu(e,a))>=0)b=!1;else return!1;if(e.level>=e.options.maxNesting)return!1;if(w=e.src.charCodeAt(h-1),s)return!0;for(v=e.tokens.length,b?(o=e.bMarks[a]+e.tShift[a],x=Number(e.src.substr(o,h-o-1)),e.tokens.push({type:"ordered_list_open",order:x,lines:_=[a,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:_=[a,0],level:e.level++}),r=a,k=!1,N=e.parser.ruler.getRules("list");r<i&&(g=e.skipSpaces(h),l=e.eMarks[r],g>=l?p=1:p=g-h,p>4&&(p=1),p<1&&(p=1),n=h-e.bMarks[r]+p,e.tokens.push({type:"list_item_open",lines:y=[a,0],level:e.level++}),c=e.blkIndent,d=e.tight,u=e.tShift[a],f=e.parentType,e.tShift[a]=g-e.bMarks[a],e.blkIndent=n,e.tight=!0,e.parentType="list",e.parser.tokenize(e,a,i,!0),(!e.tight||k)&&(m=!1),k=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=c,e.tShift[a]=u,e.tight=d,e.parentType=f,e.tokens.push({type:"list_item_close",level:--e.level}),r=a=e.line,y[1]=r,g=e.bMarks[a],!(r>=i||e.isEmpty(r)||e.tShift[r]<e.blkIndent));){for(D=!1,j=0,A=N.length;j<A;j++)if(N[j](e,r,i,!0)){D=!0;break}if(D)break;if(b){if(h=tu(e,r),h<0)break}else if(h=eu(e,r),h<0)break;if(w!==e.src.charCodeAt(h-1))break}return e.tokens.push({type:b?"ordered_list_close":"bullet_list_close",level:--e.level}),_[1]=r,e.line=r,m&&H0(e,v),!0}function G0(e,a,i,s){var r,n,u,c,d,f=e.bMarks[a]+e.tShift[a],o=e.eMarks[a];if(f+4>o||e.src.charCodeAt(f)!==91||e.src.charCodeAt(f+1)!==94||e.level>=e.options.maxNesting)return!1;for(c=f+2;c<o;c++){if(e.src.charCodeAt(c)===32)return!1;if(e.src.charCodeAt(c)===93)break}return c===f+2||c+1>=o||e.src.charCodeAt(++c)!==58?!1:(s||(c++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),d=e.src.slice(f+2,c-2),e.env.footnotes.refs[":"+d]=-1,e.tokens.push({type:"footnote_reference_open",label:d,level:e.level++}),r=e.bMarks[a],n=e.tShift[a],u=e.parentType,e.tShift[a]=e.skipSpaces(c)-c,e.bMarks[a]=c,e.blkIndent+=4,e.parentType="footnote",e.tShift[a]<e.blkIndent&&(e.tShift[a]+=e.blkIndent,e.bMarks[a]-=e.blkIndent),e.parser.tokenize(e,a,i,!0),e.parentType=u,e.blkIndent-=4,e.tShift[a]=n,e.bMarks[a]=r,e.tokens.push({type:"footnote_reference_close",level:--e.level})),!0)}function J0(e,a,i,s){var r,n,u,c=e.bMarks[a]+e.tShift[a],d=e.eMarks[a];if(c>=d||(r=e.src.charCodeAt(c),r!==35||c>=d))return!1;for(n=1,r=e.src.charCodeAt(++c);r===35&&c<d&&n<=6;)n++,r=e.src.charCodeAt(++c);return n>6||c<d&&r!==32?!1:(s||(d=e.skipCharsBack(d,32,c),u=e.skipCharsBack(d,35,c),u>c&&e.src.charCodeAt(u-1)===32&&(d=u),e.line=a+1,e.tokens.push({type:"heading_open",hLevel:n,lines:[a,e.line],level:e.level}),c<d&&e.tokens.push({type:"inline",content:e.src.slice(c,d).trim(),level:e.level+1,lines:[a,e.line],children:[]}),e.tokens.push({type:"heading_close",hLevel:n,level:e.level})),!0)}function Y0(e,a,i){var s,r,n,u=a+1;return u>=i||e.tShift[u]<e.blkIndent||e.tShift[u]-e.blkIndent>3||(r=e.bMarks[u]+e.tShift[u],n=e.eMarks[u],r>=n)||(s=e.src.charCodeAt(r),s!==45&&s!==61)||(r=e.skipChars(r,s),r=e.skipSpaces(r),r<n)?!1:(r=e.bMarks[a]+e.tShift[a],e.line=u+1,e.tokens.push({type:"heading_open",hLevel:s===61?1:2,lines:[a,e.line],level:e.level}),e.tokens.push({type:"inline",content:e.src.slice(r,e.eMarks[a]).trim(),level:e.level+1,lines:[a,e.line-1],children:[]}),e.tokens.push({type:"heading_close",hLevel:s===61?1:2,level:e.level}),!0)}var $c={};["article","aside","button","blockquote","body","canvas","caption","col","colgroup","dd","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","iframe","li","map","object","ol","output","p","pre","progress","script","section","style","table","tbody","td","textarea","tfoot","th","tr","thead","ul","video"].forEach(function(e){$c[e]=!0});var Z0=/^<([a-zA-Z]{1,15})[\s\/>]/,X0=/^<\/([a-zA-Z]{1,15})[\s>]/;function K0(e){var a=e|32;return a>=97&&a<=122}function Q0(e,a,i,s){var r,n,u,c=e.bMarks[a],d=e.eMarks[a],f=e.tShift[a];if(c+=f,!e.options.html||f>3||c+2>=d||e.src.charCodeAt(c)!==60)return!1;if(r=e.src.charCodeAt(c+1),r===33||r===63){if(s)return!0}else if(r===47||K0(r)){if(r===47){if(n=e.src.slice(c,d).match(X0),!n)return!1}else if(n=e.src.slice(c,d).match(Z0),!n)return!1;if($c[n[1].toLowerCase()]!==!0)return!1;if(s)return!0}else return!1;for(u=a+1;u<e.lineMax&&!e.isEmpty(u);)u++;return e.line=u,e.tokens.push({type:"htmlblock",level:e.level,lines:[a,e.line],content:e.getLines(a,u,0,!0)}),!0}function $s(e,a){var i=e.bMarks[a]+e.blkIndent,s=e.eMarks[a];return e.src.substr(i,s-i)}function ef(e,a,i,s){var r,n,u,c,d,f,o,h,l,p,x;if(a+2>i||(d=a+1,e.tShift[d]<e.blkIndent)||(u=e.bMarks[d]+e.tShift[d],u>=e.eMarks[d])||(r=e.src.charCodeAt(u),r!==124&&r!==45&&r!==58)||(n=$s(e,a+1),!/^[-:| ]+$/.test(n))||(f=n.split("|"),f<=2))return!1;for(h=[],c=0;c<f.length;c++){if(l=f[c].trim(),!l){if(c===0||c===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(l))return!1;l.charCodeAt(l.length-1)===58?h.push(l.charCodeAt(0)===58?"center":"right"):l.charCodeAt(0)===58?h.push("left"):h.push("")}if(n=$s(e,a).trim(),n.indexOf("|")===-1||(f=n.replace(/^\||\|$/g,"").split("|"),h.length!==f.length))return!1;if(s)return!0;for(e.tokens.push({type:"table_open",lines:p=[a,0],level:e.level++}),e.tokens.push({type:"thead_open",lines:[a,a+1],level:e.level++}),e.tokens.push({type:"tr_open",lines:[a,a+1],level:e.level++}),c=0;c<f.length;c++)e.tokens.push({type:"th_open",align:h[c],lines:[a,a+1],level:e.level++}),e.tokens.push({type:"inline",content:f[c].trim(),lines:[a,a+1],level:e.level,children:[]}),e.tokens.push({type:"th_close",level:--e.level});for(e.tokens.push({type:"tr_close",level:--e.level}),e.tokens.push({type:"thead_close",level:--e.level}),e.tokens.push({type:"tbody_open",lines:x=[a+2,0],level:e.level++}),d=a+2;d<i&&!(e.tShift[d]<e.blkIndent||(n=$s(e,d).trim(),n.indexOf("|")===-1));d++){for(f=n.replace(/^\||\|$/g,"").split("|"),e.tokens.push({type:"tr_open",level:e.level++}),c=0;c<f.length;c++)e.tokens.push({type:"td_open",align:h[c],level:e.level++}),o=f[c].substring(f[c].charCodeAt(0)===124?1:0,f[c].charCodeAt(f[c].length-1)===124?f[c].length-1:f[c].length).trim(),e.tokens.push({type:"inline",content:o,level:e.level,children:[]}),e.tokens.push({type:"td_close",level:--e.level});e.tokens.push({type:"tr_close",level:--e.level})}return e.tokens.push({type:"tbody_close",level:--e.level}),e.tokens.push({type:"table_close",level:--e.level}),p[1]=x[1]=d,e.line=d,!0}function jn(e,a){var i,s,r=e.bMarks[a]+e.tShift[a],n=e.eMarks[a];return r>=n||(s=e.src.charCodeAt(r++),s!==126&&s!==58)||(i=e.skipSpaces(r),r===i)||i>=n?-1:i}function tf(e,a){var i,s,r=e.level+2;for(i=a+2,s=e.tokens.length-2;i<s;i++)e.tokens[i].level===r&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].tight=!0,e.tokens[i].tight=!0,i+=2)}function rf(e,a,i,s){var r,n,u,c,d,f,o,h,l,p,x,w,b,g;if(s)return e.ddIndent<0?!1:jn(e,a)>=0;if(o=a+1,e.isEmpty(o)&&++o>i||e.tShift[o]<e.blkIndent||(r=jn(e,o),r<0)||e.level>=e.options.maxNesting)return!1;f=e.tokens.length,e.tokens.push({type:"dl_open",lines:d=[a,0],level:e.level++}),u=a,n=o;e:for(;;){for(g=!0,b=!1,e.tokens.push({type:"dt_open",lines:[u,u],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(u,u+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[u,u],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:c=[o,0],level:e.level++}),w=e.tight,l=e.ddIndent,h=e.blkIndent,x=e.tShift[n],p=e.parentType,e.blkIndent=e.ddIndent=e.tShift[n]+2,e.tShift[n]=r-e.bMarks[n],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,n,i,!0),(!e.tight||b)&&(g=!1),b=e.line-n>1&&e.isEmpty(e.line-1),e.tShift[n]=x,e.tight=w,e.parentType=p,e.blkIndent=h,e.ddIndent=l,e.tokens.push({type:"dd_close",level:--e.level}),c[1]=o=e.line,o>=i||e.tShift[o]<e.blkIndent)break e;if(r=jn(e,o),r<0)break;n=o}if(o>=i||(u=o,e.isEmpty(u))||e.tShift[u]<e.blkIndent||(n=u+1,n>=i)||(e.isEmpty(n)&&n++,n>=i)||e.tShift[n]<e.blkIndent||(r=jn(e,n),r<0))break}return e.tokens.push({type:"dl_close",level:--e.level}),d[1]=o,e.line=o,g&&tf(e,f),!0}function af(e,a){var i,s,r,n,u,c=a+1,d;if(i=e.lineMax,c<i&&!e.isEmpty(c)){for(d=e.parser.ruler.getRules("paragraph");c<i&&!e.isEmpty(c);c++)if(!(e.tShift[c]-e.blkIndent>3)){for(r=!1,n=0,u=d.length;n<u;n++)if(d[n](e,c,i,!0)){r=!0;break}if(r)break}}return s=e.getLines(a,c,e.blkIndent,!1).trim(),e.line=c,s.length&&(e.tokens.push({type:"paragraph_open",tight:!1,lines:[a,e.line],level:e.level}),e.tokens.push({type:"inline",content:s,level:e.level+1,lines:[a,e.line],children:[]}),e.tokens.push({type:"paragraph_close",tight:!1,level:e.level})),!0}var En=[["code",B0],["fences",V0,["paragraph","blockquote","list"]],["blockquote",U0,["paragraph","blockquote","list"]],["hr",z0,["paragraph","blockquote","list"]],["list",W0,["paragraph","blockquote"]],["footnote",G0,["paragraph"]],["heading",J0,["paragraph","blockquote"]],["lheading",Y0],["htmlblock",Q0,["paragraph","blockquote"]],["table",ef,["paragraph"]],["deflist",rf,["paragraph"]],["paragraph",af]];function Hi(){this.ruler=new bt;for(var e=0;e<En.length;e++)this.ruler.push(En[e][0],En[e][1],{alt:(En[e][2]||[]).slice()})}Hi.prototype.tokenize=function(e,a,i){for(var s=this.ruler.getRules(""),r=s.length,n=a,u=!1,c,d;n<i&&(e.line=n=e.skipEmptyLines(n),!(n>=i||e.tShift[n]<e.blkIndent));){for(d=0;d<r&&(c=s[d](e,n,i,!1),!c);d++);if(e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),n=e.line,n<i&&e.isEmpty(n)){if(u=!0,n++,n<i&&e.parentType==="list"&&e.isEmpty(n))break;e.line=n}}};var nf=/[\n\t]/g,sf=/\r[\n\u0085]|[\u2424\u2028\u0085]/g,of=/\u00a0/g;Hi.prototype.parse=function(e,a,i,s){var r,n=0,u=0;if(!e)return[];e=e.replace(of," "),e=e.replace(sf,`
116
+ `),e.indexOf(" ")>=0&&(e=e.replace(nf,function(c,d){var f;return e.charCodeAt(d)===10?(n=d+1,u=0,c):(f=" ".slice((d-n-u)%4),u=d-n+1,f)})),r=new zr(e,this,a,i,s),this.tokenize(r,r.line,r.lineMax)};function uf(e){switch(e){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}function lf(e,a){for(var i=e.pos;i<e.posMax&&!uf(e.src.charCodeAt(i));)i++;return i===e.pos?!1:(a||(e.pending+=e.src.slice(e.pos,i)),e.pos=i,!0)}function cf(e,a){var i,s,r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;if(i=e.pending.length-1,s=e.posMax,!a)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){for(var n=i-2;n>=0;n--)if(e.pending.charCodeAt(n)!==32){e.pending=e.pending.substring(0,n+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(r++;r<s&&e.src.charCodeAt(r)===32;)r++;return e.pos=r,!0}var Wi=[];for(var ru=0;ru<256;ru++)Wi.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Wi[e.charCodeAt(0)]=1});function df(e,a){var i,s=e.pos,r=e.posMax;if(e.src.charCodeAt(s)!==92)return!1;if(s++,s<r){if(i=e.src.charCodeAt(s),i<256&&Wi[i]!==0)return a||(e.pending+=e.src[s]),e.pos+=2,!0;if(i===10){for(a||e.push({type:"hardbreak",level:e.level}),s++;s<r&&e.src.charCodeAt(s)===32;)s++;return e.pos=s,!0}}return a||(e.pending+="\\"),e.pos++,!0}function ff(e,a){var i,s,r,n,u,c=e.pos,d=e.src.charCodeAt(c);if(d!==96)return!1;for(i=c,c++,s=e.posMax;c<s&&e.src.charCodeAt(c)===96;)c++;for(r=e.src.slice(i,c),n=u=c;(n=e.src.indexOf("`",u))!==-1;){for(u=n+1;u<s&&e.src.charCodeAt(u)===96;)u++;if(u-n===r.length)return a||e.push({type:"code",content:e.src.slice(c,n).replace(/[ \n]+/g," ").trim(),block:!1,level:e.level}),e.pos=u,!0}return a||(e.pending+=r),e.pos+=r.length,!0}function hf(e,a){var i,s,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==126||a||u+4>=n||e.src.charCodeAt(u+1)!==126||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===126)||d===126||d===32||d===10)return!1;for(s=u+2;s<n&&e.src.charCodeAt(s)===126;)s++;if(s>u+3)return e.pos+=s-u,a||(e.pending+=e.src.slice(u,s)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===126&&e.src.charCodeAt(e.pos+1)===126&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==126&&c!==126&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){i=!0;break}e.parser.skipToken(e)}return i?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"del_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"del_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function pf(e,a){var i,s,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==43||a||u+4>=n||e.src.charCodeAt(u+1)!==43||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===43)||d===43||d===32||d===10)return!1;for(s=u+2;s<n&&e.src.charCodeAt(s)===43;)s++;if(s!==u+2)return e.pos+=s-u,a||(e.pending+=e.src.slice(u,s)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===43&&e.src.charCodeAt(e.pos+1)===43&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==43&&c!==43&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){i=!0;break}e.parser.skipToken(e)}return i?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"ins_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"ins_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function mf(e,a){var i,s,r,n=e.posMax,u=e.pos,c,d;if(e.src.charCodeAt(u)!==61||a||u+4>=n||e.src.charCodeAt(u+1)!==61||e.level>=e.options.maxNesting||(c=u>0?e.src.charCodeAt(u-1):-1,d=e.src.charCodeAt(u+2),c===61)||d===61||d===32||d===10)return!1;for(s=u+2;s<n&&e.src.charCodeAt(s)===61;)s++;if(s!==u+2)return e.pos+=s-u,a||(e.pending+=e.src.slice(u,s)),!0;for(e.pos=u+2,r=1;e.pos+1<n;){if(e.src.charCodeAt(e.pos)===61&&e.src.charCodeAt(e.pos+1)===61&&(c=e.src.charCodeAt(e.pos-1),d=e.pos+2<n?e.src.charCodeAt(e.pos+2):-1,d!==61&&c!==61&&(c!==32&&c!==10?r--:d!==32&&d!==10&&r++,r<=0))){i=!0;break}e.parser.skipToken(e)}return i?(e.posMax=e.pos,e.pos=u+2,a||(e.push({type:"mark_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"mark_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=n,!0):(e.pos=u,!1)}function au(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function nu(e,a){var i=a,s,r,n,u=!0,c=!0,d=e.posMax,f=e.src.charCodeAt(a);for(s=a>0?e.src.charCodeAt(a-1):-1;i<d&&e.src.charCodeAt(i)===f;)i++;return i>=d&&(u=!1),n=i-a,n>=4?u=c=!1:(r=i<d?e.src.charCodeAt(i):-1,(r===32||r===10)&&(u=!1),(s===32||s===10)&&(c=!1),f===95&&(au(s)&&(u=!1),au(r)&&(c=!1))),{can_open:u,can_close:c,delims:n}}function gf(e,a){var i,s,r,n,u,c,d,f=e.posMax,o=e.pos,h=e.src.charCodeAt(o);if(h!==95&&h!==42||a)return!1;if(d=nu(e,o),i=d.delims,!d.can_open)return e.pos+=i,a||(e.pending+=e.src.slice(o,e.pos)),!0;if(e.level>=e.options.maxNesting)return!1;for(e.pos=o+i,c=[i];e.pos<f;){if(e.src.charCodeAt(e.pos)===h){if(d=nu(e,e.pos),s=d.delims,d.can_close){for(n=c.pop(),u=s;n!==u;){if(u<n){c.push(n-u);break}if(u-=n,c.length===0)break;e.pos+=n,n=c.pop()}if(c.length===0){i=n,r=!0;break}e.pos+=s;continue}d.can_open&&c.push(s),e.pos+=s;continue}e.parser.skipToken(e)}return r?(e.posMax=e.pos,e.pos=o+i,a||((i===2||i===3)&&e.push({type:"strong_open",level:e.level++}),(i===1||i===3)&&e.push({type:"em_open",level:e.level++}),e.parser.tokenize(e),(i===1||i===3)&&e.push({type:"em_close",level:--e.level}),(i===2||i===3)&&e.push({type:"strong_close",level:--e.level})),e.pos=e.posMax+i,e.posMax=f,!0):(e.pos=o,!1)}var bf=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function xf(e,a){var i,s,r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==126||a||n+2>=r||e.level>=e.options.maxNesting)return!1;for(e.pos=n+1;e.pos<r;){if(e.src.charCodeAt(e.pos)===126){i=!0;break}e.parser.skipToken(e)}return!i||n+1===e.pos||(s=e.src.slice(n+1,e.pos),s.match(/(^|[^\\])(\\\\)*\s/))?(e.pos=n,!1):(e.posMax=e.pos,e.pos=n+1,a||e.push({type:"sub",level:e.level,content:s.replace(bf,"$1")}),e.pos=e.posMax+1,e.posMax=r,!0)}var yf=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function vf(e,a){var i,s,r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==94||a||n+2>=r||e.level>=e.options.maxNesting)return!1;for(e.pos=n+1;e.pos<r;){if(e.src.charCodeAt(e.pos)===94){i=!0;break}e.parser.skipToken(e)}return!i||n+1===e.pos||(s=e.src.slice(n+1,e.pos),s.match(/(^|[^\\])(\\\\)*\s/))?(e.pos=n,!1):(e.posMax=e.pos,e.pos=n+1,a||e.push({type:"sup",level:e.level,content:s.replace(yf,"$1")}),e.pos=e.posMax+1,e.posMax=r,!0)}function wf(e,a){var i,s,r,n,u,c,d,f,o=!1,h=e.pos,l=e.posMax,p=e.pos,x=e.src.charCodeAt(p);if(x===33&&(o=!0,x=e.src.charCodeAt(++p)),x!==91||e.level>=e.options.maxNesting||(i=p+1,s=Qa(e,p),s<0))return!1;if(c=s+1,c<l&&e.src.charCodeAt(c)===40){for(c++;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c>=l)return!1;for(p=c,Dc(e,c)?(n=e.linkContent,c=e.pos):n="",p=c;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<l&&p!==c&&Tc(e,c))for(u=e.linkContent,c=e.pos;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);else u="";if(c>=l||e.src.charCodeAt(c)!==41)return e.pos=h,!1;c++}else{if(e.linkLevel>0)return!1;for(;c<l&&(f=e.src.charCodeAt(c),!(f!==32&&f!==10));c++);if(c<l&&e.src.charCodeAt(c)===91&&(p=c+1,c=Qa(e,c),c>=0?r=e.src.slice(p,c++):c=p-1),r||(typeof r>"u"&&(c=s+1),r=e.src.slice(i,s)),d=e.env.references[Oc(r)],!d)return e.pos=h,!1;n=d.href,u=d.title}return a||(e.pos=i,e.posMax=s,o?e.push({type:"image",src:n,title:u,alt:e.src.substr(i,s-i),level:e.level}):(e.push({type:"link_open",href:n,title:u,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=c,e.posMax=l,!0}function _f(e,a){var i,s,r,n,u=e.posMax,c=e.pos;return c+2>=u||e.src.charCodeAt(c)!==94||e.src.charCodeAt(c+1)!==91||e.level>=e.options.maxNesting||(i=c+2,s=Qa(e,c+1),s<0)?!1:(a||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),r=e.env.footnotes.list.length,e.pos=i,e.posMax=s,e.push({type:"footnote_ref",id:r,level:e.level}),e.linkLevel++,n=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[r]={tokens:e.tokens.splice(n)},e.linkLevel--),e.pos=s+1,e.posMax=u,!0)}function kf(e,a){var i,s,r,n,u=e.posMax,c=e.pos;if(c+3>u||!e.env.footnotes||!e.env.footnotes.refs||e.src.charCodeAt(c)!==91||e.src.charCodeAt(c+1)!==94||e.level>=e.options.maxNesting)return!1;for(s=c+2;s<u;s++){if(e.src.charCodeAt(s)===32||e.src.charCodeAt(s)===10)return!1;if(e.src.charCodeAt(s)===93)break}return s===c+2||s>=u||(s++,i=e.src.slice(c+2,s-1),typeof e.env.footnotes.refs[":"+i]>"u")?!1:(a||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+i]<0?(r=e.env.footnotes.list.length,e.env.footnotes.list[r]={label:i,count:0},e.env.footnotes.refs[":"+i]=r):r=e.env.footnotes.refs[":"+i],n=e.env.footnotes.list[r].count,e.env.footnotes.list[r].count++,e.push({type:"footnote_ref",id:r,subId:n,level:e.level})),e.pos=s,e.posMax=u,!0)}var Nf=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"],jf=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,Ef=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;function Af(e,a){var i,s,r,n,u,c=e.pos;return e.src.charCodeAt(c)!==60||(i=e.src.slice(c),i.indexOf(">")<0)?!1:(s=i.match(Ef),s?Nf.indexOf(s[1].toLowerCase())<0||(n=s[0].slice(1,-1),u=$i(n),!e.parser.validateLink(n))?!1:(a||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:n,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=s[0].length,!0):(r=i.match(jf),r?(n=r[0].slice(1,-1),u=$i("mailto:"+n),e.parser.validateLink(u)?(a||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:n,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=r[0].length,!0):!1):!1))}function ls(e,a){return e=e.source,a=a||"",function i(s,r){return s?(r=r.source||r,e=e.replace(s,r),i):new RegExp(e,a)}}var Sf=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,Cf=/[^"'=<>`\x00-\x20]+/,Df=/'[^']*'/,Tf=/"[^"]*"/,Of=ls(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",Cf)("single_quoted",Df)("double_quoted",Tf)(),Pf=ls(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",Sf)("attr_value",Of)(),$f=ls(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",Pf)(),Lf=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,Mf=/<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,Rf=/<[?].*?[?]>/,If=/<![A-Z]+\s+[^>]*>/,Ff=/<!\[CDATA\[[\s\S]*?\]\]>/,qf=ls(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",$f)("close_tag",Lf)("comment",Mf)("processing",Rf)("declaration",If)("cdata",Ff)();function Bf(e){var a=e|32;return a>=97&&a<=122}function Vf(e,a){var i,s,r,n=e.pos;return!e.options.html||(r=e.posMax,e.src.charCodeAt(n)!==60||n+2>=r)||(i=e.src.charCodeAt(n+1),i!==33&&i!==63&&i!==47&&!Bf(i))||(s=e.src.slice(n).match(qf),!s)?!1:(a||e.push({type:"htmltag",content:e.src.slice(n,n+s[0].length),level:e.level}),e.pos+=s[0].length,!0)}var Uf=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,zf=/^&([a-z][a-z0-9]{1,31});/i;function Hf(e,a){var i,s,r,n=e.pos,u=e.posMax;if(e.src.charCodeAt(n)!==38)return!1;if(n+1<u){if(i=e.src.charCodeAt(n+1),i===35){if(r=e.src.slice(n).match(Uf),r)return a||(s=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),e.pending+=Ui(s)?es(s):es(65533)),e.pos+=r[0].length,!0}else if(r=e.src.slice(n).match(zf),r){var c=Ac(r[1]);if(r[1]!==c)return a||(e.pending+=c),e.pos+=r[0].length,!0}}return a||(e.pending+="&"),e.pos++,!0}var Ls=[["text",lf],["newline",cf],["escape",df],["backticks",ff],["del",hf],["ins",pf],["mark",mf],["emphasis",gf],["sub",xf],["sup",vf],["links",wf],["footnote_inline",_f],["footnote_ref",kf],["autolink",Af],["htmltag",Vf],["entity",Hf]];function cs(){this.ruler=new bt;for(var e=0;e<Ls.length;e++)this.ruler.push(Ls[e][0],Ls[e][1]);this.validateLink=Wf}cs.prototype.skipToken=function(e){var a=this.ruler.getRules(""),i=a.length,s=e.pos,r,n;if((n=e.cacheGet(s))>0){e.pos=n;return}for(r=0;r<i;r++)if(a[r](e,!0)){e.cacheSet(s,e.pos);return}e.pos++,e.cacheSet(s,e.pos)};cs.prototype.tokenize=function(e){for(var a=this.ruler.getRules(""),i=a.length,s=e.posMax,r,n;e.pos<s;){for(n=0;n<i&&(r=a[n](e,!1),!r);n++);if(r){if(e.pos>=s)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};cs.prototype.parse=function(e,a,i,s){var r=new Ur(e,this,a,i,s);this.tokenize(r)};function Wf(e){var a=["vbscript","javascript","file","data"],i=e.trim().toLowerCase();return i=br(i),!(i.indexOf(":")!==-1&&a.indexOf(i.split(":")[0])!==-1)}var Gf={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","replacements","smartquotes","references","abbr2","footnote_tail"]},block:{rules:["blockquote","code","fences","footnote","heading","hr","htmlblock","lheading","list","paragraph","table"]},inline:{rules:["autolink","backticks","del","emphasis","entity","escape","footnote_ref","htmltag","links","newline","text"]}}},Jf={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},Yf={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","abbr2"]},block:{rules:["blockquote","code","fences","heading","hr","htmlblock","lheading","list","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","htmltag","links","newline","text"]}}},Zf={default:Gf,full:Jf,commonmark:Yf};function Lc(e,a,i){this.src=a,this.env=i,this.options=e.options,this.tokens=[],this.inlineMode=!1,this.inline=e.inline,this.block=e.block,this.renderer=e.renderer,this.typographer=e.typographer}function yr(e,a){typeof e!="string"&&(a=e,e="default"),a&&a.linkify!=null&&console.warn(`linkify option is removed. Use linkify plugin instead:
117
117
 
118
118
  import Remarkable from 'remarkable';
119
119
  import linkify from 'remarkable/linkify';
120
120
  new Remarkable().use(linkify)
121
- `),this.inline=new cs,this.block=new Hi,this.core=new Pc,this.renderer=new zi,this.ruler=new bt,this.options={},this.configure(Zf[e]),this.set(a||{})}yr.prototype.set=function(e){Vi(this.options,e)};yr.prototype.configure=function(e){var a=this;if(!e)throw new Error("Wrong `remarkable` preset, check name/content");e.options&&a.set(e.options),e.components&&Object.keys(e.components).forEach(function(i){e.components[i].rules&&a[i].ruler.enable(e.components[i].rules,!0)})};yr.prototype.use=function(e,a){return e(this,a),this};yr.prototype.parse=function(e,a){var i=new $c(this,e,a);return this.core.process(i),i.tokens};yr.prototype.render=function(e,a){return a=a||{},this.renderer.render(this.parse(e,a),this.options,a)};yr.prototype.parseInline=function(e,a){var i=new $c(this,e,a);return i.inlineMode=!0,this.core.process(i),i.tokens};yr.prototype.renderInline=function(e,a){return a=a||{},this.renderer.render(this.parseInline(e,a),this.options,a)};const Xf=Object.freeze(Object.defineProperty({__proto__:null,Remarkable:yr,utils:N0},Symbol.toStringTag,{value:"Module"})),Kf=qi(Xf);var Qt={},pr={};function Qf(e,a){var i=Object.setPrototypeOf;i?i(e,a):e.__proto__=a}function Mc(e,a){a===void 0&&(a=e.constructor);var i=Error.captureStackTrace;i&&i(e,a)}var eh=(function(){var e=function(i,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(r[u]=n[u])},e(i,s)};return function(a,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(a,i);function s(){this.constructor=a}a.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}})(),th=(function(e){eh(a,e);function a(i,s){var r=this.constructor,n=e.call(this,i,s)||this;return Object.defineProperty(n,"name",{value:r.name,enumerable:!1,configurable:!0}),Qf(n,r.prototype),Mc(n),n}return a})(Error),rh=function(e,a,i){if(i||arguments.length===2)for(var s=0,r=a.length,n;s<r;s++)(n||!(s in a))&&(n||(n=Array.prototype.slice.call(a,0,s)),n[s]=a[s]);return e.concat(n||Array.prototype.slice.call(a))};function ah(e,a){a===void 0&&(a=Error);function i(){for(var s=[],r=0;r<arguments.length;r++)s[r]=arguments[r];if(!(this instanceof i))return new(i.bind.apply(i,rh([void 0],s,!1)));a.apply(this,s),Object.defineProperty(this,"name",{value:e.name||a.name,enumerable:!1,configurable:!0}),e.apply(this,s),Mc(this,i)}return Object.defineProperties(i,{prototype:{value:Object.create(a.prototype,{constructor:{value:i,writable:!0,configurable:!0}})}})}const nh=Object.freeze(Object.defineProperty({__proto__:null,CustomError:th,customErrorFactory:ah},Symbol.toStringTag,{value:"Module"})),sh=qi(nh);var Ms={};const ih={},oh=Object.freeze(Object.defineProperty({__proto__:null,default:ih},Symbol.toStringTag,{value:"Module"})),dt=qi(oh);var Rs,su;function uh(){if(su)return Rs;su=1;const e=dt,a=/\s+at.*(?:\(|\s)(.*)\)?/,i=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,s=typeof e.homedir>"u"?"":e.homedir();return Rs=(r,n)=>(n=Object.assign({pretty:!1},n),r.replace(/\\/g,"/").split(`
121
+ `),this.inline=new cs,this.block=new Hi,this.core=new Pc,this.renderer=new zi,this.ruler=new bt,this.options={},this.configure(Zf[e]),this.set(a||{})}yr.prototype.set=function(e){Vi(this.options,e)};yr.prototype.configure=function(e){var a=this;if(!e)throw new Error("Wrong `remarkable` preset, check name/content");e.options&&a.set(e.options),e.components&&Object.keys(e.components).forEach(function(i){e.components[i].rules&&a[i].ruler.enable(e.components[i].rules,!0)})};yr.prototype.use=function(e,a){return e(this,a),this};yr.prototype.parse=function(e,a){var i=new Lc(this,e,a);return this.core.process(i),i.tokens};yr.prototype.render=function(e,a){return a=a||{},this.renderer.render(this.parse(e,a),this.options,a)};yr.prototype.parseInline=function(e,a){var i=new Lc(this,e,a);return i.inlineMode=!0,this.core.process(i),i.tokens};yr.prototype.renderInline=function(e,a){return a=a||{},this.renderer.render(this.parseInline(e,a),this.options,a)};const Xf=Object.freeze(Object.defineProperty({__proto__:null,Remarkable:yr,utils:N0},Symbol.toStringTag,{value:"Module"})),Kf=qi(Xf);var Qt={},pr={};function Qf(e,a){var i=Object.setPrototypeOf;i?i(e,a):e.__proto__=a}function Mc(e,a){a===void 0&&(a=e.constructor);var i=Error.captureStackTrace;i&&i(e,a)}var eh=(function(){var e=function(i,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(r[u]=n[u])},e(i,s)};return function(a,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(a,i);function s(){this.constructor=a}a.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}})(),th=(function(e){eh(a,e);function a(i,s){var r=this.constructor,n=e.call(this,i,s)||this;return Object.defineProperty(n,"name",{value:r.name,enumerable:!1,configurable:!0}),Qf(n,r.prototype),Mc(n),n}return a})(Error),rh=function(e,a,i){if(i||arguments.length===2)for(var s=0,r=a.length,n;s<r;s++)(n||!(s in a))&&(n||(n=Array.prototype.slice.call(a,0,s)),n[s]=a[s]);return e.concat(n||Array.prototype.slice.call(a))};function ah(e,a){a===void 0&&(a=Error);function i(){for(var s=[],r=0;r<arguments.length;r++)s[r]=arguments[r];if(!(this instanceof i))return new(i.bind.apply(i,rh([void 0],s,!1)));a.apply(this,s),Object.defineProperty(this,"name",{value:e.name||a.name,enumerable:!1,configurable:!0}),e.apply(this,s),Mc(this,i)}return Object.defineProperties(i,{prototype:{value:Object.create(a.prototype,{constructor:{value:i,writable:!0,configurable:!0}})}})}const nh=Object.freeze(Object.defineProperty({__proto__:null,CustomError:th,customErrorFactory:ah},Symbol.toStringTag,{value:"Module"})),sh=qi(nh);var Ms={};const ih={},oh=Object.freeze(Object.defineProperty({__proto__:null,default:ih},Symbol.toStringTag,{value:"Module"})),dt=qi(oh);var Rs,su;function uh(){if(su)return Rs;su=1;const e=dt,a=/\s+at.*(?:\(|\s)(.*)\)?/,i=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,s=typeof e.homedir>"u"?"":e.homedir();return Rs=(r,n)=>(n=Object.assign({pretty:!1},n),r.replace(/\\/g,"/").split(`
122
122
  `).filter(u=>{const c=u.match(a);if(c===null||!c[1])return!0;const d=c[1];return d.includes(".app/Contents/Resources/electron.asar")||d.includes(".app/Contents/Resources/default_app.asar")?!1:!i.test(d)}).filter(u=>u.trim()!=="").map(u=>n.pretty?u.replace(a,(c,d)=>c.replace(d,d.replace(s,"~"))):u).join(`
123
- `)),Rs}var Is,iu;function Rc(){if(iu)return Is;iu=1;var e=function(v){return a(v)&&!i(v)};function a(g){return!!g&&typeof g=="object"}function i(g){var v=Object.prototype.toString.call(g);return v==="[object RegExp]"||v==="[object Date]"||n(g)}var s=typeof Symbol=="function"&&Symbol.for,r=s?Symbol.for("react.element"):60103;function n(g){return g.$$typeof===r}function u(g){return Array.isArray(g)?[]:{}}function c(g,v){return v.clone!==!1&&v.isMergeableObject(g)?w(u(g),g,v):g}function d(g,v,_){return g.concat(v).map(function(k){return c(k,_)})}function f(g,v){if(!v.customMerge)return w;var _=v.customMerge(g);return typeof _=="function"?_:w}function o(g){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(g).filter(function(v){return Object.propertyIsEnumerable.call(g,v)}):[]}function h(g){return Object.keys(g).concat(o(g))}function l(g,v){try{return v in g}catch{return!1}}function p(g,v){return l(g,v)&&!(Object.hasOwnProperty.call(g,v)&&Object.propertyIsEnumerable.call(g,v))}function x(g,v,_){var k={};return _.isMergeableObject(g)&&h(g).forEach(function(y){k[y]=c(g[y],_)}),h(v).forEach(function(y){p(g,y)||(l(g,y)&&_.isMergeableObject(v[y])?k[y]=f(y,_)(g[y],v[y],_):k[y]=c(v[y],_))}),k}function w(g,v,_){_=_||{},_.arrayMerge=_.arrayMerge||d,_.isMergeableObject=_.isMergeableObject||e,_.cloneUnlessOtherwiseSpecified=c;var k=Array.isArray(v),y=Array.isArray(g),m=k===y;return m?k?_.arrayMerge(g,v,_):x(g,v,_):c(v,_)}w.all=function(v,_){if(!Array.isArray(v))throw new Error("first argument should be an array");return v.reduce(function(k,y){return w(k,y,_)},{})};var b=w;return Is=b,Is}var Fs={},ou;function $i(){return ou||(ou=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),(function(a){a.DEFAULT={cleanStack:!0}})(e.Options||(e.Options={}))})(Fs)),Fs}var uu;function lu(){return uu||(uu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});var a=uh(),i=Rc(),s=$i();(function(r){function n(d,f,o,h){h===void 0&&(h=s.Options.DEFAULT);var l=d;return f&&(l.cause=f),l.stack=u(l.stack,f,h),o&&c(l,o),l}r.make=n;function u(d,f,o){var h=d||"";f&&(h+=`
124
- Caused by: `+(f.stack||f));function l(p){return a(p,{pretty:!0})}return o&&o.cleanStack&&(h=l(h)),h}r.appendToStack=u;function c(d,f){for(var o in f)if(f.hasOwnProperty(o)){var h=d.hasOwnProperty(o)&&typeof d[o]=="object";d[o]=h?i(d[o],f[o]):f[o]}}})(e.ChainedErrorFactory||(e.ChainedErrorFactory={}))})(Ms)),Ms}var cu;function ds(){if(cu)return pr;cu=1;var e=pr&&pr.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,h){o.__proto__=h}||function(o,h){for(var l in h)h.hasOwnProperty(l)&&(o[l]=h[l])},c(d,f)};return function(d,f){c(d,f);function o(){this.constructor=d}d.prototype=f===null?Object.create(f):(o.prototype=f.prototype,new o)}})();Object.defineProperty(pr,"__esModule",{value:!0});var a=sh,i=lu(),s=$i(),r=(function(c){e(d,c);function d(f,o,h){h===void 0&&(h=s.Options.DEFAULT);var l=c.call(this,f)||this;return l.cause=o,l.stack=i.ChainedErrorFactory.appendToStack(l.stack,o,h),l}return d})(a.CustomError);pr.default=r;var n=lu();pr.ChainedErrorFactory=n.ChainedErrorFactory;var u=$i();return pr.Options=u.Options,pr}var du;function lh(){if(du)return Qt;du=1;var e=Qt&&Qt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.SecurityError=Qt.SecurityChecker=void 0;const a=e(ds());let i=class{static checkSecurity(n,u){if(!u.allowScriptTag&&this.containsScriptTag(n))throw new s("Renderer rejected the input because of insecure content: text contains script tag")}static containsScriptTag(n){return/<\s*script/gi.test(n)}};Qt.SecurityChecker=i;class s extends a.default{constructor(n,u){super(n,u)}}return Qt.SecurityError=s,Qt}var st={},Fa={},er={},Tr={},fu;function fs(){if(fu)return Tr;fu=1;function e(n,u,c){if(c===void 0&&(c=Array.prototype),n&&typeof c.find=="function")return c.find.call(n,u);for(var d=0;d<n.length;d++)if(Object.prototype.hasOwnProperty.call(n,d)){var f=n[d];if(u.call(void 0,f,d,n))return f}}function a(n,u){return u===void 0&&(u=Object),u&&typeof u.freeze=="function"?u.freeze(n):n}function i(n,u){if(n===null||typeof n!="object")throw new TypeError("target is not an object");for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(n[c]=u[c]);return n}var s=a({HTML:"text/html",isHTML:function(n){return n===s.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r=a({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(n){return n===r.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return Tr.assign=i,Tr.find=e,Tr.freeze=a,Tr.MIME_TYPE=s,Tr.NAMESPACE=r,Tr}var hu;function Ic(){if(hu)return er;hu=1;var e=fs(),a=e.find,i=e.NAMESPACE;function s(E){return E!==""}function r(E){return E?E.split(/[\t\n\f\r ]+/).filter(s):[]}function n(E,S){return E.hasOwnProperty(S)||(E[S]=!0),E}function u(E){if(!E)return[];var S=r(E);return Object.keys(S.reduce(n,{}))}function c(E){return function(S){return E&&E.indexOf(S)!==-1}}function d(E,S){for(var L in E)Object.prototype.hasOwnProperty.call(E,L)&&(S[L]=E[L])}function f(E,S){var L=E.prototype;if(!(L instanceof S)){let H=function(){};H.prototype=S.prototype,H=new H,d(L,H),E.prototype=L=H}L.constructor!=E&&(typeof E!="function"&&console.error("unknown Class:"+E),L.constructor=E)}var o={},h=o.ELEMENT_NODE=1,l=o.ATTRIBUTE_NODE=2,p=o.TEXT_NODE=3,x=o.CDATA_SECTION_NODE=4,w=o.ENTITY_REFERENCE_NODE=5,b=o.ENTITY_NODE=6,g=o.PROCESSING_INSTRUCTION_NODE=7,v=o.COMMENT_NODE=8,_=o.DOCUMENT_NODE=9,k=o.DOCUMENT_TYPE_NODE=10,y=o.DOCUMENT_FRAGMENT_NODE=11,m=o.NOTATION_NODE=12,N={},j={};N.INDEX_SIZE_ERR=(j[1]="Index size error",1),N.DOMSTRING_SIZE_ERR=(j[2]="DOMString size error",2);var A=N.HIERARCHY_REQUEST_ERR=(j[3]="Hierarchy request error",3);N.WRONG_DOCUMENT_ERR=(j[4]="Wrong document",4),N.INVALID_CHARACTER_ERR=(j[5]="Invalid character",5),N.NO_DATA_ALLOWED_ERR=(j[6]="No data allowed",6),N.NO_MODIFICATION_ALLOWED_ERR=(j[7]="No modification allowed",7);var D=N.NOT_FOUND_ERR=(j[8]="Not found",8);N.NOT_SUPPORTED_ERR=(j[9]="Not supported",9);var C=N.INUSE_ATTRIBUTE_ERR=(j[10]="Attribute in use",10);N.INVALID_STATE_ERR=(j[11]="Invalid state",11),N.SYNTAX_ERR=(j[12]="Syntax error",12),N.INVALID_MODIFICATION_ERR=(j[13]="Invalid modification",13),N.NAMESPACE_ERR=(j[14]="Invalid namespace",14),N.INVALID_ACCESS_ERR=(j[15]="Invalid access",15);function T(E,S){if(S instanceof Error)var L=S;else L=this,Error.call(this,j[E]),this.message=j[E],Error.captureStackTrace&&Error.captureStackTrace(this,T);return L.code=E,S&&(this.message=this.message+": "+S),L}T.prototype=Error.prototype,d(N,T);function M(){}M.prototype={length:0,item:function(E){return E>=0&&E<this.length?this[E]:null},toString:function(E,S){for(var L=[],H=0;H<this.length;H++)Tt(this[H],L,E,S);return L.join("")},filter:function(E){return Array.prototype.filter.call(this,E)},indexOf:function(E){return Array.prototype.indexOf.call(this,E)}};function W(E,S){this._node=E,this._refresh=S,F(this)}function F(E){var S=E._node._inc||E._node.ownerDocument._inc;if(E._inc!==S){var L=E._refresh(E._node);if(wr(E,"length",L.length),!E.$$length||L.length<E.$$length)for(var H=L.length;H in E;H++)Object.prototype.hasOwnProperty.call(E,H)&&delete E[H];d(L,E),E._inc=S}}W.prototype.item=function(E){return F(this),this[E]||null},f(W,M);function q(){}function $(E,S){for(var L=E.length;L--;)if(E[L]===S)return L}function Y(E,S,L,H){if(H?S[$(S,H)]=L:S[S.length++]=L,E){L.ownerElement=E;var re=E.ownerDocument;re&&(H&&fe(re,E,H),J(re,E,L))}}function X(E,S,L){var H=$(S,L);if(H>=0){for(var re=S.length-1;H<re;)S[H]=S[++H];if(S.length=re,E){var he=E.ownerDocument;he&&(fe(he,E,L),L.ownerElement=null)}}else throw new T(D,new Error(E.tagName+"@"+L))}q.prototype={length:0,item:M.prototype.item,getNamedItem:function(E){for(var S=this.length;S--;){var L=this[S];if(L.nodeName==E)return L}},setNamedItem:function(E){var S=E.ownerElement;if(S&&S!=this._ownerElement)throw new T(C);var L=this.getNamedItem(E.nodeName);return Y(this._ownerElement,this,E,L),L},setNamedItemNS:function(E){var S=E.ownerElement,L;if(S&&S!=this._ownerElement)throw new T(C);return L=this.getNamedItemNS(E.namespaceURI,E.localName),Y(this._ownerElement,this,E,L),L},removeNamedItem:function(E){var S=this.getNamedItem(E);return X(this._ownerElement,this,S),S},removeNamedItemNS:function(E,S){var L=this.getNamedItemNS(E,S);return X(this._ownerElement,this,L),L},getNamedItemNS:function(E,S){for(var L=this.length;L--;){var H=this[L];if(H.localName==S&&H.namespaceURI==E)return H}return null}};function ae(){}ae.prototype={hasFeature:function(E,S){return!0},createDocument:function(E,S,L){var H=new V;if(H.implementation=this,H.childNodes=new M,H.doctype=L||null,L&&H.appendChild(L),S){var re=H.createElementNS(E,S);H.appendChild(re)}return H},createDocumentType:function(E,S,L){var H=new Ze;return H.name=E,H.nodeName=E,H.publicId=S||"",H.systemId=L||"",H}};function I(){}I.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(E,S){return Ye(this,E,S)},replaceChild:function(E,S){Ye(this,E,S,pe),S&&this.removeChild(S)},removeChild:function(E){return ne(this,E)},appendChild:function(E){return this.insertBefore(E,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(E){return ft(this.ownerDocument||this,this,E)},normalize:function(){for(var E=this.firstChild;E;){var S=E.nextSibling;S&&S.nodeType==p&&E.nodeType==p?(this.removeChild(S),E.appendData(S.data)):(E.normalize(),E=S)}},isSupported:function(E,S){return this.ownerDocument.implementation.hasFeature(E,S)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(E){for(var S=this;S;){var L=S._nsMap;if(L){for(var H in L)if(Object.prototype.hasOwnProperty.call(L,H)&&L[H]===E)return H}S=S.nodeType==l?S.ownerDocument:S.parentNode}return null},lookupNamespaceURI:function(E){for(var S=this;S;){var L=S._nsMap;if(L&&Object.prototype.hasOwnProperty.call(L,E))return L[E];S=S.nodeType==l?S.ownerDocument:S.parentNode}return null},isDefaultNamespace:function(E){var S=this.lookupPrefix(E);return S==null}};function ie(E){return E=="<"&&"&lt;"||E==">"&&"&gt;"||E=="&"&&"&amp;"||E=='"'&&"&quot;"||"&#"+E.charCodeAt()+";"}d(o,I),d(o,I.prototype);function R(E,S){if(S(E))return!0;if(E=E.firstChild)do if(R(E,S))return!0;while(E=E.nextSibling)}function V(){this.ownerDocument=this}function J(E,S,L){E&&E._inc++;var H=L.namespaceURI;H===i.XMLNS&&(S._nsMap[L.prefix?L.localName:""]=L.value)}function fe(E,S,L,H){E&&E._inc++;var re=L.namespaceURI;re===i.XMLNS&&delete S._nsMap[L.prefix?L.localName:""]}function Q(E,S,L){if(E&&E._inc){E._inc++;var H=S.childNodes;if(L)H[H.length++]=L;else{for(var re=S.firstChild,he=0;re;)H[he++]=re,re=re.nextSibling;H.length=he,delete H[H.length]}}}function ne(E,S){var L=S.previousSibling,H=S.nextSibling;return L?L.nextSibling=H:E.firstChild=H,H?H.previousSibling=L:E.lastChild=L,S.parentNode=null,S.previousSibling=null,S.nextSibling=null,Q(E.ownerDocument,E),S}function xe(E){return E&&(E.nodeType===I.DOCUMENT_NODE||E.nodeType===I.DOCUMENT_FRAGMENT_NODE||E.nodeType===I.ELEMENT_NODE)}function Ce(E){return E&&(te(E)||ee(E)||Z(E)||E.nodeType===I.DOCUMENT_FRAGMENT_NODE||E.nodeType===I.COMMENT_NODE||E.nodeType===I.PROCESSING_INSTRUCTION_NODE)}function Z(E){return E&&E.nodeType===I.DOCUMENT_TYPE_NODE}function te(E){return E&&E.nodeType===I.ELEMENT_NODE}function ee(E){return E&&E.nodeType===I.TEXT_NODE}function le(E,S){var L=E.childNodes||[];if(a(L,te)||Z(S))return!1;var H=a(L,Z);return!(S&&H&&L.indexOf(H)>L.indexOf(S))}function be(E,S){var L=E.childNodes||[];function H(he){return te(he)&&he!==S}if(a(L,H))return!1;var re=a(L,Z);return!(S&&re&&L.indexOf(re)>L.indexOf(S))}function me(E,S,L){if(!xe(E))throw new T(A,"Unexpected parent node type "+E.nodeType);if(L&&L.parentNode!==E)throw new T(D,"child not in parent");if(!Ce(S)||Z(S)&&E.nodeType!==I.DOCUMENT_NODE)throw new T(A,"Unexpected node type "+S.nodeType+" for parent node type "+E.nodeType)}function ke(E,S,L){var H=E.childNodes||[],re=S.childNodes||[];if(S.nodeType===I.DOCUMENT_FRAGMENT_NODE){var he=re.filter(te);if(he.length>1||a(re,ee))throw new T(A,"More than one element or text in fragment");if(he.length===1&&!le(E,L))throw new T(A,"Element in fragment can not be inserted before doctype")}if(te(S)&&!le(E,L))throw new T(A,"Only one element can be added and only after doctype");if(Z(S)){if(a(H,Z))throw new T(A,"Only one doctype is allowed");var Ne=a(H,te);if(L&&H.indexOf(Ne)<H.indexOf(L))throw new T(A,"Doctype can only be inserted before an element");if(!L&&Ne)throw new T(A,"Doctype can not be appended since element is present")}}function pe(E,S,L){var H=E.childNodes||[],re=S.childNodes||[];if(S.nodeType===I.DOCUMENT_FRAGMENT_NODE){var he=re.filter(te);if(he.length>1||a(re,ee))throw new T(A,"More than one element or text in fragment");if(he.length===1&&!be(E,L))throw new T(A,"Element in fragment can not be inserted before doctype")}if(te(S)&&!be(E,L))throw new T(A,"Only one element can be added and only after doctype");if(Z(S)){if(a(H,function(ht){return Z(ht)&&ht!==L}))throw new T(A,"Only one doctype is allowed");var Ne=a(H,te);if(L&&H.indexOf(Ne)<H.indexOf(L))throw new T(A,"Doctype can only be inserted before an element")}}function Ye(E,S,L,H){me(E,S,L),E.nodeType===I.DOCUMENT_NODE&&(H||ke)(E,S,L);var re=S.parentNode;if(re&&re.removeChild(S),S.nodeType===y){var he=S.firstChild;if(he==null)return S;var Ne=S.lastChild}else he=Ne=S;var Se=L?L.previousSibling:E.lastChild;he.previousSibling=Se,Ne.nextSibling=L,Se?Se.nextSibling=he:E.firstChild=he,L==null?E.lastChild=Ne:L.previousSibling=Ne;do he.parentNode=E;while(he!==Ne&&(he=he.nextSibling));return Q(E.ownerDocument||E,E),S.nodeType==y&&(S.firstChild=S.lastChild=null),S}function we(E,S){return S.parentNode&&S.parentNode.removeChild(S),S.parentNode=E,S.previousSibling=E.lastChild,S.nextSibling=null,S.previousSibling?S.previousSibling.nextSibling=S:E.firstChild=S,E.lastChild=S,Q(E.ownerDocument,E,S),S}V.prototype={nodeName:"#document",nodeType:_,doctype:null,documentElement:null,_inc:1,insertBefore:function(E,S){if(E.nodeType==y){for(var L=E.firstChild;L;){var H=L.nextSibling;this.insertBefore(L,S),L=H}return E}return Ye(this,E,S),E.ownerDocument=this,this.documentElement===null&&E.nodeType===h&&(this.documentElement=E),E},removeChild:function(E){return this.documentElement==E&&(this.documentElement=null),ne(this,E)},replaceChild:function(E,S){Ye(this,E,S,pe),E.ownerDocument=this,S&&this.removeChild(S),te(E)&&(this.documentElement=E)},importNode:function(E,S){return Gr(this,E,S)},getElementById:function(E){var S=null;return R(this.documentElement,function(L){if(L.nodeType==h&&L.getAttribute("id")==E)return S=L,!0}),S},getElementsByClassName:function(E){var S=u(E);return new W(this,function(L){var H=[];return S.length>0&&R(L.documentElement,function(re){if(re!==L&&re.nodeType===h){var he=re.getAttribute("class");if(he){var Ne=E===he;if(!Ne){var Se=u(he);Ne=S.every(c(Se))}Ne&&H.push(re)}}}),H})},createElement:function(E){var S=new de;S.ownerDocument=this,S.nodeName=E,S.tagName=E,S.localName=E,S.childNodes=new M;var L=S.attributes=new q;return L._ownerElement=S,S},createDocumentFragment:function(){var E=new Ct;return E.ownerDocument=this,E.childNodes=new M,E},createTextNode:function(E){var S=new Be;return S.ownerDocument=this,S.appendData(E),S},createComment:function(E){var S=new St;return S.ownerDocument=this,S.appendData(E),S},createCDATASection:function(E){var S=new Jt;return S.ownerDocument=this,S.appendData(E),S},createProcessingInstruction:function(E,S){var L=new xt;return L.ownerDocument=this,L.tagName=L.nodeName=L.target=E,L.nodeValue=L.data=S,L},createAttribute:function(E){var S=new Ee;return S.ownerDocument=this,S.name=E,S.nodeName=E,S.localName=E,S.specified=!0,S},createEntityReference:function(E){var S=new Qe;return S.ownerDocument=this,S.nodeName=E,S},createElementNS:function(E,S){var L=new de,H=S.split(":"),re=L.attributes=new q;return L.childNodes=new M,L.ownerDocument=this,L.nodeName=S,L.tagName=S,L.namespaceURI=E,H.length==2?(L.prefix=H[0],L.localName=H[1]):L.localName=S,re._ownerElement=L,L},createAttributeNS:function(E,S){var L=new Ee,H=S.split(":");return L.ownerDocument=this,L.nodeName=S,L.name=S,L.namespaceURI=E,L.specified=!0,H.length==2?(L.prefix=H[0],L.localName=H[1]):L.localName=S,L}},f(V,I);function de(){this._nsMap={}}de.prototype={nodeType:h,hasAttribute:function(E){return this.getAttributeNode(E)!=null},getAttribute:function(E){var S=this.getAttributeNode(E);return S&&S.value||""},getAttributeNode:function(E){return this.attributes.getNamedItem(E)},setAttribute:function(E,S){var L=this.ownerDocument.createAttribute(E);L.value=L.nodeValue=""+S,this.setAttributeNode(L)},removeAttribute:function(E){var S=this.getAttributeNode(E);S&&this.removeAttributeNode(S)},appendChild:function(E){return E.nodeType===y?this.insertBefore(E,null):we(this,E)},setAttributeNode:function(E){return this.attributes.setNamedItem(E)},setAttributeNodeNS:function(E){return this.attributes.setNamedItemNS(E)},removeAttributeNode:function(E){return this.attributes.removeNamedItem(E.nodeName)},removeAttributeNS:function(E,S){var L=this.getAttributeNodeNS(E,S);L&&this.removeAttributeNode(L)},hasAttributeNS:function(E,S){return this.getAttributeNodeNS(E,S)!=null},getAttributeNS:function(E,S){var L=this.getAttributeNodeNS(E,S);return L&&L.value||""},setAttributeNS:function(E,S,L){var H=this.ownerDocument.createAttributeNS(E,S);H.value=H.nodeValue=""+L,this.setAttributeNode(H)},getAttributeNodeNS:function(E,S){return this.attributes.getNamedItemNS(E,S)},getElementsByTagName:function(E){return new W(this,function(S){var L=[];return R(S,function(H){H!==S&&H.nodeType==h&&(E==="*"||H.tagName==E)&&L.push(H)}),L})},getElementsByTagNameNS:function(E,S){return new W(this,function(L){var H=[];return R(L,function(re){re!==L&&re.nodeType===h&&(E==="*"||re.namespaceURI===E)&&(S==="*"||re.localName==S)&&H.push(re)}),H})}},V.prototype.getElementsByTagName=de.prototype.getElementsByTagName,V.prototype.getElementsByTagNameNS=de.prototype.getElementsByTagNameNS,f(de,I);function Ee(){}Ee.prototype.nodeType=l,f(Ee,I);function Oe(){}Oe.prototype={data:"",substringData:function(E,S){return this.data.substring(E,E+S)},appendData:function(E){E=this.data+E,this.nodeValue=this.data=E,this.length=E.length},insertData:function(E,S){this.replaceData(E,0,S)},appendChild:function(E){throw new Error(j[A])},deleteData:function(E,S){this.replaceData(E,S,"")},replaceData:function(E,S,L){var H=this.data.substring(0,E),re=this.data.substring(E+S);L=H+L+re,this.nodeValue=this.data=L,this.length=L.length}},f(Oe,I);function Be(){}Be.prototype={nodeName:"#text",nodeType:p,splitText:function(E){var S=this.data,L=S.substring(E);S=S.substring(0,E),this.data=this.nodeValue=S,this.length=S.length;var H=this.ownerDocument.createTextNode(L);return this.parentNode&&this.parentNode.insertBefore(H,this.nextSibling),H}},f(Be,Oe);function St(){}St.prototype={nodeName:"#comment",nodeType:v},f(St,Oe);function Jt(){}Jt.prototype={nodeName:"#cdata-section",nodeType:x},f(Jt,Oe);function Ze(){}Ze.prototype.nodeType=k,f(Ze,I);function Yt(){}Yt.prototype.nodeType=m,f(Yt,I);function vr(){}vr.prototype.nodeType=b,f(vr,I);function Qe(){}Qe.prototype.nodeType=w,f(Qe,I);function Ct(){}Ct.prototype.nodeName="#document-fragment",Ct.prototype.nodeType=y,f(Ct,I);function xt(){}xt.prototype.nodeType=g,f(xt,I);function or(){}or.prototype.serializeToString=function(E,S,L){return Zt.call(E,S,L)},I.prototype.toString=Zt;function Zt(E,S){var L=[],H=this.nodeType==9&&this.documentElement||this,re=H.prefix,he=H.namespaceURI;if(he&&re==null){var re=H.lookupPrefix(he);if(re==null)var Ne=[{namespace:he,prefix:null}]}return Tt(this,L,E,S,Ne),L.join("")}function Dt(E,S,L){var H=E.prefix||"",re=E.namespaceURI;if(!re||H==="xml"&&re===i.XML||re===i.XMLNS)return!1;for(var he=L.length;he--;){var Ne=L[he];if(Ne.prefix===H)return Ne.namespace!==re}return!0}function yt(E,S,L){E.push(" ",S,'="',L.replace(/[<>&"\t\n\r]/g,ie),'"')}function Tt(E,S,L,H,re){if(re||(re=[]),H)if(E=H(E),E){if(typeof E=="string"){S.push(E);return}}else return;switch(E.nodeType){case h:var he=E.attributes,Ne=he.length,$e=E.firstChild,Se=E.tagName;L=i.isHTML(E.namespaceURI)||L;var ht=Se;if(!L&&!E.prefix&&E.namespaceURI){for(var at,Xe=0;Xe<he.length;Xe++)if(he.item(Xe).name==="xmlns"){at=he.item(Xe).value;break}if(!at)for(var vt=re.length-1;vt>=0;vt--){var wt=re[vt];if(wt.prefix===""&&wt.namespace===E.namespaceURI){at=wt.namespace;break}}if(at!==E.namespaceURI)for(var vt=re.length-1;vt>=0;vt--){var wt=re[vt];if(wt.namespace===E.namespaceURI){wt.prefix&&(ht=wt.prefix+":"+Se);break}}}S.push("<",ht);for(var _t=0;_t<Ne;_t++){var et=he.item(_t);et.prefix=="xmlns"?re.push({prefix:et.localName,namespace:et.value}):et.nodeName=="xmlns"&&re.push({prefix:"",namespace:et.value})}for(var _t=0;_t<Ne;_t++){var et=he.item(_t);if(Dt(et,L,re)){var ze=et.prefix||"",Bt=et.namespaceURI;yt(S,ze?"xmlns:"+ze:"xmlns",Bt),re.push({prefix:ze,namespace:Bt})}Tt(et,S,L,H,re)}if(Se===ht&&Dt(E,L,re)){var ze=E.prefix||"",Bt=E.namespaceURI;yt(S,ze?"xmlns:"+ze:"xmlns",Bt),re.push({prefix:ze,namespace:Bt})}if($e||L&&!/^(?:meta|link|img|br|hr|input)$/i.test(Se)){if(S.push(">"),L&&/^script$/i.test(Se))for(;$e;)$e.data?S.push($e.data):Tt($e,S,L,H,re.slice()),$e=$e.nextSibling;else for(;$e;)Tt($e,S,L,H,re.slice()),$e=$e.nextSibling;S.push("</",ht,">")}else S.push("/>");return;case _:case y:for(var $e=E.firstChild;$e;)Tt($e,S,L,H,re.slice()),$e=$e.nextSibling;return;case l:return yt(S,E.name,E.value);case p:return S.push(E.data.replace(/[<&>]/g,ie));case x:return S.push("<![CDATA[",E.data,"]]>");case v:return S.push("<!--",E.data,"-->");case k:var Ot=E.publicId,Vt=E.systemId;if(S.push("<!DOCTYPE ",E.name),Ot)S.push(" PUBLIC ",Ot),Vt&&Vt!="."&&S.push(" ",Vt),S.push(">");else if(Vt&&Vt!=".")S.push(" SYSTEM ",Vt,">");else{var pt=E.internalSubset;pt&&S.push(" [",pt,"]"),S.push(">")}return;case g:return S.push("<?",E.target," ",E.data,"?>");case w:return S.push("&",E.nodeName,";");default:S.push("??",E.nodeName)}}function Gr(E,S,L){var H;switch(S.nodeType){case h:H=S.cloneNode(!1),H.ownerDocument=E;case y:break;case l:L=!0;break}if(H||(H=S.cloneNode(!1)),H.ownerDocument=E,H.parentNode=null,L)for(var re=S.firstChild;re;)H.appendChild(Gr(E,re,L)),re=re.nextSibling;return H}function ft(E,S,L){var H=new S.constructor;for(var re in S)if(Object.prototype.hasOwnProperty.call(S,re)){var he=S[re];typeof he!="object"&&he!=H[re]&&(H[re]=he)}switch(S.childNodes&&(H.childNodes=new M),H.ownerDocument=E,H.nodeType){case h:var Ne=S.attributes,Se=H.attributes=new q,ht=Ne.length;Se._ownerElement=H;for(var at=0;at<ht;at++)H.setAttributeNode(ft(E,Ne.item(at),!0));break;case l:L=!0}if(L)for(var Xe=S.firstChild;Xe;)H.appendChild(ft(E,Xe,L)),Xe=Xe.nextSibling;return H}function wr(E,S,L){E[S]=L}try{if(Object.defineProperty){let E=function(S){switch(S.nodeType){case h:case y:var L=[];for(S=S.firstChild;S;)S.nodeType!==7&&S.nodeType!==8&&L.push(E(S)),S=S.nextSibling;return L.join("");default:return S.nodeValue}};Object.defineProperty(W.prototype,"length",{get:function(){return F(this),this.$$length}}),Object.defineProperty(I.prototype,"textContent",{get:function(){return E(this)},set:function(S){switch(this.nodeType){case h:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(S||String(S))&&this.appendChild(this.ownerDocument.createTextNode(S));break;default:this.data=S,this.value=S,this.nodeValue=S}}}),wr=function(S,L,H){S["$$"+L]=H}}}catch{}return er.DocumentType=Ze,er.DOMException=T,er.DOMImplementation=ae,er.Element=de,er.Node=I,er.NodeList=M,er.XMLSerializer=or,er}var qa={},qs={},pu;function ch(){return pu||(pu=1,(function(e){var a=fs().freeze;e.XML_ENTITIES=a({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=a({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
125
- `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),e.entityMap=e.HTML_ENTITIES})(qs)),qs}var An={},mu;function dh(){if(mu)return An;mu=1;var e=fs().NAMESPACE,a=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+a.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),s=new RegExp("^"+a.source+i.source+"*(?::"+a.source+i.source+"*)?$"),r=0,n=1,u=2,c=3,d=4,f=5,o=6,h=7;function l(A,D){this.message=A,this.locator=D,Error.captureStackTrace&&Error.captureStackTrace(this,l)}l.prototype=new Error,l.prototype.name=l.name;function p(){}p.prototype={parse:function(A,D,C){var T=this.domBuilder;T.startDocument(),k(D,D={}),x(A,D,C,T,this.errorHandler),T.endDocument()}};function x(A,D,C,T,M){function W(de){if(de>65535){de-=65536;var Ee=55296+(de>>10),Oe=56320+(de&1023);return String.fromCharCode(Ee,Oe)}else return String.fromCharCode(de)}function F(de){var Ee=de.slice(1,-1);return Object.hasOwnProperty.call(C,Ee)?C[Ee]:Ee.charAt(0)==="#"?W(parseInt(Ee.substr(1).replace("x","0x"))):(M.error("entity not found:"+de),de)}function q(de){if(de>V){var Ee=A.substring(V,de).replace(/&#?\w+;/g,F);I&&$(V),T.characters(Ee,0,de-V),V=de}}function $(de,Ee){for(;de>=X&&(Ee=ae.exec(A));)Y=Ee.index,X=Y+Ee[0].length,I.lineNumber++;I.columnNumber=de-Y+1}for(var Y=0,X=0,ae=/.*(?:\r\n?|\n)|.*$/g,I=T.locator,ie=[{currentNSMap:D}],R={},V=0;;){try{var J=A.indexOf("<",V);if(J<0){if(!A.substr(V).match(/^\s*$/)){var fe=T.doc,Q=fe.createTextNode(A.substr(V));fe.appendChild(Q),T.currentElement=Q}return}switch(J>V&&q(J),A.charAt(J+1)){case"/":var me=A.indexOf(">",J+3),ne=A.substring(J+2,me).replace(/[ \t\n\r]+$/g,""),xe=ie.pop();me<0?(ne=A.substring(J+2).replace(/[\s<].*/,""),M.error("end tag name: "+ne+" is not complete:"+xe.tagName),me=J+1+ne.length):ne.match(/\s</)&&(ne=ne.replace(/[\s<].*/,""),M.error("end tag name: "+ne+" maybe not complete"),me=J+1+ne.length);var Ce=xe.localNSMap,Z=xe.tagName==ne,te=Z||xe.tagName&&xe.tagName.toLowerCase()==ne.toLowerCase();if(te){if(T.endElement(xe.uri,xe.localName,ne),Ce)for(var ee in Ce)Object.prototype.hasOwnProperty.call(Ce,ee)&&T.endPrefixMapping(ee);Z||M.fatalError("end tag name: "+ne+" is not match the current start tagName:"+xe.tagName)}else ie.push(xe);me++;break;case"?":I&&$(J),me=m(A,J,T);break;case"!":I&&$(J),me=y(A,J,T,M);break;default:I&&$(J);var le=new N,be=ie[ie.length-1].currentNSMap,me=b(A,J,le,be,F,M),ke=le.length;if(!le.closed&&_(A,me,le.tagName,R)&&(le.closed=!0,C.nbsp||M.warning("unclosed xml attribute")),I&&ke){for(var pe=w(I,{}),Ye=0;Ye<ke;Ye++){var we=le[Ye];$(we.offset),we.locator=w(I,{})}T.locator=pe,g(le,T,be)&&ie.push(le),T.locator=I}else g(le,T,be)&&ie.push(le);e.isHTML(le.uri)&&!le.closed?me=v(A,me,le.tagName,F,T):me++}}catch(de){if(de instanceof l)throw de;M.error("element parse error: "+de),me=-1}me>V?V=me:q(Math.max(J,V)+1)}}function w(A,D){return D.lineNumber=A.lineNumber,D.columnNumber=A.columnNumber,D}function b(A,D,C,T,M,W){function F(I,ie,R){C.attributeNames.hasOwnProperty(I)&&W.fatalError("Attribute "+I+" redefined"),C.addValue(I,ie.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,M),R)}for(var q,$,Y=++D,X=r;;){var ae=A.charAt(Y);switch(ae){case"=":if(X===n)q=A.slice(D,Y),X=c;else if(X===u)X=c;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(X===c||X===n)if(X===n&&(W.warning('attribute value must after "="'),q=A.slice(D,Y)),D=Y+1,Y=A.indexOf(ae,D),Y>0)$=A.slice(D,Y),F(q,$,D-1),X=f;else throw new Error("attribute value no end '"+ae+"' match");else if(X==d)$=A.slice(D,Y),F(q,$,D),W.warning('attribute "'+q+'" missed start quot('+ae+")!!"),D=Y+1,X=f;else throw new Error('attribute value must after "="');break;case"/":switch(X){case r:C.setTagName(A.slice(D,Y));case f:case o:case h:X=h,C.closed=!0;case d:case n:break;case u:C.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return W.error("unexpected end of input"),X==r&&C.setTagName(A.slice(D,Y)),Y;case">":switch(X){case r:C.setTagName(A.slice(D,Y));case f:case o:case h:break;case d:case n:$=A.slice(D,Y),$.slice(-1)==="/"&&(C.closed=!0,$=$.slice(0,-1));case u:X===u&&($=q),X==d?(W.warning('attribute "'+$+'" missed quot(")!'),F(q,$,D)):((!e.isHTML(T[""])||!$.match(/^(?:disabled|checked|selected)$/i))&&W.warning('attribute "'+$+'" missed value!! "'+$+'" instead!!'),F($,$,D));break;case c:throw new Error("attribute value missed!!")}return Y;case"€":ae=" ";default:if(ae<=" ")switch(X){case r:C.setTagName(A.slice(D,Y)),X=o;break;case n:q=A.slice(D,Y),X=u;break;case d:var $=A.slice(D,Y);W.warning('attribute "'+$+'" missed quot(")!!'),F(q,$,D);case f:X=o;break}else switch(X){case u:C.tagName,(!e.isHTML(T[""])||!q.match(/^(?:disabled|checked|selected)$/i))&&W.warning('attribute "'+q+'" missed value!! "'+q+'" instead2!!'),F(q,q,D),D=Y,X=n;break;case f:W.warning('attribute space is required"'+q+'"!!');case o:X=n,D=Y;break;case c:X=d,D=Y;break;case h:throw new Error("elements closed character '/' and '>' must be connected to")}}Y++}}function g(A,D,C){for(var T=A.tagName,M=null,ae=A.length;ae--;){var W=A[ae],F=W.qName,q=W.value,I=F.indexOf(":");if(I>0)var $=W.prefix=F.slice(0,I),Y=F.slice(I+1),X=$==="xmlns"&&Y;else Y=F,$=null,X=F==="xmlns"&&"";W.localName=Y,X!==!1&&(M==null&&(M={},k(C,C={})),C[X]=M[X]=q,W.uri=e.XMLNS,D.startPrefixMapping(X,q))}for(var ae=A.length;ae--;){W=A[ae];var $=W.prefix;$&&($==="xml"&&(W.uri=e.XML),$!=="xmlns"&&(W.uri=C[$||""]))}var I=T.indexOf(":");I>0?($=A.prefix=T.slice(0,I),Y=A.localName=T.slice(I+1)):($=null,Y=A.localName=T);var ie=A.uri=C[$||""];if(D.startElement(ie,Y,T,A),A.closed){if(D.endElement(ie,Y,T),M)for($ in M)Object.prototype.hasOwnProperty.call(M,$)&&D.endPrefixMapping($)}else return A.currentNSMap=C,A.localNSMap=M,!0}function v(A,D,C,T,M){if(/^(?:script|textarea)$/i.test(C)){var W=A.indexOf("</"+C+">",D),F=A.substring(D+1,W);if(/[&<]/.test(F))return/^script$/i.test(C)?(M.characters(F,0,F.length),W):(F=F.replace(/&#?\w+;/g,T),M.characters(F,0,F.length),W)}return D+1}function _(A,D,C,T){var M=T[C];return M==null&&(M=A.lastIndexOf("</"+C+">"),M<D&&(M=A.lastIndexOf("</"+C)),T[C]=M),M<D}function k(A,D){for(var C in A)Object.prototype.hasOwnProperty.call(A,C)&&(D[C]=A[C])}function y(A,D,C,T){var M=A.charAt(D+2);switch(M){case"-":if(A.charAt(D+3)==="-"){var W=A.indexOf("-->",D+4);return W>D?(C.comment(A,D+4,W-D-4),W+3):(T.error("Unclosed comment"),-1)}else return-1;default:if(A.substr(D+3,6)=="CDATA["){var W=A.indexOf("]]>",D+9);return C.startCDATA(),C.characters(A,D+9,W-D-9),C.endCDATA(),W+3}var F=j(A,D),q=F.length;if(q>1&&/!doctype/i.test(F[0][0])){var $=F[1][0],Y=!1,X=!1;q>3&&(/^public$/i.test(F[2][0])?(Y=F[3][0],X=q>4&&F[4][0]):/^system$/i.test(F[2][0])&&(X=F[3][0]));var ae=F[q-1];return C.startDTD($,Y,X),C.endDTD(),ae.index+ae[0].length}}return-1}function m(A,D,C){var T=A.indexOf("?>",D);if(T){var M=A.substring(D,T).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return M?(M[0].length,C.processingInstruction(M[1],M[2]),T+2):-1}return-1}function N(){this.attributeNames={}}N.prototype={setTagName:function(A){if(!s.test(A))throw new Error("invalid tagName:"+A);this.tagName=A},addValue:function(A,D,C){if(!s.test(A))throw new Error("invalid attribute:"+A);this.attributeNames[A]=this.length,this[this.length++]={qName:A,value:D,offset:C}},length:0,getLocalName:function(A){return this[A].localName},getLocator:function(A){return this[A].locator},getQName:function(A){return this[A].qName},getURI:function(A){return this[A].uri},getValue:function(A){return this[A].value}};function j(A,D){var C,T=[],M=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(M.lastIndex=D,M.exec(A);C=M.exec(A);)if(T.push(C),C[1])return T}return An.XMLReader=p,An.ParseError=l,An}var gu;function fh(){if(gu)return qa;gu=1;var e=fs(),a=Ic(),i=ch(),s=dh(),r=a.DOMImplementation,n=e.NAMESPACE,u=s.ParseError,c=s.XMLReader;function d(b){return b.replace(/\r[\n\u0085]/g,`
123
+ `)),Rs}var Is,iu;function Rc(){if(iu)return Is;iu=1;var e=function(v){return a(v)&&!i(v)};function a(g){return!!g&&typeof g=="object"}function i(g){var v=Object.prototype.toString.call(g);return v==="[object RegExp]"||v==="[object Date]"||n(g)}var s=typeof Symbol=="function"&&Symbol.for,r=s?Symbol.for("react.element"):60103;function n(g){return g.$$typeof===r}function u(g){return Array.isArray(g)?[]:{}}function c(g,v){return v.clone!==!1&&v.isMergeableObject(g)?w(u(g),g,v):g}function d(g,v,k){return g.concat(v).map(function(_){return c(_,k)})}function f(g,v){if(!v.customMerge)return w;var k=v.customMerge(g);return typeof k=="function"?k:w}function o(g){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(g).filter(function(v){return Object.propertyIsEnumerable.call(g,v)}):[]}function h(g){return Object.keys(g).concat(o(g))}function l(g,v){try{return v in g}catch{return!1}}function p(g,v){return l(g,v)&&!(Object.hasOwnProperty.call(g,v)&&Object.propertyIsEnumerable.call(g,v))}function x(g,v,k){var _={};return k.isMergeableObject(g)&&h(g).forEach(function(y){_[y]=c(g[y],k)}),h(v).forEach(function(y){p(g,y)||(l(g,y)&&k.isMergeableObject(v[y])?_[y]=f(y,k)(g[y],v[y],k):_[y]=c(v[y],k))}),_}function w(g,v,k){k=k||{},k.arrayMerge=k.arrayMerge||d,k.isMergeableObject=k.isMergeableObject||e,k.cloneUnlessOtherwiseSpecified=c;var _=Array.isArray(v),y=Array.isArray(g),m=_===y;return m?_?k.arrayMerge(g,v,k):x(g,v,k):c(v,k)}w.all=function(v,k){if(!Array.isArray(v))throw new Error("first argument should be an array");return v.reduce(function(_,y){return w(_,y,k)},{})};var b=w;return Is=b,Is}var Fs={},ou;function Li(){return ou||(ou=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),(function(a){a.DEFAULT={cleanStack:!0}})(e.Options||(e.Options={}))})(Fs)),Fs}var uu;function lu(){return uu||(uu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});var a=uh(),i=Rc(),s=Li();(function(r){function n(d,f,o,h){h===void 0&&(h=s.Options.DEFAULT);var l=d;return f&&(l.cause=f),l.stack=u(l.stack,f,h),o&&c(l,o),l}r.make=n;function u(d,f,o){var h=d||"";f&&(h+=`
124
+ Caused by: `+(f.stack||f));function l(p){return a(p,{pretty:!0})}return o&&o.cleanStack&&(h=l(h)),h}r.appendToStack=u;function c(d,f){for(var o in f)if(f.hasOwnProperty(o)){var h=d.hasOwnProperty(o)&&typeof d[o]=="object";d[o]=h?i(d[o],f[o]):f[o]}}})(e.ChainedErrorFactory||(e.ChainedErrorFactory={}))})(Ms)),Ms}var cu;function ds(){if(cu)return pr;cu=1;var e=pr&&pr.__extends||(function(){var c=function(d,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,h){o.__proto__=h}||function(o,h){for(var l in h)h.hasOwnProperty(l)&&(o[l]=h[l])},c(d,f)};return function(d,f){c(d,f);function o(){this.constructor=d}d.prototype=f===null?Object.create(f):(o.prototype=f.prototype,new o)}})();Object.defineProperty(pr,"__esModule",{value:!0});var a=sh,i=lu(),s=Li(),r=(function(c){e(d,c);function d(f,o,h){h===void 0&&(h=s.Options.DEFAULT);var l=c.call(this,f)||this;return l.cause=o,l.stack=i.ChainedErrorFactory.appendToStack(l.stack,o,h),l}return d})(a.CustomError);pr.default=r;var n=lu();pr.ChainedErrorFactory=n.ChainedErrorFactory;var u=Li();return pr.Options=u.Options,pr}var du;function lh(){if(du)return Qt;du=1;var e=Qt&&Qt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.SecurityError=Qt.SecurityChecker=void 0;const a=e(ds());let i=class{static checkSecurity(n,u){if(!u.allowScriptTag&&this.containsScriptTag(n))throw new s("Renderer rejected the input because of insecure content: text contains script tag")}static containsScriptTag(n){return/<\s*script/gi.test(n)}};Qt.SecurityChecker=i;class s extends a.default{constructor(n,u){super(n,u)}}return Qt.SecurityError=s,Qt}var st={},Fa={},er={},Tr={},fu;function fs(){if(fu)return Tr;fu=1;function e(n,u,c){if(c===void 0&&(c=Array.prototype),n&&typeof c.find=="function")return c.find.call(n,u);for(var d=0;d<n.length;d++)if(Object.prototype.hasOwnProperty.call(n,d)){var f=n[d];if(u.call(void 0,f,d,n))return f}}function a(n,u){return u===void 0&&(u=Object),u&&typeof u.freeze=="function"?u.freeze(n):n}function i(n,u){if(n===null||typeof n!="object")throw new TypeError("target is not an object");for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(n[c]=u[c]);return n}var s=a({HTML:"text/html",isHTML:function(n){return n===s.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r=a({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(n){return n===r.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return Tr.assign=i,Tr.find=e,Tr.freeze=a,Tr.MIME_TYPE=s,Tr.NAMESPACE=r,Tr}var hu;function Ic(){if(hu)return er;hu=1;var e=fs(),a=e.find,i=e.NAMESPACE;function s(E){return E!==""}function r(E){return E?E.split(/[\t\n\f\r ]+/).filter(s):[]}function n(E,S){return E.hasOwnProperty(S)||(E[S]=!0),E}function u(E){if(!E)return[];var S=r(E);return Object.keys(S.reduce(n,{}))}function c(E){return function(S){return E&&E.indexOf(S)!==-1}}function d(E,S){for(var L in E)Object.prototype.hasOwnProperty.call(E,L)&&(S[L]=E[L])}function f(E,S){var L=E.prototype;if(!(L instanceof S)){let W=function(){};W.prototype=S.prototype,W=new W,d(L,W),E.prototype=L=W}L.constructor!=E&&(typeof E!="function"&&console.error("unknown Class:"+E),L.constructor=E)}var o={},h=o.ELEMENT_NODE=1,l=o.ATTRIBUTE_NODE=2,p=o.TEXT_NODE=3,x=o.CDATA_SECTION_NODE=4,w=o.ENTITY_REFERENCE_NODE=5,b=o.ENTITY_NODE=6,g=o.PROCESSING_INSTRUCTION_NODE=7,v=o.COMMENT_NODE=8,k=o.DOCUMENT_NODE=9,_=o.DOCUMENT_TYPE_NODE=10,y=o.DOCUMENT_FRAGMENT_NODE=11,m=o.NOTATION_NODE=12,N={},j={};N.INDEX_SIZE_ERR=(j[1]="Index size error",1),N.DOMSTRING_SIZE_ERR=(j[2]="DOMString size error",2);var A=N.HIERARCHY_REQUEST_ERR=(j[3]="Hierarchy request error",3);N.WRONG_DOCUMENT_ERR=(j[4]="Wrong document",4),N.INVALID_CHARACTER_ERR=(j[5]="Invalid character",5),N.NO_DATA_ALLOWED_ERR=(j[6]="No data allowed",6),N.NO_MODIFICATION_ALLOWED_ERR=(j[7]="No modification allowed",7);var D=N.NOT_FOUND_ERR=(j[8]="Not found",8);N.NOT_SUPPORTED_ERR=(j[9]="Not supported",9);var C=N.INUSE_ATTRIBUTE_ERR=(j[10]="Attribute in use",10);N.INVALID_STATE_ERR=(j[11]="Invalid state",11),N.SYNTAX_ERR=(j[12]="Syntax error",12),N.INVALID_MODIFICATION_ERR=(j[13]="Invalid modification",13),N.NAMESPACE_ERR=(j[14]="Invalid namespace",14),N.INVALID_ACCESS_ERR=(j[15]="Invalid access",15);function O(E,S){if(S instanceof Error)var L=S;else L=this,Error.call(this,j[E]),this.message=j[E],Error.captureStackTrace&&Error.captureStackTrace(this,O);return L.code=E,S&&(this.message=this.message+": "+S),L}O.prototype=Error.prototype,d(N,O);function $(){}$.prototype={length:0,item:function(E){return E>=0&&E<this.length?this[E]:null},toString:function(E,S){for(var L=[],W=0;W<this.length;W++)Tt(this[W],L,E,S);return L.join("")},filter:function(E){return Array.prototype.filter.call(this,E)},indexOf:function(E){return Array.prototype.indexOf.call(this,E)}};function H(E,S){this._node=E,this._refresh=S,F(this)}function F(E){var S=E._node._inc||E._node.ownerDocument._inc;if(E._inc!==S){var L=E._refresh(E._node);if(wr(E,"length",L.length),!E.$$length||L.length<E.$$length)for(var W=L.length;W in E;W++)Object.prototype.hasOwnProperty.call(E,W)&&delete E[W];d(L,E),E._inc=S}}H.prototype.item=function(E){return F(this),this[E]||null},f(H,$);function q(){}function M(E,S){for(var L=E.length;L--;)if(E[L]===S)return L}function Y(E,S,L,W){if(W?S[M(S,W)]=L:S[S.length++]=L,E){L.ownerElement=E;var re=E.ownerDocument;re&&(W&&fe(re,E,W),J(re,E,L))}}function X(E,S,L){var W=M(S,L);if(W>=0){for(var re=S.length-1;W<re;)S[W]=S[++W];if(S.length=re,E){var he=E.ownerDocument;he&&(fe(he,E,L),L.ownerElement=null)}}else throw new O(D,new Error(E.tagName+"@"+L))}q.prototype={length:0,item:$.prototype.item,getNamedItem:function(E){for(var S=this.length;S--;){var L=this[S];if(L.nodeName==E)return L}},setNamedItem:function(E){var S=E.ownerElement;if(S&&S!=this._ownerElement)throw new O(C);var L=this.getNamedItem(E.nodeName);return Y(this._ownerElement,this,E,L),L},setNamedItemNS:function(E){var S=E.ownerElement,L;if(S&&S!=this._ownerElement)throw new O(C);return L=this.getNamedItemNS(E.namespaceURI,E.localName),Y(this._ownerElement,this,E,L),L},removeNamedItem:function(E){var S=this.getNamedItem(E);return X(this._ownerElement,this,S),S},removeNamedItemNS:function(E,S){var L=this.getNamedItemNS(E,S);return X(this._ownerElement,this,L),L},getNamedItemNS:function(E,S){for(var L=this.length;L--;){var W=this[L];if(W.localName==S&&W.namespaceURI==E)return W}return null}};function ae(){}ae.prototype={hasFeature:function(E,S){return!0},createDocument:function(E,S,L){var W=new V;if(W.implementation=this,W.childNodes=new $,W.doctype=L||null,L&&W.appendChild(L),S){var re=W.createElementNS(E,S);W.appendChild(re)}return W},createDocumentType:function(E,S,L){var W=new Ze;return W.name=E,W.nodeName=E,W.publicId=S||"",W.systemId=L||"",W}};function I(){}I.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(E,S){return Ye(this,E,S)},replaceChild:function(E,S){Ye(this,E,S,pe),S&&this.removeChild(S)},removeChild:function(E){return ne(this,E)},appendChild:function(E){return this.insertBefore(E,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(E){return ft(this.ownerDocument||this,this,E)},normalize:function(){for(var E=this.firstChild;E;){var S=E.nextSibling;S&&S.nodeType==p&&E.nodeType==p?(this.removeChild(S),E.appendData(S.data)):(E.normalize(),E=S)}},isSupported:function(E,S){return this.ownerDocument.implementation.hasFeature(E,S)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(E){for(var S=this;S;){var L=S._nsMap;if(L){for(var W in L)if(Object.prototype.hasOwnProperty.call(L,W)&&L[W]===E)return W}S=S.nodeType==l?S.ownerDocument:S.parentNode}return null},lookupNamespaceURI:function(E){for(var S=this;S;){var L=S._nsMap;if(L&&Object.prototype.hasOwnProperty.call(L,E))return L[E];S=S.nodeType==l?S.ownerDocument:S.parentNode}return null},isDefaultNamespace:function(E){var S=this.lookupPrefix(E);return S==null}};function ie(E){return E=="<"&&"&lt;"||E==">"&&"&gt;"||E=="&"&&"&amp;"||E=='"'&&"&quot;"||"&#"+E.charCodeAt()+";"}d(o,I),d(o,I.prototype);function R(E,S){if(S(E))return!0;if(E=E.firstChild)do if(R(E,S))return!0;while(E=E.nextSibling)}function V(){this.ownerDocument=this}function J(E,S,L){E&&E._inc++;var W=L.namespaceURI;W===i.XMLNS&&(S._nsMap[L.prefix?L.localName:""]=L.value)}function fe(E,S,L,W){E&&E._inc++;var re=L.namespaceURI;re===i.XMLNS&&delete S._nsMap[L.prefix?L.localName:""]}function Q(E,S,L){if(E&&E._inc){E._inc++;var W=S.childNodes;if(L)W[W.length++]=L;else{for(var re=S.firstChild,he=0;re;)W[he++]=re,re=re.nextSibling;W.length=he,delete W[W.length]}}}function ne(E,S){var L=S.previousSibling,W=S.nextSibling;return L?L.nextSibling=W:E.firstChild=W,W?W.previousSibling=L:E.lastChild=L,S.parentNode=null,S.previousSibling=null,S.nextSibling=null,Q(E.ownerDocument,E),S}function xe(E){return E&&(E.nodeType===I.DOCUMENT_NODE||E.nodeType===I.DOCUMENT_FRAGMENT_NODE||E.nodeType===I.ELEMENT_NODE)}function Ce(E){return E&&(te(E)||ee(E)||Z(E)||E.nodeType===I.DOCUMENT_FRAGMENT_NODE||E.nodeType===I.COMMENT_NODE||E.nodeType===I.PROCESSING_INSTRUCTION_NODE)}function Z(E){return E&&E.nodeType===I.DOCUMENT_TYPE_NODE}function te(E){return E&&E.nodeType===I.ELEMENT_NODE}function ee(E){return E&&E.nodeType===I.TEXT_NODE}function le(E,S){var L=E.childNodes||[];if(a(L,te)||Z(S))return!1;var W=a(L,Z);return!(S&&W&&L.indexOf(W)>L.indexOf(S))}function be(E,S){var L=E.childNodes||[];function W(he){return te(he)&&he!==S}if(a(L,W))return!1;var re=a(L,Z);return!(S&&re&&L.indexOf(re)>L.indexOf(S))}function me(E,S,L){if(!xe(E))throw new O(A,"Unexpected parent node type "+E.nodeType);if(L&&L.parentNode!==E)throw new O(D,"child not in parent");if(!Ce(S)||Z(S)&&E.nodeType!==I.DOCUMENT_NODE)throw new O(A,"Unexpected node type "+S.nodeType+" for parent node type "+E.nodeType)}function ke(E,S,L){var W=E.childNodes||[],re=S.childNodes||[];if(S.nodeType===I.DOCUMENT_FRAGMENT_NODE){var he=re.filter(te);if(he.length>1||a(re,ee))throw new O(A,"More than one element or text in fragment");if(he.length===1&&!le(E,L))throw new O(A,"Element in fragment can not be inserted before doctype")}if(te(S)&&!le(E,L))throw new O(A,"Only one element can be added and only after doctype");if(Z(S)){if(a(W,Z))throw new O(A,"Only one doctype is allowed");var Ne=a(W,te);if(L&&W.indexOf(Ne)<W.indexOf(L))throw new O(A,"Doctype can only be inserted before an element");if(!L&&Ne)throw new O(A,"Doctype can not be appended since element is present")}}function pe(E,S,L){var W=E.childNodes||[],re=S.childNodes||[];if(S.nodeType===I.DOCUMENT_FRAGMENT_NODE){var he=re.filter(te);if(he.length>1||a(re,ee))throw new O(A,"More than one element or text in fragment");if(he.length===1&&!be(E,L))throw new O(A,"Element in fragment can not be inserted before doctype")}if(te(S)&&!be(E,L))throw new O(A,"Only one element can be added and only after doctype");if(Z(S)){if(a(W,function(ht){return Z(ht)&&ht!==L}))throw new O(A,"Only one doctype is allowed");var Ne=a(W,te);if(L&&W.indexOf(Ne)<W.indexOf(L))throw new O(A,"Doctype can only be inserted before an element")}}function Ye(E,S,L,W){me(E,S,L),E.nodeType===I.DOCUMENT_NODE&&(W||ke)(E,S,L);var re=S.parentNode;if(re&&re.removeChild(S),S.nodeType===y){var he=S.firstChild;if(he==null)return S;var Ne=S.lastChild}else he=Ne=S;var Se=L?L.previousSibling:E.lastChild;he.previousSibling=Se,Ne.nextSibling=L,Se?Se.nextSibling=he:E.firstChild=he,L==null?E.lastChild=Ne:L.previousSibling=Ne;do he.parentNode=E;while(he!==Ne&&(he=he.nextSibling));return Q(E.ownerDocument||E,E),S.nodeType==y&&(S.firstChild=S.lastChild=null),S}function we(E,S){return S.parentNode&&S.parentNode.removeChild(S),S.parentNode=E,S.previousSibling=E.lastChild,S.nextSibling=null,S.previousSibling?S.previousSibling.nextSibling=S:E.firstChild=S,E.lastChild=S,Q(E.ownerDocument,E,S),S}V.prototype={nodeName:"#document",nodeType:k,doctype:null,documentElement:null,_inc:1,insertBefore:function(E,S){if(E.nodeType==y){for(var L=E.firstChild;L;){var W=L.nextSibling;this.insertBefore(L,S),L=W}return E}return Ye(this,E,S),E.ownerDocument=this,this.documentElement===null&&E.nodeType===h&&(this.documentElement=E),E},removeChild:function(E){return this.documentElement==E&&(this.documentElement=null),ne(this,E)},replaceChild:function(E,S){Ye(this,E,S,pe),E.ownerDocument=this,S&&this.removeChild(S),te(E)&&(this.documentElement=E)},importNode:function(E,S){return Gr(this,E,S)},getElementById:function(E){var S=null;return R(this.documentElement,function(L){if(L.nodeType==h&&L.getAttribute("id")==E)return S=L,!0}),S},getElementsByClassName:function(E){var S=u(E);return new H(this,function(L){var W=[];return S.length>0&&R(L.documentElement,function(re){if(re!==L&&re.nodeType===h){var he=re.getAttribute("class");if(he){var Ne=E===he;if(!Ne){var Se=u(he);Ne=S.every(c(Se))}Ne&&W.push(re)}}}),W})},createElement:function(E){var S=new de;S.ownerDocument=this,S.nodeName=E,S.tagName=E,S.localName=E,S.childNodes=new $;var L=S.attributes=new q;return L._ownerElement=S,S},createDocumentFragment:function(){var E=new Ct;return E.ownerDocument=this,E.childNodes=new $,E},createTextNode:function(E){var S=new Be;return S.ownerDocument=this,S.appendData(E),S},createComment:function(E){var S=new St;return S.ownerDocument=this,S.appendData(E),S},createCDATASection:function(E){var S=new Jt;return S.ownerDocument=this,S.appendData(E),S},createProcessingInstruction:function(E,S){var L=new xt;return L.ownerDocument=this,L.tagName=L.nodeName=L.target=E,L.nodeValue=L.data=S,L},createAttribute:function(E){var S=new Ee;return S.ownerDocument=this,S.name=E,S.nodeName=E,S.localName=E,S.specified=!0,S},createEntityReference:function(E){var S=new Qe;return S.ownerDocument=this,S.nodeName=E,S},createElementNS:function(E,S){var L=new de,W=S.split(":"),re=L.attributes=new q;return L.childNodes=new $,L.ownerDocument=this,L.nodeName=S,L.tagName=S,L.namespaceURI=E,W.length==2?(L.prefix=W[0],L.localName=W[1]):L.localName=S,re._ownerElement=L,L},createAttributeNS:function(E,S){var L=new Ee,W=S.split(":");return L.ownerDocument=this,L.nodeName=S,L.name=S,L.namespaceURI=E,L.specified=!0,W.length==2?(L.prefix=W[0],L.localName=W[1]):L.localName=S,L}},f(V,I);function de(){this._nsMap={}}de.prototype={nodeType:h,hasAttribute:function(E){return this.getAttributeNode(E)!=null},getAttribute:function(E){var S=this.getAttributeNode(E);return S&&S.value||""},getAttributeNode:function(E){return this.attributes.getNamedItem(E)},setAttribute:function(E,S){var L=this.ownerDocument.createAttribute(E);L.value=L.nodeValue=""+S,this.setAttributeNode(L)},removeAttribute:function(E){var S=this.getAttributeNode(E);S&&this.removeAttributeNode(S)},appendChild:function(E){return E.nodeType===y?this.insertBefore(E,null):we(this,E)},setAttributeNode:function(E){return this.attributes.setNamedItem(E)},setAttributeNodeNS:function(E){return this.attributes.setNamedItemNS(E)},removeAttributeNode:function(E){return this.attributes.removeNamedItem(E.nodeName)},removeAttributeNS:function(E,S){var L=this.getAttributeNodeNS(E,S);L&&this.removeAttributeNode(L)},hasAttributeNS:function(E,S){return this.getAttributeNodeNS(E,S)!=null},getAttributeNS:function(E,S){var L=this.getAttributeNodeNS(E,S);return L&&L.value||""},setAttributeNS:function(E,S,L){var W=this.ownerDocument.createAttributeNS(E,S);W.value=W.nodeValue=""+L,this.setAttributeNode(W)},getAttributeNodeNS:function(E,S){return this.attributes.getNamedItemNS(E,S)},getElementsByTagName:function(E){return new H(this,function(S){var L=[];return R(S,function(W){W!==S&&W.nodeType==h&&(E==="*"||W.tagName==E)&&L.push(W)}),L})},getElementsByTagNameNS:function(E,S){return new H(this,function(L){var W=[];return R(L,function(re){re!==L&&re.nodeType===h&&(E==="*"||re.namespaceURI===E)&&(S==="*"||re.localName==S)&&W.push(re)}),W})}},V.prototype.getElementsByTagName=de.prototype.getElementsByTagName,V.prototype.getElementsByTagNameNS=de.prototype.getElementsByTagNameNS,f(de,I);function Ee(){}Ee.prototype.nodeType=l,f(Ee,I);function Oe(){}Oe.prototype={data:"",substringData:function(E,S){return this.data.substring(E,E+S)},appendData:function(E){E=this.data+E,this.nodeValue=this.data=E,this.length=E.length},insertData:function(E,S){this.replaceData(E,0,S)},appendChild:function(E){throw new Error(j[A])},deleteData:function(E,S){this.replaceData(E,S,"")},replaceData:function(E,S,L){var W=this.data.substring(0,E),re=this.data.substring(E+S);L=W+L+re,this.nodeValue=this.data=L,this.length=L.length}},f(Oe,I);function Be(){}Be.prototype={nodeName:"#text",nodeType:p,splitText:function(E){var S=this.data,L=S.substring(E);S=S.substring(0,E),this.data=this.nodeValue=S,this.length=S.length;var W=this.ownerDocument.createTextNode(L);return this.parentNode&&this.parentNode.insertBefore(W,this.nextSibling),W}},f(Be,Oe);function St(){}St.prototype={nodeName:"#comment",nodeType:v},f(St,Oe);function Jt(){}Jt.prototype={nodeName:"#cdata-section",nodeType:x},f(Jt,Oe);function Ze(){}Ze.prototype.nodeType=_,f(Ze,I);function Yt(){}Yt.prototype.nodeType=m,f(Yt,I);function vr(){}vr.prototype.nodeType=b,f(vr,I);function Qe(){}Qe.prototype.nodeType=w,f(Qe,I);function Ct(){}Ct.prototype.nodeName="#document-fragment",Ct.prototype.nodeType=y,f(Ct,I);function xt(){}xt.prototype.nodeType=g,f(xt,I);function or(){}or.prototype.serializeToString=function(E,S,L){return Zt.call(E,S,L)},I.prototype.toString=Zt;function Zt(E,S){var L=[],W=this.nodeType==9&&this.documentElement||this,re=W.prefix,he=W.namespaceURI;if(he&&re==null){var re=W.lookupPrefix(he);if(re==null)var Ne=[{namespace:he,prefix:null}]}return Tt(this,L,E,S,Ne),L.join("")}function Dt(E,S,L){var W=E.prefix||"",re=E.namespaceURI;if(!re||W==="xml"&&re===i.XML||re===i.XMLNS)return!1;for(var he=L.length;he--;){var Ne=L[he];if(Ne.prefix===W)return Ne.namespace!==re}return!0}function yt(E,S,L){E.push(" ",S,'="',L.replace(/[<>&"\t\n\r]/g,ie),'"')}function Tt(E,S,L,W,re){if(re||(re=[]),W)if(E=W(E),E){if(typeof E=="string"){S.push(E);return}}else return;switch(E.nodeType){case h:var he=E.attributes,Ne=he.length,Le=E.firstChild,Se=E.tagName;L=i.isHTML(E.namespaceURI)||L;var ht=Se;if(!L&&!E.prefix&&E.namespaceURI){for(var at,Xe=0;Xe<he.length;Xe++)if(he.item(Xe).name==="xmlns"){at=he.item(Xe).value;break}if(!at)for(var vt=re.length-1;vt>=0;vt--){var wt=re[vt];if(wt.prefix===""&&wt.namespace===E.namespaceURI){at=wt.namespace;break}}if(at!==E.namespaceURI)for(var vt=re.length-1;vt>=0;vt--){var wt=re[vt];if(wt.namespace===E.namespaceURI){wt.prefix&&(ht=wt.prefix+":"+Se);break}}}S.push("<",ht);for(var _t=0;_t<Ne;_t++){var et=he.item(_t);et.prefix=="xmlns"?re.push({prefix:et.localName,namespace:et.value}):et.nodeName=="xmlns"&&re.push({prefix:"",namespace:et.value})}for(var _t=0;_t<Ne;_t++){var et=he.item(_t);if(Dt(et,L,re)){var ze=et.prefix||"",Bt=et.namespaceURI;yt(S,ze?"xmlns:"+ze:"xmlns",Bt),re.push({prefix:ze,namespace:Bt})}Tt(et,S,L,W,re)}if(Se===ht&&Dt(E,L,re)){var ze=E.prefix||"",Bt=E.namespaceURI;yt(S,ze?"xmlns:"+ze:"xmlns",Bt),re.push({prefix:ze,namespace:Bt})}if(Le||L&&!/^(?:meta|link|img|br|hr|input)$/i.test(Se)){if(S.push(">"),L&&/^script$/i.test(Se))for(;Le;)Le.data?S.push(Le.data):Tt(Le,S,L,W,re.slice()),Le=Le.nextSibling;else for(;Le;)Tt(Le,S,L,W,re.slice()),Le=Le.nextSibling;S.push("</",ht,">")}else S.push("/>");return;case k:case y:for(var Le=E.firstChild;Le;)Tt(Le,S,L,W,re.slice()),Le=Le.nextSibling;return;case l:return yt(S,E.name,E.value);case p:return S.push(E.data.replace(/[<&>]/g,ie));case x:return S.push("<![CDATA[",E.data,"]]>");case v:return S.push("<!--",E.data,"-->");case _:var Ot=E.publicId,Vt=E.systemId;if(S.push("<!DOCTYPE ",E.name),Ot)S.push(" PUBLIC ",Ot),Vt&&Vt!="."&&S.push(" ",Vt),S.push(">");else if(Vt&&Vt!=".")S.push(" SYSTEM ",Vt,">");else{var pt=E.internalSubset;pt&&S.push(" [",pt,"]"),S.push(">")}return;case g:return S.push("<?",E.target," ",E.data,"?>");case w:return S.push("&",E.nodeName,";");default:S.push("??",E.nodeName)}}function Gr(E,S,L){var W;switch(S.nodeType){case h:W=S.cloneNode(!1),W.ownerDocument=E;case y:break;case l:L=!0;break}if(W||(W=S.cloneNode(!1)),W.ownerDocument=E,W.parentNode=null,L)for(var re=S.firstChild;re;)W.appendChild(Gr(E,re,L)),re=re.nextSibling;return W}function ft(E,S,L){var W=new S.constructor;for(var re in S)if(Object.prototype.hasOwnProperty.call(S,re)){var he=S[re];typeof he!="object"&&he!=W[re]&&(W[re]=he)}switch(S.childNodes&&(W.childNodes=new $),W.ownerDocument=E,W.nodeType){case h:var Ne=S.attributes,Se=W.attributes=new q,ht=Ne.length;Se._ownerElement=W;for(var at=0;at<ht;at++)W.setAttributeNode(ft(E,Ne.item(at),!0));break;case l:L=!0}if(L)for(var Xe=S.firstChild;Xe;)W.appendChild(ft(E,Xe,L)),Xe=Xe.nextSibling;return W}function wr(E,S,L){E[S]=L}try{if(Object.defineProperty){let E=function(S){switch(S.nodeType){case h:case y:var L=[];for(S=S.firstChild;S;)S.nodeType!==7&&S.nodeType!==8&&L.push(E(S)),S=S.nextSibling;return L.join("");default:return S.nodeValue}};Object.defineProperty(H.prototype,"length",{get:function(){return F(this),this.$$length}}),Object.defineProperty(I.prototype,"textContent",{get:function(){return E(this)},set:function(S){switch(this.nodeType){case h:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(S||String(S))&&this.appendChild(this.ownerDocument.createTextNode(S));break;default:this.data=S,this.value=S,this.nodeValue=S}}}),wr=function(S,L,W){S["$$"+L]=W}}}catch{}return er.DocumentType=Ze,er.DOMException=O,er.DOMImplementation=ae,er.Element=de,er.Node=I,er.NodeList=$,er.XMLSerializer=or,er}var qa={},qs={},pu;function ch(){return pu||(pu=1,(function(e){var a=fs().freeze;e.XML_ENTITIES=a({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=a({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
125
+ `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),e.entityMap=e.HTML_ENTITIES})(qs)),qs}var An={},mu;function dh(){if(mu)return An;mu=1;var e=fs().NAMESPACE,a=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+a.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),s=new RegExp("^"+a.source+i.source+"*(?::"+a.source+i.source+"*)?$"),r=0,n=1,u=2,c=3,d=4,f=5,o=6,h=7;function l(A,D){this.message=A,this.locator=D,Error.captureStackTrace&&Error.captureStackTrace(this,l)}l.prototype=new Error,l.prototype.name=l.name;function p(){}p.prototype={parse:function(A,D,C){var O=this.domBuilder;O.startDocument(),_(D,D={}),x(A,D,C,O,this.errorHandler),O.endDocument()}};function x(A,D,C,O,$){function H(de){if(de>65535){de-=65536;var Ee=55296+(de>>10),Oe=56320+(de&1023);return String.fromCharCode(Ee,Oe)}else return String.fromCharCode(de)}function F(de){var Ee=de.slice(1,-1);return Object.hasOwnProperty.call(C,Ee)?C[Ee]:Ee.charAt(0)==="#"?H(parseInt(Ee.substr(1).replace("x","0x"))):($.error("entity not found:"+de),de)}function q(de){if(de>V){var Ee=A.substring(V,de).replace(/&#?\w+;/g,F);I&&M(V),O.characters(Ee,0,de-V),V=de}}function M(de,Ee){for(;de>=X&&(Ee=ae.exec(A));)Y=Ee.index,X=Y+Ee[0].length,I.lineNumber++;I.columnNumber=de-Y+1}for(var Y=0,X=0,ae=/.*(?:\r\n?|\n)|.*$/g,I=O.locator,ie=[{currentNSMap:D}],R={},V=0;;){try{var J=A.indexOf("<",V);if(J<0){if(!A.substr(V).match(/^\s*$/)){var fe=O.doc,Q=fe.createTextNode(A.substr(V));fe.appendChild(Q),O.currentElement=Q}return}switch(J>V&&q(J),A.charAt(J+1)){case"/":var me=A.indexOf(">",J+3),ne=A.substring(J+2,me).replace(/[ \t\n\r]+$/g,""),xe=ie.pop();me<0?(ne=A.substring(J+2).replace(/[\s<].*/,""),$.error("end tag name: "+ne+" is not complete:"+xe.tagName),me=J+1+ne.length):ne.match(/\s</)&&(ne=ne.replace(/[\s<].*/,""),$.error("end tag name: "+ne+" maybe not complete"),me=J+1+ne.length);var Ce=xe.localNSMap,Z=xe.tagName==ne,te=Z||xe.tagName&&xe.tagName.toLowerCase()==ne.toLowerCase();if(te){if(O.endElement(xe.uri,xe.localName,ne),Ce)for(var ee in Ce)Object.prototype.hasOwnProperty.call(Ce,ee)&&O.endPrefixMapping(ee);Z||$.fatalError("end tag name: "+ne+" is not match the current start tagName:"+xe.tagName)}else ie.push(xe);me++;break;case"?":I&&M(J),me=m(A,J,O);break;case"!":I&&M(J),me=y(A,J,O,$);break;default:I&&M(J);var le=new N,be=ie[ie.length-1].currentNSMap,me=b(A,J,le,be,F,$),ke=le.length;if(!le.closed&&k(A,me,le.tagName,R)&&(le.closed=!0,C.nbsp||$.warning("unclosed xml attribute")),I&&ke){for(var pe=w(I,{}),Ye=0;Ye<ke;Ye++){var we=le[Ye];M(we.offset),we.locator=w(I,{})}O.locator=pe,g(le,O,be)&&ie.push(le),O.locator=I}else g(le,O,be)&&ie.push(le);e.isHTML(le.uri)&&!le.closed?me=v(A,me,le.tagName,F,O):me++}}catch(de){if(de instanceof l)throw de;$.error("element parse error: "+de),me=-1}me>V?V=me:q(Math.max(J,V)+1)}}function w(A,D){return D.lineNumber=A.lineNumber,D.columnNumber=A.columnNumber,D}function b(A,D,C,O,$,H){function F(I,ie,R){C.attributeNames.hasOwnProperty(I)&&H.fatalError("Attribute "+I+" redefined"),C.addValue(I,ie.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,$),R)}for(var q,M,Y=++D,X=r;;){var ae=A.charAt(Y);switch(ae){case"=":if(X===n)q=A.slice(D,Y),X=c;else if(X===u)X=c;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(X===c||X===n)if(X===n&&(H.warning('attribute value must after "="'),q=A.slice(D,Y)),D=Y+1,Y=A.indexOf(ae,D),Y>0)M=A.slice(D,Y),F(q,M,D-1),X=f;else throw new Error("attribute value no end '"+ae+"' match");else if(X==d)M=A.slice(D,Y),F(q,M,D),H.warning('attribute "'+q+'" missed start quot('+ae+")!!"),D=Y+1,X=f;else throw new Error('attribute value must after "="');break;case"/":switch(X){case r:C.setTagName(A.slice(D,Y));case f:case o:case h:X=h,C.closed=!0;case d:case n:break;case u:C.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return H.error("unexpected end of input"),X==r&&C.setTagName(A.slice(D,Y)),Y;case">":switch(X){case r:C.setTagName(A.slice(D,Y));case f:case o:case h:break;case d:case n:M=A.slice(D,Y),M.slice(-1)==="/"&&(C.closed=!0,M=M.slice(0,-1));case u:X===u&&(M=q),X==d?(H.warning('attribute "'+M+'" missed quot(")!'),F(q,M,D)):((!e.isHTML(O[""])||!M.match(/^(?:disabled|checked|selected)$/i))&&H.warning('attribute "'+M+'" missed value!! "'+M+'" instead!!'),F(M,M,D));break;case c:throw new Error("attribute value missed!!")}return Y;case"€":ae=" ";default:if(ae<=" ")switch(X){case r:C.setTagName(A.slice(D,Y)),X=o;break;case n:q=A.slice(D,Y),X=u;break;case d:var M=A.slice(D,Y);H.warning('attribute "'+M+'" missed quot(")!!'),F(q,M,D);case f:X=o;break}else switch(X){case u:C.tagName,(!e.isHTML(O[""])||!q.match(/^(?:disabled|checked|selected)$/i))&&H.warning('attribute "'+q+'" missed value!! "'+q+'" instead2!!'),F(q,q,D),D=Y,X=n;break;case f:H.warning('attribute space is required"'+q+'"!!');case o:X=n,D=Y;break;case c:X=d,D=Y;break;case h:throw new Error("elements closed character '/' and '>' must be connected to")}}Y++}}function g(A,D,C){for(var O=A.tagName,$=null,ae=A.length;ae--;){var H=A[ae],F=H.qName,q=H.value,I=F.indexOf(":");if(I>0)var M=H.prefix=F.slice(0,I),Y=F.slice(I+1),X=M==="xmlns"&&Y;else Y=F,M=null,X=F==="xmlns"&&"";H.localName=Y,X!==!1&&($==null&&($={},_(C,C={})),C[X]=$[X]=q,H.uri=e.XMLNS,D.startPrefixMapping(X,q))}for(var ae=A.length;ae--;){H=A[ae];var M=H.prefix;M&&(M==="xml"&&(H.uri=e.XML),M!=="xmlns"&&(H.uri=C[M||""]))}var I=O.indexOf(":");I>0?(M=A.prefix=O.slice(0,I),Y=A.localName=O.slice(I+1)):(M=null,Y=A.localName=O);var ie=A.uri=C[M||""];if(D.startElement(ie,Y,O,A),A.closed){if(D.endElement(ie,Y,O),$)for(M in $)Object.prototype.hasOwnProperty.call($,M)&&D.endPrefixMapping(M)}else return A.currentNSMap=C,A.localNSMap=$,!0}function v(A,D,C,O,$){if(/^(?:script|textarea)$/i.test(C)){var H=A.indexOf("</"+C+">",D),F=A.substring(D+1,H);if(/[&<]/.test(F))return/^script$/i.test(C)?($.characters(F,0,F.length),H):(F=F.replace(/&#?\w+;/g,O),$.characters(F,0,F.length),H)}return D+1}function k(A,D,C,O){var $=O[C];return $==null&&($=A.lastIndexOf("</"+C+">"),$<D&&($=A.lastIndexOf("</"+C)),O[C]=$),$<D}function _(A,D){for(var C in A)Object.prototype.hasOwnProperty.call(A,C)&&(D[C]=A[C])}function y(A,D,C,O){var $=A.charAt(D+2);switch($){case"-":if(A.charAt(D+3)==="-"){var H=A.indexOf("-->",D+4);return H>D?(C.comment(A,D+4,H-D-4),H+3):(O.error("Unclosed comment"),-1)}else return-1;default:if(A.substr(D+3,6)=="CDATA["){var H=A.indexOf("]]>",D+9);return C.startCDATA(),C.characters(A,D+9,H-D-9),C.endCDATA(),H+3}var F=j(A,D),q=F.length;if(q>1&&/!doctype/i.test(F[0][0])){var M=F[1][0],Y=!1,X=!1;q>3&&(/^public$/i.test(F[2][0])?(Y=F[3][0],X=q>4&&F[4][0]):/^system$/i.test(F[2][0])&&(X=F[3][0]));var ae=F[q-1];return C.startDTD(M,Y,X),C.endDTD(),ae.index+ae[0].length}}return-1}function m(A,D,C){var O=A.indexOf("?>",D);if(O){var $=A.substring(D,O).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return $?($[0].length,C.processingInstruction($[1],$[2]),O+2):-1}return-1}function N(){this.attributeNames={}}N.prototype={setTagName:function(A){if(!s.test(A))throw new Error("invalid tagName:"+A);this.tagName=A},addValue:function(A,D,C){if(!s.test(A))throw new Error("invalid attribute:"+A);this.attributeNames[A]=this.length,this[this.length++]={qName:A,value:D,offset:C}},length:0,getLocalName:function(A){return this[A].localName},getLocator:function(A){return this[A].locator},getQName:function(A){return this[A].qName},getURI:function(A){return this[A].uri},getValue:function(A){return this[A].value}};function j(A,D){var C,O=[],$=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for($.lastIndex=D,$.exec(A);C=$.exec(A);)if(O.push(C),C[1])return O}return An.XMLReader=p,An.ParseError=l,An}var gu;function fh(){if(gu)return qa;gu=1;var e=fs(),a=Ic(),i=ch(),s=dh(),r=a.DOMImplementation,n=e.NAMESPACE,u=s.ParseError,c=s.XMLReader;function d(b){return b.replace(/\r[\n\u0085]/g,`
126
126
  `).replace(/[\r\u0085\u2028]/g,`
127
- `)}function f(b){this.options=b||{locator:{}}}f.prototype.parseFromString=function(b,g){var v=this.options,_=new c,k=v.domBuilder||new h,y=v.errorHandler,m=v.locator,N=v.xmlns||{},j=/\/x?html?$/.test(g),A=j?i.HTML_ENTITIES:i.XML_ENTITIES;m&&k.setDocumentLocator(m),_.errorHandler=o(y,k,m),_.domBuilder=v.domBuilder||k,j&&(N[""]=n.HTML),N.xml=N.xml||n.XML;var D=v.normalizeLineEndings||d;return b&&typeof b=="string"?_.parse(D(b),N,A):_.errorHandler.error("invalid doc source"),k.doc};function o(b,g,v){if(!b){if(g instanceof h)return g;b=g}var _={},k=b instanceof Function;v=v||{};function y(m){var N=b[m];!N&&k&&(N=b.length==2?function(j){b(m,j)}:b),_[m]=N&&function(j){N("[xmldom "+m+"] "+j+p(v))}||function(){}}return y("warning"),y("error"),y("fatalError"),_}function h(){this.cdata=!1}function l(b,g){g.lineNumber=b.lineNumber,g.columnNumber=b.columnNumber}h.prototype={startDocument:function(){this.doc=new r().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(b,g,v,_){var k=this.doc,y=k.createElementNS(b,v||g),m=_.length;w(this,y),this.currentElement=y,this.locator&&l(this.locator,y);for(var N=0;N<m;N++){var b=_.getURI(N),j=_.getValue(N),v=_.getQName(N),A=k.createAttributeNS(b,v);this.locator&&l(_.getLocator(N),A),A.value=A.nodeValue=j,y.setAttributeNode(A)}},endElement:function(b,g,v){var _=this.currentElement;_.tagName,this.currentElement=_.parentNode},startPrefixMapping:function(b,g){},endPrefixMapping:function(b){},processingInstruction:function(b,g){var v=this.doc.createProcessingInstruction(b,g);this.locator&&l(this.locator,v),w(this,v)},ignorableWhitespace:function(b,g,v){},characters:function(b,g,v){if(b=x.apply(this,arguments),b){if(this.cdata)var _=this.doc.createCDATASection(b);else var _=this.doc.createTextNode(b);this.currentElement?this.currentElement.appendChild(_):/^\s*$/.test(b)&&this.doc.appendChild(_),this.locator&&l(this.locator,_)}},skippedEntity:function(b){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(b){(this.locator=b)&&(b.lineNumber=0)},comment:function(b,g,v){b=x.apply(this,arguments);var _=this.doc.createComment(b);this.locator&&l(this.locator,_),w(this,_)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(b,g,v){var _=this.doc.implementation;if(_&&_.createDocumentType){var k=_.createDocumentType(b,g,v);this.locator&&l(this.locator,k),w(this,k),this.doc.doctype=k}},warning:function(b){console.warn("[xmldom warning] "+b,p(this.locator))},error:function(b){console.error("[xmldom error] "+b,p(this.locator))},fatalError:function(b){throw new u(b,this.locator)}};function p(b){if(b)return`
128
- @`+(b.systemId||"")+"#[line:"+b.lineNumber+",col:"+b.columnNumber+"]"}function x(b,g,v){return typeof b=="string"?b.substr(g,v):b.length>=g+v||g?new java.lang.String(b,g,v)+"":b}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(b){h.prototype[b]=function(){return null}});function w(b,g){b.currentElement?b.currentElement.appendChild(g):b.doc.appendChild(g)}return qa.__DOMHandler=h,qa.normalizeLineEndings=d,qa.DOMParser=f,qa}var bu;function hh(){if(bu)return Fa;bu=1;var e=Ic();return Fa.DOMImplementation=e.DOMImplementation,Fa.XMLSerializer=e.XMLSerializer,Fa.DOMParser=fh().DOMParser,Fa}var Ba={},At={},Sn={},Bs={},Cn={},xu;function hs(){if(xu)return Cn;xu=1,Object.defineProperty(Cn,"__esModule",{value:!0});const e=ds();let a=class extends e.default{constructor(s,r){super(s,r)}};return Cn.UniverseLogError=a,Cn}var yu;function an(){return yu||(yu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=hs();(function(i){i.error="error",i.warn="warn",i.info="info",i.http="http",i.verbose="verbose",i.debug="debug",i.silly="silly"})(e.LogLevel||(e.LogLevel={})),(function(i){i.LEVELS_VALUES={[i.error]:0,[i.warn]:1,[i.info]:2,[i.http]:3,[i.verbose]:4,[i.debug]:5,[i.silly]:6},i.LEVELS_BY_NAME={[i.error]:i.error,[i.warn]:i.warn,[i.info]:i.info,[i.http]:i.http,[i.verbose]:i.verbose,[i.debug]:i.debug,[i.silly]:i.silly},i.DEFAULT_LEVEL=i.info;function s(d){if(typeof i.LEVELS_BY_NAME[d]>"u"){const f=Object.keys(i.LEVELS_BY_NAME).join(", ");throw new a.UniverseLogError(`There is no such log level: '${d}'. Available levels: [ ${f} ]`)}return i.LEVELS_BY_NAME[d]}i.valueOf=s;function r(d){if(typeof i.LEVELS_VALUES[d]>"u"){const f=Object.keys(i.LEVELS_BY_NAME).join(", ");throw new a.UniverseLogError(`There is no such log level: '${d}'. Available levels: [ ${f} ]`)}return i.LEVELS_VALUES[d]}i.levelToValue=r;function n(d){return r(d.level)<=r(d.threshold)}i.isLessOrEquallyVerbose=n;function u(d,f){return i.LEVELS_VALUES[d]>i.LEVELS_VALUES[f]?d:f}i.moreVerbose=u;function c(d,f){return i.LEVELS_VALUES[d]<i.LEVELS_VALUES[f]?d:f}i.lessVerbose=c})(e.LogLevel||(e.LogLevel={}))})(Bs)),Bs}var Dn={},ta={},Vs={exports:{}},vu;function Fc(){return vu||(vu=1,(function(e){e.exports=(function(i){var s={};function r(n){if(s[n])return s[n].exports;var u=s[n]={i:n,l:!1,exports:{}};return i[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=i,r.c=s,r.d=function(n,u,c){r.o(n,u)||Object.defineProperty(n,u,{enumerable:!0,get:c})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,u){if(1&u&&(n=r(n)),8&u||4&u&&typeof n=="object"&&n&&n.__esModule)return n;var c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:n}),2&u&&typeof n!="string")for(var d in n)r.d(c,d,(function(f){return n[f]}).bind(null,d));return c},r.n=function(n){var u=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(u,"a",u),u},r.o=function(n,u){return Object.prototype.hasOwnProperty.call(n,u)},r.p="",r(r.s=4)})([function(i,s,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=r(8),d=r(2),f=r(16);s.validatorSymbol=Symbol("validators"),s.Predicate=class{constructor(o,h={}){this.type=o,this.options=h,this.context={validators:[]},this.context=Object.assign({},this.context,this.options);const l=this.type[0].toLowerCase()+this.type.slice(1);this.addValidator({message:(p,x)=>`Expected ${x&&x.substring(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${u.default(p)}\``,validator:p=>u.default[l](p)})}[d.testSymbol](o,h,l){for(const{validator:p,message:x}of this.context.validators){if(this.options.optional===!0&&o===void 0)continue;const w=p(o);if(w===!0)continue;let b=l;throw typeof l=="function"&&(b=l()),b=b?`${this.type} \`${b}\``:this.type,new c.ArgumentError(x(o,b,w),h)}}get[s.validatorSymbol](){return this.context.validators}get not(){return f.not(this)}validate(o){return this.addValidator({message:(h,l,p)=>typeof p=="string"?`(${l}) ${p}`:p(l),validator:h=>{const{message:l,validator:p}=o(h);return!!p||l}})}is(o){return this.addValidator({message:(h,l,p)=>p?`(${l}) ${p}`:`Expected ${l} \`${h}\` to pass custom validation function`,validator:o})}addValidator(o){return this.context.validators.push(o),this}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=typeof URL>"u"?r(15).URL:URL,{toString:u}=Object.prototype,c=g=>v=>typeof v===g,d=g=>{const v=u.call(g).slice(8,-1);if(v)return v},f=g=>v=>d(v)===g;function o(g){switch(g){case null:return"null";case!0:case!1:return"boolean"}switch(typeof g){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"bigint":return"bigint";case"symbol":return"symbol"}if(o.function_(g))return"Function";if(o.observable(g))return"Observable";if(o.array(g))return"Array";if(o.buffer(g))return"Buffer";const v=d(g);if(v)return v;if(g instanceof String||g instanceof Boolean||g instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}const h=g=>typeof g=="object";o.undefined=c("undefined"),o.string=c("string"),o.number=c("number"),o.bigint=c("bigint"),o.function_=c("function"),o.null_=(g=>g===null),o.class_=(g=>o.function_(g)&&g.toString().startsWith("class ")),o.boolean=(g=>g===!0||g===!1),o.symbol=c("symbol"),o.numericString=(g=>o.string(g)&&g.length>0&&!Number.isNaN(Number(g))),o.array=Array.isArray,o.buffer=(g=>!o.nullOrUndefined(g)&&!o.nullOrUndefined(g.constructor)&&o.function_(g.constructor.isBuffer)&&g.constructor.isBuffer(g)),o.nullOrUndefined=(g=>o.null_(g)||o.undefined(g)),o.object=(g=>!o.nullOrUndefined(g)&&(o.function_(g)||h(g))),o.iterable=(g=>!o.nullOrUndefined(g)&&o.function_(g[Symbol.iterator])),o.asyncIterable=(g=>!o.nullOrUndefined(g)&&o.function_(g[Symbol.asyncIterator])),o.generator=(g=>o.iterable(g)&&o.function_(g.next)&&o.function_(g.throw)),o.nativePromise=(g=>f("Promise")(g)),o.promise=(g=>o.nativePromise(g)||(v=>!o.null_(v)&&h(v)&&o.function_(v.then)&&o.function_(v.catch))(g)),o.generatorFunction=f("GeneratorFunction"),o.asyncFunction=f("AsyncFunction"),o.boundFunction=(g=>o.function_(g)&&!g.hasOwnProperty("prototype")),o.regExp=f("RegExp"),o.date=f("Date"),o.error=f("Error"),o.map=(g=>f("Map")(g)),o.set=(g=>f("Set")(g)),o.weakMap=(g=>f("WeakMap")(g)),o.weakSet=(g=>f("WeakSet")(g)),o.int8Array=f("Int8Array"),o.uint8Array=f("Uint8Array"),o.uint8ClampedArray=f("Uint8ClampedArray"),o.int16Array=f("Int16Array"),o.uint16Array=f("Uint16Array"),o.int32Array=f("Int32Array"),o.uint32Array=f("Uint32Array"),o.float32Array=f("Float32Array"),o.float64Array=f("Float64Array"),o.bigint64Array=f("BigInt64Array"),o.biguint64Array=f("BigUint64Array"),o.arrayBuffer=f("ArrayBuffer"),o.sharedArrayBuffer=f("SharedArrayBuffer"),o.dataView=f("DataView"),o.directInstanceOf=((g,v)=>Object.getPrototypeOf(g)===v.prototype),o.urlInstance=(g=>f("URL")(g)),o.urlString=(g=>{if(!o.string(g))return!1;try{return new n(g),!0}catch{return!1}}),o.truthy=(g=>!!g),o.falsy=(g=>!g),o.nan=(g=>Number.isNaN(g));const l=new Set(["undefined","string","number","bigint","boolean","symbol"]);o.primitive=(g=>o.null_(g)||l.has(typeof g)),o.integer=(g=>Number.isInteger(g)),o.safeInteger=(g=>Number.isSafeInteger(g)),o.plainObject=(g=>{if(d(g)!=="Object")return!1;const v=Object.getPrototypeOf(g);return v===null||v===Object.getPrototypeOf({})});const p=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]);o.typedArray=(g=>{const v=d(g);return v!==void 0&&p.has(v)}),o.arrayLike=(g=>!o.nullOrUndefined(g)&&!o.function_(g)&&(v=>o.safeInteger(v)&&v>=0)(g.length)),o.inRange=((g,v)=>{if(o.number(v))return g>=Math.min(0,v)&&g<=Math.max(v,0);if(o.array(v)&&v.length===2)return g>=Math.min(...v)&&g<=Math.max(...v);throw new TypeError(`Invalid range: ${JSON.stringify(v)}`)});const x=["innerHTML","ownerDocument","style","attributes","nodeValue"];o.domElement=(g=>o.object(g)&&g.nodeType===1&&o.string(g.nodeName)&&!o.plainObject(g)&&x.every(v=>v in g)),o.observable=(g=>!!g&&(!(!g[Symbol.observable]||g!==g[Symbol.observable]())||!(!g["@@observable"]||g!==g["@@observable"]()))),o.nodeStream=(g=>!o.nullOrUndefined(g)&&h(g)&&o.function_(g.pipe)&&!o.observable(g)),o.infinite=(g=>g===1/0||g===-1/0);const w=g=>v=>o.integer(v)&&Math.abs(v%2)===g;o.evenInteger=w(0),o.oddInteger=w(1),o.emptyArray=(g=>o.array(g)&&g.length===0),o.nonEmptyArray=(g=>o.array(g)&&g.length>0),o.emptyString=(g=>o.string(g)&&g.length===0),o.nonEmptyString=(g=>o.string(g)&&g.length>0),o.emptyStringOrWhitespace=(g=>o.emptyString(g)||(v=>o.string(v)&&/\S/.test(v)===!1)(g)),o.emptyObject=(g=>o.object(g)&&!o.map(g)&&!o.set(g)&&Object.keys(g).length===0),o.nonEmptyObject=(g=>o.object(g)&&!o.map(g)&&!o.set(g)&&Object.keys(g).length>0),o.emptySet=(g=>o.set(g)&&g.size===0),o.nonEmptySet=(g=>o.set(g)&&g.size>0),o.emptyMap=(g=>o.map(g)&&g.size===0),o.nonEmptyMap=(g=>o.map(g)&&g.size>0);const b=(g,v,_)=>{if(o.function_(v)===!1)throw new TypeError(`Invalid predicate: ${JSON.stringify(v)}`);if(_.length===0)throw new TypeError("Invalid number of values");return g.call(_,v)};o.any=((g,...v)=>b(Array.prototype.some,g,v)),o.all=((g,...v)=>b(Array.prototype.every,g,v)),Object.defineProperties(o,{class:{value:o.class_},function:{value:o.function_},null:{value:o.null_}}),i.exports=o,s.default=o},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0}),s.testSymbol=Symbol("test"),s.isPredicate=(n=>!!(n&&n[s.testSymbol]))},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0}),s.default=((n,u,c=5)=>{const d=[];for(const f of u)if(!n.has(f)&&(d.push(f),d.length===c))return d;return d.length===0||d})},function(i,s,r){var n=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(10)),c=r(11),d=r(0);s.Predicate=d.Predicate;const f=r(2),o=n(r(17)),h=n(r(6)),l=n(r(9)),p=(w,b,g)=>{if(!f.isPredicate(b)&&typeof b!="string")throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof b}\``);if(f.isPredicate(b)){const v=u.default();l.default(w,()=>c.inferLabel(v),b)}else l.default(w,b,g)};Object.defineProperties(p,{isValid:{value:(w,b)=>{try{return p(w,b),!0}catch{return!1}}},create:{value:(w,b)=>g=>{if(f.isPredicate(w)){const v=u.default();l.default(g,()=>c.inferLabel(v),w)}else l.default(g,w,b)}}}),s.default=h.default(o.default(p));var x=r(6);s.StringPredicate=x.StringPredicate,s.NumberPredicate=x.NumberPredicate,s.BooleanPredicate=x.BooleanPredicate,s.ArrayPredicate=x.ArrayPredicate,s.ObjectPredicate=x.ObjectPredicate,s.DatePredicate=x.DatePredicate,s.ErrorPredicate=x.ErrorPredicate,s.MapPredicate=x.MapPredicate,s.WeakMapPredicate=x.WeakMapPredicate,s.SetPredicate=x.SetPredicate,s.WeakSetPredicate=x.WeakSetPredicate,s.AnyPredicate=x.AnyPredicate},function(i,s,r){(function(n){var u=200,c="__lodash_hash_undefined__",d=1,f=2,o=9007199254740991,h="[object Arguments]",l="[object Array]",p="[object AsyncFunction]",x="[object Boolean]",w="[object Date]",b="[object Error]",g="[object Function]",v="[object GeneratorFunction]",_="[object Map]",k="[object Number]",y="[object Null]",m="[object Object]",N="[object Proxy]",j="[object RegExp]",A="[object Set]",D="[object String]",C="[object Symbol]",T="[object Undefined]",M="[object ArrayBuffer]",W="[object DataView]",F=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,$={};$["[object Float32Array]"]=$["[object Float64Array]"]=$["[object Int8Array]"]=$["[object Int16Array]"]=$["[object Int32Array]"]=$["[object Uint8Array]"]=$["[object Uint8ClampedArray]"]=$["[object Uint16Array]"]=$["[object Uint32Array]"]=!0,$[h]=$[l]=$[M]=$[x]=$[W]=$[w]=$[b]=$[g]=$[_]=$[k]=$[m]=$[j]=$[A]=$[D]=$["[object WeakMap]"]=!1;var Y=typeof gr=="object"&&gr&&gr.Object===Object&&gr,X=typeof self=="object"&&self&&self.Object===Object&&self,ae=Y||X||Function("return this")(),I=s&&!s.nodeType&&s,ie=I&&typeof n=="object"&&n&&!n.nodeType&&n,R=ie&&ie.exports===I,V=R&&Y.process,J=(function(){try{return V&&V.binding&&V.binding("util")}catch{}})(),fe=J&&J.isTypedArray;function Q(B,G){for(var se=-1,oe=B==null?0:B.length;++se<oe;)if(G(B[se],se,B))return!0;return!1}function ne(B){var G=-1,se=Array(B.size);return B.forEach(function(oe,De){se[++G]=[De,oe]}),se}function xe(B){var G=-1,se=Array(B.size);return B.forEach(function(oe){se[++G]=oe}),se}var Ce,Z,te,ee=Array.prototype,le=Function.prototype,be=Object.prototype,me=ae["__core-js_shared__"],ke=le.toString,pe=be.hasOwnProperty,Ye=(Ce=/[^.]+$/.exec(me&&me.keys&&me.keys.IE_PROTO||""))?"Symbol(src)_1."+Ce:"",we=be.toString,de=RegExp("^"+ke.call(pe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ee=R?ae.Buffer:void 0,Oe=ae.Symbol,Be=ae.Uint8Array,St=be.propertyIsEnumerable,Jt=ee.splice,Ze=Oe?Oe.toStringTag:void 0,Yt=Object.getOwnPropertySymbols,vr=Ee?Ee.isBuffer:void 0,Qe=(Z=Object.keys,te=Object,function(B){return Z(te(B))}),Ct=Ot(ae,"DataView"),xt=Ot(ae,"Map"),or=Ot(ae,"Promise"),Zt=Ot(ae,"Set"),Dt=Ot(ae,"WeakMap"),yt=Ot(Object,"create"),Tt=Xt(Ct),Gr=Xt(xt),ft=Xt(or),wr=Xt(Zt),E=Xt(Dt),S=Oe?Oe.prototype:void 0,L=S?S.valueOf:void 0;function H(B){var G=-1,se=B==null?0:B.length;for(this.clear();++G<se;){var oe=B[G];this.set(oe[0],oe[1])}}function re(B){var G=-1,se=B==null?0:B.length;for(this.clear();++G<se;){var oe=B[G];this.set(oe[0],oe[1])}}function he(B){var G=-1,se=B==null?0:B.length;for(this.clear();++G<se;){var oe=B[G];this.set(oe[0],oe[1])}}function Ne(B){var G=-1,se=B==null?0:B.length;for(this.__data__=new he;++G<se;)this.add(B[G])}function Se(B){var G=this.__data__=new re(B);this.size=G.size}function ht(B,G){var se=Jr(B),oe=!se&&ws(B),De=!se&&!oe&&ca(B),_e=!se&&!oe&&!De&&cn(B),Pe=se||oe||De||_e,Re=Pe?(function(Le,kt){for(var nt=-1,He=Array(Le);++nt<Le;)He[nt]=kt(nt);return He})(B.length,String):[],mt=Re.length;for(var Fe in B)!pe.call(B,Fe)||Pe&&(Fe=="length"||De&&(Fe=="offset"||Fe=="parent")||_e&&(Fe=="buffer"||Fe=="byteLength"||Fe=="byteOffset")||Pt(Fe,mt))||Re.push(Fe);return Re}function at(B,G){for(var se=B.length;se--;)if(on(B[se][0],G))return se;return-1}function Xe(B){return B==null?B===void 0?T:y:Ze&&Ze in Object(B)?(function(G){var se=pe.call(G,Ze),oe=G[Ze];try{G[Ze]=void 0;var De=!0}catch{}var _e=we.call(G);return De&&(se?G[Ze]=oe:delete G[Ze]),_e})(B):(function(G){return we.call(G)})(B)}function vt(B){return _r(B)&&Xe(B)==h}function wt(B,G,se,oe,De){return B===G||(B==null||G==null||!_r(B)&&!_r(G)?B!=B&&G!=G:(function(_e,Pe,Re,mt,Fe,Le){var kt=Jr(_e),nt=Jr(Pe),He=kt?l:pt(_e),Nt=nt?l:pt(Pe),ur=(He=He==h?m:He)==m,Yr=(Nt=Nt==h?m:Nt)==m,lr=He==Nt;if(lr&&ca(_e)){if(!ca(Pe))return!1;kt=!0,ur=!1}if(lr&&!ur)return Le||(Le=new Se),kt||cn(_e)?ze(_e,Pe,Re,mt,Fe,Le):(function(Ae,je,Lt,zt,fa,qe,$t){switch(Lt){case W:if(Ae.byteLength!=je.byteLength||Ae.byteOffset!=je.byteOffset)return!1;Ae=Ae.buffer,je=je.buffer;case M:return!(Ae.byteLength!=je.byteLength||!qe(new Be(Ae),new Be(je)));case x:case w:case k:return on(+Ae,+je);case b:return Ae.name==je.name&&Ae.message==je.message;case j:case D:return Ae==je+"";case _:var Ht=ne;case A:var Nr=zt&d;if(Ht||(Ht=xe),Ae.size!=je.size&&!Nr)return!1;var Zr=$t.get(Ae);if(Zr)return Zr==je;zt|=f,$t.set(Ae,je);var cr=ze(Ht(Ae),Ht(je),zt,fa,qe,$t);return $t.delete(Ae),cr;case C:if(L)return L.call(Ae)==L.call(je)}return!1})(_e,Pe,He,Re,mt,Fe,Le);if(!(Re&d)){var kr=ur&&pe.call(_e,"__wrapped__"),da=Yr&&pe.call(Pe,"__wrapped__");if(kr||da){var ks=kr?_e.value():_e,Ns=da?Pe.value():Pe;return Le||(Le=new Se),Fe(ks,Ns,Re,mt,Le)}}return lr?(Le||(Le=new Se),(function(Ae,je,Lt,zt,fa,qe){var $t=Lt&d,Ht=Bt(Ae),Nr=Ht.length,Zr=Bt(je).length;if(Nr!=Zr&&!$t)return!1;for(var cr=Nr;cr--;){var tt=Ht[cr];if(!($t?tt in je:pe.call(je,tt)))return!1}var ha=qe.get(Ae);if(ha&&qe.get(je))return ha==je;var Xr=!0;qe.set(Ae,je),qe.set(je,Ae);for(var dr=$t;++cr<Nr;){tt=Ht[cr];var Kr=Ae[tt],fr=je[tt];if(zt)var dn=$t?zt(fr,Kr,tt,je,Ae,qe):zt(Kr,fr,tt,Ae,je,qe);if(!(dn===void 0?Kr===fr||fa(Kr,fr,Lt,zt,qe):dn)){Xr=!1;break}dr||(dr=tt=="constructor")}if(Xr&&!dr){var jr=Ae.constructor,Er=je.constructor;jr!=Er&&"constructor"in Ae&&"constructor"in je&&!(typeof jr=="function"&&jr instanceof jr&&typeof Er=="function"&&Er instanceof Er)&&(Xr=!1)}return qe.delete(Ae),qe.delete(je),Xr})(_e,Pe,Re,mt,Fe,Le)):!1})(B,G,se,oe,wt,De))}function _t(B){return!(!ln(B)||(G=B,Ye&&Ye in G))&&(Ut(B)?de:F).test(Xt(B));var G}function et(B){if(se=(G=B)&&G.constructor,oe=typeof se=="function"&&se.prototype||be,G!==oe)return Qe(B);var G,se,oe,De=[];for(var _e in Object(B))pe.call(B,_e)&&_e!="constructor"&&De.push(_e);return De}function ze(B,G,se,oe,De,_e){var Pe=se&d,Re=B.length,mt=G.length;if(Re!=mt&&!(Pe&&mt>Re))return!1;var Fe=_e.get(B);if(Fe&&_e.get(G))return Fe==G;var Le=-1,kt=!0,nt=se&f?new Ne:void 0;for(_e.set(B,G),_e.set(G,B);++Le<Re;){var He=B[Le],Nt=G[Le];if(oe)var ur=Pe?oe(Nt,He,Le,G,B,_e):oe(He,Nt,Le,B,G,_e);if(ur!==void 0){if(ur)continue;kt=!1;break}if(nt){if(!Q(G,function(Yr,lr){if(kr=lr,!nt.has(kr)&&(He===Yr||De(He,Yr,se,oe,_e)))return nt.push(lr);var kr})){kt=!1;break}}else if(He!==Nt&&!De(He,Nt,se,oe,_e)){kt=!1;break}}return _e.delete(B),_e.delete(G),kt}function Bt(B){return(function(G,se,oe){var De=se(G);return Jr(G)?De:(function(_e,Pe){for(var Re=-1,mt=Pe.length,Fe=_e.length;++Re<mt;)_e[Fe+Re]=Pe[Re];return _e})(De,oe(G))})(B,_s,Vt)}function $e(B,G){var se,oe,De=B.__data__;return((oe=typeof(se=G))=="string"||oe=="number"||oe=="symbol"||oe=="boolean"?se!=="__proto__":se===null)?De[typeof G=="string"?"string":"hash"]:De.map}function Ot(B,G){var se=(function(oe,De){return oe?.[De]})(B,G);return _t(se)?se:void 0}H.prototype.clear=function(){this.__data__=yt?yt(null):{},this.size=0},H.prototype.delete=function(B){var G=this.has(B)&&delete this.__data__[B];return this.size-=G?1:0,G},H.prototype.get=function(B){var G=this.__data__;if(yt){var se=G[B];return se===c?void 0:se}return pe.call(G,B)?G[B]:void 0},H.prototype.has=function(B){var G=this.__data__;return yt?G[B]!==void 0:pe.call(G,B)},H.prototype.set=function(B,G){var se=this.__data__;return this.size+=this.has(B)?0:1,se[B]=yt&&G===void 0?c:G,this},re.prototype.clear=function(){this.__data__=[],this.size=0},re.prototype.delete=function(B){var G=this.__data__,se=at(G,B);return!(se<0||(se==G.length-1?G.pop():Jt.call(G,se,1),--this.size,0))},re.prototype.get=function(B){var G=this.__data__,se=at(G,B);return se<0?void 0:G[se][1]},re.prototype.has=function(B){return at(this.__data__,B)>-1},re.prototype.set=function(B,G){var se=this.__data__,oe=at(se,B);return oe<0?(++this.size,se.push([B,G])):se[oe][1]=G,this},he.prototype.clear=function(){this.size=0,this.__data__={hash:new H,map:new(xt||re),string:new H}},he.prototype.delete=function(B){var G=$e(this,B).delete(B);return this.size-=G?1:0,G},he.prototype.get=function(B){return $e(this,B).get(B)},he.prototype.has=function(B){return $e(this,B).has(B)},he.prototype.set=function(B,G){var se=$e(this,B),oe=se.size;return se.set(B,G),this.size+=se.size==oe?0:1,this},Ne.prototype.add=Ne.prototype.push=function(B){return this.__data__.set(B,c),this},Ne.prototype.has=function(B){return this.__data__.has(B)},Se.prototype.clear=function(){this.__data__=new re,this.size=0},Se.prototype.delete=function(B){var G=this.__data__,se=G.delete(B);return this.size=G.size,se},Se.prototype.get=function(B){return this.__data__.get(B)},Se.prototype.has=function(B){return this.__data__.has(B)},Se.prototype.set=function(B,G){var se=this.__data__;if(se instanceof re){var oe=se.__data__;if(!xt||oe.length<u-1)return oe.push([B,G]),this.size=++se.size,this;se=this.__data__=new he(oe)}return se.set(B,G),this.size=se.size,this};var Vt=Yt?function(B){return B==null?[]:(B=Object(B),(function(G,se){for(var oe=-1,De=G==null?0:G.length,_e=0,Pe=[];++oe<De;){var Re=G[oe];se(Re,oe,G)&&(Pe[_e++]=Re)}return Pe})(Yt(B),function(G){return St.call(B,G)}))}:function(){return[]},pt=Xe;function Pt(B,G){return!!(G=G??o)&&(typeof B=="number"||q.test(B))&&B>-1&&B%1==0&&B<G}function Xt(B){if(B!=null){try{return ke.call(B)}catch{}try{return B+""}catch{}}return""}function on(B,G){return B===G||B!=B&&G!=G}(Ct&&pt(new Ct(new ArrayBuffer(1)))!=W||xt&&pt(new xt)!=_||or&&pt(or.resolve())!="[object Promise]"||Zt&&pt(new Zt)!=A||Dt&&pt(new Dt)!="[object WeakMap]")&&(pt=function(B){var G=Xe(B),se=G==m?B.constructor:void 0,oe=se?Xt(se):"";if(oe)switch(oe){case Tt:return W;case Gr:return _;case ft:return"[object Promise]";case wr:return A;case E:return"[object WeakMap]"}return G});var ws=vt((function(){return arguments})())?vt:function(B){return _r(B)&&pe.call(B,"callee")&&!St.call(B,"callee")},Jr=Array.isArray,ca=vr||function(){return!1};function Ut(B){if(!ln(B))return!1;var G=Xe(B);return G==g||G==v||G==p||G==N}function un(B){return typeof B=="number"&&B>-1&&B%1==0&&B<=o}function ln(B){var G=typeof B;return B!=null&&(G=="object"||G=="function")}function _r(B){return B!=null&&typeof B=="object"}var cn=fe?(function(B){return function(G){return B(G)}})(fe):function(B){return _r(B)&&un(B.length)&&!!$[Xe(B)]};function _s(B){return(G=B)!=null&&un(G.length)&&!Ut(G)?ht(B):et(B);var G}n.exports=function(B,G){return wt(B,G)}}).call(this,r(23)(i))},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(18);s.StringPredicate=n.StringPredicate;const u=r(20);s.NumberPredicate=u.NumberPredicate;const c=r(21);s.BooleanPredicate=c.BooleanPredicate;const d=r(0),f=r(22);s.ArrayPredicate=f.ArrayPredicate;const o=r(24);s.ObjectPredicate=o.ObjectPredicate;const h=r(29);s.DatePredicate=h.DatePredicate;const l=r(30);s.ErrorPredicate=l.ErrorPredicate;const p=r(31);s.MapPredicate=p.MapPredicate;const x=r(32);s.WeakMapPredicate=x.WeakMapPredicate;const w=r(33);s.SetPredicate=w.SetPredicate;const b=r(34);s.WeakSetPredicate=b.WeakSetPredicate;const g=r(35);s.AnyPredicate=g.AnyPredicate,s.default=((v,_)=>(Object.defineProperties(v,{string:{get:()=>new n.StringPredicate(_)},number:{get:()=>new u.NumberPredicate(_)},boolean:{get:()=>new c.BooleanPredicate(_)},undefined:{get:()=>new d.Predicate("undefined",_)},null:{get:()=>new d.Predicate("null",_)},nullOrUndefined:{get:()=>new d.Predicate("nullOrUndefined",_)},nan:{get:()=>new d.Predicate("nan",_)},symbol:{get:()=>new d.Predicate("symbol",_)},array:{get:()=>new f.ArrayPredicate(_)},object:{get:()=>new o.ObjectPredicate(_)},date:{get:()=>new h.DatePredicate(_)},error:{get:()=>new l.ErrorPredicate(_)},map:{get:()=>new p.MapPredicate(_)},weakMap:{get:()=>new x.WeakMapPredicate(_)},set:{get:()=>new w.SetPredicate(_)},weakSet:{get:()=>new b.WeakSetPredicate(_)},function:{get:()=>new d.Predicate("Function",_)},buffer:{get:()=>new d.Predicate("Buffer",_)},regExp:{get:()=>new d.Predicate("RegExp",_)},promise:{get:()=>new d.Predicate("Promise",_)},typedArray:{get:()=>new d.Predicate("TypedArray",_)},int8Array:{get:()=>new d.Predicate("Int8Array",_)},uint8Array:{get:()=>new d.Predicate("Uint8Array",_)},uint8ClampedArray:{get:()=>new d.Predicate("Uint8ClampedArray",_)},int16Array:{get:()=>new d.Predicate("Int16Array",_)},uint16Array:{get:()=>new d.Predicate("Uint16Array",_)},int32Array:{get:()=>new d.Predicate("Int32Array",_)},uint32Array:{get:()=>new d.Predicate("Uint32Array",_)},float32Array:{get:()=>new d.Predicate("Float32Array",_)},float64Array:{get:()=>new d.Predicate("Float64Array",_)},arrayBuffer:{get:()=>new d.Predicate("ArrayBuffer",_)},dataView:{get:()=>new d.Predicate("DataView",_)},iterable:{get:()=>new d.Predicate("Iterable",_)},any:{value:(...k)=>new g.AnyPredicate(k,_)}}),v))},function(i,s,r){var n=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(4));s.default=((c,d)=>{try{for(const f of c)u.default(f,d);return!0}catch(f){return f.message}})},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0}),s.ArgumentError=class extends Error{constructor(n,u){super(n),"captureStackTrace"in Error&&Error.captureStackTrace(this,u),this.name="ArgumentError"}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(2);s.default=function u(c,d,f){f[n.testSymbol](c,u,d)}},function(i,s,r){const n=()=>{const u=Error.prepareStackTrace;Error.prepareStackTrace=((d,f)=>f);const c=new Error().stack.slice(1);return Error.prepareStackTrace=u,c};i.exports=n,i.exports.default=n},function(i,s,r){var n=this&&this.__importStar||function(h){if(h&&h.__esModule)return h;var l={};if(h!=null)for(var p in h)Object.hasOwnProperty.call(h,p)&&(l[p]=h[p]);return l.default=h,l},u=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(s,"__esModule",{value:!0});const c=n(r(12)),d=u(r(13)),f=u(r(14)),o=/^.*?\((.*?)[,)]/;s.inferLabel=(h=>{if(!f.default)return;const l=h[1],p=l.getFileName(),x=l.getLineNumber(),w=l.getColumnNumber();if(!p||x===null||w===null)return;let b=[];try{b=c.readFileSync(p,"utf8").split(`
129
- `)}catch{return}let g=b[x-1];if(!g)return;g=g.slice(w-1);const v=o.exec(g);if(!v||!v[1])return;const _=v[1];return d.default(_)||d.default(_.split(".").pop())?_:void 0})},function(i,s){i.exports=dt},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=/^[a-z$_][a-z$_0-9]*$/i,u=new Set(["undefined","null","true","false","super","this","Infinity","NaN"]);s.default=(c=>c&&!u.has(c)&&n.test(c))},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0}),s.default=!!(typeof process<"u"&&process.versions&&process.versions.node)},function(i,s){i.exports=dt},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(0);s.not=(u=>{const c=u.addValidator;return u.addValidator=(d=>{const f=d.validator,o=d.message;return d.message=((h,l)=>`[NOT] ${o(h,l)}`),d.validator=(h=>!f(h)),u[n.validatorSymbol].push(d),u.addValidator=c,u}),u})},function(i,s,r){var n=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(6));s.default=(c=>(Object.defineProperties(c,{optional:{get:()=>u.default({},{optional:!0})}}),c))},function(i,s,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=n(r(19)),d=r(0);s.StringPredicate=class extends d.Predicate{constructor(f){super("string",f)}length(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have length \`${f}\`, got \`${o}\``,validator:o=>o.length===f})}minLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a minimum length of \`${f}\`, got \`${o}\``,validator:o=>o.length>=f})}maxLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a maximum length of \`${f}\`, got \`${o}\``,validator:o=>o.length<=f})}matches(f){return this.addValidator({message:(o,h)=>`Expected ${h} to match \`${f}\`, got \`${o}\``,validator:o=>f.test(o)})}startsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to start with \`${f}\`, got \`${o}\``,validator:o=>o.startsWith(f)})}endsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to end with \`${f}\`, got \`${o}\``,validator:o=>o.endsWith(f)})}includes(f){return this.addValidator({message:(o,h)=>`Expected ${h} to include \`${f}\`, got \`${o}\``,validator:o=>o.includes(f)})}oneOf(f){return this.addValidator({message:(o,h)=>{let l=JSON.stringify(f);if(f.length>10){const p=f.length-10;l=JSON.stringify(f.slice(0,10)).replace(/]$/,`,…+${p} more]`)}return`Expected ${h} to be one of \`${l}\`, got \`${o}\``},validator:o=>f.includes(o)})}get empty(){return this.addValidator({message:(f,o)=>`Expected ${o} to be empty, got \`${f}\``,validator:f=>f===""})}get nonEmpty(){return this.addValidator({message:(f,o)=>`Expected ${o} to not be empty`,validator:f=>f!==""})}equals(f){return this.addValidator({message:(o,h)=>`Expected ${h} to be equal to \`${f}\`, got \`${o}\``,validator:o=>o===f})}get alphanumeric(){return this.addValidator({message:(f,o)=>`Expected ${o} to be alphanumeric, got \`${f}\``,validator:f=>/^[a-z\d]+$/i.test(f)})}get alphabetical(){return this.addValidator({message:(f,o)=>`Expected ${o} to be alphabetical, got \`${f}\``,validator:f=>/^[a-z]+$/gi.test(f)})}get numeric(){return this.addValidator({message:(f,o)=>`Expected ${o} to be numeric, got \`${f}\``,validator:f=>/^(\+|-)?\d+$/i.test(f)})}get date(){return this.addValidator({message:(f,o)=>`Expected ${o} to be a date, got \`${f}\``,validator:c.default})}get lowercase(){return this.addValidator({message:(f,o)=>`Expected ${o} to be lowercase, got \`${f}\``,validator:f=>f.trim()!==""&&f===f.toLowerCase()})}get uppercase(){return this.addValidator({message:(f,o)=>`Expected ${o} to be uppercase, got \`${f}\``,validator:f=>f.trim()!==""&&f===f.toUpperCase()})}get url(){return this.addValidator({message:(f,o)=>`Expected ${o} to be a URL, got \`${f}\``,validator:u.default.urlString})}}},function(i,s,r){i.exports=function(n){return!isNaN(Date.parse(n))}},function(i,s,r){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=r(0);s.NumberPredicate=class extends c.Predicate{constructor(d){super("number",d)}inRange(d,f){return this.addValidator({message:(o,h)=>`Expected ${h} to be in range [${d}..${f}], got ${o}`,validator:o=>u.default.inRange(o,[d,f])})}greaterThan(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be greater than ${d}, got ${f}`,validator:f=>f>d})}greaterThanOrEqual(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be greater than or equal to ${d}, got ${f}`,validator:f=>f>=d})}lessThan(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be less than ${d}, got ${f}`,validator:f=>f<d})}lessThanOrEqual(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be less than or equal to ${d}, got ${f}`,validator:f=>f<=d})}equal(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be equal to ${d}, got ${f}`,validator:f=>f===d})}oneOf(d){return this.addValidator({message:(f,o)=>{let h=JSON.stringify(d);if(d.length>10){const l=d.length-10;h=JSON.stringify(d.slice(0,10)).replace(/]$/,`,…+${l} more]`)}return`Expected ${o} to be one of \`${h}\`, got ${f}`},validator:f=>d.includes(f)})}get integer(){return this.addValidator({message:(d,f)=>`Expected ${f} to be an integer, got ${d}`,validator:d=>u.default.integer(d)})}get finite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be finite, got ${d}`,validator:d=>!u.default.infinite(d)})}get infinite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be infinite, got ${d}`,validator:d=>u.default.infinite(d)})}get positive(){return this.addValidator({message:(d,f)=>`Expected ${f} to be positive, got ${d}`,validator:d=>d>0})}get negative(){return this.addValidator({message:(d,f)=>`Expected ${f} to be negative, got ${d}`,validator:d=>d<0})}get integerOrInfinite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be an integer or infinite, got ${d}`,validator:d=>u.default.integer(d)||u.default.infinite(d)})}get uint8(){return this.integer.inRange(0,255)}get uint16(){return this.integer.inRange(0,65535)}get uint32(){return this.integer.inRange(0,4294967295)}get int8(){return this.integer.inRange(-128,127)}get int16(){return this.integer.inRange(-32768,32767)}get int32(){return this.integer.inRange(-2147483648,2147483647)}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(0);s.BooleanPredicate=class extends n.Predicate{constructor(u){super("boolean",u)}get true(){return this.addValidator({message:(u,c)=>`Expected ${c} to be true, got ${u}`,validator:u=>u===!0})}get false(){return this.addValidator({message:(u,c)=>`Expected ${c} to be false, got ${u}`,validator:u=>u===!1})}}},function(i,s,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(5)),c=n(r(4)),d=r(0);s.ArrayPredicate=class extends d.Predicate{constructor(f){super("array",f)}length(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have length \`${f}\`, got \`${o.length}\``,validator:o=>o.length===f})}minLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a minimum length of \`${f}\`, got \`${o.length}\``,validator:o=>o.length>=f})}maxLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a maximum length of \`${f}\`, got \`${o.length}\``,validator:o=>o.length<=f})}startsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to start with \`${f}\`, got \`${o[0]}\``,validator:o=>o[0]===f})}endsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to end with \`${f}\`, got \`${o[o.length-1]}\``,validator:o=>o[o.length-1]===f})}includes(...f){return this.addValidator({message:(o,h)=>`Expected ${h} to include all elements of \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>f.every(h=>o.indexOf(h)!==-1)})}includesAny(...f){return this.addValidator({message:(o,h)=>`Expected ${h} to include any element of \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>f.some(h=>o.indexOf(h)!==-1)})}get empty(){return this.addValidator({message:(f,o)=>`Expected ${o} to be empty, got \`${JSON.stringify(f)}\``,validator:f=>f.length===0})}get nonEmpty(){return this.addValidator({message:(f,o)=>`Expected ${o} to not be empty`,validator:f=>f.length>0})}deepEqual(f){return this.addValidator({message:(o,h)=>`Expected ${h} to be deeply equal to \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>u.default(o,f)})}ofType(f){let o;return this.addValidator({message:(h,l)=>`(${l}) ${o}`,validator:h=>{try{for(const l of h)c.default(l,f);return!0}catch(l){return o=l.message,!1}}})}}},function(i,s){i.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(i,s,r){var n=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=n(r(25)),d=n(r(5)),f=r(0),o=n(r(3)),h=n(r(7)),l=n(r(27)),p=r(28);s.ObjectPredicate=class extends f.Predicate{constructor(x){super("object",x)}get plain(){return this.addValidator({message:(x,w)=>`Expected ${w} to be a plain object`,validator:x=>u.default.plainObject(x)})}get empty(){return this.addValidator({message:(x,w)=>`Expected ${w} to be empty, got \`${JSON.stringify(x)}\``,validator:x=>Object.keys(x).length===0})}get nonEmpty(){return this.addValidator({message:(x,w)=>`Expected ${w} to not be empty`,validator:x=>Object.keys(x).length>0})}valuesOfType(x){return this.addValidator({message:(w,b,g)=>`(${b}) ${g}`,validator:w=>{const b=Object.keys(w).map(g=>w[g]);return h.default(b,x)}})}deepValuesOfType(x){return this.addValidator({message:(w,b,g)=>`(${b}) ${g}`,validator:w=>l.default(w,x)})}deepEqual(x){return this.addValidator({message:(w,b)=>`Expected ${b} to be deeply equal to \`${JSON.stringify(x)}\`, got \`${JSON.stringify(w)}\``,validator:w=>d.default(w,x)})}instanceOf(x){return this.addValidator({message:(w,b)=>{let g=w.constructor.name;return g&&g!=="Object"||(g=JSON.stringify(w)),`Expected ${b} \`${g}\` to be of type \`${x.name}\``},validator:w=>w instanceof x})}hasKeys(...x){return this.addValidator({message:(w,b,g)=>`Expected ${b} to have keys \`${JSON.stringify(g)}\``,validator:w=>o.default({has:b=>c.default.has(w,b)},x)})}hasAnyKeys(...x){return this.addValidator({message:(w,b)=>`Expected ${b} to have any key of \`${JSON.stringify(x)}\``,validator:w=>x.some(b=>c.default.has(w,b))})}partialShape(x){return this.addValidator({message:(w,b,g)=>`${g.replace("Expected","Expected property")} in ${b}`,validator:w=>p.partial(w,x)})}exactShape(x){return this.addValidator({message:(w,b,g)=>`${g.replace("Expected","Expected property")} in ${b}`,validator:w=>p.exact(w,x)})}}},function(i,s,r){const n=r(26);function u(c){const d=c.split("."),f=[];for(let o=0;o<d.length;o++){let h=d[o];for(;h[h.length-1]==="\\"&&d[o+1]!==void 0;)h=h.slice(0,-1)+".",h+=d[++o];f.push(h)}return f}i.exports={get(c,d,f){if(!n(c)||typeof d!="string")return f===void 0?c:f;const o=u(d);for(let h=0;h<o.length;h++){if(!Object.prototype.propertyIsEnumerable.call(c,o[h]))return f;if((c=c[o[h]])==null){if(h!==o.length-1)return f;break}}return c},set(c,d,f){if(!n(c)||typeof d!="string")return c;const o=c,h=u(d);for(let l=0;l<h.length;l++){const p=h[l];n(c[p])||(c[p]={}),l===h.length-1&&(c[p]=f),c=c[p]}return o},delete(c,d){if(!n(c)||typeof d!="string")return;const f=u(d);for(let o=0;o<f.length;o++){const h=f[o];if(o===f.length-1)return void delete c[h];if(c=c[h],!n(c))return}},has(c,d){if(!n(c)||typeof d!="string")return!1;const f=u(d);for(let o=0;o<f.length;o++){if(!n(c)||!(f[o]in c))return!1;c=c[f[o]]}return!0}}},function(i,s,r){i.exports=function(n){var u=typeof n;return n!==null&&(u==="object"||u==="function")}},function(i,s,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=n(r(4)),d=(f,o)=>u.default.plainObject(f)?Object.keys(f).every(h=>d(f[h],o)):(c.default(f,o),!0);s.default=((f,o)=>{try{return d(f,o)}catch(h){return h.message}})},function(i,s,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=n(r(9)),d=r(2);s.partial=function f(o,h,l){try{for(const p of Object.keys(h)){const x=l?`${l}.${p}`:p;if(d.isPredicate(h[p]))c.default(o[p],x,h[p]);else if(u.default.plainObject(h[p])){const w=f(o[p],h[p],x);if(w!==!0)return w}}return!0}catch(p){return p.message}},s.exact=function f(o,h,l){try{const p=new Set(Object.keys(o));for(const x of Object.keys(h)){p.delete(x);const w=l?`${l}.${x}`:x;if(d.isPredicate(h[x]))c.default(o[x],w,h[x]);else if(u.default.plainObject(h[x])){if(!Object.prototype.hasOwnProperty.call(o,x))return`Expected \`${w}\` to exist`;const b=f(o[x],h[x],w);if(b!==!0)return b}}if(p.size>0){const x=Array.from(p.keys())[0];return`Did not expect property \`${l?`${l}.${x}`:x}\` to exist, got \`${o[x]}\``}return!0}catch(p){return p.message}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(0);s.DatePredicate=class extends n.Predicate{constructor(u){super("date",u)}before(u){return this.addValidator({message:(c,d)=>`Expected ${d} ${c.toISOString()} to be before ${u.toISOString()}`,validator:c=>c.getTime()<u.getTime()})}after(u){return this.addValidator({message:(c,d)=>`Expected ${d} ${c.toISOString()} to be after ${u.toISOString()}`,validator:c=>c.getTime()>u.getTime()})}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(0);s.ErrorPredicate=class extends n.Predicate{constructor(u){super("error",u)}name(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have name \`${u}\`, got \`${c.name}\``,validator:c=>c.name===u})}message(u){return this.addValidator({message:(c,d)=>`Expected ${d} message to be \`${u}\`, got \`${c.message}\``,validator:c=>c.message===u})}messageIncludes(u){return this.addValidator({message:(c,d)=>`Expected ${d} message to include \`${u}\`, got \`${c.message}\``,validator:c=>c.message.includes(u)})}hasKeys(...u){return this.addValidator({message:(c,d)=>`Expected ${d} message to have keys \`${u.join("`, `")}\``,validator:c=>u.every(d=>c.hasOwnProperty(d))})}instanceOf(u){return this.addValidator({message:(c,d)=>`Expected ${d} \`${c.name}\` to be of type \`${u.name}\``,validator:c=>c instanceof u})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}},function(i,s,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(5)),c=r(0),d=n(r(3)),f=n(r(7));s.MapPredicate=class extends c.Predicate{constructor(o){super("Map",o)}size(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have size \`${o}\`, got \`${h.size}\``,validator:h=>h.size===o})}minSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a minimum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size>=o})}maxSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a maximum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size<=o})}hasKeys(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have keys \`${JSON.stringify(p)}\``,validator:h=>d.default(h,o)})}hasAnyKeys(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any key of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>h.has(l))})}hasValues(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have values \`${JSON.stringify(p)}\``,validator:h=>d.default(new Set(h.values()),o)})}hasAnyValues(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any value of \`${JSON.stringify(o)}\``,validator:h=>{const l=new Set(h.values());return o.some(p=>l.has(p))}})}keysOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h.keys(),o)})}valuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h.values(),o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(Array.from(o))}\``,validator:o=>o.size===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>o.size>0})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(Array.from(o))}\`, got \`${JSON.stringify(Array.from(h))}\``,validator:h=>u.default(h,o)})}}},function(i,s,r){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(s,"__esModule",{value:!0});const u=r(0),c=n(r(3));s.WeakMapPredicate=class extends u.Predicate{constructor(d){super("WeakMap",d)}hasKeys(...d){return this.addValidator({message:(f,o,h)=>`Expected ${o} to have keys \`${JSON.stringify(h)}\``,validator:f=>c.default(f,d)})}hasAnyKeys(...d){return this.addValidator({message:(f,o)=>`Expected ${o} to have any key of \`${JSON.stringify(d)}\``,validator:f=>d.some(o=>f.has(o))})}}},function(i,s,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(5)),c=r(0),d=n(r(3)),f=n(r(7));s.SetPredicate=class extends c.Predicate{constructor(o){super("Set",o)}size(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have size \`${o}\`, got \`${h.size}\``,validator:h=>h.size===o})}minSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a minimum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size>=o})}maxSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a maximum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size<=o})}has(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have items \`${JSON.stringify(p)}\``,validator:h=>d.default(h,o)})}hasAny(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any item of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>h.has(l))})}ofType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h,o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(Array.from(o))}\``,validator:o=>o.size===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>o.size>0})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(Array.from(o))}\`, got \`${JSON.stringify(Array.from(h))}\``,validator:h=>u.default(h,o)})}}},function(i,s,r){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(s,"__esModule",{value:!0});const u=r(0),c=n(r(3));s.WeakSetPredicate=class extends u.Predicate{constructor(d){super("WeakSet",d)}has(...d){return this.addValidator({message:(f,o,h)=>`Expected ${o} to have items \`${JSON.stringify(h)}\``,validator:f=>c.default(f,d)})}hasAny(...d){return this.addValidator({message:(f,o)=>`Expected ${o} to have any item of \`${JSON.stringify(d)}\``,validator:f=>d.some(o=>f.has(o))})}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(8),u=r(2);s.AnyPredicate=class{constructor(c,d={}){this.predicates=c,this.options=d}[u.testSymbol](c,d,f){const o=["Any predicate failed with the following errors:"];for(const h of this.predicates)try{return void d(c,f,h)}catch(l){if(c===void 0&&this.options.optional===!0)return;o.push(`- ${l.message}`)}throw new n.ArgumentError(o.join(`
127
+ `)}function f(b){this.options=b||{locator:{}}}f.prototype.parseFromString=function(b,g){var v=this.options,k=new c,_=v.domBuilder||new h,y=v.errorHandler,m=v.locator,N=v.xmlns||{},j=/\/x?html?$/.test(g),A=j?i.HTML_ENTITIES:i.XML_ENTITIES;m&&_.setDocumentLocator(m),k.errorHandler=o(y,_,m),k.domBuilder=v.domBuilder||_,j&&(N[""]=n.HTML),N.xml=N.xml||n.XML;var D=v.normalizeLineEndings||d;return b&&typeof b=="string"?k.parse(D(b),N,A):k.errorHandler.error("invalid doc source"),_.doc};function o(b,g,v){if(!b){if(g instanceof h)return g;b=g}var k={},_=b instanceof Function;v=v||{};function y(m){var N=b[m];!N&&_&&(N=b.length==2?function(j){b(m,j)}:b),k[m]=N&&function(j){N("[xmldom "+m+"] "+j+p(v))}||function(){}}return y("warning"),y("error"),y("fatalError"),k}function h(){this.cdata=!1}function l(b,g){g.lineNumber=b.lineNumber,g.columnNumber=b.columnNumber}h.prototype={startDocument:function(){this.doc=new r().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(b,g,v,k){var _=this.doc,y=_.createElementNS(b,v||g),m=k.length;w(this,y),this.currentElement=y,this.locator&&l(this.locator,y);for(var N=0;N<m;N++){var b=k.getURI(N),j=k.getValue(N),v=k.getQName(N),A=_.createAttributeNS(b,v);this.locator&&l(k.getLocator(N),A),A.value=A.nodeValue=j,y.setAttributeNode(A)}},endElement:function(b,g,v){var k=this.currentElement;k.tagName,this.currentElement=k.parentNode},startPrefixMapping:function(b,g){},endPrefixMapping:function(b){},processingInstruction:function(b,g){var v=this.doc.createProcessingInstruction(b,g);this.locator&&l(this.locator,v),w(this,v)},ignorableWhitespace:function(b,g,v){},characters:function(b,g,v){if(b=x.apply(this,arguments),b){if(this.cdata)var k=this.doc.createCDATASection(b);else var k=this.doc.createTextNode(b);this.currentElement?this.currentElement.appendChild(k):/^\s*$/.test(b)&&this.doc.appendChild(k),this.locator&&l(this.locator,k)}},skippedEntity:function(b){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(b){(this.locator=b)&&(b.lineNumber=0)},comment:function(b,g,v){b=x.apply(this,arguments);var k=this.doc.createComment(b);this.locator&&l(this.locator,k),w(this,k)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(b,g,v){var k=this.doc.implementation;if(k&&k.createDocumentType){var _=k.createDocumentType(b,g,v);this.locator&&l(this.locator,_),w(this,_),this.doc.doctype=_}},warning:function(b){console.warn("[xmldom warning] "+b,p(this.locator))},error:function(b){console.error("[xmldom error] "+b,p(this.locator))},fatalError:function(b){throw new u(b,this.locator)}};function p(b){if(b)return`
128
+ @`+(b.systemId||"")+"#[line:"+b.lineNumber+",col:"+b.columnNumber+"]"}function x(b,g,v){return typeof b=="string"?b.substr(g,v):b.length>=g+v||g?new java.lang.String(b,g,v)+"":b}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(b){h.prototype[b]=function(){return null}});function w(b,g){b.currentElement?b.currentElement.appendChild(g):b.doc.appendChild(g)}return qa.__DOMHandler=h,qa.normalizeLineEndings=d,qa.DOMParser=f,qa}var bu;function hh(){if(bu)return Fa;bu=1;var e=Ic();return Fa.DOMImplementation=e.DOMImplementation,Fa.XMLSerializer=e.XMLSerializer,Fa.DOMParser=fh().DOMParser,Fa}var Ba={},At={},Sn={},Bs={},Cn={},xu;function hs(){if(xu)return Cn;xu=1,Object.defineProperty(Cn,"__esModule",{value:!0});const e=ds();let a=class extends e.default{constructor(s,r){super(s,r)}};return Cn.UniverseLogError=a,Cn}var yu;function an(){return yu||(yu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=hs();(function(i){i.error="error",i.warn="warn",i.info="info",i.http="http",i.verbose="verbose",i.debug="debug",i.silly="silly"})(e.LogLevel||(e.LogLevel={})),(function(i){i.LEVELS_VALUES={[i.error]:0,[i.warn]:1,[i.info]:2,[i.http]:3,[i.verbose]:4,[i.debug]:5,[i.silly]:6},i.LEVELS_BY_NAME={[i.error]:i.error,[i.warn]:i.warn,[i.info]:i.info,[i.http]:i.http,[i.verbose]:i.verbose,[i.debug]:i.debug,[i.silly]:i.silly},i.DEFAULT_LEVEL=i.info;function s(d){if(typeof i.LEVELS_BY_NAME[d]>"u"){const f=Object.keys(i.LEVELS_BY_NAME).join(", ");throw new a.UniverseLogError(`There is no such log level: '${d}'. Available levels: [ ${f} ]`)}return i.LEVELS_BY_NAME[d]}i.valueOf=s;function r(d){if(typeof i.LEVELS_VALUES[d]>"u"){const f=Object.keys(i.LEVELS_BY_NAME).join(", ");throw new a.UniverseLogError(`There is no such log level: '${d}'. Available levels: [ ${f} ]`)}return i.LEVELS_VALUES[d]}i.levelToValue=r;function n(d){return r(d.level)<=r(d.threshold)}i.isLessOrEquallyVerbose=n;function u(d,f){return i.LEVELS_VALUES[d]>i.LEVELS_VALUES[f]?d:f}i.moreVerbose=u;function c(d,f){return i.LEVELS_VALUES[d]<i.LEVELS_VALUES[f]?d:f}i.lessVerbose=c})(e.LogLevel||(e.LogLevel={}))})(Bs)),Bs}var Dn={},ta={},Vs={exports:{}},vu;function Fc(){return vu||(vu=1,(function(e){e.exports=(function(i){var s={};function r(n){if(s[n])return s[n].exports;var u=s[n]={i:n,l:!1,exports:{}};return i[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=i,r.c=s,r.d=function(n,u,c){r.o(n,u)||Object.defineProperty(n,u,{enumerable:!0,get:c})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,u){if(1&u&&(n=r(n)),8&u||4&u&&typeof n=="object"&&n&&n.__esModule)return n;var c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:n}),2&u&&typeof n!="string")for(var d in n)r.d(c,d,(function(f){return n[f]}).bind(null,d));return c},r.n=function(n){var u=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(u,"a",u),u},r.o=function(n,u){return Object.prototype.hasOwnProperty.call(n,u)},r.p="",r(r.s=4)})([function(i,s,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=r(8),d=r(2),f=r(16);s.validatorSymbol=Symbol("validators"),s.Predicate=class{constructor(o,h={}){this.type=o,this.options=h,this.context={validators:[]},this.context=Object.assign({},this.context,this.options);const l=this.type[0].toLowerCase()+this.type.slice(1);this.addValidator({message:(p,x)=>`Expected ${x&&x.substring(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${u.default(p)}\``,validator:p=>u.default[l](p)})}[d.testSymbol](o,h,l){for(const{validator:p,message:x}of this.context.validators){if(this.options.optional===!0&&o===void 0)continue;const w=p(o);if(w===!0)continue;let b=l;throw typeof l=="function"&&(b=l()),b=b?`${this.type} \`${b}\``:this.type,new c.ArgumentError(x(o,b,w),h)}}get[s.validatorSymbol](){return this.context.validators}get not(){return f.not(this)}validate(o){return this.addValidator({message:(h,l,p)=>typeof p=="string"?`(${l}) ${p}`:p(l),validator:h=>{const{message:l,validator:p}=o(h);return!!p||l}})}is(o){return this.addValidator({message:(h,l,p)=>p?`(${l}) ${p}`:`Expected ${l} \`${h}\` to pass custom validation function`,validator:o})}addValidator(o){return this.context.validators.push(o),this}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=typeof URL>"u"?r(15).URL:URL,{toString:u}=Object.prototype,c=g=>v=>typeof v===g,d=g=>{const v=u.call(g).slice(8,-1);if(v)return v},f=g=>v=>d(v)===g;function o(g){switch(g){case null:return"null";case!0:case!1:return"boolean"}switch(typeof g){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"bigint":return"bigint";case"symbol":return"symbol"}if(o.function_(g))return"Function";if(o.observable(g))return"Observable";if(o.array(g))return"Array";if(o.buffer(g))return"Buffer";const v=d(g);if(v)return v;if(g instanceof String||g instanceof Boolean||g instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}const h=g=>typeof g=="object";o.undefined=c("undefined"),o.string=c("string"),o.number=c("number"),o.bigint=c("bigint"),o.function_=c("function"),o.null_=(g=>g===null),o.class_=(g=>o.function_(g)&&g.toString().startsWith("class ")),o.boolean=(g=>g===!0||g===!1),o.symbol=c("symbol"),o.numericString=(g=>o.string(g)&&g.length>0&&!Number.isNaN(Number(g))),o.array=Array.isArray,o.buffer=(g=>!o.nullOrUndefined(g)&&!o.nullOrUndefined(g.constructor)&&o.function_(g.constructor.isBuffer)&&g.constructor.isBuffer(g)),o.nullOrUndefined=(g=>o.null_(g)||o.undefined(g)),o.object=(g=>!o.nullOrUndefined(g)&&(o.function_(g)||h(g))),o.iterable=(g=>!o.nullOrUndefined(g)&&o.function_(g[Symbol.iterator])),o.asyncIterable=(g=>!o.nullOrUndefined(g)&&o.function_(g[Symbol.asyncIterator])),o.generator=(g=>o.iterable(g)&&o.function_(g.next)&&o.function_(g.throw)),o.nativePromise=(g=>f("Promise")(g)),o.promise=(g=>o.nativePromise(g)||(v=>!o.null_(v)&&h(v)&&o.function_(v.then)&&o.function_(v.catch))(g)),o.generatorFunction=f("GeneratorFunction"),o.asyncFunction=f("AsyncFunction"),o.boundFunction=(g=>o.function_(g)&&!g.hasOwnProperty("prototype")),o.regExp=f("RegExp"),o.date=f("Date"),o.error=f("Error"),o.map=(g=>f("Map")(g)),o.set=(g=>f("Set")(g)),o.weakMap=(g=>f("WeakMap")(g)),o.weakSet=(g=>f("WeakSet")(g)),o.int8Array=f("Int8Array"),o.uint8Array=f("Uint8Array"),o.uint8ClampedArray=f("Uint8ClampedArray"),o.int16Array=f("Int16Array"),o.uint16Array=f("Uint16Array"),o.int32Array=f("Int32Array"),o.uint32Array=f("Uint32Array"),o.float32Array=f("Float32Array"),o.float64Array=f("Float64Array"),o.bigint64Array=f("BigInt64Array"),o.biguint64Array=f("BigUint64Array"),o.arrayBuffer=f("ArrayBuffer"),o.sharedArrayBuffer=f("SharedArrayBuffer"),o.dataView=f("DataView"),o.directInstanceOf=((g,v)=>Object.getPrototypeOf(g)===v.prototype),o.urlInstance=(g=>f("URL")(g)),o.urlString=(g=>{if(!o.string(g))return!1;try{return new n(g),!0}catch{return!1}}),o.truthy=(g=>!!g),o.falsy=(g=>!g),o.nan=(g=>Number.isNaN(g));const l=new Set(["undefined","string","number","bigint","boolean","symbol"]);o.primitive=(g=>o.null_(g)||l.has(typeof g)),o.integer=(g=>Number.isInteger(g)),o.safeInteger=(g=>Number.isSafeInteger(g)),o.plainObject=(g=>{if(d(g)!=="Object")return!1;const v=Object.getPrototypeOf(g);return v===null||v===Object.getPrototypeOf({})});const p=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"]);o.typedArray=(g=>{const v=d(g);return v!==void 0&&p.has(v)}),o.arrayLike=(g=>!o.nullOrUndefined(g)&&!o.function_(g)&&(v=>o.safeInteger(v)&&v>=0)(g.length)),o.inRange=((g,v)=>{if(o.number(v))return g>=Math.min(0,v)&&g<=Math.max(v,0);if(o.array(v)&&v.length===2)return g>=Math.min(...v)&&g<=Math.max(...v);throw new TypeError(`Invalid range: ${JSON.stringify(v)}`)});const x=["innerHTML","ownerDocument","style","attributes","nodeValue"];o.domElement=(g=>o.object(g)&&g.nodeType===1&&o.string(g.nodeName)&&!o.plainObject(g)&&x.every(v=>v in g)),o.observable=(g=>!!g&&(!(!g[Symbol.observable]||g!==g[Symbol.observable]())||!(!g["@@observable"]||g!==g["@@observable"]()))),o.nodeStream=(g=>!o.nullOrUndefined(g)&&h(g)&&o.function_(g.pipe)&&!o.observable(g)),o.infinite=(g=>g===1/0||g===-1/0);const w=g=>v=>o.integer(v)&&Math.abs(v%2)===g;o.evenInteger=w(0),o.oddInteger=w(1),o.emptyArray=(g=>o.array(g)&&g.length===0),o.nonEmptyArray=(g=>o.array(g)&&g.length>0),o.emptyString=(g=>o.string(g)&&g.length===0),o.nonEmptyString=(g=>o.string(g)&&g.length>0),o.emptyStringOrWhitespace=(g=>o.emptyString(g)||(v=>o.string(v)&&/\S/.test(v)===!1)(g)),o.emptyObject=(g=>o.object(g)&&!o.map(g)&&!o.set(g)&&Object.keys(g).length===0),o.nonEmptyObject=(g=>o.object(g)&&!o.map(g)&&!o.set(g)&&Object.keys(g).length>0),o.emptySet=(g=>o.set(g)&&g.size===0),o.nonEmptySet=(g=>o.set(g)&&g.size>0),o.emptyMap=(g=>o.map(g)&&g.size===0),o.nonEmptyMap=(g=>o.map(g)&&g.size>0);const b=(g,v,k)=>{if(o.function_(v)===!1)throw new TypeError(`Invalid predicate: ${JSON.stringify(v)}`);if(k.length===0)throw new TypeError("Invalid number of values");return g.call(k,v)};o.any=((g,...v)=>b(Array.prototype.some,g,v)),o.all=((g,...v)=>b(Array.prototype.every,g,v)),Object.defineProperties(o,{class:{value:o.class_},function:{value:o.function_},null:{value:o.null_}}),i.exports=o,s.default=o},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0}),s.testSymbol=Symbol("test"),s.isPredicate=(n=>!!(n&&n[s.testSymbol]))},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0}),s.default=((n,u,c=5)=>{const d=[];for(const f of u)if(!n.has(f)&&(d.push(f),d.length===c))return d;return d.length===0||d})},function(i,s,r){var n=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(10)),c=r(11),d=r(0);s.Predicate=d.Predicate;const f=r(2),o=n(r(17)),h=n(r(6)),l=n(r(9)),p=(w,b,g)=>{if(!f.isPredicate(b)&&typeof b!="string")throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof b}\``);if(f.isPredicate(b)){const v=u.default();l.default(w,()=>c.inferLabel(v),b)}else l.default(w,b,g)};Object.defineProperties(p,{isValid:{value:(w,b)=>{try{return p(w,b),!0}catch{return!1}}},create:{value:(w,b)=>g=>{if(f.isPredicate(w)){const v=u.default();l.default(g,()=>c.inferLabel(v),w)}else l.default(g,w,b)}}}),s.default=h.default(o.default(p));var x=r(6);s.StringPredicate=x.StringPredicate,s.NumberPredicate=x.NumberPredicate,s.BooleanPredicate=x.BooleanPredicate,s.ArrayPredicate=x.ArrayPredicate,s.ObjectPredicate=x.ObjectPredicate,s.DatePredicate=x.DatePredicate,s.ErrorPredicate=x.ErrorPredicate,s.MapPredicate=x.MapPredicate,s.WeakMapPredicate=x.WeakMapPredicate,s.SetPredicate=x.SetPredicate,s.WeakSetPredicate=x.WeakSetPredicate,s.AnyPredicate=x.AnyPredicate},function(i,s,r){(function(n){var u=200,c="__lodash_hash_undefined__",d=1,f=2,o=9007199254740991,h="[object Arguments]",l="[object Array]",p="[object AsyncFunction]",x="[object Boolean]",w="[object Date]",b="[object Error]",g="[object Function]",v="[object GeneratorFunction]",k="[object Map]",_="[object Number]",y="[object Null]",m="[object Object]",N="[object Proxy]",j="[object RegExp]",A="[object Set]",D="[object String]",C="[object Symbol]",O="[object Undefined]",$="[object ArrayBuffer]",H="[object DataView]",F=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[h]=M[l]=M[$]=M[x]=M[H]=M[w]=M[b]=M[g]=M[k]=M[_]=M[m]=M[j]=M[A]=M[D]=M["[object WeakMap]"]=!1;var Y=typeof gr=="object"&&gr&&gr.Object===Object&&gr,X=typeof self=="object"&&self&&self.Object===Object&&self,ae=Y||X||Function("return this")(),I=s&&!s.nodeType&&s,ie=I&&typeof n=="object"&&n&&!n.nodeType&&n,R=ie&&ie.exports===I,V=R&&Y.process,J=(function(){try{return V&&V.binding&&V.binding("util")}catch{}})(),fe=J&&J.isTypedArray;function Q(B,G){for(var se=-1,oe=B==null?0:B.length;++se<oe;)if(G(B[se],se,B))return!0;return!1}function ne(B){var G=-1,se=Array(B.size);return B.forEach(function(oe,De){se[++G]=[De,oe]}),se}function xe(B){var G=-1,se=Array(B.size);return B.forEach(function(oe){se[++G]=oe}),se}var Ce,Z,te,ee=Array.prototype,le=Function.prototype,be=Object.prototype,me=ae["__core-js_shared__"],ke=le.toString,pe=be.hasOwnProperty,Ye=(Ce=/[^.]+$/.exec(me&&me.keys&&me.keys.IE_PROTO||""))?"Symbol(src)_1."+Ce:"",we=be.toString,de=RegExp("^"+ke.call(pe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ee=R?ae.Buffer:void 0,Oe=ae.Symbol,Be=ae.Uint8Array,St=be.propertyIsEnumerable,Jt=ee.splice,Ze=Oe?Oe.toStringTag:void 0,Yt=Object.getOwnPropertySymbols,vr=Ee?Ee.isBuffer:void 0,Qe=(Z=Object.keys,te=Object,function(B){return Z(te(B))}),Ct=Ot(ae,"DataView"),xt=Ot(ae,"Map"),or=Ot(ae,"Promise"),Zt=Ot(ae,"Set"),Dt=Ot(ae,"WeakMap"),yt=Ot(Object,"create"),Tt=Xt(Ct),Gr=Xt(xt),ft=Xt(or),wr=Xt(Zt),E=Xt(Dt),S=Oe?Oe.prototype:void 0,L=S?S.valueOf:void 0;function W(B){var G=-1,se=B==null?0:B.length;for(this.clear();++G<se;){var oe=B[G];this.set(oe[0],oe[1])}}function re(B){var G=-1,se=B==null?0:B.length;for(this.clear();++G<se;){var oe=B[G];this.set(oe[0],oe[1])}}function he(B){var G=-1,se=B==null?0:B.length;for(this.clear();++G<se;){var oe=B[G];this.set(oe[0],oe[1])}}function Ne(B){var G=-1,se=B==null?0:B.length;for(this.__data__=new he;++G<se;)this.add(B[G])}function Se(B){var G=this.__data__=new re(B);this.size=G.size}function ht(B,G){var se=Jr(B),oe=!se&&ws(B),De=!se&&!oe&&ca(B),_e=!se&&!oe&&!De&&cn(B),Pe=se||oe||De||_e,Re=Pe?(function($e,kt){for(var nt=-1,He=Array($e);++nt<$e;)He[nt]=kt(nt);return He})(B.length,String):[],mt=Re.length;for(var Fe in B)!pe.call(B,Fe)||Pe&&(Fe=="length"||De&&(Fe=="offset"||Fe=="parent")||_e&&(Fe=="buffer"||Fe=="byteLength"||Fe=="byteOffset")||Pt(Fe,mt))||Re.push(Fe);return Re}function at(B,G){for(var se=B.length;se--;)if(on(B[se][0],G))return se;return-1}function Xe(B){return B==null?B===void 0?O:y:Ze&&Ze in Object(B)?(function(G){var se=pe.call(G,Ze),oe=G[Ze];try{G[Ze]=void 0;var De=!0}catch{}var _e=we.call(G);return De&&(se?G[Ze]=oe:delete G[Ze]),_e})(B):(function(G){return we.call(G)})(B)}function vt(B){return _r(B)&&Xe(B)==h}function wt(B,G,se,oe,De){return B===G||(B==null||G==null||!_r(B)&&!_r(G)?B!=B&&G!=G:(function(_e,Pe,Re,mt,Fe,$e){var kt=Jr(_e),nt=Jr(Pe),He=kt?l:pt(_e),Nt=nt?l:pt(Pe),ur=(He=He==h?m:He)==m,Yr=(Nt=Nt==h?m:Nt)==m,lr=He==Nt;if(lr&&ca(_e)){if(!ca(Pe))return!1;kt=!0,ur=!1}if(lr&&!ur)return $e||($e=new Se),kt||cn(_e)?ze(_e,Pe,Re,mt,Fe,$e):(function(Ae,je,$t,zt,fa,qe,Lt){switch($t){case H:if(Ae.byteLength!=je.byteLength||Ae.byteOffset!=je.byteOffset)return!1;Ae=Ae.buffer,je=je.buffer;case $:return!(Ae.byteLength!=je.byteLength||!qe(new Be(Ae),new Be(je)));case x:case w:case _:return on(+Ae,+je);case b:return Ae.name==je.name&&Ae.message==je.message;case j:case D:return Ae==je+"";case k:var Ht=ne;case A:var Nr=zt&d;if(Ht||(Ht=xe),Ae.size!=je.size&&!Nr)return!1;var Zr=Lt.get(Ae);if(Zr)return Zr==je;zt|=f,Lt.set(Ae,je);var cr=ze(Ht(Ae),Ht(je),zt,fa,qe,Lt);return Lt.delete(Ae),cr;case C:if(L)return L.call(Ae)==L.call(je)}return!1})(_e,Pe,He,Re,mt,Fe,$e);if(!(Re&d)){var kr=ur&&pe.call(_e,"__wrapped__"),da=Yr&&pe.call(Pe,"__wrapped__");if(kr||da){var ks=kr?_e.value():_e,Ns=da?Pe.value():Pe;return $e||($e=new Se),Fe(ks,Ns,Re,mt,$e)}}return lr?($e||($e=new Se),(function(Ae,je,$t,zt,fa,qe){var Lt=$t&d,Ht=Bt(Ae),Nr=Ht.length,Zr=Bt(je).length;if(Nr!=Zr&&!Lt)return!1;for(var cr=Nr;cr--;){var tt=Ht[cr];if(!(Lt?tt in je:pe.call(je,tt)))return!1}var ha=qe.get(Ae);if(ha&&qe.get(je))return ha==je;var Xr=!0;qe.set(Ae,je),qe.set(je,Ae);for(var dr=Lt;++cr<Nr;){tt=Ht[cr];var Kr=Ae[tt],fr=je[tt];if(zt)var dn=Lt?zt(fr,Kr,tt,je,Ae,qe):zt(Kr,fr,tt,Ae,je,qe);if(!(dn===void 0?Kr===fr||fa(Kr,fr,$t,zt,qe):dn)){Xr=!1;break}dr||(dr=tt=="constructor")}if(Xr&&!dr){var jr=Ae.constructor,Er=je.constructor;jr!=Er&&"constructor"in Ae&&"constructor"in je&&!(typeof jr=="function"&&jr instanceof jr&&typeof Er=="function"&&Er instanceof Er)&&(Xr=!1)}return qe.delete(Ae),qe.delete(je),Xr})(_e,Pe,Re,mt,Fe,$e)):!1})(B,G,se,oe,wt,De))}function _t(B){return!(!ln(B)||(G=B,Ye&&Ye in G))&&(Ut(B)?de:F).test(Xt(B));var G}function et(B){if(se=(G=B)&&G.constructor,oe=typeof se=="function"&&se.prototype||be,G!==oe)return Qe(B);var G,se,oe,De=[];for(var _e in Object(B))pe.call(B,_e)&&_e!="constructor"&&De.push(_e);return De}function ze(B,G,se,oe,De,_e){var Pe=se&d,Re=B.length,mt=G.length;if(Re!=mt&&!(Pe&&mt>Re))return!1;var Fe=_e.get(B);if(Fe&&_e.get(G))return Fe==G;var $e=-1,kt=!0,nt=se&f?new Ne:void 0;for(_e.set(B,G),_e.set(G,B);++$e<Re;){var He=B[$e],Nt=G[$e];if(oe)var ur=Pe?oe(Nt,He,$e,G,B,_e):oe(He,Nt,$e,B,G,_e);if(ur!==void 0){if(ur)continue;kt=!1;break}if(nt){if(!Q(G,function(Yr,lr){if(kr=lr,!nt.has(kr)&&(He===Yr||De(He,Yr,se,oe,_e)))return nt.push(lr);var kr})){kt=!1;break}}else if(He!==Nt&&!De(He,Nt,se,oe,_e)){kt=!1;break}}return _e.delete(B),_e.delete(G),kt}function Bt(B){return(function(G,se,oe){var De=se(G);return Jr(G)?De:(function(_e,Pe){for(var Re=-1,mt=Pe.length,Fe=_e.length;++Re<mt;)_e[Fe+Re]=Pe[Re];return _e})(De,oe(G))})(B,_s,Vt)}function Le(B,G){var se,oe,De=B.__data__;return((oe=typeof(se=G))=="string"||oe=="number"||oe=="symbol"||oe=="boolean"?se!=="__proto__":se===null)?De[typeof G=="string"?"string":"hash"]:De.map}function Ot(B,G){var se=(function(oe,De){return oe?.[De]})(B,G);return _t(se)?se:void 0}W.prototype.clear=function(){this.__data__=yt?yt(null):{},this.size=0},W.prototype.delete=function(B){var G=this.has(B)&&delete this.__data__[B];return this.size-=G?1:0,G},W.prototype.get=function(B){var G=this.__data__;if(yt){var se=G[B];return se===c?void 0:se}return pe.call(G,B)?G[B]:void 0},W.prototype.has=function(B){var G=this.__data__;return yt?G[B]!==void 0:pe.call(G,B)},W.prototype.set=function(B,G){var se=this.__data__;return this.size+=this.has(B)?0:1,se[B]=yt&&G===void 0?c:G,this},re.prototype.clear=function(){this.__data__=[],this.size=0},re.prototype.delete=function(B){var G=this.__data__,se=at(G,B);return!(se<0||(se==G.length-1?G.pop():Jt.call(G,se,1),--this.size,0))},re.prototype.get=function(B){var G=this.__data__,se=at(G,B);return se<0?void 0:G[se][1]},re.prototype.has=function(B){return at(this.__data__,B)>-1},re.prototype.set=function(B,G){var se=this.__data__,oe=at(se,B);return oe<0?(++this.size,se.push([B,G])):se[oe][1]=G,this},he.prototype.clear=function(){this.size=0,this.__data__={hash:new W,map:new(xt||re),string:new W}},he.prototype.delete=function(B){var G=Le(this,B).delete(B);return this.size-=G?1:0,G},he.prototype.get=function(B){return Le(this,B).get(B)},he.prototype.has=function(B){return Le(this,B).has(B)},he.prototype.set=function(B,G){var se=Le(this,B),oe=se.size;return se.set(B,G),this.size+=se.size==oe?0:1,this},Ne.prototype.add=Ne.prototype.push=function(B){return this.__data__.set(B,c),this},Ne.prototype.has=function(B){return this.__data__.has(B)},Se.prototype.clear=function(){this.__data__=new re,this.size=0},Se.prototype.delete=function(B){var G=this.__data__,se=G.delete(B);return this.size=G.size,se},Se.prototype.get=function(B){return this.__data__.get(B)},Se.prototype.has=function(B){return this.__data__.has(B)},Se.prototype.set=function(B,G){var se=this.__data__;if(se instanceof re){var oe=se.__data__;if(!xt||oe.length<u-1)return oe.push([B,G]),this.size=++se.size,this;se=this.__data__=new he(oe)}return se.set(B,G),this.size=se.size,this};var Vt=Yt?function(B){return B==null?[]:(B=Object(B),(function(G,se){for(var oe=-1,De=G==null?0:G.length,_e=0,Pe=[];++oe<De;){var Re=G[oe];se(Re,oe,G)&&(Pe[_e++]=Re)}return Pe})(Yt(B),function(G){return St.call(B,G)}))}:function(){return[]},pt=Xe;function Pt(B,G){return!!(G=G??o)&&(typeof B=="number"||q.test(B))&&B>-1&&B%1==0&&B<G}function Xt(B){if(B!=null){try{return ke.call(B)}catch{}try{return B+""}catch{}}return""}function on(B,G){return B===G||B!=B&&G!=G}(Ct&&pt(new Ct(new ArrayBuffer(1)))!=H||xt&&pt(new xt)!=k||or&&pt(or.resolve())!="[object Promise]"||Zt&&pt(new Zt)!=A||Dt&&pt(new Dt)!="[object WeakMap]")&&(pt=function(B){var G=Xe(B),se=G==m?B.constructor:void 0,oe=se?Xt(se):"";if(oe)switch(oe){case Tt:return H;case Gr:return k;case ft:return"[object Promise]";case wr:return A;case E:return"[object WeakMap]"}return G});var ws=vt((function(){return arguments})())?vt:function(B){return _r(B)&&pe.call(B,"callee")&&!St.call(B,"callee")},Jr=Array.isArray,ca=vr||function(){return!1};function Ut(B){if(!ln(B))return!1;var G=Xe(B);return G==g||G==v||G==p||G==N}function un(B){return typeof B=="number"&&B>-1&&B%1==0&&B<=o}function ln(B){var G=typeof B;return B!=null&&(G=="object"||G=="function")}function _r(B){return B!=null&&typeof B=="object"}var cn=fe?(function(B){return function(G){return B(G)}})(fe):function(B){return _r(B)&&un(B.length)&&!!M[Xe(B)]};function _s(B){return(G=B)!=null&&un(G.length)&&!Ut(G)?ht(B):et(B);var G}n.exports=function(B,G){return wt(B,G)}}).call(this,r(23)(i))},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(18);s.StringPredicate=n.StringPredicate;const u=r(20);s.NumberPredicate=u.NumberPredicate;const c=r(21);s.BooleanPredicate=c.BooleanPredicate;const d=r(0),f=r(22);s.ArrayPredicate=f.ArrayPredicate;const o=r(24);s.ObjectPredicate=o.ObjectPredicate;const h=r(29);s.DatePredicate=h.DatePredicate;const l=r(30);s.ErrorPredicate=l.ErrorPredicate;const p=r(31);s.MapPredicate=p.MapPredicate;const x=r(32);s.WeakMapPredicate=x.WeakMapPredicate;const w=r(33);s.SetPredicate=w.SetPredicate;const b=r(34);s.WeakSetPredicate=b.WeakSetPredicate;const g=r(35);s.AnyPredicate=g.AnyPredicate,s.default=((v,k)=>(Object.defineProperties(v,{string:{get:()=>new n.StringPredicate(k)},number:{get:()=>new u.NumberPredicate(k)},boolean:{get:()=>new c.BooleanPredicate(k)},undefined:{get:()=>new d.Predicate("undefined",k)},null:{get:()=>new d.Predicate("null",k)},nullOrUndefined:{get:()=>new d.Predicate("nullOrUndefined",k)},nan:{get:()=>new d.Predicate("nan",k)},symbol:{get:()=>new d.Predicate("symbol",k)},array:{get:()=>new f.ArrayPredicate(k)},object:{get:()=>new o.ObjectPredicate(k)},date:{get:()=>new h.DatePredicate(k)},error:{get:()=>new l.ErrorPredicate(k)},map:{get:()=>new p.MapPredicate(k)},weakMap:{get:()=>new x.WeakMapPredicate(k)},set:{get:()=>new w.SetPredicate(k)},weakSet:{get:()=>new b.WeakSetPredicate(k)},function:{get:()=>new d.Predicate("Function",k)},buffer:{get:()=>new d.Predicate("Buffer",k)},regExp:{get:()=>new d.Predicate("RegExp",k)},promise:{get:()=>new d.Predicate("Promise",k)},typedArray:{get:()=>new d.Predicate("TypedArray",k)},int8Array:{get:()=>new d.Predicate("Int8Array",k)},uint8Array:{get:()=>new d.Predicate("Uint8Array",k)},uint8ClampedArray:{get:()=>new d.Predicate("Uint8ClampedArray",k)},int16Array:{get:()=>new d.Predicate("Int16Array",k)},uint16Array:{get:()=>new d.Predicate("Uint16Array",k)},int32Array:{get:()=>new d.Predicate("Int32Array",k)},uint32Array:{get:()=>new d.Predicate("Uint32Array",k)},float32Array:{get:()=>new d.Predicate("Float32Array",k)},float64Array:{get:()=>new d.Predicate("Float64Array",k)},arrayBuffer:{get:()=>new d.Predicate("ArrayBuffer",k)},dataView:{get:()=>new d.Predicate("DataView",k)},iterable:{get:()=>new d.Predicate("Iterable",k)},any:{value:(..._)=>new g.AnyPredicate(_,k)}}),v))},function(i,s,r){var n=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(4));s.default=((c,d)=>{try{for(const f of c)u.default(f,d);return!0}catch(f){return f.message}})},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0}),s.ArgumentError=class extends Error{constructor(n,u){super(n),"captureStackTrace"in Error&&Error.captureStackTrace(this,u),this.name="ArgumentError"}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(2);s.default=function u(c,d,f){f[n.testSymbol](c,u,d)}},function(i,s,r){const n=()=>{const u=Error.prepareStackTrace;Error.prepareStackTrace=((d,f)=>f);const c=new Error().stack.slice(1);return Error.prepareStackTrace=u,c};i.exports=n,i.exports.default=n},function(i,s,r){var n=this&&this.__importStar||function(h){if(h&&h.__esModule)return h;var l={};if(h!=null)for(var p in h)Object.hasOwnProperty.call(h,p)&&(l[p]=h[p]);return l.default=h,l},u=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(s,"__esModule",{value:!0});const c=n(r(12)),d=u(r(13)),f=u(r(14)),o=/^.*?\((.*?)[,)]/;s.inferLabel=(h=>{if(!f.default)return;const l=h[1],p=l.getFileName(),x=l.getLineNumber(),w=l.getColumnNumber();if(!p||x===null||w===null)return;let b=[];try{b=c.readFileSync(p,"utf8").split(`
129
+ `)}catch{return}let g=b[x-1];if(!g)return;g=g.slice(w-1);const v=o.exec(g);if(!v||!v[1])return;const k=v[1];return d.default(k)||d.default(k.split(".").pop())?k:void 0})},function(i,s){i.exports=dt},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=/^[a-z$_][a-z$_0-9]*$/i,u=new Set(["undefined","null","true","false","super","this","Infinity","NaN"]);s.default=(c=>c&&!u.has(c)&&n.test(c))},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0}),s.default=!!(typeof process<"u"&&process.versions&&process.versions.node)},function(i,s){i.exports=dt},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(0);s.not=(u=>{const c=u.addValidator;return u.addValidator=(d=>{const f=d.validator,o=d.message;return d.message=((h,l)=>`[NOT] ${o(h,l)}`),d.validator=(h=>!f(h)),u[n.validatorSymbol].push(d),u.addValidator=c,u}),u})},function(i,s,r){var n=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(6));s.default=(c=>(Object.defineProperties(c,{optional:{get:()=>u.default({},{optional:!0})}}),c))},function(i,s,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=n(r(19)),d=r(0);s.StringPredicate=class extends d.Predicate{constructor(f){super("string",f)}length(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have length \`${f}\`, got \`${o}\``,validator:o=>o.length===f})}minLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a minimum length of \`${f}\`, got \`${o}\``,validator:o=>o.length>=f})}maxLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a maximum length of \`${f}\`, got \`${o}\``,validator:o=>o.length<=f})}matches(f){return this.addValidator({message:(o,h)=>`Expected ${h} to match \`${f}\`, got \`${o}\``,validator:o=>f.test(o)})}startsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to start with \`${f}\`, got \`${o}\``,validator:o=>o.startsWith(f)})}endsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to end with \`${f}\`, got \`${o}\``,validator:o=>o.endsWith(f)})}includes(f){return this.addValidator({message:(o,h)=>`Expected ${h} to include \`${f}\`, got \`${o}\``,validator:o=>o.includes(f)})}oneOf(f){return this.addValidator({message:(o,h)=>{let l=JSON.stringify(f);if(f.length>10){const p=f.length-10;l=JSON.stringify(f.slice(0,10)).replace(/]$/,`,…+${p} more]`)}return`Expected ${h} to be one of \`${l}\`, got \`${o}\``},validator:o=>f.includes(o)})}get empty(){return this.addValidator({message:(f,o)=>`Expected ${o} to be empty, got \`${f}\``,validator:f=>f===""})}get nonEmpty(){return this.addValidator({message:(f,o)=>`Expected ${o} to not be empty`,validator:f=>f!==""})}equals(f){return this.addValidator({message:(o,h)=>`Expected ${h} to be equal to \`${f}\`, got \`${o}\``,validator:o=>o===f})}get alphanumeric(){return this.addValidator({message:(f,o)=>`Expected ${o} to be alphanumeric, got \`${f}\``,validator:f=>/^[a-z\d]+$/i.test(f)})}get alphabetical(){return this.addValidator({message:(f,o)=>`Expected ${o} to be alphabetical, got \`${f}\``,validator:f=>/^[a-z]+$/gi.test(f)})}get numeric(){return this.addValidator({message:(f,o)=>`Expected ${o} to be numeric, got \`${f}\``,validator:f=>/^(\+|-)?\d+$/i.test(f)})}get date(){return this.addValidator({message:(f,o)=>`Expected ${o} to be a date, got \`${f}\``,validator:c.default})}get lowercase(){return this.addValidator({message:(f,o)=>`Expected ${o} to be lowercase, got \`${f}\``,validator:f=>f.trim()!==""&&f===f.toLowerCase()})}get uppercase(){return this.addValidator({message:(f,o)=>`Expected ${o} to be uppercase, got \`${f}\``,validator:f=>f.trim()!==""&&f===f.toUpperCase()})}get url(){return this.addValidator({message:(f,o)=>`Expected ${o} to be a URL, got \`${f}\``,validator:u.default.urlString})}}},function(i,s,r){i.exports=function(n){return!isNaN(Date.parse(n))}},function(i,s,r){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=r(0);s.NumberPredicate=class extends c.Predicate{constructor(d){super("number",d)}inRange(d,f){return this.addValidator({message:(o,h)=>`Expected ${h} to be in range [${d}..${f}], got ${o}`,validator:o=>u.default.inRange(o,[d,f])})}greaterThan(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be greater than ${d}, got ${f}`,validator:f=>f>d})}greaterThanOrEqual(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be greater than or equal to ${d}, got ${f}`,validator:f=>f>=d})}lessThan(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be less than ${d}, got ${f}`,validator:f=>f<d})}lessThanOrEqual(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be less than or equal to ${d}, got ${f}`,validator:f=>f<=d})}equal(d){return this.addValidator({message:(f,o)=>`Expected ${o} to be equal to ${d}, got ${f}`,validator:f=>f===d})}oneOf(d){return this.addValidator({message:(f,o)=>{let h=JSON.stringify(d);if(d.length>10){const l=d.length-10;h=JSON.stringify(d.slice(0,10)).replace(/]$/,`,…+${l} more]`)}return`Expected ${o} to be one of \`${h}\`, got ${f}`},validator:f=>d.includes(f)})}get integer(){return this.addValidator({message:(d,f)=>`Expected ${f} to be an integer, got ${d}`,validator:d=>u.default.integer(d)})}get finite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be finite, got ${d}`,validator:d=>!u.default.infinite(d)})}get infinite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be infinite, got ${d}`,validator:d=>u.default.infinite(d)})}get positive(){return this.addValidator({message:(d,f)=>`Expected ${f} to be positive, got ${d}`,validator:d=>d>0})}get negative(){return this.addValidator({message:(d,f)=>`Expected ${f} to be negative, got ${d}`,validator:d=>d<0})}get integerOrInfinite(){return this.addValidator({message:(d,f)=>`Expected ${f} to be an integer or infinite, got ${d}`,validator:d=>u.default.integer(d)||u.default.infinite(d)})}get uint8(){return this.integer.inRange(0,255)}get uint16(){return this.integer.inRange(0,65535)}get uint32(){return this.integer.inRange(0,4294967295)}get int8(){return this.integer.inRange(-128,127)}get int16(){return this.integer.inRange(-32768,32767)}get int32(){return this.integer.inRange(-2147483648,2147483647)}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(0);s.BooleanPredicate=class extends n.Predicate{constructor(u){super("boolean",u)}get true(){return this.addValidator({message:(u,c)=>`Expected ${c} to be true, got ${u}`,validator:u=>u===!0})}get false(){return this.addValidator({message:(u,c)=>`Expected ${c} to be false, got ${u}`,validator:u=>u===!1})}}},function(i,s,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(5)),c=n(r(4)),d=r(0);s.ArrayPredicate=class extends d.Predicate{constructor(f){super("array",f)}length(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have length \`${f}\`, got \`${o.length}\``,validator:o=>o.length===f})}minLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a minimum length of \`${f}\`, got \`${o.length}\``,validator:o=>o.length>=f})}maxLength(f){return this.addValidator({message:(o,h)=>`Expected ${h} to have a maximum length of \`${f}\`, got \`${o.length}\``,validator:o=>o.length<=f})}startsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to start with \`${f}\`, got \`${o[0]}\``,validator:o=>o[0]===f})}endsWith(f){return this.addValidator({message:(o,h)=>`Expected ${h} to end with \`${f}\`, got \`${o[o.length-1]}\``,validator:o=>o[o.length-1]===f})}includes(...f){return this.addValidator({message:(o,h)=>`Expected ${h} to include all elements of \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>f.every(h=>o.indexOf(h)!==-1)})}includesAny(...f){return this.addValidator({message:(o,h)=>`Expected ${h} to include any element of \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>f.some(h=>o.indexOf(h)!==-1)})}get empty(){return this.addValidator({message:(f,o)=>`Expected ${o} to be empty, got \`${JSON.stringify(f)}\``,validator:f=>f.length===0})}get nonEmpty(){return this.addValidator({message:(f,o)=>`Expected ${o} to not be empty`,validator:f=>f.length>0})}deepEqual(f){return this.addValidator({message:(o,h)=>`Expected ${h} to be deeply equal to \`${JSON.stringify(f)}\`, got \`${JSON.stringify(o)}\``,validator:o=>u.default(o,f)})}ofType(f){let o;return this.addValidator({message:(h,l)=>`(${l}) ${o}`,validator:h=>{try{for(const l of h)c.default(l,f);return!0}catch(l){return o=l.message,!1}}})}}},function(i,s){i.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(i,s,r){var n=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=n(r(25)),d=n(r(5)),f=r(0),o=n(r(3)),h=n(r(7)),l=n(r(27)),p=r(28);s.ObjectPredicate=class extends f.Predicate{constructor(x){super("object",x)}get plain(){return this.addValidator({message:(x,w)=>`Expected ${w} to be a plain object`,validator:x=>u.default.plainObject(x)})}get empty(){return this.addValidator({message:(x,w)=>`Expected ${w} to be empty, got \`${JSON.stringify(x)}\``,validator:x=>Object.keys(x).length===0})}get nonEmpty(){return this.addValidator({message:(x,w)=>`Expected ${w} to not be empty`,validator:x=>Object.keys(x).length>0})}valuesOfType(x){return this.addValidator({message:(w,b,g)=>`(${b}) ${g}`,validator:w=>{const b=Object.keys(w).map(g=>w[g]);return h.default(b,x)}})}deepValuesOfType(x){return this.addValidator({message:(w,b,g)=>`(${b}) ${g}`,validator:w=>l.default(w,x)})}deepEqual(x){return this.addValidator({message:(w,b)=>`Expected ${b} to be deeply equal to \`${JSON.stringify(x)}\`, got \`${JSON.stringify(w)}\``,validator:w=>d.default(w,x)})}instanceOf(x){return this.addValidator({message:(w,b)=>{let g=w.constructor.name;return g&&g!=="Object"||(g=JSON.stringify(w)),`Expected ${b} \`${g}\` to be of type \`${x.name}\``},validator:w=>w instanceof x})}hasKeys(...x){return this.addValidator({message:(w,b,g)=>`Expected ${b} to have keys \`${JSON.stringify(g)}\``,validator:w=>o.default({has:b=>c.default.has(w,b)},x)})}hasAnyKeys(...x){return this.addValidator({message:(w,b)=>`Expected ${b} to have any key of \`${JSON.stringify(x)}\``,validator:w=>x.some(b=>c.default.has(w,b))})}partialShape(x){return this.addValidator({message:(w,b,g)=>`${g.replace("Expected","Expected property")} in ${b}`,validator:w=>p.partial(w,x)})}exactShape(x){return this.addValidator({message:(w,b,g)=>`${g.replace("Expected","Expected property")} in ${b}`,validator:w=>p.exact(w,x)})}}},function(i,s,r){const n=r(26);function u(c){const d=c.split("."),f=[];for(let o=0;o<d.length;o++){let h=d[o];for(;h[h.length-1]==="\\"&&d[o+1]!==void 0;)h=h.slice(0,-1)+".",h+=d[++o];f.push(h)}return f}i.exports={get(c,d,f){if(!n(c)||typeof d!="string")return f===void 0?c:f;const o=u(d);for(let h=0;h<o.length;h++){if(!Object.prototype.propertyIsEnumerable.call(c,o[h]))return f;if((c=c[o[h]])==null){if(h!==o.length-1)return f;break}}return c},set(c,d,f){if(!n(c)||typeof d!="string")return c;const o=c,h=u(d);for(let l=0;l<h.length;l++){const p=h[l];n(c[p])||(c[p]={}),l===h.length-1&&(c[p]=f),c=c[p]}return o},delete(c,d){if(!n(c)||typeof d!="string")return;const f=u(d);for(let o=0;o<f.length;o++){const h=f[o];if(o===f.length-1)return void delete c[h];if(c=c[h],!n(c))return}},has(c,d){if(!n(c)||typeof d!="string")return!1;const f=u(d);for(let o=0;o<f.length;o++){if(!n(c)||!(f[o]in c))return!1;c=c[f[o]]}return!0}}},function(i,s,r){i.exports=function(n){var u=typeof n;return n!==null&&(u==="object"||u==="function")}},function(i,s,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=n(r(4)),d=(f,o)=>u.default.plainObject(f)?Object.keys(f).every(h=>d(f[h],o)):(c.default(f,o),!0);s.default=((f,o)=>{try{return d(f,o)}catch(h){return h.message}})},function(i,s,r){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(1)),c=n(r(9)),d=r(2);s.partial=function f(o,h,l){try{for(const p of Object.keys(h)){const x=l?`${l}.${p}`:p;if(d.isPredicate(h[p]))c.default(o[p],x,h[p]);else if(u.default.plainObject(h[p])){const w=f(o[p],h[p],x);if(w!==!0)return w}}return!0}catch(p){return p.message}},s.exact=function f(o,h,l){try{const p=new Set(Object.keys(o));for(const x of Object.keys(h)){p.delete(x);const w=l?`${l}.${x}`:x;if(d.isPredicate(h[x]))c.default(o[x],w,h[x]);else if(u.default.plainObject(h[x])){if(!Object.prototype.hasOwnProperty.call(o,x))return`Expected \`${w}\` to exist`;const b=f(o[x],h[x],w);if(b!==!0)return b}}if(p.size>0){const x=Array.from(p.keys())[0];return`Did not expect property \`${l?`${l}.${x}`:x}\` to exist, got \`${o[x]}\``}return!0}catch(p){return p.message}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(0);s.DatePredicate=class extends n.Predicate{constructor(u){super("date",u)}before(u){return this.addValidator({message:(c,d)=>`Expected ${d} ${c.toISOString()} to be before ${u.toISOString()}`,validator:c=>c.getTime()<u.getTime()})}after(u){return this.addValidator({message:(c,d)=>`Expected ${d} ${c.toISOString()} to be after ${u.toISOString()}`,validator:c=>c.getTime()>u.getTime()})}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(0);s.ErrorPredicate=class extends n.Predicate{constructor(u){super("error",u)}name(u){return this.addValidator({message:(c,d)=>`Expected ${d} to have name \`${u}\`, got \`${c.name}\``,validator:c=>c.name===u})}message(u){return this.addValidator({message:(c,d)=>`Expected ${d} message to be \`${u}\`, got \`${c.message}\``,validator:c=>c.message===u})}messageIncludes(u){return this.addValidator({message:(c,d)=>`Expected ${d} message to include \`${u}\`, got \`${c.message}\``,validator:c=>c.message.includes(u)})}hasKeys(...u){return this.addValidator({message:(c,d)=>`Expected ${d} message to have keys \`${u.join("`, `")}\``,validator:c=>u.every(d=>c.hasOwnProperty(d))})}instanceOf(u){return this.addValidator({message:(c,d)=>`Expected ${d} \`${c.name}\` to be of type \`${u.name}\``,validator:c=>c instanceof u})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}},function(i,s,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(5)),c=r(0),d=n(r(3)),f=n(r(7));s.MapPredicate=class extends c.Predicate{constructor(o){super("Map",o)}size(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have size \`${o}\`, got \`${h.size}\``,validator:h=>h.size===o})}minSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a minimum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size>=o})}maxSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a maximum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size<=o})}hasKeys(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have keys \`${JSON.stringify(p)}\``,validator:h=>d.default(h,o)})}hasAnyKeys(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any key of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>h.has(l))})}hasValues(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have values \`${JSON.stringify(p)}\``,validator:h=>d.default(new Set(h.values()),o)})}hasAnyValues(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any value of \`${JSON.stringify(o)}\``,validator:h=>{const l=new Set(h.values());return o.some(p=>l.has(p))}})}keysOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h.keys(),o)})}valuesOfType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h.values(),o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(Array.from(o))}\``,validator:o=>o.size===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>o.size>0})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(Array.from(o))}\`, got \`${JSON.stringify(Array.from(h))}\``,validator:h=>u.default(h,o)})}}},function(i,s,r){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(s,"__esModule",{value:!0});const u=r(0),c=n(r(3));s.WeakMapPredicate=class extends u.Predicate{constructor(d){super("WeakMap",d)}hasKeys(...d){return this.addValidator({message:(f,o,h)=>`Expected ${o} to have keys \`${JSON.stringify(h)}\``,validator:f=>c.default(f,d)})}hasAnyKeys(...d){return this.addValidator({message:(f,o)=>`Expected ${o} to have any key of \`${JSON.stringify(d)}\``,validator:f=>d.some(o=>f.has(o))})}}},function(i,s,r){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(s,"__esModule",{value:!0});const u=n(r(5)),c=r(0),d=n(r(3)),f=n(r(7));s.SetPredicate=class extends c.Predicate{constructor(o){super("Set",o)}size(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have size \`${o}\`, got \`${h.size}\``,validator:h=>h.size===o})}minSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a minimum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size>=o})}maxSize(o){return this.addValidator({message:(h,l)=>`Expected ${l} to have a maximum size of \`${o}\`, got \`${h.size}\``,validator:h=>h.size<=o})}has(...o){return this.addValidator({message:(h,l,p)=>`Expected ${l} to have items \`${JSON.stringify(p)}\``,validator:h=>d.default(h,o)})}hasAny(...o){return this.addValidator({message:(h,l)=>`Expected ${l} to have any item of \`${JSON.stringify(o)}\``,validator:h=>o.some(l=>h.has(l))})}ofType(o){return this.addValidator({message:(h,l,p)=>`(${l}) ${p}`,validator:h=>f.default(h,o)})}get empty(){return this.addValidator({message:(o,h)=>`Expected ${h} to be empty, got \`${JSON.stringify(Array.from(o))}\``,validator:o=>o.size===0})}get nonEmpty(){return this.addValidator({message:(o,h)=>`Expected ${h} to not be empty`,validator:o=>o.size>0})}deepEqual(o){return this.addValidator({message:(h,l)=>`Expected ${l} to be deeply equal to \`${JSON.stringify(Array.from(o))}\`, got \`${JSON.stringify(Array.from(h))}\``,validator:h=>u.default(h,o)})}}},function(i,s,r){var n=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(s,"__esModule",{value:!0});const u=r(0),c=n(r(3));s.WeakSetPredicate=class extends u.Predicate{constructor(d){super("WeakSet",d)}has(...d){return this.addValidator({message:(f,o,h)=>`Expected ${o} to have items \`${JSON.stringify(h)}\``,validator:f=>c.default(f,d)})}hasAny(...d){return this.addValidator({message:(f,o)=>`Expected ${o} to have any item of \`${JSON.stringify(d)}\``,validator:f=>d.some(o=>f.has(o))})}}},function(i,s,r){Object.defineProperty(s,"__esModule",{value:!0});const n=r(8),u=r(2);s.AnyPredicate=class{constructor(c,d={}){this.predicates=c,this.options=d}[u.testSymbol](c,d,f){const o=["Any predicate failed with the following errors:"];for(const h of this.predicates)try{return void d(c,f,h)}catch(l){if(c===void 0&&this.options.optional===!0)return;o.push(`- ${l.message}`)}throw new n.ArgumentError(o.join(`
130
130
  `),d)}}}]);const a=e.exports;e.exports=a.default,Object.assign(e.exports,a)})(Vs)),Vs.exports}var Us={},Tn={},wu;function ph(){if(wu)return Tn;wu=1,Object.defineProperty(Tn,"__esModule",{value:!0});let e=class Mi{constructor(i){this.pretty=!1,this.pretty=i}format(i,s){const r=Object.assign({},s,i);return this.pretty?JSON.stringify(r,void 0,2)+`
131
131
  `:JSON.stringify(r)}getName(){return this.pretty?Mi.FORMAT_NAME_PRETTY:Mi.FORMAT_NAME}};return e.FORMAT_NAME="json",e.FORMAT_NAME_PRETTY="json_pretty",Tn.JsonLogFormat=e,Tn}var On={},zs={},_u;function ps(){return _u||(_u=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),(function(a){a.EMPTY_METADATA={};function i(s){let r=s.service?`${s.service}.`:s.project?`${s.project}.`:"";return r+=s.module?`${s.module}.`:"",r+=s.library?`[${s.library}].`:"",r+=s.tag||"",r||(r="universe-log-empty-id"),r}a.getBestIdentifier=i})(e.LogMetadata||(e.LogMetadata={}))})(zs)),zs}var Pn={},ku;function qc(){if(ku)return Pn;ku=1,Object.defineProperty(Pn,"__esModule",{value:!0});let e=class{static getTimestamp(){return Date.now()}static getUTCISOTime(){return new Date().toISOString()}};return Pn.TimeUtils=e,Pn}var Nu;function mh(){if(Nu)return On;Nu=1,Object.defineProperty(On,"__esModule",{value:!0});const e=ps(),a=qc();let i=class Bc{format(r,n){const u=r.time_iso||new Date(r.timestamp).toISOString()||a.TimeUtils.getUTCISOTime();return`${e.LogMetadata.getBestIdentifier(n)} | ${u} [${r.level}]: ${r.message}`+this.includeStackIfPresent(r)}getName(){return Bc.FORMAT_NAME}includeStackIfPresent(r){return r.error&&r.error.stack?`
132
- ${r.error.stack}`:""}};return i.FORMAT_NAME="oneline",On.OnelineLogFormat=i,On}var ju;function ms(){return ju||(ju=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=hs(),i=ph(),s=mh();(function(r){r.FORMATS={json:new i.JsonLogFormat(!1),json_pretty:new i.JsonLogFormat(!0),oneline:new s.OnelineLogFormat},r.KEYS=Object.freeze({json:"json",json_pretty:"json_pretty",oneline:"oneline"}),r.DEFAULT_FORMAT=r.FORMATS.oneline;function n(u){if(typeof r.FORMATS[u]>"u"){const c=Object.keys(r.FORMATS).join(",");throw new a.UniverseLogError(`There is no such log format: '${u}'. Available formats: [ ${c} ]`)}return r.FORMATS[u]}r.valueOf=n})(e.LogFormats||(e.LogFormats={}))})(Us)),Us}var Ln={},Eu;function gh(){if(Eu)return Ln;Eu=1,Object.defineProperty(Ln,"__esModule",{value:!0});let e=class{static log(i){console.error(`UniverseLog.FallbackLog: ${i}`)}};return Ln.FallbackLog=e,Ln}var $n={},Au;function Vc(){if(Au)return $n;Au=1,Object.defineProperty($n,"__esModule",{value:!0});const e=hs(),a=new Function("try {return this===window;}catch(e){ return false;}"),i=new Function("try {return this===global;}catch(e){return false;}"),s=new Function("try {return this;}catch(e){return undefined}");function r(c){const d=s();if(!d)throw new e.UniverseLogError("PortableEnv: environment is browser, but could not get window object");return d[c]}function n(c){if(!process)throw new e.UniverseLogError("PortableEnv: environment is node, but process object does not exist");if(!process.env)throw new e.UniverseLogError("PortableEnv: environment is node, but process.env object does not exist");if(process.env[c])return process.env[c]}function u(c){if(a())return r(c);if(i())return n(c);throw new e.UniverseLogError("PortableEnv: unknown environment (not browser, not node)")}return $n.PortableEnv=u,$n}var Mn={},Su;function Uc(){if(Su)return Mn;Su=1,Object.defineProperty(Mn,"__esModule",{value:!0});class e{}return e.LEAST_LEVEL_ENV="LOG_LEVEL",e.LOG_FORMAT_ENV="LOG_FORMAT",e.LOG_METADATA_ENV="LOG_METADATA",e.REEVALUATE_CONFIG_AFTER_MS=150,e.DEFAULT_LOG_FN=a=>console.error(a),Mn.StaticConfig=e,Mn}var Cu;function bh(){if(Cu)return ta;Cu=1;var e=ta&&ta.__rest||function(f,o){var h={};for(var l in f)Object.prototype.hasOwnProperty.call(f,l)&&o.indexOf(l)<0&&(h[l]=f[l]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,l=Object.getOwnPropertySymbols(f);p<l.length;p++)o.indexOf(l[p])<0&&Object.prototype.propertyIsEnumerable.call(f,l[p])&&(h[l[p]]=f[l[p]]);return h};Object.defineProperty(ta,"__esModule",{value:!0});const a=Fc(),i=ms(),s=gh(),r=an(),n=ps(),u=Vc(),c=Uc();let d=class{constructor(o){this.levelEvaluationEnvNames=[],this.level=r.LogLevel.DEFAULT_LEVEL,this.metadata=n.LogMetadata.EMPTY_METADATA,this.nextReevaluateTimestampMs=0,this.levelEvaluationEnvNames=o.levelEvaluationEnvNames,a.default(this.levelEvaluationEnvNames,"levelEvaluationEnvNames",a.default.array.ofType(a.default.string)),this.fallbackLog=o.fallbackLog,a.default(this.fallbackLog,"fallbackLog",a.default.function),this.defaultFormat=o.defaultFormat,a.default(this.defaultFormat,"defaultFormat",a.default.object),this.format=this.defaultFormat,this.evaluateIfRequired()}setLevelEvaluationEnvNames(o){this.levelEvaluationEnvNames=o,this.evaluateIfRequired()}getLevel(){return this.level}getFormat(){return this.format}getMetadata(){return this.metadata}evaluateIfRequired(){if(!(Date.now()<this.nextReevaluateTimestampMs))try{this.nextReevaluateTimestampMs=Date.now()+c.StaticConfig.REEVALUATE_CONFIG_AFTER_MS,this.evaluate()}catch(o){this.fallbackLog(`Could not evaluate live log config: ${o}: ${o.stack}`)}}evaluate(){this.format=this.evaluateFormat(),this.level=this.evaluateLogLevel(),this.metadata=this.evaluateMetadata()}evaluateFormat(){const o=u.PortableEnv(c.StaticConfig.LOG_FORMAT_ENV);return o?i.LogFormats.valueOf(o):this.defaultFormat}evaluateLogLevel(){const o=this.chooseMostVerboseLevel(this.getEnvValues(this.levelEvaluationEnvNames));if(o)return o;const h=this.chooseMostVerboseLevel(this.getEnvValues([c.StaticConfig.LEAST_LEVEL_ENV]));return h||r.LogLevel.DEFAULT_LEVEL}getEnvValues(o){return o.map(l=>u.PortableEnv(l)).filter(l=>!!l).map(l=>l||"unreachable")}chooseMostVerboseLevel(o){const h=o.map(p=>r.LogLevel.valueOf(p));return h.length===0?void 0:h.reduce((p,x)=>r.LogLevel.moreVerbose(p,x))}evaluateMetadata(){try{const o=u.PortableEnv(c.StaticConfig.LOG_METADATA_ENV);if(o){const h=JSON.parse(o);return this.removeTagFromMetadata(h)}}catch(o){s.FallbackLog.log(`Could not parse value of ${c.StaticConfig.LOG_METADATA_ENV} env: ${o}`)}return n.LogMetadata.EMPTY_METADATA}removeTagFromMetadata(o){const{tag:h}=o;return e(o,["tag"])}};return ta.LiveLogConfig=d,ta}var Rn={},Du;function xh(){if(Du)return Rn;Du=1,Object.defineProperty(Rn,"__esModule",{value:!0});const e=ds(),a=an(),i=qc();let s=class Gt{static parse(n,u){let c=Gt.basicLogMsg(n);for(const d of u)c=Object.assign({},c,Gt.parseElem(d,c));return c}static basicLogMsg(n){return{time_iso:i.TimeUtils.getUTCISOTime(),timestamp:i.TimeUtils.getTimestamp(),level:n,level_value:a.LogLevel.LEVELS_VALUES[n]}}static parseElem(n,u){return typeof n=="string"?Gt.parseString(n,u):n instanceof Error?Gt.parseError(n,u):typeof n=="object"?Gt.parseObject(n,u):Gt.parseOther(n,u)}static parseString(n,u){return{message:(u.message?u.message+"; ":"")+n}}static parseError(n,u){const c={};return c.message=(u.message?u.message+"; ":"")+(n+"").trim(),u.error?(c.other_errors=[...u.other_errors||[]],c.other_errors.push(Gt.errorToObj(n))):c.error=Gt.errorToObj(n),c}static errorToObj(n){return n instanceof e.default?Object.assign({name:n.name,message:n.message,stack:n.stack},n.cause?{cause:Gt.errorToObj(n.cause)}:{}):{name:n.name,message:n.message,stack:n.stack}}static parseObject(n,u){return Object.assign({},n)}static parseOther(n,u){return{others:[...u.others||[],n]}}};return Rn.ParseLogMsg=s,Rn}var Hs={},Tu;function zc(){return Tu||(Tu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=Fc(),i=ms();(function(s){function r(n){a.default(n.levelEnvs,"Properties.levelEnvs",a.default.any(a.default.undefined,a.default.array.ofType(a.default.string))),a.default(n.metadata,"Properties.metadata",a.default.optional.object),a.default(n.logFn,"Properties.logFn",a.default.any(a.default.undefined,a.default.function)),a.default(n.defaultFormat,"Properties.defaultFormat",a.default.optional.string.oneOf(Object.keys(i.LogFormats.KEYS)))}s.validate=r})(e.Properties||(e.Properties={}))})(Hs)),Hs}var Ou;function Wc(){if(Ou)return Dn;Ou=1,Object.defineProperty(Dn,"__esModule",{value:!0});const e=bh(),a=an(),i=ps(),s=Uc(),r=ms(),n=xh(),u=zc();let c=class Hc{constructor(f){if(this.instanceMetadata=i.LogMetadata.EMPTY_METADATA,"clone"in f){this.instanceMetadata=Object.assign({},f.clone.instanceMetadata,f.newMetadata),this.liveConfig=f.clone.liveConfig,this.logFn=f.clone.logFn;return}u.Properties.validate(f),f.metadata&&(this.instanceMetadata=f.metadata),f.logFn?this.logFn=f.logFn:this.logFn=s.StaticConfig.DEFAULT_LOG_FN;const o=f.defaultFormat?r.LogFormats.valueOf(f.defaultFormat):r.LogFormats.DEFAULT_FORMAT;this.liveConfig=new e.LiveLogConfig({levelEvaluationEnvNames:f.levelEnvs||[],fallbackLog:this.logFn,defaultFormat:o})}cloneWithMetadata(f){return new Hc({clone:this,newMetadata:f})}getLevel(){return this.liveConfig.getLevel()}getFormatName(){return this.liveConfig.getFormat().getName()}getMetadata(){return Object.assign({},this.instanceMetadata,this.liveConfig.getMetadata())}doEfficientLog(f,o){this.reevaluateConfigIfRequired();const h=a.LogLevel.LEVELS_VALUES[this.getLevel()];a.LogLevel.LEVELS_VALUES[f]<=h&&this.doLog(f,o())}doLog(f,...o){if(this.reevaluateConfigIfRequired(),o.length!==0&&(o.length===1&&Array.isArray(o[0])&&(o=o[0]),a.LogLevel.isLessOrEquallyVerbose({level:f,threshold:this.getLevel()}))){const h=n.ParseLogMsg.parse(f,o),l=this.liveConfig.getFormat().format(h,this.getMetadata());this.rawWriteToLog(l)}}rawWriteToLog(f){this.logFn(f)}reevaluateConfigIfRequired(){this.liveConfig.evaluateIfRequired()}};return Dn.LogEngine=c,Dn}var Pu;function Gc(){if(Pu)return Sn;Pu=1,Object.defineProperty(Sn,"__esModule",{value:!0});const e=an(),a=Wc();let i=class{constructor(r){r instanceof a.LogEngine?this.logEngine=r:this.logEngine=new a.LogEngine(r)}getLevel(){return this.logEngine.getLevel()}getFormatName(){return this.logEngine.getFormatName()}getMetadata(){return this.logEngine.getMetadata()}isDebug(){return e.LogLevel.LEVELS_VALUES[this.getLevel()]>=e.LogLevel.LEVELS_VALUES.debug}error(...r){this.doLog(e.LogLevel.error,r)}errorGen(r){this.doEfficientLog(e.LogLevel.error,r)}warn(...r){this.doLog(e.LogLevel.warn,r)}warnGen(r){this.doEfficientLog(e.LogLevel.warn,r)}info(...r){this.doLog(e.LogLevel.info,r)}infoGen(r){this.doEfficientLog(e.LogLevel.info,r)}http(...r){this.doLog(e.LogLevel.http,r)}httpGen(r){this.doEfficientLog(e.LogLevel.http,r)}verbose(...r){this.doLog(e.LogLevel.verbose,r)}verboseGen(r){this.doEfficientLog(e.LogLevel.verbose,r)}debug(...r){this.doLog(e.LogLevel.debug,r)}debugGen(r){this.doEfficientLog(e.LogLevel.debug,r)}silly(...r){this.doLog(e.LogLevel.silly,r)}sillyGen(r){this.doEfficientLog(e.LogLevel.silly,r)}doEfficientLog(r,n){this.logEngine.doEfficientLog(r,n)}doLog(r,...n){this.logEngine.doLog(r,...n)}getEngine(){return this.logEngine}};return Sn.AbstractUniverseLog=i,Sn}var In={},Lu;function yh(){if(Lu)return In;Lu=1,Object.defineProperty(In,"__esModule",{value:!0});const e=Gc();let a=class Jc extends e.AbstractUniverseLog{constructor(s){super(s)}tag(s){return new Jc(super.getEngine().cloneWithMetadata({tag:s}))}};return In.BasicTaggedUniverseLog=a,In}var $u;function vh(){if($u)return At;$u=1,Object.defineProperty(At,"__esModule",{value:!0});var e=Gc();At.AbstractUniverseLog=e.AbstractUniverseLog;var a=Wc();At.LogEngine=a.LogEngine;var i=zc();At.UniverseLogProperties=i.Properties;var s=yh();At.BasicTaggedUniverseLog=s.BasicTaggedUniverseLog;var r=ps();At.LogMetadata=r.LogMetadata;var n=an();At.LogLevel=n.LogLevel;var u=Vc();At.PortableEnv=u.PortableEnv;var c=hs();At.UniverseLogError=c.UniverseLogError;var d=ms();return At.LogFormats=d.LogFormats,At}var Mu;function ir(){if(Mu)return Ba;Mu=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.Log=void 0;const e=vh();let a=class Yc extends e.AbstractUniverseLog{static log(){return Yc.INSTANCE}constructor(){super({levelEnvs:["HIVE_CONTENT_RENDERER_LOG_LEVEL","ENGRAVE_LOG_LEVEL"],metadata:{library:"@hiveio/content-renderer"}})}};return Ba.Log=a,a.INSTANCE=new a,Ba}var Or={},Va={},Ru;function wh(){if(Ru)return Va;Ru=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.Phishing=void 0;const e=["steewit.com","śteemit.com","ŝteemit.com","şteemit.com","šteemit.com","sţeemit.com","sťeemit.com","șteemit.com","sleemit.com","aba.ae","autobidbot.cf","autobidbot.ga","autobidbot.gq","autobotsteem.cf","autobotsteem.ga","autobotsteem.gq","autobotsteem.ml","autosteem.info","autosteembot.cf","autosteembot.ga","autosteembot.gq","autosteembot.ml","autosteemit.wapka.mobi","boostbot.ga","boostbot.gq","boostwhaleup.cf","cutt.us","dereferer.me","eb2a.com","lordlinkers.tk","nullrefer.com","steeemit.ml","steeemitt.aba.ae","steemart.ga","steemautobot.bid","steemautobot.cf","steemautobot.trade","steemers.aba.ae","steemiit.cf","steemiit.ga","steemij.tk","steemik.ga","steemik.tk","steemil.com","steemil.ml","steemir.tk","steemitou.co.nf","steemitservices.ga","steemitservices.gq","steemiz.tk","steemnow.cf","steemnow.ga","steemnow.gq","steemnow.ml","steempostupper.win","steemrewards.ml","steemrobot.ga","steemrobot.ml","steemupgot.cf","steemupgot.ga","steemupgot.gq","steemupper.cf","steemupper.ga","steemupper.gq","steemupper.ml","steenit.cf","stemit.com","stssmater.aba.ae","uppervotes.ga","uppervotes.gq","upperwhaleplus.cf","upperwhaleplus.ga","upperwhaleplus.gq","upvoteme.cf","upvoteme.ga","upvoteme.gq","upvoteme.ml","url.rw","us.aba.ae","whaleboostup.ga","whaleboostup.ml"];let a=class{};return Va.Phishing=a,a.looksPhishy=i=>{for(const s of e)if(i.toLocaleLowerCase().indexOf(s)>-1)return!0;return!1},Va}var Iu;function _h(){if(Iu)return Or;Iu=1;var e=Or&&Or.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Or,"__esModule",{value:!0}),Or.LinkSanitizer=void 0;const a=e(rn()),i=ir(),s=wh();let r=class Zc{constructor(u){this.validate(u),this.options=u,this.baseUrl=new URL(this.options.baseUrl),this.topLevelsBaseDomain=Zc.getTopLevelBaseDomainFromBaseUrl(this.baseUrl)}sanitizeLink(u,c){return u=this.prependUnknownProtocolLink(u),i.Log.log().debug("LinkSanitizer#sanitizeLink",{url:u,urlTitle:c}),s.Phishing.looksPhishy(u)?(i.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","phishing list",u,{url:u,urlTitle:c}),!1):this.isPseudoLocalUrl(u,c)?(i.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","pseudo local url",u,{url:u,urlTitle:c}),!1):u}static getTopLevelBaseDomainFromBaseUrl(u){const d=/([^\s/$.?#]+\.[^\s/$.?#]+)$/g.exec(u.hostname);if(d&&d[0])return d[0];throw new Error(`LinkSanitizer: could not determine top level base domain from baseUrl hostname: ${u.hostname}`)}prependUnknownProtocolLink(u){return/^((#)|(\/(?!\/))|(((hive|https?):)?\/\/))/.test(u)||(u="https://"+u),u}isPseudoLocalUrl(u,c){if(u.indexOf("#")===0)return!1;u=u.toLowerCase(),c=c.toLowerCase();try{const d=c.indexOf(this.topLevelsBaseDomain)!==-1,f=u.indexOf(this.topLevelsBaseDomain)!==-1;if(d&&!f)return!0}catch(d){if(d instanceof TypeError)return!1;throw d}return!1}validate(u){(0,a.default)(u,"LinkSanitizerOptions",a.default.object),(0,a.default)(u.baseUrl,"LinkSanitizerOptions.baseUrl",a.default.string.nonEmpty)}};return Or.LinkSanitizer=r,Or}var Pr={},Fu;function Gi(){if(Fu)return Pr;Fu=1;var e=Pr&&Pr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.Localization=void 0;const a=e(rn());let i=class{static validate(r){(0,a.default)(r,"LocalizationOptions",a.default.object),(0,a.default)(r.phishingWarning,"LocalizationOptions.phishingWarning",a.default.string.nonEmpty),(0,a.default)(r.externalLink,"LocalizationOptions.externalLink",a.default.string.nonEmpty),(0,a.default)(r.noImage,"LocalizationOptions.noImage",a.default.string.nonEmpty),(0,a.default)(r.accountNameWrongLength,"LocalizationOptions.accountNameWrongLength",a.default.string.nonEmpty),(0,a.default)(r.accountNameBadActor,"LocalizationOptions.accountNameBadActor",a.default.string.nonEmpty),(0,a.default)(r.accountNameWrongSegment,"LocalizationOptions.accountNameWrongSegment",a.default.string.nonEmpty)}};return Pr.Localization=i,i.DEFAULT={phishingWarning:"Link expanded to plain text; beware of a potential phishing attempt",externalLink:"This link will take you away from example.com",noImage:"Images not allowed",accountNameWrongLength:"Account name should be between 3 and 16 characters long",accountNameBadActor:"This account is on a bad actor list",accountNameWrongSegment:"This account name contains a bad segment"},Pr}var Lr={},Ua={},qu;function Hr(){if(qu)return Ua;qu=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.AbstractEmbedder=void 0;let e=class{static getEmbedMarker(i,s){return`~~~ embed:${i} ${s} ~~~`}static insertAllEmbeds(i,s,r){const n=[];for(let u of s.split("~~~ embed:")){const c=u.match(/^([A-Za-z0-9?/=_-]+) ([^ ]*) ~~~/);if(c&&c.length>=3){const d=c[1],f=c[2];for(const o of i)if(o.type==f){n.push(o.processEmbed(d,r));break}if(u=u.substring(`${d} ${f} ~~~`.length),u==="")continue}n.push(u)}return n.join("")}};return Ua.AbstractEmbedder=e,Ua}var za={},Bu;function kh(){if(Bu)return za;Bu=1,Object.defineProperty(za,"__esModule",{value:!0}),za.SpotifyEmbedder=void 0;const e=ir(),a=Hr();let i=class Ri extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="spotify"}static extractMetadata(r){if(!r)return;const n=r.match(Ri.regex.main);return!n||n.length<2?void 0:{id:`${n[1]==="show"||n[1]==="episode"?"embed-podcast":"embed"}/${n[1]}/${n[2]}`,url:n[0],canonical:`https://open.spotify.com/${n[1]}/${n[2]}`}}getEmbedMetadata(r){try{const n=Ri.extractMetadata(r.data);return n?{id:n.id,url:n.url,image:n.canonical}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(r,n){return`<div class="videoWrapper"><iframe src="${`https://open.spotify.com/${r}`}" width="${n.width}" height="${n.height}" frameBorder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe></div>`}};return za.SpotifyEmbedder=i,i.regex={main:/https?:\/\/open.spotify.com\/(playlist|show|episode|album|track|artist)\/(.*)/i,sanitize:/^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|album|track|artist)\/(.*)/i},za}var Ha={},Vu;function Nh(){if(Vu)return Ha;Vu=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.ThreeSpeakEmbedder=void 0;const e=ir(),a=Hr();let i=class Xc extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="3speak"}getEmbedMetadata(r){const n=typeof r=="string"?r:r.data;try{const u=n.match(Xc.linkRegex);if(u&&u[1])return{id:u[1],url:n}}catch(u){e.Log.log().error(u)}}processEmbed(r,n){const u=`https://3speak.tv/embed?v=${r}`;return`<div class="threeSpeakWrapper"><iframe width="${n.width}" height="${n.height}" src="${u}" frameborder="0" allowfullscreen></iframe></div>`}};return Ha.ThreeSpeakEmbedder=i,i.linkRegex=/^(?:https?:\/\/)?(?:(?:3speak\.(?:tv|online|co)\/watch\?v=)|(?:3speak\.tv\/embed\?v=))([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_-]+)(?:&.*)?$/,Ha}var $r={},Ws={},Uu;function Kc(){return Uu||(Uu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.imageFile=e.image=e.remote=e.local=e.any=void 0;const a='[^\\s"<>\\]\\[\\(\\)]',i=a.replace(/\]$/,".,']"),s="(?:(?:\\.(?:tiff?|jpe?g|gif|png|svg|ico)|ipfs/[a-z\\d]{40,}))",r="(?:[-a-zA-Z0-9\\._]*[-a-zA-Z0-9])",n="(?:"+a+"*"+i+")?",u=({domain:l=r,path:p=""}={})=>`https?://${l}(?::\\d{2,5})?(?:[/\\?#]${n}${p||""})${p?"":"?"}`,c=(l="i")=>new RegExp(u(),l);e.any=c;const d=(l="i")=>new RegExp(u({domain:"(?:localhost|(?:.*\\.)?hive.blog)"}),l);e.local=d;const f=(l="i")=>new RegExp(u({domain:`(?!localhost|(?:.*\\.)?hive.blog)${r}`}),l);e.remote=f;const o=(l="i")=>new RegExp(u({path:s}),l);e.image=o;const h=(l="i")=>new RegExp(s,l);e.imageFile=h,e.default={any:(0,e.any)(),local:(0,e.local)(),remote:(0,e.remote)(),image:(0,e.image)(),imageFile:(0,e.imageFile)(),vimeo:/https?:\/\/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)\/*/,vimeoId:/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)/,twitch:/https?:\/\/(?:www.)?twitch.tv\/(?:(videos)\/)?([a-zA-Z0-9][\w]{3,24})/i,ipfsProtocol:/^((\/\/?ipfs\/)|(ipfs:\/\/))/}})(Ws)),Ws}var zu;function jh(){if(zu)return $r;zu=1;var e=$r&&$r.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty($r,"__esModule",{value:!0}),$r.TwitchEmbedder=void 0;const a=ir(),i=e(Kc()),s=Hr();let r=class extends s.AbstractEmbedder{constructor(u){super(),this.type="twitch",this.domain=new URL(u.baseUrl).hostname}getEmbedMetadata(u){try{const c=u.data,d=this.twitchId(c);return d?Object.assign({},d):void 0}catch(c){a.Log.log().error(c)}}processEmbed(u,c){return`<div class="videoWrapper"><iframe src=${`https://player.twitch.tv/${u}&parent=${this.domain}`} width=${c.width} height=${c.height} frameBorder="0" allowFullScreen></iframe></div>`}twitchId(u){if(!u)return null;const c=u.match(i.default.twitch);return!c||c.length<3?null:{id:c[1]==="videos"?`?video=${c[2]}`:`?channel=${c[2]}`,url:c[0],canonical:c[1]==="videos"?`https://player.twitch.tv/?video=${c[2]}`:`https://player.twitch.tv/?channel=${c[2]}`}}};return $r.TwitchEmbedder=r,$r}var Wa={},Ga={},Hu;function Qc(){if(Hu)return Ga;Hu=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.StaticConfig=void 0;let e=class{};return Ga.StaticConfig=e,e.sanitization={iframeWhitelist:[{re:/^(?:@?(?:https?:)?\/\/)?(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:a=>{if(!a)return null;const s=a.replace(/^(@|https?:\/\/)/,"").match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!s||s.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${s[1]}`}},{re:/^(https?:)?\/\/player.vimeo.com\/video\/.*/i,fn:a=>{if(!a)return null;const i=a.match(/https:\/\/player\.vimeo\.com\/video\/([0-9]+)/);return!i||i.length!==2?null:"https://player.vimeo.com/video/"+i[1]}},{re:/^(https?:)?\/\/www.youtube.com\/embed\/.*/i,fn:a=>a.replace(/\?.+$/,"")},{re:/^https:\/\/w.soundcloud.com\/player\/.*/i,fn:a=>{if(!a)return null;const i=a.match(/url=(.+?)&/);return!i||i.length!==2?null:`https://w.soundcloud.com/player/?url=${i[1]}&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true`}},{re:/^(https?:)?\/\/player.twitch.tv\/.*/i,fn:a=>a},{re:/^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|album|track|artist)\/(.*)/i,fn:a=>a},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/embed\?v=([^&\s]+)/i,fn:a=>{if(!a)return null;const i=a.match(/3speak\.(?:tv|online|co)\/embed\?v=([^&\s]+)/i);return!i||i.length!==2?null:`https://3speak.tv/embed?v=${i[1]}`}},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/watch\?v=([^&\s]+)/i,fn:a=>{if(!a)return null;const i=a.match(/3speak\.(?:tv|online|co)\/watch\?v=([^&\s]+)/i);return!i||i.length!==2?null:`https://3speak.tv/embed?v=${i[1]}`}},{re:/^(?:https:)\/\/(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:a=>{if(!a)return null;const i=a.match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!i||i.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${i[1]}`}}],noImageText:"(Image not shown due to low ratings)",allowedTags:`
132
+ ${r.error.stack}`:""}};return i.FORMAT_NAME="oneline",On.OnelineLogFormat=i,On}var ju;function ms(){return ju||(ju=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=hs(),i=ph(),s=mh();(function(r){r.FORMATS={json:new i.JsonLogFormat(!1),json_pretty:new i.JsonLogFormat(!0),oneline:new s.OnelineLogFormat},r.KEYS=Object.freeze({json:"json",json_pretty:"json_pretty",oneline:"oneline"}),r.DEFAULT_FORMAT=r.FORMATS.oneline;function n(u){if(typeof r.FORMATS[u]>"u"){const c=Object.keys(r.FORMATS).join(",");throw new a.UniverseLogError(`There is no such log format: '${u}'. Available formats: [ ${c} ]`)}return r.FORMATS[u]}r.valueOf=n})(e.LogFormats||(e.LogFormats={}))})(Us)),Us}var $n={},Eu;function gh(){if(Eu)return $n;Eu=1,Object.defineProperty($n,"__esModule",{value:!0});let e=class{static log(i){console.error(`UniverseLog.FallbackLog: ${i}`)}};return $n.FallbackLog=e,$n}var Ln={},Au;function Vc(){if(Au)return Ln;Au=1,Object.defineProperty(Ln,"__esModule",{value:!0});const e=hs(),a=new Function("try {return this===window;}catch(e){ return false;}"),i=new Function("try {return this===global;}catch(e){return false;}"),s=new Function("try {return this;}catch(e){return undefined}");function r(c){const d=s();if(!d)throw new e.UniverseLogError("PortableEnv: environment is browser, but could not get window object");return d[c]}function n(c){if(!process)throw new e.UniverseLogError("PortableEnv: environment is node, but process object does not exist");if(!process.env)throw new e.UniverseLogError("PortableEnv: environment is node, but process.env object does not exist");if(process.env[c])return process.env[c]}function u(c){if(a())return r(c);if(i())return n(c);throw new e.UniverseLogError("PortableEnv: unknown environment (not browser, not node)")}return Ln.PortableEnv=u,Ln}var Mn={},Su;function Uc(){if(Su)return Mn;Su=1,Object.defineProperty(Mn,"__esModule",{value:!0});class e{}return e.LEAST_LEVEL_ENV="LOG_LEVEL",e.LOG_FORMAT_ENV="LOG_FORMAT",e.LOG_METADATA_ENV="LOG_METADATA",e.REEVALUATE_CONFIG_AFTER_MS=150,e.DEFAULT_LOG_FN=a=>console.error(a),Mn.StaticConfig=e,Mn}var Cu;function bh(){if(Cu)return ta;Cu=1;var e=ta&&ta.__rest||function(f,o){var h={};for(var l in f)Object.prototype.hasOwnProperty.call(f,l)&&o.indexOf(l)<0&&(h[l]=f[l]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,l=Object.getOwnPropertySymbols(f);p<l.length;p++)o.indexOf(l[p])<0&&Object.prototype.propertyIsEnumerable.call(f,l[p])&&(h[l[p]]=f[l[p]]);return h};Object.defineProperty(ta,"__esModule",{value:!0});const a=Fc(),i=ms(),s=gh(),r=an(),n=ps(),u=Vc(),c=Uc();let d=class{constructor(o){this.levelEvaluationEnvNames=[],this.level=r.LogLevel.DEFAULT_LEVEL,this.metadata=n.LogMetadata.EMPTY_METADATA,this.nextReevaluateTimestampMs=0,this.levelEvaluationEnvNames=o.levelEvaluationEnvNames,a.default(this.levelEvaluationEnvNames,"levelEvaluationEnvNames",a.default.array.ofType(a.default.string)),this.fallbackLog=o.fallbackLog,a.default(this.fallbackLog,"fallbackLog",a.default.function),this.defaultFormat=o.defaultFormat,a.default(this.defaultFormat,"defaultFormat",a.default.object),this.format=this.defaultFormat,this.evaluateIfRequired()}setLevelEvaluationEnvNames(o){this.levelEvaluationEnvNames=o,this.evaluateIfRequired()}getLevel(){return this.level}getFormat(){return this.format}getMetadata(){return this.metadata}evaluateIfRequired(){if(!(Date.now()<this.nextReevaluateTimestampMs))try{this.nextReevaluateTimestampMs=Date.now()+c.StaticConfig.REEVALUATE_CONFIG_AFTER_MS,this.evaluate()}catch(o){this.fallbackLog(`Could not evaluate live log config: ${o}: ${o.stack}`)}}evaluate(){this.format=this.evaluateFormat(),this.level=this.evaluateLogLevel(),this.metadata=this.evaluateMetadata()}evaluateFormat(){const o=u.PortableEnv(c.StaticConfig.LOG_FORMAT_ENV);return o?i.LogFormats.valueOf(o):this.defaultFormat}evaluateLogLevel(){const o=this.chooseMostVerboseLevel(this.getEnvValues(this.levelEvaluationEnvNames));if(o)return o;const h=this.chooseMostVerboseLevel(this.getEnvValues([c.StaticConfig.LEAST_LEVEL_ENV]));return h||r.LogLevel.DEFAULT_LEVEL}getEnvValues(o){return o.map(l=>u.PortableEnv(l)).filter(l=>!!l).map(l=>l||"unreachable")}chooseMostVerboseLevel(o){const h=o.map(p=>r.LogLevel.valueOf(p));return h.length===0?void 0:h.reduce((p,x)=>r.LogLevel.moreVerbose(p,x))}evaluateMetadata(){try{const o=u.PortableEnv(c.StaticConfig.LOG_METADATA_ENV);if(o){const h=JSON.parse(o);return this.removeTagFromMetadata(h)}}catch(o){s.FallbackLog.log(`Could not parse value of ${c.StaticConfig.LOG_METADATA_ENV} env: ${o}`)}return n.LogMetadata.EMPTY_METADATA}removeTagFromMetadata(o){const{tag:h}=o;return e(o,["tag"])}};return ta.LiveLogConfig=d,ta}var Rn={},Du;function xh(){if(Du)return Rn;Du=1,Object.defineProperty(Rn,"__esModule",{value:!0});const e=ds(),a=an(),i=qc();let s=class Gt{static parse(n,u){let c=Gt.basicLogMsg(n);for(const d of u)c=Object.assign({},c,Gt.parseElem(d,c));return c}static basicLogMsg(n){return{time_iso:i.TimeUtils.getUTCISOTime(),timestamp:i.TimeUtils.getTimestamp(),level:n,level_value:a.LogLevel.LEVELS_VALUES[n]}}static parseElem(n,u){return typeof n=="string"?Gt.parseString(n,u):n instanceof Error?Gt.parseError(n,u):typeof n=="object"?Gt.parseObject(n,u):Gt.parseOther(n,u)}static parseString(n,u){return{message:(u.message?u.message+"; ":"")+n}}static parseError(n,u){const c={};return c.message=(u.message?u.message+"; ":"")+(n+"").trim(),u.error?(c.other_errors=[...u.other_errors||[]],c.other_errors.push(Gt.errorToObj(n))):c.error=Gt.errorToObj(n),c}static errorToObj(n){return n instanceof e.default?Object.assign({name:n.name,message:n.message,stack:n.stack},n.cause?{cause:Gt.errorToObj(n.cause)}:{}):{name:n.name,message:n.message,stack:n.stack}}static parseObject(n,u){return Object.assign({},n)}static parseOther(n,u){return{others:[...u.others||[],n]}}};return Rn.ParseLogMsg=s,Rn}var Hs={},Tu;function zc(){return Tu||(Tu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0});const a=Fc(),i=ms();(function(s){function r(n){a.default(n.levelEnvs,"Properties.levelEnvs",a.default.any(a.default.undefined,a.default.array.ofType(a.default.string))),a.default(n.metadata,"Properties.metadata",a.default.optional.object),a.default(n.logFn,"Properties.logFn",a.default.any(a.default.undefined,a.default.function)),a.default(n.defaultFormat,"Properties.defaultFormat",a.default.optional.string.oneOf(Object.keys(i.LogFormats.KEYS)))}s.validate=r})(e.Properties||(e.Properties={}))})(Hs)),Hs}var Ou;function Wc(){if(Ou)return Dn;Ou=1,Object.defineProperty(Dn,"__esModule",{value:!0});const e=bh(),a=an(),i=ps(),s=Uc(),r=ms(),n=xh(),u=zc();let c=class Hc{constructor(f){if(this.instanceMetadata=i.LogMetadata.EMPTY_METADATA,"clone"in f){this.instanceMetadata=Object.assign({},f.clone.instanceMetadata,f.newMetadata),this.liveConfig=f.clone.liveConfig,this.logFn=f.clone.logFn;return}u.Properties.validate(f),f.metadata&&(this.instanceMetadata=f.metadata),f.logFn?this.logFn=f.logFn:this.logFn=s.StaticConfig.DEFAULT_LOG_FN;const o=f.defaultFormat?r.LogFormats.valueOf(f.defaultFormat):r.LogFormats.DEFAULT_FORMAT;this.liveConfig=new e.LiveLogConfig({levelEvaluationEnvNames:f.levelEnvs||[],fallbackLog:this.logFn,defaultFormat:o})}cloneWithMetadata(f){return new Hc({clone:this,newMetadata:f})}getLevel(){return this.liveConfig.getLevel()}getFormatName(){return this.liveConfig.getFormat().getName()}getMetadata(){return Object.assign({},this.instanceMetadata,this.liveConfig.getMetadata())}doEfficientLog(f,o){this.reevaluateConfigIfRequired();const h=a.LogLevel.LEVELS_VALUES[this.getLevel()];a.LogLevel.LEVELS_VALUES[f]<=h&&this.doLog(f,o())}doLog(f,...o){if(this.reevaluateConfigIfRequired(),o.length!==0&&(o.length===1&&Array.isArray(o[0])&&(o=o[0]),a.LogLevel.isLessOrEquallyVerbose({level:f,threshold:this.getLevel()}))){const h=n.ParseLogMsg.parse(f,o),l=this.liveConfig.getFormat().format(h,this.getMetadata());this.rawWriteToLog(l)}}rawWriteToLog(f){this.logFn(f)}reevaluateConfigIfRequired(){this.liveConfig.evaluateIfRequired()}};return Dn.LogEngine=c,Dn}var Pu;function Gc(){if(Pu)return Sn;Pu=1,Object.defineProperty(Sn,"__esModule",{value:!0});const e=an(),a=Wc();let i=class{constructor(r){r instanceof a.LogEngine?this.logEngine=r:this.logEngine=new a.LogEngine(r)}getLevel(){return this.logEngine.getLevel()}getFormatName(){return this.logEngine.getFormatName()}getMetadata(){return this.logEngine.getMetadata()}isDebug(){return e.LogLevel.LEVELS_VALUES[this.getLevel()]>=e.LogLevel.LEVELS_VALUES.debug}error(...r){this.doLog(e.LogLevel.error,r)}errorGen(r){this.doEfficientLog(e.LogLevel.error,r)}warn(...r){this.doLog(e.LogLevel.warn,r)}warnGen(r){this.doEfficientLog(e.LogLevel.warn,r)}info(...r){this.doLog(e.LogLevel.info,r)}infoGen(r){this.doEfficientLog(e.LogLevel.info,r)}http(...r){this.doLog(e.LogLevel.http,r)}httpGen(r){this.doEfficientLog(e.LogLevel.http,r)}verbose(...r){this.doLog(e.LogLevel.verbose,r)}verboseGen(r){this.doEfficientLog(e.LogLevel.verbose,r)}debug(...r){this.doLog(e.LogLevel.debug,r)}debugGen(r){this.doEfficientLog(e.LogLevel.debug,r)}silly(...r){this.doLog(e.LogLevel.silly,r)}sillyGen(r){this.doEfficientLog(e.LogLevel.silly,r)}doEfficientLog(r,n){this.logEngine.doEfficientLog(r,n)}doLog(r,...n){this.logEngine.doLog(r,...n)}getEngine(){return this.logEngine}};return Sn.AbstractUniverseLog=i,Sn}var In={},$u;function yh(){if($u)return In;$u=1,Object.defineProperty(In,"__esModule",{value:!0});const e=Gc();let a=class Jc extends e.AbstractUniverseLog{constructor(s){super(s)}tag(s){return new Jc(super.getEngine().cloneWithMetadata({tag:s}))}};return In.BasicTaggedUniverseLog=a,In}var Lu;function vh(){if(Lu)return At;Lu=1,Object.defineProperty(At,"__esModule",{value:!0});var e=Gc();At.AbstractUniverseLog=e.AbstractUniverseLog;var a=Wc();At.LogEngine=a.LogEngine;var i=zc();At.UniverseLogProperties=i.Properties;var s=yh();At.BasicTaggedUniverseLog=s.BasicTaggedUniverseLog;var r=ps();At.LogMetadata=r.LogMetadata;var n=an();At.LogLevel=n.LogLevel;var u=Vc();At.PortableEnv=u.PortableEnv;var c=hs();At.UniverseLogError=c.UniverseLogError;var d=ms();return At.LogFormats=d.LogFormats,At}var Mu;function ir(){if(Mu)return Ba;Mu=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.Log=void 0;const e=vh();let a=class Yc extends e.AbstractUniverseLog{static log(){return Yc.INSTANCE}constructor(){super({levelEnvs:["HIVE_CONTENT_RENDERER_LOG_LEVEL","ENGRAVE_LOG_LEVEL"],metadata:{library:"@hiveio/content-renderer"}})}};return Ba.Log=a,a.INSTANCE=new a,Ba}var Or={},Va={},Ru;function wh(){if(Ru)return Va;Ru=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.Phishing=void 0;const e=["steewit.com","śteemit.com","ŝteemit.com","şteemit.com","šteemit.com","sţeemit.com","sťeemit.com","șteemit.com","sleemit.com","aba.ae","autobidbot.cf","autobidbot.ga","autobidbot.gq","autobotsteem.cf","autobotsteem.ga","autobotsteem.gq","autobotsteem.ml","autosteem.info","autosteembot.cf","autosteembot.ga","autosteembot.gq","autosteembot.ml","autosteemit.wapka.mobi","boostbot.ga","boostbot.gq","boostwhaleup.cf","cutt.us","dereferer.me","eb2a.com","lordlinkers.tk","nullrefer.com","steeemit.ml","steeemitt.aba.ae","steemart.ga","steemautobot.bid","steemautobot.cf","steemautobot.trade","steemers.aba.ae","steemiit.cf","steemiit.ga","steemij.tk","steemik.ga","steemik.tk","steemil.com","steemil.ml","steemir.tk","steemitou.co.nf","steemitservices.ga","steemitservices.gq","steemiz.tk","steemnow.cf","steemnow.ga","steemnow.gq","steemnow.ml","steempostupper.win","steemrewards.ml","steemrobot.ga","steemrobot.ml","steemupgot.cf","steemupgot.ga","steemupgot.gq","steemupper.cf","steemupper.ga","steemupper.gq","steemupper.ml","steenit.cf","stemit.com","stssmater.aba.ae","uppervotes.ga","uppervotes.gq","upperwhaleplus.cf","upperwhaleplus.ga","upperwhaleplus.gq","upvoteme.cf","upvoteme.ga","upvoteme.gq","upvoteme.ml","url.rw","us.aba.ae","whaleboostup.ga","whaleboostup.ml"];let a=class{};return Va.Phishing=a,a.looksPhishy=i=>{for(const s of e)if(i.toLocaleLowerCase().indexOf(s)>-1)return!0;return!1},Va}var Iu;function _h(){if(Iu)return Or;Iu=1;var e=Or&&Or.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Or,"__esModule",{value:!0}),Or.LinkSanitizer=void 0;const a=e(rn()),i=ir(),s=wh();let r=class Zc{constructor(u){this.validate(u),this.options=u,this.baseUrl=new URL(this.options.baseUrl),this.topLevelsBaseDomain=Zc.getTopLevelBaseDomainFromBaseUrl(this.baseUrl)}sanitizeLink(u,c){return u=this.prependUnknownProtocolLink(u),i.Log.log().debug("LinkSanitizer#sanitizeLink",{url:u,urlTitle:c}),s.Phishing.looksPhishy(u)?(i.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","phishing list",u,{url:u,urlTitle:c}),!1):this.isPseudoLocalUrl(u,c)?(i.Log.log().debug("LinkSanitizer#sanitizeLink","phishing link detected","pseudo local url",u,{url:u,urlTitle:c}),!1):u}static getTopLevelBaseDomainFromBaseUrl(u){const d=/([^\s/$.?#]+\.[^\s/$.?#]+)$/g.exec(u.hostname);if(d&&d[0])return d[0];throw new Error(`LinkSanitizer: could not determine top level base domain from baseUrl hostname: ${u.hostname}`)}prependUnknownProtocolLink(u){return/^((#)|(\/(?!\/))|(((hive|https?):)?\/\/))/.test(u)||(u="https://"+u),u}isPseudoLocalUrl(u,c){if(u.indexOf("#")===0)return!1;u=u.toLowerCase(),c=c.toLowerCase();try{const d=c.indexOf(this.topLevelsBaseDomain)!==-1,f=u.indexOf(this.topLevelsBaseDomain)!==-1;if(d&&!f)return!0}catch(d){if(d instanceof TypeError)return!1;throw d}return!1}validate(u){(0,a.default)(u,"LinkSanitizerOptions",a.default.object),(0,a.default)(u.baseUrl,"LinkSanitizerOptions.baseUrl",a.default.string.nonEmpty)}};return Or.LinkSanitizer=r,Or}var Pr={},Fu;function Gi(){if(Fu)return Pr;Fu=1;var e=Pr&&Pr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.Localization=void 0;const a=e(rn());let i=class{static validate(r){(0,a.default)(r,"LocalizationOptions",a.default.object),(0,a.default)(r.phishingWarning,"LocalizationOptions.phishingWarning",a.default.string.nonEmpty),(0,a.default)(r.externalLink,"LocalizationOptions.externalLink",a.default.string.nonEmpty),(0,a.default)(r.noImage,"LocalizationOptions.noImage",a.default.string.nonEmpty),(0,a.default)(r.accountNameWrongLength,"LocalizationOptions.accountNameWrongLength",a.default.string.nonEmpty),(0,a.default)(r.accountNameBadActor,"LocalizationOptions.accountNameBadActor",a.default.string.nonEmpty),(0,a.default)(r.accountNameWrongSegment,"LocalizationOptions.accountNameWrongSegment",a.default.string.nonEmpty)}};return Pr.Localization=i,i.DEFAULT={phishingWarning:"Link expanded to plain text; beware of a potential phishing attempt",externalLink:"This link will take you away from example.com",noImage:"Images not allowed",accountNameWrongLength:"Account name should be between 3 and 16 characters long",accountNameBadActor:"This account is on a bad actor list",accountNameWrongSegment:"This account name contains a bad segment"},Pr}var $r={},Ua={},qu;function Hr(){if(qu)return Ua;qu=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.AbstractEmbedder=void 0;let e=class{static getEmbedMarker(i,s){return`~~~ embed:${i} ${s} ~~~`}static insertAllEmbeds(i,s,r){const n=[];for(let u of s.split("~~~ embed:")){const c=u.match(/^([A-Za-z0-9?/=_-]+) ([^ ]*) ~~~/);if(c&&c.length>=3){const d=c[1],f=c[2];for(const o of i)if(o.type==f){n.push(o.processEmbed(d,r));break}if(u=u.substring(`${d} ${f} ~~~`.length),u==="")continue}n.push(u)}return n.join("")}};return Ua.AbstractEmbedder=e,Ua}var za={},Bu;function kh(){if(Bu)return za;Bu=1,Object.defineProperty(za,"__esModule",{value:!0}),za.SpotifyEmbedder=void 0;const e=ir(),a=Hr();let i=class Ri extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="spotify"}static extractMetadata(r){if(!r)return;const n=r.match(Ri.regex.main);return!n||n.length<2?void 0:{id:`${n[1]==="show"||n[1]==="episode"?"embed-podcast":"embed"}/${n[1]}/${n[2]}`,url:n[0],canonical:`https://open.spotify.com/${n[1]}/${n[2]}`}}getEmbedMetadata(r){try{const n=Ri.extractMetadata(r.data);return n?{id:n.id,url:n.url,image:n.canonical}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(r,n){return`<div class="videoWrapper"><iframe src="${`https://open.spotify.com/${r}`}" width="${n.width}" height="${n.height}" frameBorder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe></div>`}};return za.SpotifyEmbedder=i,i.regex={main:/https?:\/\/open.spotify.com\/(playlist|show|episode|album|track|artist)\/(.*)/i,sanitize:/^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|album|track|artist)\/(.*)/i},za}var Ha={},Vu;function Nh(){if(Vu)return Ha;Vu=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.ThreeSpeakEmbedder=void 0;const e=ir(),a=Hr();let i=class Xc extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="3speak"}getEmbedMetadata(r){const n=typeof r=="string"?r:r.data;try{const u=n.match(Xc.linkRegex);if(u&&u[1])return{id:u[1],url:n}}catch(u){e.Log.log().error(u)}}processEmbed(r,n){const u=`https://3speak.tv/embed?v=${r}`;return`<div class="threeSpeakWrapper"><iframe width="${n.width}" height="${n.height}" src="${u}" frameborder="0" allowfullscreen></iframe></div>`}};return Ha.ThreeSpeakEmbedder=i,i.linkRegex=/^(?:https?:\/\/)?(?:(?:3speak\.(?:tv|online|co)\/watch\?v=)|(?:3speak\.tv\/embed\?v=))([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_-]+)(?:&.*)?$/,Ha}var Lr={},Ws={},Uu;function Kc(){return Uu||(Uu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.imageFile=e.image=e.remote=e.local=e.any=void 0;const a='[^\\s"<>\\]\\[\\(\\)]',i=a.replace(/\]$/,".,']"),s="(?:(?:\\.(?:tiff?|jpe?g|gif|png|svg|ico)|ipfs/[a-z\\d]{40,}))",r="(?:[-a-zA-Z0-9\\._]*[-a-zA-Z0-9])",n="(?:"+a+"*"+i+")?",u=({domain:l=r,path:p=""}={})=>`https?://${l}(?::\\d{2,5})?(?:[/\\?#]${n}${p||""})${p?"":"?"}`,c=(l="i")=>new RegExp(u(),l);e.any=c;const d=(l="i")=>new RegExp(u({domain:"(?:localhost|(?:.*\\.)?hive.blog)"}),l);e.local=d;const f=(l="i")=>new RegExp(u({domain:`(?!localhost|(?:.*\\.)?hive.blog)${r}`}),l);e.remote=f;const o=(l="i")=>new RegExp(u({path:s}),l);e.image=o;const h=(l="i")=>new RegExp(s,l);e.imageFile=h,e.default={any:(0,e.any)(),local:(0,e.local)(),remote:(0,e.remote)(),image:(0,e.image)(),imageFile:(0,e.imageFile)(),vimeo:/https?:\/\/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)\/*/,vimeoId:/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)/,twitch:/https?:\/\/(?:www.)?twitch.tv\/(?:(videos)\/)?([a-zA-Z0-9][\w]{3,24})/i,ipfsProtocol:/^((\/\/?ipfs\/)|(ipfs:\/\/))/}})(Ws)),Ws}var zu;function jh(){if(zu)return Lr;zu=1;var e=Lr&&Lr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.TwitchEmbedder=void 0;const a=ir(),i=e(Kc()),s=Hr();let r=class extends s.AbstractEmbedder{constructor(u){super(),this.type="twitch",this.domain=new URL(u.baseUrl).hostname}getEmbedMetadata(u){try{const c=u.data,d=this.twitchId(c);return d?Object.assign({},d):void 0}catch(c){a.Log.log().error(c)}}processEmbed(u,c){return`<div class="videoWrapper"><iframe src=${`https://player.twitch.tv/${u}&parent=${this.domain}`} width=${c.width} height=${c.height} frameBorder="0" allowFullScreen></iframe></div>`}twitchId(u){if(!u)return null;const c=u.match(i.default.twitch);return!c||c.length<3?null:{id:c[1]==="videos"?`?video=${c[2]}`:`?channel=${c[2]}`,url:c[0],canonical:c[1]==="videos"?`https://player.twitch.tv/?video=${c[2]}`:`https://player.twitch.tv/?channel=${c[2]}`}}};return Lr.TwitchEmbedder=r,Lr}var Wa={},Ga={},Hu;function Qc(){if(Hu)return Ga;Hu=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.StaticConfig=void 0;let e=class{};return Ga.StaticConfig=e,e.sanitization={iframeWhitelist:[{re:/^(?:@?(?:https?:)?\/\/)?(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:a=>{if(!a)return null;const s=a.replace(/^(@|https?:\/\/)/,"").match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!s||s.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${s[1]}`}},{re:/^(https?:)?\/\/player.vimeo.com\/video\/.*/i,fn:a=>{if(!a)return null;const i=a.match(/https:\/\/player\.vimeo\.com\/video\/([0-9]+)/);return!i||i.length!==2?null:"https://player.vimeo.com/video/"+i[1]}},{re:/^(https?:)?\/\/www.youtube.com\/embed\/.*/i,fn:a=>a.replace(/\?.+$/,"")},{re:/^https:\/\/w.soundcloud.com\/player\/.*/i,fn:a=>{if(!a)return null;const i=a.match(/url=(.+?)&/);return!i||i.length!==2?null:`https://w.soundcloud.com/player/?url=${i[1]}&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true`}},{re:/^(https?:)?\/\/player.twitch.tv\/.*/i,fn:a=>a},{re:/^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|album|track|artist)\/(.*)/i,fn:a=>a},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/embed\?v=([^&\s]+)/i,fn:a=>{if(!a)return null;const i=a.match(/3speak\.(?:tv|online|co)\/embed\?v=([^&\s]+)/i);return!i||i.length!==2?null:`https://3speak.tv/embed?v=${i[1]}`}},{re:/^(?:https?:)?\/\/(?:3speak\.(?:tv|online|co))\/watch\?v=([^&\s]+)/i,fn:a=>{if(!a)return null;const i=a.match(/3speak\.(?:tv|online|co)\/watch\?v=([^&\s]+)/i);return!i||i.length!==2?null:`https://3speak.tv/embed?v=${i[1]}`}},{re:/^(?:https:)\/\/(?:www\.)?(twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i,fn:a=>{if(!a)return null;const i=a.match(/(?:twitter|x)\.com\/(?:\w+\/status|status)\/(\d{1,20})/i);return!i||i.length!==2?null:`https://platform.twitter.com/embed/Tweet.html?id=${i[1]}`}}],noImageText:"(Image not shown due to low ratings)",allowedTags:`
133
133
  div, iframe, del,
134
134
  a, p, b, i, q, br, ul, li, ol, img, h1, h2, h3, h4, h5, h6, hr,
135
135
  blockquote, pre, code, em, strong, center, table, thead, tbody, tr, th, td,
136
136
  strike, sup, sub
137
- `.trim().split(/,\s*/)},Ga}var Wu;function Eh(){if(Wu)return Wa;Wu=1;var e;Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.TwitterEmbedder=void 0;const a=ir(),i=Qc(),s=Hr();let r=class Ii extends s.AbstractEmbedder{constructor(){super(...arguments),this.type="twitter"}getEmbedMetadata(u){const c=typeof u=="string"?u:u.data;try{const d=Ii.getTwitterMetadataFromLink(c);return d?{id:d.id,url:d.url}:void 0}catch(d){a.Log.log().error(d)}}processEmbed(u,c){const d=i.StaticConfig.sanitization.iframeWhitelist.find(o=>o.re.toString().includes("twitter")),f=d?.fn(`https://twitter.com/status/${u}`);return f?`<div class="twitterWrapper"><iframe width="${c.width}" height="${c.height}" src="${f}" frameborder="0" scrolling="no" allowtransparency="true" allowfullscreen="true"></iframe></div>`:""}static getTwitterMetadataFromLink(u){if(!u)return;const c=u.replace(/^(@|https:\/\/)/,""),d=c.match(Ii.linkRegex);if(!d)return;const f=d[2],o=`https://${c}`;return{id:f,url:o}}};return Wa.TwitterEmbedder=r,r.linkRegex=(e=i.StaticConfig.sanitization.iframeWhitelist.find(n=>n.re.toString().includes("twitter")))===null||e===void 0?void 0:e.re,Wa}var Ja={},Gu;function Ah(){if(Gu)return Ja;Gu=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.VimeoEmbedder=void 0;const e=ir(),a=Hr();let i=class ed extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="vimeo"}getEmbedMetadata(r){try{const n=r.data,u=this.extractMetadata(n);return u?{id:u.id,url:u.url}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(r,n){return`<div class="videoWrapper"><iframe src=${this.generateCanonicalUrl(r)} width=${n.width} height=${n.height} frameBorder="0" webkitallowfullscreen mozallowfullscreen allowFullScreen></iframe></div>`}generateCanonicalUrl(r){return`https://player.vimeo.com/video/${r}`}extractMetadata(r){if(!r)return null;const n=r.match(ed.regex);return!n||n.length<2?null:{id:n[1],url:n[0],canonical:this.generateCanonicalUrl(n[1])}}};return Ja.VimeoEmbedder=i,i.regex=/https?:\/\/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)\/*/,Ja}var Ya={},Ju;function td(){if(Ju)return Ya;Ju=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.YoutubeEmbedder=void 0;const e=ir(),a=Hr();let i=class Jn extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="youtube"}static getYoutubeMetadataFromLink(r){if(!r)return;const n=r.match(Jn.linkRegex),u=n?n[0]:void 0;if(!u)return;const c=u.match(Jn.idRegex),d=c&&c.length>=2?c[2]:void 0;if(d)return{id:d,url:u,thumbnail:"https://img.youtube.com/vi/"+d+"/0.jpg"}}getEmbedMetadata(r){try{const n=Jn.getYoutubeMetadataFromLink(r.data);return n?{id:n.id,url:n.url,image:n.thumbnail}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(r,n){const u=`https://www.youtube.com/embed/${r}`;return`<div class="videoWrapper"><iframe width="${n.width}" height="${n.height}" src="${u}" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" frameborder="0"></iframe></div>`}};return Ya.YoutubeEmbedder=i,i.linkRegex=/https?:\/\/(?:www\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/watch\?v=|youtu.be\/[^watch]|youtube\.com\/(embed|shorts)\/)([A-Za-z0-9_-]+)[^ ]*/i,i.idRegex=/(?:youtube\.com\/watch\?v=|youtu\.be\/watch\?v=|youtu.be\/|youtube\.com\/(embed|shorts)\/)([A-Za-z0-9_-]+)/i,Ya}var Yu;function Sh(){if(Yu)return Lr;Yu=1;var e=Lr&&Lr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.AssetEmbedder=void 0;const a=e(rn()),i=Hr(),s=kh(),r=Nh(),n=jh(),u=Eh(),c=Ah(),d=td();let f=class rd{constructor(h,l){rd.validate(h),this.options=h,this.localization=l,this.embedders=[new d.YoutubeEmbedder,new c.VimeoEmbedder,new n.TwitchEmbedder(h),new s.SpotifyEmbedder,new r.ThreeSpeakEmbedder,new u.TwitterEmbedder]}static validate(h){(0,a.default)(h,"AssetEmbedderOptions",a.default.object),(0,a.default)(h.ipfsPrefix,"AssetEmbedderOptions.ipfsPrefix",a.default.optional.string),(0,a.default)(h.width,"AssetEmbedderOptions.width",a.default.number.integer.positive),(0,a.default)(h.height,"AssetEmbedderOptions.height",a.default.number.integer.positive),(0,a.default)(h.hideImages,"AssetEmbedderOptions.hideImages",a.default.boolean),(0,a.default)(h.baseUrl,"AssetEmbedderOptions.baseUrl",a.default.string.nonEmpty),(0,a.default)(h.imageProxyFn,"AssetEmbedderOptions.imageProxyFn",a.default.function),(0,a.default)(h.hashtagUrlFn,"AssetEmbedderOptions.hashtagUrlFn",a.default.function),(0,a.default)(h.usertagUrlFn,"AssetEmbedderOptions.usertagUrlFn",a.default.function)}insertAssets(h){const l={width:this.options.width,height:this.options.height};return this.insertMarkedEmbedsToRenderedOutput(h,l)}insertMarkedEmbedsToRenderedOutput(h,l){return i.AbstractEmbedder.insertAllEmbeds(this.embedders,h,l)}processTextNodeAndInsertEmbeds(h){const l={links:[],images:[]};for(const p of this.embedders){const x=p.getEmbedMetadata(h);x&&(h.data=h.data.replace(x.url,i.AbstractEmbedder.getEmbedMarker(x.id,p.type)),x.image&&l.images.push(x.image),x.link&&l.links.push(x.link))}return l}};return Lr.AssetEmbedder=f,Lr}var Mr={},Fn={},Zu;function Ch(){if(Zu)return Fn;Zu=1,Object.defineProperty(Fn,"__esModule",{value:!0});const e=`
137
+ `.trim().split(/,\s*/)},Ga}var Wu;function Eh(){if(Wu)return Wa;Wu=1;var e;Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.TwitterEmbedder=void 0;const a=ir(),i=Qc(),s=Hr();let r=class Ii extends s.AbstractEmbedder{constructor(){super(...arguments),this.type="twitter"}getEmbedMetadata(u){const c=typeof u=="string"?u:u.data;try{const d=Ii.getTwitterMetadataFromLink(c);return d?{id:d.id,url:d.url}:void 0}catch(d){a.Log.log().error(d)}}processEmbed(u,c){const d=i.StaticConfig.sanitization.iframeWhitelist.find(o=>o.re.toString().includes("twitter")),f=d?.fn(`https://twitter.com/status/${u}`);return f?`<div class="twitterWrapper"><iframe width="${c.width}" height="${c.height}" src="${f}" frameborder="0" scrolling="no" allowtransparency="true" allowfullscreen="true"></iframe></div>`:""}static getTwitterMetadataFromLink(u){if(!u)return;const c=u.replace(/^(@|https:\/\/)/,""),d=c.match(Ii.linkRegex);if(!d)return;const f=d[2],o=`https://${c}`;return{id:f,url:o}}};return Wa.TwitterEmbedder=r,r.linkRegex=(e=i.StaticConfig.sanitization.iframeWhitelist.find(n=>n.re.toString().includes("twitter")))===null||e===void 0?void 0:e.re,Wa}var Ja={},Gu;function Ah(){if(Gu)return Ja;Gu=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.VimeoEmbedder=void 0;const e=ir(),a=Hr();let i=class ed extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="vimeo"}getEmbedMetadata(r){try{const n=r.data,u=this.extractMetadata(n);return u?{id:u.id,url:u.url}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(r,n){return`<div class="videoWrapper"><iframe src=${this.generateCanonicalUrl(r)} width=${n.width} height=${n.height} frameBorder="0" webkitallowfullscreen mozallowfullscreen allowFullScreen></iframe></div>`}generateCanonicalUrl(r){return`https://player.vimeo.com/video/${r}`}extractMetadata(r){if(!r)return null;const n=r.match(ed.regex);return!n||n.length<2?null:{id:n[1],url:n[0],canonical:this.generateCanonicalUrl(n[1])}}};return Ja.VimeoEmbedder=i,i.regex=/https?:\/\/(?:vimeo.com\/|player.vimeo.com\/video\/)([0-9]+)\/*/,Ja}var Ya={},Ju;function td(){if(Ju)return Ya;Ju=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.YoutubeEmbedder=void 0;const e=ir(),a=Hr();let i=class Jn extends a.AbstractEmbedder{constructor(){super(...arguments),this.type="youtube"}static getYoutubeMetadataFromLink(r){if(!r)return;const n=r.match(Jn.linkRegex),u=n?n[0]:void 0;if(!u)return;const c=u.match(Jn.idRegex),d=c&&c.length>=2?c[2]:void 0;if(d)return{id:d,url:u,thumbnail:"https://img.youtube.com/vi/"+d+"/0.jpg"}}getEmbedMetadata(r){try{const n=Jn.getYoutubeMetadataFromLink(r.data);return n?{id:n.id,url:n.url,image:n.thumbnail}:void 0}catch(n){e.Log.log().error(n)}}processEmbed(r,n){const u=`https://www.youtube.com/embed/${r}`;return`<div class="videoWrapper"><iframe width="${n.width}" height="${n.height}" src="${u}" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" frameborder="0"></iframe></div>`}};return Ya.YoutubeEmbedder=i,i.linkRegex=/https?:\/\/(?:www\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/watch\?v=|youtu.be\/[^watch]|youtube\.com\/(embed|shorts)\/)([A-Za-z0-9_-]+)[^ ]*/i,i.idRegex=/(?:youtube\.com\/watch\?v=|youtu\.be\/watch\?v=|youtu.be\/|youtube\.com\/(embed|shorts)\/)([A-Za-z0-9_-]+)/i,Ya}var Yu;function Sh(){if(Yu)return $r;Yu=1;var e=$r&&$r.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty($r,"__esModule",{value:!0}),$r.AssetEmbedder=void 0;const a=e(rn()),i=Hr(),s=kh(),r=Nh(),n=jh(),u=Eh(),c=Ah(),d=td();let f=class rd{constructor(h,l){rd.validate(h),this.options=h,this.localization=l,this.embedders=[new d.YoutubeEmbedder,new c.VimeoEmbedder,new n.TwitchEmbedder(h),new s.SpotifyEmbedder,new r.ThreeSpeakEmbedder,new u.TwitterEmbedder]}static validate(h){(0,a.default)(h,"AssetEmbedderOptions",a.default.object),(0,a.default)(h.ipfsPrefix,"AssetEmbedderOptions.ipfsPrefix",a.default.optional.string),(0,a.default)(h.width,"AssetEmbedderOptions.width",a.default.number.integer.positive),(0,a.default)(h.height,"AssetEmbedderOptions.height",a.default.number.integer.positive),(0,a.default)(h.hideImages,"AssetEmbedderOptions.hideImages",a.default.boolean),(0,a.default)(h.baseUrl,"AssetEmbedderOptions.baseUrl",a.default.string.nonEmpty),(0,a.default)(h.imageProxyFn,"AssetEmbedderOptions.imageProxyFn",a.default.function),(0,a.default)(h.hashtagUrlFn,"AssetEmbedderOptions.hashtagUrlFn",a.default.function),(0,a.default)(h.usertagUrlFn,"AssetEmbedderOptions.usertagUrlFn",a.default.function)}insertAssets(h){const l={width:this.options.width,height:this.options.height};return this.insertMarkedEmbedsToRenderedOutput(h,l)}insertMarkedEmbedsToRenderedOutput(h,l){return i.AbstractEmbedder.insertAllEmbeds(this.embedders,h,l)}processTextNodeAndInsertEmbeds(h){const l={links:[],images:[]};for(const p of this.embedders){const x=p.getEmbedMetadata(h);x&&(h.data=h.data.replace(x.url,i.AbstractEmbedder.getEmbedMarker(x.id,p.type)),x.image&&l.images.push(x.image),x.link&&l.links.push(x.link))}return l}};return $r.AssetEmbedder=f,$r}var Mr={},Fn={},Zu;function Ch(){if(Zu)return Fn;Zu=1,Object.defineProperty(Fn,"__esModule",{value:!0});const e=`
138
138
  aalpha
139
139
  aappreciator
140
140
  abits
@@ -1044,14 +1044,14 @@ youbit
1044
1044
  yunbi
1045
1045
  zenieix
1046
1046
  `.trim().split(`
1047
- `);return Fn.default=e,Fn}var Xu;function Dh(){if(Xu)return Mr;Xu=1;var e=Mr&&Mr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.AccountNameValidator=void 0;const a=e(Ch());let i=class{static validateAccountName(r,n){let u,c,d;if(!r)return n.accountNameWrongLength;const f=r.length;if(f<3||f>16)return n.accountNameWrongLength;if(a.default.includes(r))return n.accountNameBadActor;const o=r.split(".");for(u=0,d=o.length;u<d;u++)if(c=o[u],!/^[a-z]/.test(c)||!/^[a-z0-9-]*$/.test(c)||!/[a-z0-9]$/.test(c)||!(c.length>=3))return n.accountNameWrongSegment;return null}};return Mr.AccountNameValidator=i,Mr}var Ku;function Th(){if(Ku)return st;Ku=1;var e=st&&st.__createBinding||(Object.create?(function(w,b,g,v){v===void 0&&(v=g);var _=Object.getOwnPropertyDescriptor(b,g);(!_||("get"in _?!b.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return b[g]}}),Object.defineProperty(w,v,_)}):(function(w,b,g,v){v===void 0&&(v=g),w[v]=b[g]})),a=st&&st.__setModuleDefault||(Object.create?(function(w,b){Object.defineProperty(w,"default",{enumerable:!0,value:b})}):function(w,b){w.default=b}),i=st&&st.__importStar||function(w){if(w&&w.__esModule)return w;var b={};if(w!=null)for(var g in w)g!=="default"&&Object.prototype.hasOwnProperty.call(w,g)&&e(b,w,g);return a(b,w),b},s=st&&st.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(st,"__esModule",{value:!0}),st.HtmlDOMParserError=st.HtmlDOMParser=void 0;const r=i(hh()),n=s(ds()),u=ir(),c=_h(),d=Gi(),f=Sh(),o=td(),h=Dh(),l=i(Kc());let p=class{constructor(b,g=d.Localization.DEFAULT){this.domParser=new r.DOMParser({errorHandler:{warning:()=>{},error:()=>{}}}),this.xmlSerializer=new r.XMLSerializer,this.mutate=!0,this.parsedDocument=void 0,f.AssetEmbedder.validate(b),d.Localization.validate(g),this.options=b,this.localization=g,this.linkSanitizer=new c.LinkSanitizer({baseUrl:this.options.baseUrl}),this.embedder=new f.AssetEmbedder({ipfsPrefix:this.options.ipfsPrefix,width:this.options.width,height:this.options.height,hideImages:this.options.hideImages,imageProxyFn:this.options.imageProxyFn,hashtagUrlFn:this.options.hashtagUrlFn,usertagUrlFn:this.options.usertagUrlFn,baseUrl:this.options.baseUrl},g),this.state={hashtags:new Set,usertags:new Set,htmltags:new Set,images:new Set,links:new Set}}setMutateEnabled(b){return this.mutate=b,this}parse(b){try{const g=this.domParser.parseFromString(b,"text/html");this.traverseDOMNode(g),this.mutate&&this.postprocessDOM(g),this.parsedDocument=g}catch(g){throw new x("Parsing error",g)}return this}getState(){if(!this.parsedDocument)throw new x("Html has not been parsed yet");return this.state}getParsedDocument(){if(!this.parsedDocument)throw new x("Html has not been parsed yet");return this.parsedDocument}getParsedDocumentAsString(){return this.xmlSerializer.serializeToString(this.getParsedDocument())}traverseDOMNode(b,g=0){!b||!b.childNodes||Array.from(b.childNodes).forEach(v=>{const _=v.tagName?v.tagName.toLowerCase():null;_&&this.state.htmltags.add(_),_==="img"?this.processImgTag(v):_==="iframe"?this.processIframeTag(v):_==="a"?this.processLinkTag(v):v.nodeName==="#text"&&this.processTextNode(v),this.traverseDOMNode(v,g+1)})}processLinkTag(b){const g=b.getAttribute("href");if(g&&(this.state.links.add(g),this.mutate)){const v=b.textContent+"",_=this.linkSanitizer.sanitizeLink(g,v);if(_===!1){const k=b.ownerDocument.createElement("div");k.textContent=`${b.textContent} / ${g}`,k.setAttribute("title",this.localization.phishingWarning),k.setAttribute("class","phishy");const y=b.parentNode;y&&(y.appendChild(k),y.removeChild(b))}else b.setAttribute("href",_)}}processIframeTag(b){const g=b.getAttribute("src");if(g&&this.reportIframeLink(g),!this.mutate||(b.parentNode.tagName?b.parentNode.tagName.toLowerCase():b.parentNode.tagName)==="div"&&b.parentNode.getAttribute("class")==="videoWrapper")return;const _=this.xmlSerializer.serializeToString(b),k=this.domParser.parseFromString(`<div class="videoWrapper">${_}</div>`),y=b.parentNode;y&&(y.appendChild(k),y.removeChild(b))}reportIframeLink(b){const g=o.YoutubeEmbedder.getYoutubeMetadataFromLink(b);g&&(this.state.links.add(g.url),this.state.images.add("https://img.youtube.com/vi/"+g.id+"/0.jpg"))}processImgTag(b){const g=b.getAttribute("src");if(g&&(this.state.images.add(g),this.mutate)){let v=this.normalizeUrl(g);/^\/\//.test(v)&&(v="https:"+v),v!==g&&b.setAttribute("src",v)}}processTextNode(b){try{const g=b.parentNode.tagName?b.parentNode.tagName.toLowerCase():b.parentNode.tagName;if(g==="code"||g==="a"||!b.data)return;const v=this.embedder.processTextNodeAndInsertEmbeds(b);v.images.forEach(y=>this.state.images.add(y)),v.links.forEach(y=>this.state.links.add(y));const _=this.xmlSerializer.serializeToString(b),k=this.linkify(_);if(this.mutate&&k!==_){const y=this.domParser.parseFromString(`<span>${k}</span>`),m=b.parentNode;return m&&(m.appendChild(y),m.removeChild(b)),y}}catch(g){u.Log.log().error(g)}}linkify(b){return b=b.replace((0,l.any)("gi"),g=>{if(l.default.image.test(g))return this.state.images.add(g),`<img src="${this.normalizeUrl(g)}" />`;if(/\.(zip|exe)$/i.test(g))return g;const v=this.linkSanitizer.sanitizeLink(g,g);return v===!1?`<div title='${this.localization.phishingWarning}' class='phishy'>${g}</div>`:(this.state.links.add(v),`<a href="${this.normalizeUrl(g)}">${v}</a>`)}),b=b.replace(/(^|\s)(#[-a-z\d]+)/gi,g=>{if(/#[\d]+$/.test(g))return g;const v=/^\s/.test(g)?g[0]:"",k=g.trim().substring(1).toLowerCase();if(this.state.hashtags.add(k),!this.mutate)return g;const y=this.options.hashtagUrlFn(k);return v+`<a href="${y}">${g.trim()}</a>`}),b=b.replace(/(^|[^a-zA-Z0-9_!#$%&*@@/]|(^|[^a-zA-Z0-9_+~.-/#]))[@@]([a-z][-.a-z\d]+[a-z\d])/gi,(g,v,_,k)=>{const y=k.toLowerCase(),m=h.AccountNameValidator.validateAccountName(y,this.localization)==null;m&&this.state.usertags&&this.state.usertags.add(y);const N=(v||"")+(_||"");if(!this.mutate)return`${N}${k}`;const j=this.options.usertagUrlFn(y);return m?`${N}<a href="${j}">@${k}</a>`:`${N}@${k}`}),b}postprocessDOM(b){this.hideImagesIfNeeded(b),this.proxifyImagesIfNeeded(b)}hideImagesIfNeeded(b){if(this.mutate&&this.options.hideImages)for(const g of Array.from(b.getElementsByTagName("img"))){const v=b.createElement("pre");v.setAttribute("class","image-url-only"),v.appendChild(b.createTextNode(g.getAttribute("src")||""));const _=g.parentNode;_&&(_.appendChild(v),_.removeChild(g))}}proxifyImagesIfNeeded(b){this.mutate&&!this.options.hideImages&&this.proxifyImages(b)}proxifyImages(b){b&&Array.from(b.getElementsByTagName("img")).forEach(g=>{const v=g.getAttribute("src")||"";l.default.local.test(v)||g.setAttribute("src",this.options.imageProxyFn(v))})}normalizeUrl(b){if(this.options.ipfsPrefix&&l.default.ipfsProtocol.test(b)){const[g]=b.match(l.default.ipfsProtocol),v=b.replace(g,"");return`${this.options.ipfsPrefix.replace(/\/+$/,"")}/${v}`}return b}};st.HtmlDOMParser=p;class x extends n.default{constructor(b,g){super(b,g)}}return st.HtmlDOMParserError=x,st}var Za={},Qu;function Oh(){if(Qu)return Za;Qu=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.PreliminarySanitizer=void 0;let e=class ad{static preliminarySanitize(i){return ad.stripHtmlComments(i)}static stripHtmlComments(i){return i.replace(/<!--([\s\S]+?)(-->|$)/g,"(html comment removed: $1)")}};return Za.PreliminarySanitizer=e,Za}var Rr={},Rt={},It={},Gs={},Ft={},qn={},el;function Ph(){return el||(el=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}))),qn}var Bn={},tl;function Lh(){return tl||(tl=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}))),Bn}var Js={},rl;function al(){return rl||(rl=1,(function(e){var a;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var i=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(a=String.fromCodePoint)!==null&&a!==void 0?a:function(n){var u="";return n>65535&&(n-=65536,u+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023),u+=String.fromCharCode(n),u};function s(n){var u;return n>=55296&&n<=57343||n>1114111?65533:(u=i.get(n))!==null&&u!==void 0?u:n}e.replaceCodePoint=s;function r(n){return(0,e.fromCodePoint)(s(n))}e.default=r})(Js)),Js}var nl;function ts(){return nl||(nl=1,(function(e){var a=Ft&&Ft.__createBinding||(Object.create?(function(C,T,M,W){W===void 0&&(W=M);var F=Object.getOwnPropertyDescriptor(T,M);(!F||("get"in F?!T.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return T[M]}}),Object.defineProperty(C,W,F)}):(function(C,T,M,W){W===void 0&&(W=M),C[W]=T[M]})),i=Ft&&Ft.__setModuleDefault||(Object.create?(function(C,T){Object.defineProperty(C,"default",{enumerable:!0,value:T})}):function(C,T){C.default=T}),s=Ft&&Ft.__importStar||function(C){if(C&&C.__esModule)return C;var T={};if(C!=null)for(var M in C)M!=="default"&&Object.prototype.hasOwnProperty.call(C,M)&&a(T,C,M);return i(T,C),T},r=Ft&&Ft.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var n=r(Ph());e.htmlDecodeTree=n.default;var u=r(Lh());e.xmlDecodeTree=u.default;var c=s(al());e.decodeCodePoint=c.default;var d=al();Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return d.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return d.fromCodePoint}});var f;(function(C){C[C.NUM=35]="NUM",C[C.SEMI=59]="SEMI",C[C.EQUALS=61]="EQUALS",C[C.ZERO=48]="ZERO",C[C.NINE=57]="NINE",C[C.LOWER_A=97]="LOWER_A",C[C.LOWER_F=102]="LOWER_F",C[C.LOWER_X=120]="LOWER_X",C[C.LOWER_Z=122]="LOWER_Z",C[C.UPPER_A=65]="UPPER_A",C[C.UPPER_F=70]="UPPER_F",C[C.UPPER_Z=90]="UPPER_Z"})(f||(f={}));var o=32,h;(function(C){C[C.VALUE_LENGTH=49152]="VALUE_LENGTH",C[C.BRANCH_LENGTH=16256]="BRANCH_LENGTH",C[C.JUMP_TABLE=127]="JUMP_TABLE"})(h=e.BinTrieFlags||(e.BinTrieFlags={}));function l(C){return C>=f.ZERO&&C<=f.NINE}function p(C){return C>=f.UPPER_A&&C<=f.UPPER_F||C>=f.LOWER_A&&C<=f.LOWER_F}function x(C){return C>=f.UPPER_A&&C<=f.UPPER_Z||C>=f.LOWER_A&&C<=f.LOWER_Z||l(C)}function w(C){return C===f.EQUALS||x(C)}var b;(function(C){C[C.EntityStart=0]="EntityStart",C[C.NumericStart=1]="NumericStart",C[C.NumericDecimal=2]="NumericDecimal",C[C.NumericHex=3]="NumericHex",C[C.NamedEntity=4]="NamedEntity"})(b||(b={}));var g;(function(C){C[C.Legacy=0]="Legacy",C[C.Strict=1]="Strict",C[C.Attribute=2]="Attribute"})(g=e.DecodingMode||(e.DecodingMode={}));var v=(function(){function C(T,M,W){this.decodeTree=T,this.emitCodePoint=M,this.errors=W,this.state=b.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=g.Strict}return C.prototype.startEntity=function(T){this.decodeMode=T,this.state=b.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},C.prototype.write=function(T,M){switch(this.state){case b.EntityStart:return T.charCodeAt(M)===f.NUM?(this.state=b.NumericStart,this.consumed+=1,this.stateNumericStart(T,M+1)):(this.state=b.NamedEntity,this.stateNamedEntity(T,M));case b.NumericStart:return this.stateNumericStart(T,M);case b.NumericDecimal:return this.stateNumericDecimal(T,M);case b.NumericHex:return this.stateNumericHex(T,M);case b.NamedEntity:return this.stateNamedEntity(T,M)}},C.prototype.stateNumericStart=function(T,M){return M>=T.length?-1:(T.charCodeAt(M)|o)===f.LOWER_X?(this.state=b.NumericHex,this.consumed+=1,this.stateNumericHex(T,M+1)):(this.state=b.NumericDecimal,this.stateNumericDecimal(T,M))},C.prototype.addToNumericResult=function(T,M,W,F){if(M!==W){var q=W-M;this.result=this.result*Math.pow(F,q)+parseInt(T.substr(M,q),F),this.consumed+=q}},C.prototype.stateNumericHex=function(T,M){for(var W=M;M<T.length;){var F=T.charCodeAt(M);if(l(F)||p(F))M+=1;else return this.addToNumericResult(T,W,M,16),this.emitNumericEntity(F,3)}return this.addToNumericResult(T,W,M,16),-1},C.prototype.stateNumericDecimal=function(T,M){for(var W=M;M<T.length;){var F=T.charCodeAt(M);if(l(F))M+=1;else return this.addToNumericResult(T,W,M,10),this.emitNumericEntity(F,2)}return this.addToNumericResult(T,W,M,10),-1},C.prototype.emitNumericEntity=function(T,M){var W;if(this.consumed<=M)return(W=this.errors)===null||W===void 0||W.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(T===f.SEMI)this.consumed+=1;else if(this.decodeMode===g.Strict)return 0;return this.emitCodePoint((0,c.replaceCodePoint)(this.result),this.consumed),this.errors&&(T!==f.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed},C.prototype.stateNamedEntity=function(T,M){for(var W=this.decodeTree,F=W[this.treeIndex],q=(F&h.VALUE_LENGTH)>>14;M<T.length;M++,this.excess++){var $=T.charCodeAt(M);if(this.treeIndex=k(W,F,this.treeIndex+Math.max(1,q),$),this.treeIndex<0)return this.result===0||this.decodeMode===g.Attribute&&(q===0||w($))?0:this.emitNotTerminatedNamedEntity();if(F=W[this.treeIndex],q=(F&h.VALUE_LENGTH)>>14,q!==0){if($===f.SEMI)return this.emitNamedEntityData(this.treeIndex,q,this.consumed+this.excess);this.decodeMode!==g.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},C.prototype.emitNotTerminatedNamedEntity=function(){var T,M=this,W=M.result,F=M.decodeTree,q=(F[W]&h.VALUE_LENGTH)>>14;return this.emitNamedEntityData(W,q,this.consumed),(T=this.errors)===null||T===void 0||T.missingSemicolonAfterCharacterReference(),this.consumed},C.prototype.emitNamedEntityData=function(T,M,W){var F=this.decodeTree;return this.emitCodePoint(M===1?F[T]&~h.VALUE_LENGTH:F[T+1],W),M===3&&this.emitCodePoint(F[T+2],W),W},C.prototype.end=function(){var T;switch(this.state){case b.NamedEntity:return this.result!==0&&(this.decodeMode!==g.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case b.NumericDecimal:return this.emitNumericEntity(0,2);case b.NumericHex:return this.emitNumericEntity(0,3);case b.NumericStart:return(T=this.errors)===null||T===void 0||T.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case b.EntityStart:return 0}},C})();e.EntityDecoder=v;function _(C){var T="",M=new v(C,function(W){return T+=(0,c.fromCodePoint)(W)});return function(F,q){for(var $=0,Y=0;(Y=F.indexOf("&",Y))>=0;){T+=F.slice($,Y),M.startEntity(q);var X=M.write(F,Y+1);if(X<0){$=Y+M.end();break}$=Y+X,Y=X===0?$+1:$}var ae=T+F.slice($);return T="",ae}}function k(C,T,M,W){var F=(T&h.BRANCH_LENGTH)>>7,q=T&h.JUMP_TABLE;if(F===0)return q!==0&&W===q?M:-1;if(q){var $=W-q;return $<0||$>=F?-1:C[M+$]-1}for(var Y=M,X=Y+F-1;Y<=X;){var ae=Y+X>>>1,I=C[ae];if(I<W)Y=ae+1;else if(I>W)X=ae-1;else return C[ae+F]}return-1}e.determineBranch=k;var y=_(n.default),m=_(u.default);function N(C,T){return T===void 0&&(T=g.Legacy),y(C,T)}e.decodeHTML=N;function j(C){return y(C,g.Attribute)}e.decodeHTMLAttribute=j;function A(C){return y(C,g.Strict)}e.decodeHTMLStrict=A;function D(C){return m(C,g.Strict)}e.decodeXML=D})(Ft)),Ft}var sl;function nd(){return sl||(sl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var a=ts(),i;(function(l){l[l.Tab=9]="Tab",l[l.NewLine=10]="NewLine",l[l.FormFeed=12]="FormFeed",l[l.CarriageReturn=13]="CarriageReturn",l[l.Space=32]="Space",l[l.ExclamationMark=33]="ExclamationMark",l[l.Number=35]="Number",l[l.Amp=38]="Amp",l[l.SingleQuote=39]="SingleQuote",l[l.DoubleQuote=34]="DoubleQuote",l[l.Dash=45]="Dash",l[l.Slash=47]="Slash",l[l.Zero=48]="Zero",l[l.Nine=57]="Nine",l[l.Semi=59]="Semi",l[l.Lt=60]="Lt",l[l.Eq=61]="Eq",l[l.Gt=62]="Gt",l[l.Questionmark=63]="Questionmark",l[l.UpperA=65]="UpperA",l[l.LowerA=97]="LowerA",l[l.UpperF=70]="UpperF",l[l.LowerF=102]="LowerF",l[l.UpperZ=90]="UpperZ",l[l.LowerZ=122]="LowerZ",l[l.LowerX=120]="LowerX",l[l.OpeningSquareBracket=91]="OpeningSquareBracket"})(i||(i={}));var s;(function(l){l[l.Text=1]="Text",l[l.BeforeTagName=2]="BeforeTagName",l[l.InTagName=3]="InTagName",l[l.InSelfClosingTag=4]="InSelfClosingTag",l[l.BeforeClosingTagName=5]="BeforeClosingTagName",l[l.InClosingTagName=6]="InClosingTagName",l[l.AfterClosingTagName=7]="AfterClosingTagName",l[l.BeforeAttributeName=8]="BeforeAttributeName",l[l.InAttributeName=9]="InAttributeName",l[l.AfterAttributeName=10]="AfterAttributeName",l[l.BeforeAttributeValue=11]="BeforeAttributeValue",l[l.InAttributeValueDq=12]="InAttributeValueDq",l[l.InAttributeValueSq=13]="InAttributeValueSq",l[l.InAttributeValueNq=14]="InAttributeValueNq",l[l.BeforeDeclaration=15]="BeforeDeclaration",l[l.InDeclaration=16]="InDeclaration",l[l.InProcessingInstruction=17]="InProcessingInstruction",l[l.BeforeComment=18]="BeforeComment",l[l.CDATASequence=19]="CDATASequence",l[l.InSpecialComment=20]="InSpecialComment",l[l.InCommentLike=21]="InCommentLike",l[l.BeforeSpecialS=22]="BeforeSpecialS",l[l.SpecialStartSequence=23]="SpecialStartSequence",l[l.InSpecialTag=24]="InSpecialTag",l[l.BeforeEntity=25]="BeforeEntity",l[l.BeforeNumericEntity=26]="BeforeNumericEntity",l[l.InNamedEntity=27]="InNamedEntity",l[l.InNumericEntity=28]="InNumericEntity",l[l.InHexEntity=29]="InHexEntity"})(s||(s={}));function r(l){return l===i.Space||l===i.NewLine||l===i.Tab||l===i.FormFeed||l===i.CarriageReturn}function n(l){return l===i.Slash||l===i.Gt||r(l)}function u(l){return l>=i.Zero&&l<=i.Nine}function c(l){return l>=i.LowerA&&l<=i.LowerZ||l>=i.UpperA&&l<=i.UpperZ}function d(l){return l>=i.UpperA&&l<=i.UpperF||l>=i.LowerA&&l<=i.LowerF}var f;(function(l){l[l.NoValue=0]="NoValue",l[l.Unquoted=1]="Unquoted",l[l.Single=2]="Single",l[l.Double=3]="Double"})(f=e.QuoteType||(e.QuoteType={}));var o={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},h=(function(){function l(p,x){var w=p.xmlMode,b=w===void 0?!1:w,g=p.decodeEntities,v=g===void 0?!0:g;this.cbs=x,this.state=s.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=s.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=b,this.decodeEntities=v,this.entityTrie=b?a.xmlDecodeTree:a.htmlDecodeTree}return l.prototype.reset=function(){this.state=s.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=s.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},l.prototype.write=function(p){this.offset+=this.buffer.length,this.buffer=p,this.parse()},l.prototype.end=function(){this.running&&this.finish()},l.prototype.pause=function(){this.running=!1},l.prototype.resume=function(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()},l.prototype.getIndex=function(){return this.index},l.prototype.getSectionStart=function(){return this.sectionStart},l.prototype.stateText=function(p){p===i.Lt||!this.decodeEntities&&this.fastForwardTo(i.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=s.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&p===i.Amp&&(this.state=s.BeforeEntity)},l.prototype.stateSpecialStartSequence=function(p){var x=this.sequenceIndex===this.currentSequence.length,w=x?n(p):(p|32)===this.currentSequence[this.sequenceIndex];if(!w)this.isSpecial=!1;else if(!x){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=s.InTagName,this.stateInTagName(p)},l.prototype.stateInSpecialTag=function(p){if(this.sequenceIndex===this.currentSequence.length){if(p===i.Gt||r(p)){var x=this.index-this.currentSequence.length;if(this.sectionStart<x){var w=this.index;this.index=x,this.cbs.ontext(this.sectionStart,x),this.index=w}this.isSpecial=!1,this.sectionStart=x+2,this.stateInClosingTagName(p);return}this.sequenceIndex=0}(p|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===o.TitleEnd?this.decodeEntities&&p===i.Amp&&(this.state=s.BeforeEntity):this.fastForwardTo(i.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(p===i.Lt)},l.prototype.stateCDATASequence=function(p){p===o.Cdata[this.sequenceIndex]?++this.sequenceIndex===o.Cdata.length&&(this.state=s.InCommentLike,this.currentSequence=o.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=s.InDeclaration,this.stateInDeclaration(p))},l.prototype.fastForwardTo=function(p){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===p)return!0;return this.index=this.buffer.length+this.offset-1,!1},l.prototype.stateInCommentLike=function(p){p===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===o.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=s.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):p!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)},l.prototype.isTagStartChar=function(p){return this.xmlMode?!n(p):c(p)},l.prototype.startSpecial=function(p,x){this.isSpecial=!0,this.currentSequence=p,this.sequenceIndex=x,this.state=s.SpecialStartSequence},l.prototype.stateBeforeTagName=function(p){if(p===i.ExclamationMark)this.state=s.BeforeDeclaration,this.sectionStart=this.index+1;else if(p===i.Questionmark)this.state=s.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(p)){var x=p|32;this.sectionStart=this.index,!this.xmlMode&&x===o.TitleEnd[2]?this.startSpecial(o.TitleEnd,3):this.state=!this.xmlMode&&x===o.ScriptEnd[2]?s.BeforeSpecialS:s.InTagName}else p===i.Slash?this.state=s.BeforeClosingTagName:(this.state=s.Text,this.stateText(p))},l.prototype.stateInTagName=function(p){n(p)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p))},l.prototype.stateBeforeClosingTagName=function(p){r(p)||(p===i.Gt?this.state=s.Text:(this.state=this.isTagStartChar(p)?s.InClosingTagName:s.InSpecialComment,this.sectionStart=this.index))},l.prototype.stateInClosingTagName=function(p){(p===i.Gt||r(p))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.AfterClosingTagName,this.stateAfterClosingTagName(p))},l.prototype.stateAfterClosingTagName=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.state=s.Text,this.baseState=s.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeAttributeName=function(p){p===i.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=s.InSpecialTag,this.sequenceIndex=0):this.state=s.Text,this.baseState=this.state,this.sectionStart=this.index+1):p===i.Slash?this.state=s.InSelfClosingTag:r(p)||(this.state=s.InAttributeName,this.sectionStart=this.index)},l.prototype.stateInSelfClosingTag=function(p){p===i.Gt?(this.cbs.onselfclosingtag(this.index),this.state=s.Text,this.baseState=s.Text,this.sectionStart=this.index+1,this.isSpecial=!1):r(p)||(this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p))},l.prototype.stateInAttributeName=function(p){(p===i.Eq||n(p))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.AfterAttributeName,this.stateAfterAttributeName(p))},l.prototype.stateAfterAttributeName=function(p){p===i.Eq?this.state=s.BeforeAttributeValue:p===i.Slash||p===i.Gt?(this.cbs.onattribend(f.NoValue,this.index),this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p)):r(p)||(this.cbs.onattribend(f.NoValue,this.index),this.state=s.InAttributeName,this.sectionStart=this.index)},l.prototype.stateBeforeAttributeValue=function(p){p===i.DoubleQuote?(this.state=s.InAttributeValueDq,this.sectionStart=this.index+1):p===i.SingleQuote?(this.state=s.InAttributeValueSq,this.sectionStart=this.index+1):r(p)||(this.sectionStart=this.index,this.state=s.InAttributeValueNq,this.stateInAttributeValueNoQuotes(p))},l.prototype.handleInAttributeValue=function(p,x){p===x||!this.decodeEntities&&this.fastForwardTo(x)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(x===i.DoubleQuote?f.Double:f.Single,this.index),this.state=s.BeforeAttributeName):this.decodeEntities&&p===i.Amp&&(this.baseState=this.state,this.state=s.BeforeEntity)},l.prototype.stateInAttributeValueDoubleQuotes=function(p){this.handleInAttributeValue(p,i.DoubleQuote)},l.prototype.stateInAttributeValueSingleQuotes=function(p){this.handleInAttributeValue(p,i.SingleQuote)},l.prototype.stateInAttributeValueNoQuotes=function(p){r(p)||p===i.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(f.Unquoted,this.index),this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p)):this.decodeEntities&&p===i.Amp&&(this.baseState=this.state,this.state=s.BeforeEntity)},l.prototype.stateBeforeDeclaration=function(p){p===i.OpeningSquareBracket?(this.state=s.CDATASequence,this.sequenceIndex=0):this.state=p===i.Dash?s.BeforeComment:s.InDeclaration},l.prototype.stateInDeclaration=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=s.Text,this.sectionStart=this.index+1)},l.prototype.stateInProcessingInstruction=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=s.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeComment=function(p){p===i.Dash?(this.state=s.InCommentLike,this.currentSequence=o.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=s.InDeclaration},l.prototype.stateInSpecialComment=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=s.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeSpecialS=function(p){var x=p|32;x===o.ScriptEnd[3]?this.startSpecial(o.ScriptEnd,4):x===o.StyleEnd[3]?this.startSpecial(o.StyleEnd,4):(this.state=s.InTagName,this.stateInTagName(p))},l.prototype.stateBeforeEntity=function(p){this.entityExcess=1,this.entityResult=0,p===i.Number?this.state=s.BeforeNumericEntity:p===i.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=s.InNamedEntity,this.stateInNamedEntity(p))},l.prototype.stateInNamedEntity=function(p){if(this.entityExcess+=1,this.trieIndex=(0,a.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,p),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];var x=this.trieCurrent&a.BinTrieFlags.VALUE_LENGTH;if(x){var w=(x>>14)-1;if(!this.allowLegacyEntity()&&p!==i.Semi)this.trieIndex+=w;else{var b=this.index-this.entityExcess+1;b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.entityResult=this.trieIndex,this.trieIndex+=w,this.entityExcess=0,this.sectionStart=this.index+1,w===0&&this.emitNamedEntity()}}},l.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var p=(this.entityTrie[this.entityResult]&a.BinTrieFlags.VALUE_LENGTH)>>14;switch(p){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~a.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},l.prototype.stateBeforeNumericEntity=function(p){(p|32)===i.LowerX?(this.entityExcess++,this.state=s.InHexEntity):(this.state=s.InNumericEntity,this.stateInNumericEntity(p))},l.prototype.emitNumericEntity=function(p){var x=this.index-this.entityExcess-1,w=x+2+ +(this.state===s.InHexEntity);w!==this.index&&(x>this.sectionStart&&this.emitPartial(this.sectionStart,x),this.sectionStart=this.index+Number(p),this.emitCodePoint((0,a.replaceCodePoint)(this.entityResult))),this.state=this.baseState},l.prototype.stateInNumericEntity=function(p){p===i.Semi?this.emitNumericEntity(!0):u(p)?(this.entityResult=this.entityResult*10+(p-i.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.stateInHexEntity=function(p){p===i.Semi?this.emitNumericEntity(!0):u(p)?(this.entityResult=this.entityResult*16+(p-i.Zero),this.entityExcess++):d(p)?(this.entityResult=this.entityResult*16+((p|32)-i.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===s.Text||this.baseState===s.InSpecialTag)},l.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===s.Text||this.state===s.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===s.InAttributeValueDq||this.state===s.InAttributeValueSq||this.state===s.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},l.prototype.shouldContinue=function(){return this.index<this.buffer.length+this.offset&&this.running},l.prototype.parse=function(){for(;this.shouldContinue();){var p=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case s.Text:{this.stateText(p);break}case s.SpecialStartSequence:{this.stateSpecialStartSequence(p);break}case s.InSpecialTag:{this.stateInSpecialTag(p);break}case s.CDATASequence:{this.stateCDATASequence(p);break}case s.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(p);break}case s.InAttributeName:{this.stateInAttributeName(p);break}case s.InCommentLike:{this.stateInCommentLike(p);break}case s.InSpecialComment:{this.stateInSpecialComment(p);break}case s.BeforeAttributeName:{this.stateBeforeAttributeName(p);break}case s.InTagName:{this.stateInTagName(p);break}case s.InClosingTagName:{this.stateInClosingTagName(p);break}case s.BeforeTagName:{this.stateBeforeTagName(p);break}case s.AfterAttributeName:{this.stateAfterAttributeName(p);break}case s.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(p);break}case s.BeforeAttributeValue:{this.stateBeforeAttributeValue(p);break}case s.BeforeClosingTagName:{this.stateBeforeClosingTagName(p);break}case s.AfterClosingTagName:{this.stateAfterClosingTagName(p);break}case s.BeforeSpecialS:{this.stateBeforeSpecialS(p);break}case s.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(p);break}case s.InSelfClosingTag:{this.stateInSelfClosingTag(p);break}case s.InDeclaration:{this.stateInDeclaration(p);break}case s.BeforeDeclaration:{this.stateBeforeDeclaration(p);break}case s.BeforeComment:{this.stateBeforeComment(p);break}case s.InProcessingInstruction:{this.stateInProcessingInstruction(p);break}case s.InNamedEntity:{this.stateInNamedEntity(p);break}case s.BeforeEntity:{this.stateBeforeEntity(p);break}case s.InHexEntity:{this.stateInHexEntity(p);break}case s.InNumericEntity:{this.stateInNumericEntity(p);break}default:this.stateBeforeNumericEntity(p)}this.index++}this.cleanup()},l.prototype.finish=function(){this.state===s.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()},l.prototype.handleTrailingData=function(){var p=this.buffer.length+this.offset;this.state===s.InCommentLike?this.currentSequence===o.CdataEnd?this.cbs.oncdata(this.sectionStart,p,0):this.cbs.oncomment(this.sectionStart,p,0):this.state===s.InNumericEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===s.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===s.InTagName||this.state===s.BeforeAttributeName||this.state===s.BeforeAttributeValue||this.state===s.AfterAttributeName||this.state===s.InAttributeName||this.state===s.InAttributeValueSq||this.state===s.InAttributeValueDq||this.state===s.InAttributeValueNq||this.state===s.InClosingTagName||this.cbs.ontext(this.sectionStart,p)},l.prototype.emitPartial=function(p,x){this.baseState!==s.Text&&this.baseState!==s.InSpecialTag?this.cbs.onattribdata(p,x):this.cbs.ontext(p,x)},l.prototype.emitCodePoint=function(p){this.baseState!==s.Text&&this.baseState!==s.InSpecialTag?this.cbs.onattribentity(p):this.cbs.ontextentity(p)},l})();e.default=h})(Gs)),Gs}var il;function ol(){if(il)return It;il=1;var e=It&&It.__createBinding||(Object.create?(function(b,g,v,_){_===void 0&&(_=v);var k=Object.getOwnPropertyDescriptor(g,v);(!k||("get"in k?!g.__esModule:k.writable||k.configurable))&&(k={enumerable:!0,get:function(){return g[v]}}),Object.defineProperty(b,_,k)}):(function(b,g,v,_){_===void 0&&(_=v),b[_]=g[v]})),a=It&&It.__setModuleDefault||(Object.create?(function(b,g){Object.defineProperty(b,"default",{enumerable:!0,value:g})}):function(b,g){b.default=g}),i=It&&It.__importStar||function(b){if(b&&b.__esModule)return b;var g={};if(b!=null)for(var v in b)v!=="default"&&Object.prototype.hasOwnProperty.call(b,v)&&e(g,b,v);return a(g,b),g};Object.defineProperty(It,"__esModule",{value:!0}),It.Parser=void 0;var s=i(nd()),r=ts(),n=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),c=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),f=new Set(["rt","rp"]),o=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",n],["input",n],["output",n],["button",n],["datalist",n],["textarea",n],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",f],["rp",f],["tbody",c],["tfoot",c]]),h=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),l=new Set(["math","svg"]),p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),x=/\s|\//,w=(function(){function b(g,v){v===void 0&&(v={});var _,k,y,m,N;this.options=v,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=g??{},this.lowerCaseTagNames=(_=v.lowerCaseTags)!==null&&_!==void 0?_:!v.xmlMode,this.lowerCaseAttributeNames=(k=v.lowerCaseAttributeNames)!==null&&k!==void 0?k:!v.xmlMode,this.tokenizer=new((y=v.Tokenizer)!==null&&y!==void 0?y:s.default)(this.options,this),(N=(m=this.cbs).onparserinit)===null||N===void 0||N.call(m,this)}return b.prototype.ontext=function(g,v){var _,k,y=this.getSlice(g,v);this.endIndex=v-1,(k=(_=this.cbs).ontext)===null||k===void 0||k.call(_,y),this.startIndex=v},b.prototype.ontextentity=function(g){var v,_,k=this.tokenizer.getSectionStart();this.endIndex=k-1,(_=(v=this.cbs).ontext)===null||_===void 0||_.call(v,(0,r.fromCodePoint)(g)),this.startIndex=k},b.prototype.isVoidElement=function(g){return!this.options.xmlMode&&h.has(g)},b.prototype.onopentagname=function(g,v){this.endIndex=v;var _=this.getSlice(g,v);this.lowerCaseTagNames&&(_=_.toLowerCase()),this.emitOpenTag(_)},b.prototype.emitOpenTag=function(g){var v,_,k,y;this.openTagStart=this.startIndex,this.tagname=g;var m=!this.options.xmlMode&&o.get(g);if(m)for(;this.stack.length>0&&m.has(this.stack[this.stack.length-1]);){var N=this.stack.pop();(_=(v=this.cbs).onclosetag)===null||_===void 0||_.call(v,N,!0)}this.isVoidElement(g)||(this.stack.push(g),l.has(g)?this.foreignContext.push(!0):p.has(g)&&this.foreignContext.push(!1)),(y=(k=this.cbs).onopentagname)===null||y===void 0||y.call(k,g),this.cbs.onopentag&&(this.attribs={})},b.prototype.endOpenTag=function(g){var v,_;this.startIndex=this.openTagStart,this.attribs&&((_=(v=this.cbs).onopentag)===null||_===void 0||_.call(v,this.tagname,this.attribs,g),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},b.prototype.onopentagend=function(g){this.endIndex=g,this.endOpenTag(!1),this.startIndex=g+1},b.prototype.onclosetag=function(g,v){var _,k,y,m,N,j;this.endIndex=v;var A=this.getSlice(g,v);if(this.lowerCaseTagNames&&(A=A.toLowerCase()),(l.has(A)||p.has(A))&&this.foreignContext.pop(),this.isVoidElement(A))!this.options.xmlMode&&A==="br"&&((k=(_=this.cbs).onopentagname)===null||k===void 0||k.call(_,"br"),(m=(y=this.cbs).onopentag)===null||m===void 0||m.call(y,"br",{},!0),(j=(N=this.cbs).onclosetag)===null||j===void 0||j.call(N,"br",!1));else{var D=this.stack.lastIndexOf(A);if(D!==-1)if(this.cbs.onclosetag)for(var C=this.stack.length-D;C--;)this.cbs.onclosetag(this.stack.pop(),C!==0);else this.stack.length=D;else!this.options.xmlMode&&A==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=v+1},b.prototype.onselfclosingtag=function(g){this.endIndex=g,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=g+1):this.onopentagend(g)},b.prototype.closeCurrentTag=function(g){var v,_,k=this.tagname;this.endOpenTag(g),this.stack[this.stack.length-1]===k&&((_=(v=this.cbs).onclosetag)===null||_===void 0||_.call(v,k,!g),this.stack.pop())},b.prototype.onattribname=function(g,v){this.startIndex=g;var _=this.getSlice(g,v);this.attribname=this.lowerCaseAttributeNames?_.toLowerCase():_},b.prototype.onattribdata=function(g,v){this.attribvalue+=this.getSlice(g,v)},b.prototype.onattribentity=function(g){this.attribvalue+=(0,r.fromCodePoint)(g)},b.prototype.onattribend=function(g,v){var _,k;this.endIndex=v,(k=(_=this.cbs).onattribute)===null||k===void 0||k.call(_,this.attribname,this.attribvalue,g===s.QuoteType.Double?'"':g===s.QuoteType.Single?"'":g===s.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},b.prototype.getInstructionName=function(g){var v=g.search(x),_=v<0?g:g.substr(0,v);return this.lowerCaseTagNames&&(_=_.toLowerCase()),_},b.prototype.ondeclaration=function(g,v){this.endIndex=v;var _=this.getSlice(g,v);if(this.cbs.onprocessinginstruction){var k=this.getInstructionName(_);this.cbs.onprocessinginstruction("!".concat(k),"!".concat(_))}this.startIndex=v+1},b.prototype.onprocessinginstruction=function(g,v){this.endIndex=v;var _=this.getSlice(g,v);if(this.cbs.onprocessinginstruction){var k=this.getInstructionName(_);this.cbs.onprocessinginstruction("?".concat(k),"?".concat(_))}this.startIndex=v+1},b.prototype.oncomment=function(g,v,_){var k,y,m,N;this.endIndex=v,(y=(k=this.cbs).oncomment)===null||y===void 0||y.call(k,this.getSlice(g,v-_)),(N=(m=this.cbs).oncommentend)===null||N===void 0||N.call(m),this.startIndex=v+1},b.prototype.oncdata=function(g,v,_){var k,y,m,N,j,A,D,C,T,M;this.endIndex=v;var W=this.getSlice(g,v-_);this.options.xmlMode||this.options.recognizeCDATA?((y=(k=this.cbs).oncdatastart)===null||y===void 0||y.call(k),(N=(m=this.cbs).ontext)===null||N===void 0||N.call(m,W),(A=(j=this.cbs).oncdataend)===null||A===void 0||A.call(j)):((C=(D=this.cbs).oncomment)===null||C===void 0||C.call(D,"[CDATA[".concat(W,"]]")),(M=(T=this.cbs).oncommentend)===null||M===void 0||M.call(T)),this.startIndex=v+1},b.prototype.onend=function(){var g,v;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var _=this.stack.length;_>0;this.cbs.onclosetag(this.stack[--_],!0));}(v=(g=this.cbs).onend)===null||v===void 0||v.call(g)},b.prototype.reset=function(){var g,v,_,k;(v=(g=this.cbs).onreset)===null||v===void 0||v.call(g),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(k=(_=this.cbs).onparserinit)===null||k===void 0||k.call(_,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},b.prototype.parseComplete=function(g){this.reset(),this.end(g)},b.prototype.getSlice=function(g,v){for(;g-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var _=this.buffers[0].slice(g-this.bufferOffset,v-this.bufferOffset);v-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),_+=this.buffers[0].slice(0,v-this.bufferOffset);return _},b.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},b.prototype.write=function(g){var v,_;if(this.ended){(_=(v=this.cbs).onerror)===null||_===void 0||_.call(v,new Error(".write() after done!"));return}this.buffers.push(g),this.tokenizer.running&&(this.tokenizer.write(g),this.writeIndex++)},b.prototype.end=function(g){var v,_;if(this.ended){(_=(v=this.cbs).onerror)===null||_===void 0||_.call(v,new Error(".end() after done!"));return}g&&this.write(g),this.ended=!0,this.tokenizer.end()},b.prototype.pause=function(){this.tokenizer.pause()},b.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()},b.prototype.parseChunk=function(g){this.write(g)},b.prototype.done=function(g){this.end(g)},b})();return It.Parser=w,It}var Ir={},Ys={},ul;function nn(){return ul||(ul=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var a;(function(s){s.Root="root",s.Text="text",s.Directive="directive",s.Comment="comment",s.Script="script",s.Style="style",s.Tag="tag",s.CDATA="cdata",s.Doctype="doctype"})(a=e.ElementType||(e.ElementType={}));function i(s){return s.type===a.Tag||s.type===a.Script||s.type===a.Style}e.isTag=i,e.Root=a.Root,e.Text=a.Text,e.Directive=a.Directive,e.Comment=a.Comment,e.Script=a.Script,e.Style=a.Style,e.Tag=a.Tag,e.CDATA=a.CDATA,e.Doctype=a.Doctype})(Ys)),Ys}var ve={},ll;function cl(){if(ll)return ve;ll=1;var e=ve&&ve.__extends||(function(){var y=function(m,N){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,A){j.__proto__=A}||function(j,A){for(var D in A)Object.prototype.hasOwnProperty.call(A,D)&&(j[D]=A[D])},y(m,N)};return function(m,N){if(typeof N!="function"&&N!==null)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");y(m,N);function j(){this.constructor=m}m.prototype=N===null?Object.create(N):(j.prototype=N.prototype,new j)}})(),a=ve&&ve.__assign||function(){return a=Object.assign||function(y){for(var m,N=1,j=arguments.length;N<j;N++){m=arguments[N];for(var A in m)Object.prototype.hasOwnProperty.call(m,A)&&(y[A]=m[A])}return y},a.apply(this,arguments)};Object.defineProperty(ve,"__esModule",{value:!0}),ve.cloneNode=ve.hasChildren=ve.isDocument=ve.isDirective=ve.isComment=ve.isText=ve.isCDATA=ve.isTag=ve.Element=ve.Document=ve.CDATA=ve.NodeWithChildren=ve.ProcessingInstruction=ve.Comment=ve.Text=ve.DataNode=ve.Node=void 0;var i=nn(),s=(function(){function y(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(y.prototype,"parentNode",{get:function(){return this.parent},set:function(m){this.parent=m},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"previousSibling",{get:function(){return this.prev},set:function(m){this.prev=m},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"nextSibling",{get:function(){return this.next},set:function(m){this.next=m},enumerable:!1,configurable:!0}),y.prototype.cloneNode=function(m){return m===void 0&&(m=!1),_(this,m)},y})();ve.Node=s;var r=(function(y){e(m,y);function m(N){var j=y.call(this)||this;return j.data=N,j}return Object.defineProperty(m.prototype,"nodeValue",{get:function(){return this.data},set:function(N){this.data=N},enumerable:!1,configurable:!0}),m})(s);ve.DataNode=r;var n=(function(y){e(m,y);function m(){var N=y!==null&&y.apply(this,arguments)||this;return N.type=i.ElementType.Text,N}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),m})(r);ve.Text=n;var u=(function(y){e(m,y);function m(){var N=y!==null&&y.apply(this,arguments)||this;return N.type=i.ElementType.Comment,N}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),m})(r);ve.Comment=u;var c=(function(y){e(m,y);function m(N,j){var A=y.call(this,j)||this;return A.name=N,A.type=i.ElementType.Directive,A}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),m})(r);ve.ProcessingInstruction=c;var d=(function(y){e(m,y);function m(N){var j=y.call(this)||this;return j.children=N,j}return Object.defineProperty(m.prototype,"firstChild",{get:function(){var N;return(N=this.children[0])!==null&&N!==void 0?N:null},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"childNodes",{get:function(){return this.children},set:function(N){this.children=N},enumerable:!1,configurable:!0}),m})(s);ve.NodeWithChildren=d;var f=(function(y){e(m,y);function m(){var N=y!==null&&y.apply(this,arguments)||this;return N.type=i.ElementType.CDATA,N}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),m})(d);ve.CDATA=f;var o=(function(y){e(m,y);function m(){var N=y!==null&&y.apply(this,arguments)||this;return N.type=i.ElementType.Root,N}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),m})(d);ve.Document=o;var h=(function(y){e(m,y);function m(N,j,A,D){A===void 0&&(A=[]),D===void 0&&(D=N==="script"?i.ElementType.Script:N==="style"?i.ElementType.Style:i.ElementType.Tag);var C=y.call(this,A)||this;return C.name=N,C.attribs=j,C.type=D,C}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"tagName",{get:function(){return this.name},set:function(N){this.name=N},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"attributes",{get:function(){var N=this;return Object.keys(this.attribs).map(function(j){var A,D;return{name:j,value:N.attribs[j],namespace:(A=N["x-attribsNamespace"])===null||A===void 0?void 0:A[j],prefix:(D=N["x-attribsPrefix"])===null||D===void 0?void 0:D[j]}})},enumerable:!1,configurable:!0}),m})(d);ve.Element=h;function l(y){return(0,i.isTag)(y)}ve.isTag=l;function p(y){return y.type===i.ElementType.CDATA}ve.isCDATA=p;function x(y){return y.type===i.ElementType.Text}ve.isText=x;function w(y){return y.type===i.ElementType.Comment}ve.isComment=w;function b(y){return y.type===i.ElementType.Directive}ve.isDirective=b;function g(y){return y.type===i.ElementType.Root}ve.isDocument=g;function v(y){return Object.prototype.hasOwnProperty.call(y,"children")}ve.hasChildren=v;function _(y,m){m===void 0&&(m=!1);var N;if(x(y))N=new n(y.data);else if(w(y))N=new u(y.data);else if(l(y)){var j=m?k(y.children):[],A=new h(y.name,a({},y.attribs),j);j.forEach(function(M){return M.parent=A}),y.namespace!=null&&(A.namespace=y.namespace),y["x-attribsNamespace"]&&(A["x-attribsNamespace"]=a({},y["x-attribsNamespace"])),y["x-attribsPrefix"]&&(A["x-attribsPrefix"]=a({},y["x-attribsPrefix"])),N=A}else if(p(y)){var j=m?k(y.children):[],D=new f(j);j.forEach(function(W){return W.parent=D}),N=D}else if(g(y)){var j=m?k(y.children):[],C=new o(j);j.forEach(function(W){return W.parent=C}),y["x-mode"]&&(C["x-mode"]=y["x-mode"]),N=C}else if(b(y)){var T=new c(y.name,y.data);y["x-name"]!=null&&(T["x-name"]=y["x-name"],T["x-publicId"]=y["x-publicId"],T["x-systemId"]=y["x-systemId"]),N=T}else throw new Error("Not implemented yet: ".concat(y.type));return N.startIndex=y.startIndex,N.endIndex=y.endIndex,y.sourceCodeLocation!=null&&(N.sourceCodeLocation=y.sourceCodeLocation),N}ve.cloneNode=_;function k(y){for(var m=y.map(function(j){return _(j,!0)}),N=1;N<m.length;N++)m[N].prev=m[N-1],m[N-1].next=m[N];return m}return ve}var dl;function xr(){return dl||(dl=1,(function(e){var a=Ir&&Ir.__createBinding||(Object.create?(function(c,d,f,o){o===void 0&&(o=f);var h=Object.getOwnPropertyDescriptor(d,f);(!h||("get"in h?!d.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return d[f]}}),Object.defineProperty(c,o,h)}):(function(c,d,f,o){o===void 0&&(o=f),c[o]=d[f]})),i=Ir&&Ir.__exportStar||function(c,d){for(var f in c)f!=="default"&&!Object.prototype.hasOwnProperty.call(d,f)&&a(d,c,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var s=nn(),r=cl();i(cl(),e);var n={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},u=(function(){function c(d,f,o){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof f=="function"&&(o=f,f=n),typeof d=="object"&&(f=d,d=void 0),this.callback=d??null,this.options=f??n,this.elementCB=o??null}return c.prototype.onparserinit=function(d){this.parser=d},c.prototype.onreset=function(){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},c.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},c.prototype.onerror=function(d){this.handleCallback(d)},c.prototype.onclosetag=function(){this.lastNode=null;var d=this.tagStack.pop();this.options.withEndIndices&&(d.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(d)},c.prototype.onopentag=function(d,f){var o=this.options.xmlMode?s.ElementType.Tag:void 0,h=new r.Element(d,f,void 0,o);this.addNode(h),this.tagStack.push(h)},c.prototype.ontext=function(d){var f=this.lastNode;if(f&&f.type===s.ElementType.Text)f.data+=d,this.options.withEndIndices&&(f.endIndex=this.parser.endIndex);else{var o=new r.Text(d);this.addNode(o),this.lastNode=o}},c.prototype.oncomment=function(d){if(this.lastNode&&this.lastNode.type===s.ElementType.Comment){this.lastNode.data+=d;return}var f=new r.Comment(d);this.addNode(f),this.lastNode=f},c.prototype.oncommentend=function(){this.lastNode=null},c.prototype.oncdatastart=function(){var d=new r.Text(""),f=new r.CDATA([d]);this.addNode(f),d.parent=f,this.lastNode=d},c.prototype.oncdataend=function(){this.lastNode=null},c.prototype.onprocessinginstruction=function(d,f){var o=new r.ProcessingInstruction(d,f);this.addNode(o)},c.prototype.handleCallback=function(d){if(typeof this.callback=="function")this.callback(d,this.dom);else if(d)throw d},c.prototype.addNode=function(d){var f=this.tagStack[this.tagStack.length-1],o=f.children[f.children.length-1];this.options.withStartIndices&&(d.startIndex=this.parser.startIndex),this.options.withEndIndices&&(d.endIndex=this.parser.endIndex),f.children.push(d),o&&(d.prev=o,o.next=d),d.parent=f,this.lastNode=null},c})();e.DomHandler=u,e.default=u})(Ir)),Ir}var Fr={},Wt={},lt={},Zs={},tr={},Vn={},fl;function $h(){if(fl)return Vn;fl=1,Object.defineProperty(Vn,"__esModule",{value:!0});function e(a){for(var i=1;i<a.length;i++)a[i][0]+=a[i-1][0]+1;return a}return Vn.default=new Map(e([[9,"&Tab;"],[0,"&NewLine;"],[22,"&excl;"],[0,"&quot;"],[0,"&num;"],[0,"&dollar;"],[0,"&percnt;"],[0,"&amp;"],[0,"&apos;"],[0,"&lpar;"],[0,"&rpar;"],[0,"&ast;"],[0,"&plus;"],[0,"&comma;"],[1,"&period;"],[0,"&sol;"],[10,"&colon;"],[0,"&semi;"],[0,{v:"&lt;",n:8402,o:"&nvlt;"}],[0,{v:"&equals;",n:8421,o:"&bne;"}],[0,{v:"&gt;",n:8402,o:"&nvgt;"}],[0,"&quest;"],[0,"&commat;"],[26,"&lbrack;"],[0,"&bsol;"],[0,"&rbrack;"],[0,"&Hat;"],[0,"&lowbar;"],[0,"&DiacriticalGrave;"],[5,{n:106,o:"&fjlig;"}],[20,"&lbrace;"],[0,"&verbar;"],[0,"&rbrace;"],[34,"&nbsp;"],[0,"&iexcl;"],[0,"&cent;"],[0,"&pound;"],[0,"&curren;"],[0,"&yen;"],[0,"&brvbar;"],[0,"&sect;"],[0,"&die;"],[0,"&copy;"],[0,"&ordf;"],[0,"&laquo;"],[0,"&not;"],[0,"&shy;"],[0,"&circledR;"],[0,"&macr;"],[0,"&deg;"],[0,"&PlusMinus;"],[0,"&sup2;"],[0,"&sup3;"],[0,"&acute;"],[0,"&micro;"],[0,"&para;"],[0,"&centerdot;"],[0,"&cedil;"],[0,"&sup1;"],[0,"&ordm;"],[0,"&raquo;"],[0,"&frac14;"],[0,"&frac12;"],[0,"&frac34;"],[0,"&iquest;"],[0,"&Agrave;"],[0,"&Aacute;"],[0,"&Acirc;"],[0,"&Atilde;"],[0,"&Auml;"],[0,"&angst;"],[0,"&AElig;"],[0,"&Ccedil;"],[0,"&Egrave;"],[0,"&Eacute;"],[0,"&Ecirc;"],[0,"&Euml;"],[0,"&Igrave;"],[0,"&Iacute;"],[0,"&Icirc;"],[0,"&Iuml;"],[0,"&ETH;"],[0,"&Ntilde;"],[0,"&Ograve;"],[0,"&Oacute;"],[0,"&Ocirc;"],[0,"&Otilde;"],[0,"&Ouml;"],[0,"&times;"],[0,"&Oslash;"],[0,"&Ugrave;"],[0,"&Uacute;"],[0,"&Ucirc;"],[0,"&Uuml;"],[0,"&Yacute;"],[0,"&THORN;"],[0,"&szlig;"],[0,"&agrave;"],[0,"&aacute;"],[0,"&acirc;"],[0,"&atilde;"],[0,"&auml;"],[0,"&aring;"],[0,"&aelig;"],[0,"&ccedil;"],[0,"&egrave;"],[0,"&eacute;"],[0,"&ecirc;"],[0,"&euml;"],[0,"&igrave;"],[0,"&iacute;"],[0,"&icirc;"],[0,"&iuml;"],[0,"&eth;"],[0,"&ntilde;"],[0,"&ograve;"],[0,"&oacute;"],[0,"&ocirc;"],[0,"&otilde;"],[0,"&ouml;"],[0,"&div;"],[0,"&oslash;"],[0,"&ugrave;"],[0,"&uacute;"],[0,"&ucirc;"],[0,"&uuml;"],[0,"&yacute;"],[0,"&thorn;"],[0,"&yuml;"],[0,"&Amacr;"],[0,"&amacr;"],[0,"&Abreve;"],[0,"&abreve;"],[0,"&Aogon;"],[0,"&aogon;"],[0,"&Cacute;"],[0,"&cacute;"],[0,"&Ccirc;"],[0,"&ccirc;"],[0,"&Cdot;"],[0,"&cdot;"],[0,"&Ccaron;"],[0,"&ccaron;"],[0,"&Dcaron;"],[0,"&dcaron;"],[0,"&Dstrok;"],[0,"&dstrok;"],[0,"&Emacr;"],[0,"&emacr;"],[2,"&Edot;"],[0,"&edot;"],[0,"&Eogon;"],[0,"&eogon;"],[0,"&Ecaron;"],[0,"&ecaron;"],[0,"&Gcirc;"],[0,"&gcirc;"],[0,"&Gbreve;"],[0,"&gbreve;"],[0,"&Gdot;"],[0,"&gdot;"],[0,"&Gcedil;"],[1,"&Hcirc;"],[0,"&hcirc;"],[0,"&Hstrok;"],[0,"&hstrok;"],[0,"&Itilde;"],[0,"&itilde;"],[0,"&Imacr;"],[0,"&imacr;"],[2,"&Iogon;"],[0,"&iogon;"],[0,"&Idot;"],[0,"&imath;"],[0,"&IJlig;"],[0,"&ijlig;"],[0,"&Jcirc;"],[0,"&jcirc;"],[0,"&Kcedil;"],[0,"&kcedil;"],[0,"&kgreen;"],[0,"&Lacute;"],[0,"&lacute;"],[0,"&Lcedil;"],[0,"&lcedil;"],[0,"&Lcaron;"],[0,"&lcaron;"],[0,"&Lmidot;"],[0,"&lmidot;"],[0,"&Lstrok;"],[0,"&lstrok;"],[0,"&Nacute;"],[0,"&nacute;"],[0,"&Ncedil;"],[0,"&ncedil;"],[0,"&Ncaron;"],[0,"&ncaron;"],[0,"&napos;"],[0,"&ENG;"],[0,"&eng;"],[0,"&Omacr;"],[0,"&omacr;"],[2,"&Odblac;"],[0,"&odblac;"],[0,"&OElig;"],[0,"&oelig;"],[0,"&Racute;"],[0,"&racute;"],[0,"&Rcedil;"],[0,"&rcedil;"],[0,"&Rcaron;"],[0,"&rcaron;"],[0,"&Sacute;"],[0,"&sacute;"],[0,"&Scirc;"],[0,"&scirc;"],[0,"&Scedil;"],[0,"&scedil;"],[0,"&Scaron;"],[0,"&scaron;"],[0,"&Tcedil;"],[0,"&tcedil;"],[0,"&Tcaron;"],[0,"&tcaron;"],[0,"&Tstrok;"],[0,"&tstrok;"],[0,"&Utilde;"],[0,"&utilde;"],[0,"&Umacr;"],[0,"&umacr;"],[0,"&Ubreve;"],[0,"&ubreve;"],[0,"&Uring;"],[0,"&uring;"],[0,"&Udblac;"],[0,"&udblac;"],[0,"&Uogon;"],[0,"&uogon;"],[0,"&Wcirc;"],[0,"&wcirc;"],[0,"&Ycirc;"],[0,"&ycirc;"],[0,"&Yuml;"],[0,"&Zacute;"],[0,"&zacute;"],[0,"&Zdot;"],[0,"&zdot;"],[0,"&Zcaron;"],[0,"&zcaron;"],[19,"&fnof;"],[34,"&imped;"],[63,"&gacute;"],[65,"&jmath;"],[142,"&circ;"],[0,"&caron;"],[16,"&breve;"],[0,"&DiacriticalDot;"],[0,"&ring;"],[0,"&ogon;"],[0,"&DiacriticalTilde;"],[0,"&dblac;"],[51,"&DownBreve;"],[127,"&Alpha;"],[0,"&Beta;"],[0,"&Gamma;"],[0,"&Delta;"],[0,"&Epsilon;"],[0,"&Zeta;"],[0,"&Eta;"],[0,"&Theta;"],[0,"&Iota;"],[0,"&Kappa;"],[0,"&Lambda;"],[0,"&Mu;"],[0,"&Nu;"],[0,"&Xi;"],[0,"&Omicron;"],[0,"&Pi;"],[0,"&Rho;"],[1,"&Sigma;"],[0,"&Tau;"],[0,"&Upsilon;"],[0,"&Phi;"],[0,"&Chi;"],[0,"&Psi;"],[0,"&ohm;"],[7,"&alpha;"],[0,"&beta;"],[0,"&gamma;"],[0,"&delta;"],[0,"&epsi;"],[0,"&zeta;"],[0,"&eta;"],[0,"&theta;"],[0,"&iota;"],[0,"&kappa;"],[0,"&lambda;"],[0,"&mu;"],[0,"&nu;"],[0,"&xi;"],[0,"&omicron;"],[0,"&pi;"],[0,"&rho;"],[0,"&sigmaf;"],[0,"&sigma;"],[0,"&tau;"],[0,"&upsi;"],[0,"&phi;"],[0,"&chi;"],[0,"&psi;"],[0,"&omega;"],[7,"&thetasym;"],[0,"&Upsi;"],[2,"&phiv;"],[0,"&piv;"],[5,"&Gammad;"],[0,"&digamma;"],[18,"&kappav;"],[0,"&rhov;"],[3,"&epsiv;"],[0,"&backepsilon;"],[10,"&IOcy;"],[0,"&DJcy;"],[0,"&GJcy;"],[0,"&Jukcy;"],[0,"&DScy;"],[0,"&Iukcy;"],[0,"&YIcy;"],[0,"&Jsercy;"],[0,"&LJcy;"],[0,"&NJcy;"],[0,"&TSHcy;"],[0,"&KJcy;"],[1,"&Ubrcy;"],[0,"&DZcy;"],[0,"&Acy;"],[0,"&Bcy;"],[0,"&Vcy;"],[0,"&Gcy;"],[0,"&Dcy;"],[0,"&IEcy;"],[0,"&ZHcy;"],[0,"&Zcy;"],[0,"&Icy;"],[0,"&Jcy;"],[0,"&Kcy;"],[0,"&Lcy;"],[0,"&Mcy;"],[0,"&Ncy;"],[0,"&Ocy;"],[0,"&Pcy;"],[0,"&Rcy;"],[0,"&Scy;"],[0,"&Tcy;"],[0,"&Ucy;"],[0,"&Fcy;"],[0,"&KHcy;"],[0,"&TScy;"],[0,"&CHcy;"],[0,"&SHcy;"],[0,"&SHCHcy;"],[0,"&HARDcy;"],[0,"&Ycy;"],[0,"&SOFTcy;"],[0,"&Ecy;"],[0,"&YUcy;"],[0,"&YAcy;"],[0,"&acy;"],[0,"&bcy;"],[0,"&vcy;"],[0,"&gcy;"],[0,"&dcy;"],[0,"&iecy;"],[0,"&zhcy;"],[0,"&zcy;"],[0,"&icy;"],[0,"&jcy;"],[0,"&kcy;"],[0,"&lcy;"],[0,"&mcy;"],[0,"&ncy;"],[0,"&ocy;"],[0,"&pcy;"],[0,"&rcy;"],[0,"&scy;"],[0,"&tcy;"],[0,"&ucy;"],[0,"&fcy;"],[0,"&khcy;"],[0,"&tscy;"],[0,"&chcy;"],[0,"&shcy;"],[0,"&shchcy;"],[0,"&hardcy;"],[0,"&ycy;"],[0,"&softcy;"],[0,"&ecy;"],[0,"&yucy;"],[0,"&yacy;"],[1,"&iocy;"],[0,"&djcy;"],[0,"&gjcy;"],[0,"&jukcy;"],[0,"&dscy;"],[0,"&iukcy;"],[0,"&yicy;"],[0,"&jsercy;"],[0,"&ljcy;"],[0,"&njcy;"],[0,"&tshcy;"],[0,"&kjcy;"],[1,"&ubrcy;"],[0,"&dzcy;"],[7074,"&ensp;"],[0,"&emsp;"],[0,"&emsp13;"],[0,"&emsp14;"],[1,"&numsp;"],[0,"&puncsp;"],[0,"&ThinSpace;"],[0,"&hairsp;"],[0,"&NegativeMediumSpace;"],[0,"&zwnj;"],[0,"&zwj;"],[0,"&lrm;"],[0,"&rlm;"],[0,"&dash;"],[2,"&ndash;"],[0,"&mdash;"],[0,"&horbar;"],[0,"&Verbar;"],[1,"&lsquo;"],[0,"&CloseCurlyQuote;"],[0,"&lsquor;"],[1,"&ldquo;"],[0,"&CloseCurlyDoubleQuote;"],[0,"&bdquo;"],[1,"&dagger;"],[0,"&Dagger;"],[0,"&bull;"],[2,"&nldr;"],[0,"&hellip;"],[9,"&permil;"],[0,"&pertenk;"],[0,"&prime;"],[0,"&Prime;"],[0,"&tprime;"],[0,"&backprime;"],[3,"&lsaquo;"],[0,"&rsaquo;"],[3,"&oline;"],[2,"&caret;"],[1,"&hybull;"],[0,"&frasl;"],[10,"&bsemi;"],[7,"&qprime;"],[7,{v:"&MediumSpace;",n:8202,o:"&ThickSpace;"}],[0,"&NoBreak;"],[0,"&af;"],[0,"&InvisibleTimes;"],[0,"&ic;"],[72,"&euro;"],[46,"&tdot;"],[0,"&DotDot;"],[37,"&complexes;"],[2,"&incare;"],[4,"&gscr;"],[0,"&hamilt;"],[0,"&Hfr;"],[0,"&Hopf;"],[0,"&planckh;"],[0,"&hbar;"],[0,"&imagline;"],[0,"&Ifr;"],[0,"&lagran;"],[0,"&ell;"],[1,"&naturals;"],[0,"&numero;"],[0,"&copysr;"],[0,"&weierp;"],[0,"&Popf;"],[0,"&Qopf;"],[0,"&realine;"],[0,"&real;"],[0,"&reals;"],[0,"&rx;"],[3,"&trade;"],[1,"&integers;"],[2,"&mho;"],[0,"&zeetrf;"],[0,"&iiota;"],[2,"&bernou;"],[0,"&Cayleys;"],[1,"&escr;"],[0,"&Escr;"],[0,"&Fouriertrf;"],[1,"&Mellintrf;"],[0,"&order;"],[0,"&alefsym;"],[0,"&beth;"],[0,"&gimel;"],[0,"&daleth;"],[12,"&CapitalDifferentialD;"],[0,"&dd;"],[0,"&ee;"],[0,"&ii;"],[10,"&frac13;"],[0,"&frac23;"],[0,"&frac15;"],[0,"&frac25;"],[0,"&frac35;"],[0,"&frac45;"],[0,"&frac16;"],[0,"&frac56;"],[0,"&frac18;"],[0,"&frac38;"],[0,"&frac58;"],[0,"&frac78;"],[49,"&larr;"],[0,"&ShortUpArrow;"],[0,"&rarr;"],[0,"&darr;"],[0,"&harr;"],[0,"&updownarrow;"],[0,"&nwarr;"],[0,"&nearr;"],[0,"&LowerRightArrow;"],[0,"&LowerLeftArrow;"],[0,"&nlarr;"],[0,"&nrarr;"],[1,{v:"&rarrw;",n:824,o:"&nrarrw;"}],[0,"&Larr;"],[0,"&Uarr;"],[0,"&Rarr;"],[0,"&Darr;"],[0,"&larrtl;"],[0,"&rarrtl;"],[0,"&LeftTeeArrow;"],[0,"&mapstoup;"],[0,"&map;"],[0,"&DownTeeArrow;"],[1,"&hookleftarrow;"],[0,"&hookrightarrow;"],[0,"&larrlp;"],[0,"&looparrowright;"],[0,"&harrw;"],[0,"&nharr;"],[1,"&lsh;"],[0,"&rsh;"],[0,"&ldsh;"],[0,"&rdsh;"],[1,"&crarr;"],[0,"&cularr;"],[0,"&curarr;"],[2,"&circlearrowleft;"],[0,"&circlearrowright;"],[0,"&leftharpoonup;"],[0,"&DownLeftVector;"],[0,"&RightUpVector;"],[0,"&LeftUpVector;"],[0,"&rharu;"],[0,"&DownRightVector;"],[0,"&dharr;"],[0,"&dharl;"],[0,"&RightArrowLeftArrow;"],[0,"&udarr;"],[0,"&LeftArrowRightArrow;"],[0,"&leftleftarrows;"],[0,"&upuparrows;"],[0,"&rightrightarrows;"],[0,"&ddarr;"],[0,"&leftrightharpoons;"],[0,"&Equilibrium;"],[0,"&nlArr;"],[0,"&nhArr;"],[0,"&nrArr;"],[0,"&DoubleLeftArrow;"],[0,"&DoubleUpArrow;"],[0,"&DoubleRightArrow;"],[0,"&dArr;"],[0,"&DoubleLeftRightArrow;"],[0,"&DoubleUpDownArrow;"],[0,"&nwArr;"],[0,"&neArr;"],[0,"&seArr;"],[0,"&swArr;"],[0,"&lAarr;"],[0,"&rAarr;"],[1,"&zigrarr;"],[6,"&larrb;"],[0,"&rarrb;"],[15,"&DownArrowUpArrow;"],[7,"&loarr;"],[0,"&roarr;"],[0,"&hoarr;"],[0,"&forall;"],[0,"&comp;"],[0,{v:"&part;",n:824,o:"&npart;"}],[0,"&exist;"],[0,"&nexist;"],[0,"&empty;"],[1,"&Del;"],[0,"&Element;"],[0,"&NotElement;"],[1,"&ni;"],[0,"&notni;"],[2,"&prod;"],[0,"&coprod;"],[0,"&sum;"],[0,"&minus;"],[0,"&MinusPlus;"],[0,"&dotplus;"],[1,"&Backslash;"],[0,"&lowast;"],[0,"&compfn;"],[1,"&radic;"],[2,"&prop;"],[0,"&infin;"],[0,"&angrt;"],[0,{v:"&ang;",n:8402,o:"&nang;"}],[0,"&angmsd;"],[0,"&angsph;"],[0,"&mid;"],[0,"&nmid;"],[0,"&DoubleVerticalBar;"],[0,"&NotDoubleVerticalBar;"],[0,"&and;"],[0,"&or;"],[0,{v:"&cap;",n:65024,o:"&caps;"}],[0,{v:"&cup;",n:65024,o:"&cups;"}],[0,"&int;"],[0,"&Int;"],[0,"&iiint;"],[0,"&conint;"],[0,"&Conint;"],[0,"&Cconint;"],[0,"&cwint;"],[0,"&ClockwiseContourIntegral;"],[0,"&awconint;"],[0,"&there4;"],[0,"&becaus;"],[0,"&ratio;"],[0,"&Colon;"],[0,"&dotminus;"],[1,"&mDDot;"],[0,"&homtht;"],[0,{v:"&sim;",n:8402,o:"&nvsim;"}],[0,{v:"&backsim;",n:817,o:"&race;"}],[0,{v:"&ac;",n:819,o:"&acE;"}],[0,"&acd;"],[0,"&VerticalTilde;"],[0,"&NotTilde;"],[0,{v:"&eqsim;",n:824,o:"&nesim;"}],[0,"&sime;"],[0,"&NotTildeEqual;"],[0,"&cong;"],[0,"&simne;"],[0,"&ncong;"],[0,"&ap;"],[0,"&nap;"],[0,"&ape;"],[0,{v:"&apid;",n:824,o:"&napid;"}],[0,"&backcong;"],[0,{v:"&asympeq;",n:8402,o:"&nvap;"}],[0,{v:"&bump;",n:824,o:"&nbump;"}],[0,{v:"&bumpe;",n:824,o:"&nbumpe;"}],[0,{v:"&doteq;",n:824,o:"&nedot;"}],[0,"&doteqdot;"],[0,"&efDot;"],[0,"&erDot;"],[0,"&Assign;"],[0,"&ecolon;"],[0,"&ecir;"],[0,"&circeq;"],[1,"&wedgeq;"],[0,"&veeeq;"],[1,"&triangleq;"],[2,"&equest;"],[0,"&ne;"],[0,{v:"&Congruent;",n:8421,o:"&bnequiv;"}],[0,"&nequiv;"],[1,{v:"&le;",n:8402,o:"&nvle;"}],[0,{v:"&ge;",n:8402,o:"&nvge;"}],[0,{v:"&lE;",n:824,o:"&nlE;"}],[0,{v:"&gE;",n:824,o:"&ngE;"}],[0,{v:"&lnE;",n:65024,o:"&lvertneqq;"}],[0,{v:"&gnE;",n:65024,o:"&gvertneqq;"}],[0,{v:"&ll;",n:new Map(e([[824,"&nLtv;"],[7577,"&nLt;"]]))}],[0,{v:"&gg;",n:new Map(e([[824,"&nGtv;"],[7577,"&nGt;"]]))}],[0,"&between;"],[0,"&NotCupCap;"],[0,"&nless;"],[0,"&ngt;"],[0,"&nle;"],[0,"&nge;"],[0,"&lesssim;"],[0,"&GreaterTilde;"],[0,"&nlsim;"],[0,"&ngsim;"],[0,"&LessGreater;"],[0,"&gl;"],[0,"&NotLessGreater;"],[0,"&NotGreaterLess;"],[0,"&pr;"],[0,"&sc;"],[0,"&prcue;"],[0,"&sccue;"],[0,"&PrecedesTilde;"],[0,{v:"&scsim;",n:824,o:"&NotSucceedsTilde;"}],[0,"&NotPrecedes;"],[0,"&NotSucceeds;"],[0,{v:"&sub;",n:8402,o:"&NotSubset;"}],[0,{v:"&sup;",n:8402,o:"&NotSuperset;"}],[0,"&nsub;"],[0,"&nsup;"],[0,"&sube;"],[0,"&supe;"],[0,"&NotSubsetEqual;"],[0,"&NotSupersetEqual;"],[0,{v:"&subne;",n:65024,o:"&varsubsetneq;"}],[0,{v:"&supne;",n:65024,o:"&varsupsetneq;"}],[1,"&cupdot;"],[0,"&UnionPlus;"],[0,{v:"&sqsub;",n:824,o:"&NotSquareSubset;"}],[0,{v:"&sqsup;",n:824,o:"&NotSquareSuperset;"}],[0,"&sqsube;"],[0,"&sqsupe;"],[0,{v:"&sqcap;",n:65024,o:"&sqcaps;"}],[0,{v:"&sqcup;",n:65024,o:"&sqcups;"}],[0,"&CirclePlus;"],[0,"&CircleMinus;"],[0,"&CircleTimes;"],[0,"&osol;"],[0,"&CircleDot;"],[0,"&circledcirc;"],[0,"&circledast;"],[1,"&circleddash;"],[0,"&boxplus;"],[0,"&boxminus;"],[0,"&boxtimes;"],[0,"&dotsquare;"],[0,"&RightTee;"],[0,"&dashv;"],[0,"&DownTee;"],[0,"&bot;"],[1,"&models;"],[0,"&DoubleRightTee;"],[0,"&Vdash;"],[0,"&Vvdash;"],[0,"&VDash;"],[0,"&nvdash;"],[0,"&nvDash;"],[0,"&nVdash;"],[0,"&nVDash;"],[0,"&prurel;"],[1,"&LeftTriangle;"],[0,"&RightTriangle;"],[0,{v:"&LeftTriangleEqual;",n:8402,o:"&nvltrie;"}],[0,{v:"&RightTriangleEqual;",n:8402,o:"&nvrtrie;"}],[0,"&origof;"],[0,"&imof;"],[0,"&multimap;"],[0,"&hercon;"],[0,"&intcal;"],[0,"&veebar;"],[1,"&barvee;"],[0,"&angrtvb;"],[0,"&lrtri;"],[0,"&bigwedge;"],[0,"&bigvee;"],[0,"&bigcap;"],[0,"&bigcup;"],[0,"&diam;"],[0,"&sdot;"],[0,"&sstarf;"],[0,"&divideontimes;"],[0,"&bowtie;"],[0,"&ltimes;"],[0,"&rtimes;"],[0,"&leftthreetimes;"],[0,"&rightthreetimes;"],[0,"&backsimeq;"],[0,"&curlyvee;"],[0,"&curlywedge;"],[0,"&Sub;"],[0,"&Sup;"],[0,"&Cap;"],[0,"&Cup;"],[0,"&fork;"],[0,"&epar;"],[0,"&lessdot;"],[0,"&gtdot;"],[0,{v:"&Ll;",n:824,o:"&nLl;"}],[0,{v:"&Gg;",n:824,o:"&nGg;"}],[0,{v:"&leg;",n:65024,o:"&lesg;"}],[0,{v:"&gel;",n:65024,o:"&gesl;"}],[2,"&cuepr;"],[0,"&cuesc;"],[0,"&NotPrecedesSlantEqual;"],[0,"&NotSucceedsSlantEqual;"],[0,"&NotSquareSubsetEqual;"],[0,"&NotSquareSupersetEqual;"],[2,"&lnsim;"],[0,"&gnsim;"],[0,"&precnsim;"],[0,"&scnsim;"],[0,"&nltri;"],[0,"&NotRightTriangle;"],[0,"&nltrie;"],[0,"&NotRightTriangleEqual;"],[0,"&vellip;"],[0,"&ctdot;"],[0,"&utdot;"],[0,"&dtdot;"],[0,"&disin;"],[0,"&isinsv;"],[0,"&isins;"],[0,{v:"&isindot;",n:824,o:"&notindot;"}],[0,"&notinvc;"],[0,"&notinvb;"],[1,{v:"&isinE;",n:824,o:"&notinE;"}],[0,"&nisd;"],[0,"&xnis;"],[0,"&nis;"],[0,"&notnivc;"],[0,"&notnivb;"],[6,"&barwed;"],[0,"&Barwed;"],[1,"&lceil;"],[0,"&rceil;"],[0,"&LeftFloor;"],[0,"&rfloor;"],[0,"&drcrop;"],[0,"&dlcrop;"],[0,"&urcrop;"],[0,"&ulcrop;"],[0,"&bnot;"],[1,"&profline;"],[0,"&profsurf;"],[1,"&telrec;"],[0,"&target;"],[5,"&ulcorn;"],[0,"&urcorn;"],[0,"&dlcorn;"],[0,"&drcorn;"],[2,"&frown;"],[0,"&smile;"],[9,"&cylcty;"],[0,"&profalar;"],[7,"&topbot;"],[6,"&ovbar;"],[1,"&solbar;"],[60,"&angzarr;"],[51,"&lmoustache;"],[0,"&rmoustache;"],[2,"&OverBracket;"],[0,"&bbrk;"],[0,"&bbrktbrk;"],[37,"&OverParenthesis;"],[0,"&UnderParenthesis;"],[0,"&OverBrace;"],[0,"&UnderBrace;"],[2,"&trpezium;"],[4,"&elinters;"],[59,"&blank;"],[164,"&circledS;"],[55,"&boxh;"],[1,"&boxv;"],[9,"&boxdr;"],[3,"&boxdl;"],[3,"&boxur;"],[3,"&boxul;"],[3,"&boxvr;"],[7,"&boxvl;"],[7,"&boxhd;"],[7,"&boxhu;"],[7,"&boxvh;"],[19,"&boxH;"],[0,"&boxV;"],[0,"&boxdR;"],[0,"&boxDr;"],[0,"&boxDR;"],[0,"&boxdL;"],[0,"&boxDl;"],[0,"&boxDL;"],[0,"&boxuR;"],[0,"&boxUr;"],[0,"&boxUR;"],[0,"&boxuL;"],[0,"&boxUl;"],[0,"&boxUL;"],[0,"&boxvR;"],[0,"&boxVr;"],[0,"&boxVR;"],[0,"&boxvL;"],[0,"&boxVl;"],[0,"&boxVL;"],[0,"&boxHd;"],[0,"&boxhD;"],[0,"&boxHD;"],[0,"&boxHu;"],[0,"&boxhU;"],[0,"&boxHU;"],[0,"&boxvH;"],[0,"&boxVh;"],[0,"&boxVH;"],[19,"&uhblk;"],[3,"&lhblk;"],[3,"&block;"],[8,"&blk14;"],[0,"&blk12;"],[0,"&blk34;"],[13,"&square;"],[8,"&blacksquare;"],[0,"&EmptyVerySmallSquare;"],[1,"&rect;"],[0,"&marker;"],[2,"&fltns;"],[1,"&bigtriangleup;"],[0,"&blacktriangle;"],[0,"&triangle;"],[2,"&blacktriangleright;"],[0,"&rtri;"],[3,"&bigtriangledown;"],[0,"&blacktriangledown;"],[0,"&dtri;"],[2,"&blacktriangleleft;"],[0,"&ltri;"],[6,"&loz;"],[0,"&cir;"],[32,"&tridot;"],[2,"&bigcirc;"],[8,"&ultri;"],[0,"&urtri;"],[0,"&lltri;"],[0,"&EmptySmallSquare;"],[0,"&FilledSmallSquare;"],[8,"&bigstar;"],[0,"&star;"],[7,"&phone;"],[49,"&female;"],[1,"&male;"],[29,"&spades;"],[2,"&clubs;"],[1,"&hearts;"],[0,"&diamondsuit;"],[3,"&sung;"],[2,"&flat;"],[0,"&natural;"],[0,"&sharp;"],[163,"&check;"],[3,"&cross;"],[8,"&malt;"],[21,"&sext;"],[33,"&VerticalSeparator;"],[25,"&lbbrk;"],[0,"&rbbrk;"],[84,"&bsolhsub;"],[0,"&suphsol;"],[28,"&LeftDoubleBracket;"],[0,"&RightDoubleBracket;"],[0,"&lang;"],[0,"&rang;"],[0,"&Lang;"],[0,"&Rang;"],[0,"&loang;"],[0,"&roang;"],[7,"&longleftarrow;"],[0,"&longrightarrow;"],[0,"&longleftrightarrow;"],[0,"&DoubleLongLeftArrow;"],[0,"&DoubleLongRightArrow;"],[0,"&DoubleLongLeftRightArrow;"],[1,"&longmapsto;"],[2,"&dzigrarr;"],[258,"&nvlArr;"],[0,"&nvrArr;"],[0,"&nvHarr;"],[0,"&Map;"],[6,"&lbarr;"],[0,"&bkarow;"],[0,"&lBarr;"],[0,"&dbkarow;"],[0,"&drbkarow;"],[0,"&DDotrahd;"],[0,"&UpArrowBar;"],[0,"&DownArrowBar;"],[2,"&Rarrtl;"],[2,"&latail;"],[0,"&ratail;"],[0,"&lAtail;"],[0,"&rAtail;"],[0,"&larrfs;"],[0,"&rarrfs;"],[0,"&larrbfs;"],[0,"&rarrbfs;"],[2,"&nwarhk;"],[0,"&nearhk;"],[0,"&hksearow;"],[0,"&hkswarow;"],[0,"&nwnear;"],[0,"&nesear;"],[0,"&seswar;"],[0,"&swnwar;"],[8,{v:"&rarrc;",n:824,o:"&nrarrc;"}],[1,"&cudarrr;"],[0,"&ldca;"],[0,"&rdca;"],[0,"&cudarrl;"],[0,"&larrpl;"],[2,"&curarrm;"],[0,"&cularrp;"],[7,"&rarrpl;"],[2,"&harrcir;"],[0,"&Uarrocir;"],[0,"&lurdshar;"],[0,"&ldrushar;"],[2,"&LeftRightVector;"],[0,"&RightUpDownVector;"],[0,"&DownLeftRightVector;"],[0,"&LeftUpDownVector;"],[0,"&LeftVectorBar;"],[0,"&RightVectorBar;"],[0,"&RightUpVectorBar;"],[0,"&RightDownVectorBar;"],[0,"&DownLeftVectorBar;"],[0,"&DownRightVectorBar;"],[0,"&LeftUpVectorBar;"],[0,"&LeftDownVectorBar;"],[0,"&LeftTeeVector;"],[0,"&RightTeeVector;"],[0,"&RightUpTeeVector;"],[0,"&RightDownTeeVector;"],[0,"&DownLeftTeeVector;"],[0,"&DownRightTeeVector;"],[0,"&LeftUpTeeVector;"],[0,"&LeftDownTeeVector;"],[0,"&lHar;"],[0,"&uHar;"],[0,"&rHar;"],[0,"&dHar;"],[0,"&luruhar;"],[0,"&ldrdhar;"],[0,"&ruluhar;"],[0,"&rdldhar;"],[0,"&lharul;"],[0,"&llhard;"],[0,"&rharul;"],[0,"&lrhard;"],[0,"&udhar;"],[0,"&duhar;"],[0,"&RoundImplies;"],[0,"&erarr;"],[0,"&simrarr;"],[0,"&larrsim;"],[0,"&rarrsim;"],[0,"&rarrap;"],[0,"&ltlarr;"],[1,"&gtrarr;"],[0,"&subrarr;"],[1,"&suplarr;"],[0,"&lfisht;"],[0,"&rfisht;"],[0,"&ufisht;"],[0,"&dfisht;"],[5,"&lopar;"],[0,"&ropar;"],[4,"&lbrke;"],[0,"&rbrke;"],[0,"&lbrkslu;"],[0,"&rbrksld;"],[0,"&lbrksld;"],[0,"&rbrkslu;"],[0,"&langd;"],[0,"&rangd;"],[0,"&lparlt;"],[0,"&rpargt;"],[0,"&gtlPar;"],[0,"&ltrPar;"],[3,"&vzigzag;"],[1,"&vangrt;"],[0,"&angrtvbd;"],[6,"&ange;"],[0,"&range;"],[0,"&dwangle;"],[0,"&uwangle;"],[0,"&angmsdaa;"],[0,"&angmsdab;"],[0,"&angmsdac;"],[0,"&angmsdad;"],[0,"&angmsdae;"],[0,"&angmsdaf;"],[0,"&angmsdag;"],[0,"&angmsdah;"],[0,"&bemptyv;"],[0,"&demptyv;"],[0,"&cemptyv;"],[0,"&raemptyv;"],[0,"&laemptyv;"],[0,"&ohbar;"],[0,"&omid;"],[0,"&opar;"],[1,"&operp;"],[1,"&olcross;"],[0,"&odsold;"],[1,"&olcir;"],[0,"&ofcir;"],[0,"&olt;"],[0,"&ogt;"],[0,"&cirscir;"],[0,"&cirE;"],[0,"&solb;"],[0,"&bsolb;"],[3,"&boxbox;"],[3,"&trisb;"],[0,"&rtriltri;"],[0,{v:"&LeftTriangleBar;",n:824,o:"&NotLeftTriangleBar;"}],[0,{v:"&RightTriangleBar;",n:824,o:"&NotRightTriangleBar;"}],[11,"&iinfin;"],[0,"&infintie;"],[0,"&nvinfin;"],[4,"&eparsl;"],[0,"&smeparsl;"],[0,"&eqvparsl;"],[5,"&blacklozenge;"],[8,"&RuleDelayed;"],[1,"&dsol;"],[9,"&bigodot;"],[0,"&bigoplus;"],[0,"&bigotimes;"],[1,"&biguplus;"],[1,"&bigsqcup;"],[5,"&iiiint;"],[0,"&fpartint;"],[2,"&cirfnint;"],[0,"&awint;"],[0,"&rppolint;"],[0,"&scpolint;"],[0,"&npolint;"],[0,"&pointint;"],[0,"&quatint;"],[0,"&intlarhk;"],[10,"&pluscir;"],[0,"&plusacir;"],[0,"&simplus;"],[0,"&plusdu;"],[0,"&plussim;"],[0,"&plustwo;"],[1,"&mcomma;"],[0,"&minusdu;"],[2,"&loplus;"],[0,"&roplus;"],[0,"&Cross;"],[0,"&timesd;"],[0,"&timesbar;"],[1,"&smashp;"],[0,"&lotimes;"],[0,"&rotimes;"],[0,"&otimesas;"],[0,"&Otimes;"],[0,"&odiv;"],[0,"&triplus;"],[0,"&triminus;"],[0,"&tritime;"],[0,"&intprod;"],[2,"&amalg;"],[0,"&capdot;"],[1,"&ncup;"],[0,"&ncap;"],[0,"&capand;"],[0,"&cupor;"],[0,"&cupcap;"],[0,"&capcup;"],[0,"&cupbrcap;"],[0,"&capbrcup;"],[0,"&cupcup;"],[0,"&capcap;"],[0,"&ccups;"],[0,"&ccaps;"],[2,"&ccupssm;"],[2,"&And;"],[0,"&Or;"],[0,"&andand;"],[0,"&oror;"],[0,"&orslope;"],[0,"&andslope;"],[1,"&andv;"],[0,"&orv;"],[0,"&andd;"],[0,"&ord;"],[1,"&wedbar;"],[6,"&sdote;"],[3,"&simdot;"],[2,{v:"&congdot;",n:824,o:"&ncongdot;"}],[0,"&easter;"],[0,"&apacir;"],[0,{v:"&apE;",n:824,o:"&napE;"}],[0,"&eplus;"],[0,"&pluse;"],[0,"&Esim;"],[0,"&Colone;"],[0,"&Equal;"],[1,"&ddotseq;"],[0,"&equivDD;"],[0,"&ltcir;"],[0,"&gtcir;"],[0,"&ltquest;"],[0,"&gtquest;"],[0,{v:"&leqslant;",n:824,o:"&nleqslant;"}],[0,{v:"&geqslant;",n:824,o:"&ngeqslant;"}],[0,"&lesdot;"],[0,"&gesdot;"],[0,"&lesdoto;"],[0,"&gesdoto;"],[0,"&lesdotor;"],[0,"&gesdotol;"],[0,"&lap;"],[0,"&gap;"],[0,"&lne;"],[0,"&gne;"],[0,"&lnap;"],[0,"&gnap;"],[0,"&lEg;"],[0,"&gEl;"],[0,"&lsime;"],[0,"&gsime;"],[0,"&lsimg;"],[0,"&gsiml;"],[0,"&lgE;"],[0,"&glE;"],[0,"&lesges;"],[0,"&gesles;"],[0,"&els;"],[0,"&egs;"],[0,"&elsdot;"],[0,"&egsdot;"],[0,"&el;"],[0,"&eg;"],[2,"&siml;"],[0,"&simg;"],[0,"&simlE;"],[0,"&simgE;"],[0,{v:"&LessLess;",n:824,o:"&NotNestedLessLess;"}],[0,{v:"&GreaterGreater;",n:824,o:"&NotNestedGreaterGreater;"}],[1,"&glj;"],[0,"&gla;"],[0,"&ltcc;"],[0,"&gtcc;"],[0,"&lescc;"],[0,"&gescc;"],[0,"&smt;"],[0,"&lat;"],[0,{v:"&smte;",n:65024,o:"&smtes;"}],[0,{v:"&late;",n:65024,o:"&lates;"}],[0,"&bumpE;"],[0,{v:"&PrecedesEqual;",n:824,o:"&NotPrecedesEqual;"}],[0,{v:"&sce;",n:824,o:"&NotSucceedsEqual;"}],[2,"&prE;"],[0,"&scE;"],[0,"&precneqq;"],[0,"&scnE;"],[0,"&prap;"],[0,"&scap;"],[0,"&precnapprox;"],[0,"&scnap;"],[0,"&Pr;"],[0,"&Sc;"],[0,"&subdot;"],[0,"&supdot;"],[0,"&subplus;"],[0,"&supplus;"],[0,"&submult;"],[0,"&supmult;"],[0,"&subedot;"],[0,"&supedot;"],[0,{v:"&subE;",n:824,o:"&nsubE;"}],[0,{v:"&supE;",n:824,o:"&nsupE;"}],[0,"&subsim;"],[0,"&supsim;"],[2,{v:"&subnE;",n:65024,o:"&varsubsetneqq;"}],[0,{v:"&supnE;",n:65024,o:"&varsupsetneqq;"}],[2,"&csub;"],[0,"&csup;"],[0,"&csube;"],[0,"&csupe;"],[0,"&subsup;"],[0,"&supsub;"],[0,"&subsub;"],[0,"&supsup;"],[0,"&suphsub;"],[0,"&supdsub;"],[0,"&forkv;"],[0,"&topfork;"],[0,"&mlcp;"],[8,"&Dashv;"],[1,"&Vdashl;"],[0,"&Barv;"],[0,"&vBar;"],[0,"&vBarv;"],[1,"&Vbar;"],[0,"&Not;"],[0,"&bNot;"],[0,"&rnmid;"],[0,"&cirmid;"],[0,"&midcir;"],[0,"&topcir;"],[0,"&nhpar;"],[0,"&parsim;"],[9,{v:"&parsl;",n:8421,o:"&nparsl;"}],[44343,{n:new Map(e([[56476,"&Ascr;"],[1,"&Cscr;"],[0,"&Dscr;"],[2,"&Gscr;"],[2,"&Jscr;"],[0,"&Kscr;"],[2,"&Nscr;"],[0,"&Oscr;"],[0,"&Pscr;"],[0,"&Qscr;"],[1,"&Sscr;"],[0,"&Tscr;"],[0,"&Uscr;"],[0,"&Vscr;"],[0,"&Wscr;"],[0,"&Xscr;"],[0,"&Yscr;"],[0,"&Zscr;"],[0,"&ascr;"],[0,"&bscr;"],[0,"&cscr;"],[0,"&dscr;"],[1,"&fscr;"],[1,"&hscr;"],[0,"&iscr;"],[0,"&jscr;"],[0,"&kscr;"],[0,"&lscr;"],[0,"&mscr;"],[0,"&nscr;"],[1,"&pscr;"],[0,"&qscr;"],[0,"&rscr;"],[0,"&sscr;"],[0,"&tscr;"],[0,"&uscr;"],[0,"&vscr;"],[0,"&wscr;"],[0,"&xscr;"],[0,"&yscr;"],[0,"&zscr;"],[52,"&Afr;"],[0,"&Bfr;"],[1,"&Dfr;"],[0,"&Efr;"],[0,"&Ffr;"],[0,"&Gfr;"],[2,"&Jfr;"],[0,"&Kfr;"],[0,"&Lfr;"],[0,"&Mfr;"],[0,"&Nfr;"],[0,"&Ofr;"],[0,"&Pfr;"],[0,"&Qfr;"],[1,"&Sfr;"],[0,"&Tfr;"],[0,"&Ufr;"],[0,"&Vfr;"],[0,"&Wfr;"],[0,"&Xfr;"],[0,"&Yfr;"],[1,"&afr;"],[0,"&bfr;"],[0,"&cfr;"],[0,"&dfr;"],[0,"&efr;"],[0,"&ffr;"],[0,"&gfr;"],[0,"&hfr;"],[0,"&ifr;"],[0,"&jfr;"],[0,"&kfr;"],[0,"&lfr;"],[0,"&mfr;"],[0,"&nfr;"],[0,"&ofr;"],[0,"&pfr;"],[0,"&qfr;"],[0,"&rfr;"],[0,"&sfr;"],[0,"&tfr;"],[0,"&ufr;"],[0,"&vfr;"],[0,"&wfr;"],[0,"&xfr;"],[0,"&yfr;"],[0,"&zfr;"],[0,"&Aopf;"],[0,"&Bopf;"],[1,"&Dopf;"],[0,"&Eopf;"],[0,"&Fopf;"],[0,"&Gopf;"],[1,"&Iopf;"],[0,"&Jopf;"],[0,"&Kopf;"],[0,"&Lopf;"],[0,"&Mopf;"],[1,"&Oopf;"],[3,"&Sopf;"],[0,"&Topf;"],[0,"&Uopf;"],[0,"&Vopf;"],[0,"&Wopf;"],[0,"&Xopf;"],[0,"&Yopf;"],[1,"&aopf;"],[0,"&bopf;"],[0,"&copf;"],[0,"&dopf;"],[0,"&eopf;"],[0,"&fopf;"],[0,"&gopf;"],[0,"&hopf;"],[0,"&iopf;"],[0,"&jopf;"],[0,"&kopf;"],[0,"&lopf;"],[0,"&mopf;"],[0,"&nopf;"],[0,"&oopf;"],[0,"&popf;"],[0,"&qopf;"],[0,"&ropf;"],[0,"&sopf;"],[0,"&topf;"],[0,"&uopf;"],[0,"&vopf;"],[0,"&wopf;"],[0,"&xopf;"],[0,"&yopf;"],[0,"&zopf;"]]))}],[8906,"&fflig;"],[0,"&filig;"],[0,"&fllig;"],[0,"&ffilig;"],[0,"&ffllig;"]])),Vn}var Xs={},hl;function Fi(){return hl||(hl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.getCodePoint=e.xmlReplacer=void 0,e.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var a=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(r,n){return r.codePointAt(n)}:function(r,n){return(r.charCodeAt(n)&64512)===55296?(r.charCodeAt(n)-55296)*1024+r.charCodeAt(n+1)-56320+65536:r.charCodeAt(n)};function i(r){for(var n="",u=0,c;(c=e.xmlReplacer.exec(r))!==null;){var d=c.index,f=r.charCodeAt(d),o=a.get(f);o!==void 0?(n+=r.substring(u,d)+o,u=d+1):(n+="".concat(r.substring(u,d),"&#x").concat((0,e.getCodePoint)(r,d).toString(16),";"),u=e.xmlReplacer.lastIndex+=+((f&64512)===55296))}return n+r.substr(u)}e.encodeXML=i,e.escape=i;function s(r,n){return function(c){for(var d,f=0,o="";d=r.exec(c);)f!==d.index&&(o+=c.substring(f,d.index)),o+=n.get(d[0].charCodeAt(0)),f=d.index+1;return o+c.substring(f)}}e.escapeUTF8=s(/[&<>'"]/g,a),e.escapeAttribute=s(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),e.escapeText=s(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]))})(Xs)),Xs}var pl;function ml(){if(pl)return tr;pl=1;var e=tr&&tr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.encodeNonAsciiHTML=tr.encodeHTML=void 0;var a=e($h()),i=Fi(),s=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function r(c){return u(s,c)}tr.encodeHTML=r;function n(c){return u(i.xmlReplacer,c)}tr.encodeNonAsciiHTML=n;function u(c,d){for(var f="",o=0,h;(h=c.exec(d))!==null;){var l=h.index;f+=d.substring(o,l);var p=d.charCodeAt(l),x=a.default.get(p);if(typeof x=="object"){if(l+1<d.length){var w=d.charCodeAt(l+1),b=typeof x.n=="number"?x.n===w?x.o:void 0:x.n.get(w);if(b!==void 0){f+=b,o=c.lastIndex+=1;continue}}x=x.v}if(x!==void 0)f+=x,o=l+1;else{var g=(0,i.getCodePoint)(d,l);f+="&#x".concat(g.toString(16),";"),o=c.lastIndex+=+(g!==p)}}return f+d.substr(o)}return tr}var gl;function Mh(){return gl||(gl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLAttribute=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.DecodingMode=e.EntityDecoder=e.encodeHTML5=e.encodeHTML4=e.encodeNonAsciiHTML=e.encodeHTML=e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.encode=e.decodeStrict=e.decode=e.EncodingMode=e.EntityLevel=void 0;var a=ts(),i=ml(),s=Fi(),r;(function(l){l[l.XML=0]="XML",l[l.HTML=1]="HTML"})(r=e.EntityLevel||(e.EntityLevel={}));var n;(function(l){l[l.UTF8=0]="UTF8",l[l.ASCII=1]="ASCII",l[l.Extensive=2]="Extensive",l[l.Attribute=3]="Attribute",l[l.Text=4]="Text"})(n=e.EncodingMode||(e.EncodingMode={}));function u(l,p){p===void 0&&(p=r.XML);var x=typeof p=="number"?p:p.level;if(x===r.HTML){var w=typeof p=="object"?p.mode:void 0;return(0,a.decodeHTML)(l,w)}return(0,a.decodeXML)(l)}e.decode=u;function c(l,p){var x;p===void 0&&(p=r.XML);var w=typeof p=="number"?{level:p}:p;return(x=w.mode)!==null&&x!==void 0||(w.mode=a.DecodingMode.Strict),u(l,w)}e.decodeStrict=c;function d(l,p){p===void 0&&(p=r.XML);var x=typeof p=="number"?{level:p}:p;return x.mode===n.UTF8?(0,s.escapeUTF8)(l):x.mode===n.Attribute?(0,s.escapeAttribute)(l):x.mode===n.Text?(0,s.escapeText)(l):x.level===r.HTML?x.mode===n.ASCII?(0,i.encodeNonAsciiHTML)(l):(0,i.encodeHTML)(l):(0,s.encodeXML)(l)}e.encode=d;var f=Fi();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return f.encodeXML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return f.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return f.escapeUTF8}}),Object.defineProperty(e,"escapeAttribute",{enumerable:!0,get:function(){return f.escapeAttribute}}),Object.defineProperty(e,"escapeText",{enumerable:!0,get:function(){return f.escapeText}});var o=ml();Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var h=ts();Object.defineProperty(e,"EntityDecoder",{enumerable:!0,get:function(){return h.EntityDecoder}}),Object.defineProperty(e,"DecodingMode",{enumerable:!0,get:function(){return h.DecodingMode}}),Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return h.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTMLAttribute",{enumerable:!0,get:function(){return h.decodeHTMLAttribute}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return h.decodeXML}})})(Zs)),Zs}var qr={},bl;function Rh(){return bl||(bl=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.attributeNames=qr.elementNames=void 0,qr.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(function(e){return[e.toLowerCase(),e]})),qr.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(function(e){return[e.toLowerCase(),e]}))),qr}var xl;function Ih(){if(xl)return lt;xl=1;var e=lt&&lt.__assign||function(){return e=Object.assign||function(k){for(var y,m=1,N=arguments.length;m<N;m++){y=arguments[m];for(var j in y)Object.prototype.hasOwnProperty.call(y,j)&&(k[j]=y[j])}return k},e.apply(this,arguments)},a=lt&&lt.__createBinding||(Object.create?(function(k,y,m,N){N===void 0&&(N=m);var j=Object.getOwnPropertyDescriptor(y,m);(!j||("get"in j?!y.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return y[m]}}),Object.defineProperty(k,N,j)}):(function(k,y,m,N){N===void 0&&(N=m),k[N]=y[m]})),i=lt&&lt.__setModuleDefault||(Object.create?(function(k,y){Object.defineProperty(k,"default",{enumerable:!0,value:y})}):function(k,y){k.default=y}),s=lt&&lt.__importStar||function(k){if(k&&k.__esModule)return k;var y={};if(k!=null)for(var m in k)m!=="default"&&Object.prototype.hasOwnProperty.call(k,m)&&a(y,k,m);return i(y,k),y};Object.defineProperty(lt,"__esModule",{value:!0}),lt.render=void 0;var r=s(nn()),n=Mh(),u=Rh(),c=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function d(k){return k.replace(/"/g,"&quot;")}function f(k,y){var m;if(k){var N=((m=y.encodeEntities)!==null&&m!==void 0?m:y.decodeEntities)===!1?d:y.xmlMode||y.encodeEntities!=="utf8"?n.encodeXML:n.escapeAttribute;return Object.keys(k).map(function(j){var A,D,C=(A=k[j])!==null&&A!==void 0?A:"";return y.xmlMode==="foreign"&&(j=(D=u.attributeNames.get(j))!==null&&D!==void 0?D:j),!y.emptyAttrs&&!y.xmlMode&&C===""?j:"".concat(j,'="').concat(N(C),'"')}).join(" ")}}var o=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function h(k,y){y===void 0&&(y={});for(var m=("length"in k)?k:[k],N="",j=0;j<m.length;j++)N+=l(m[j],y);return N}lt.render=h,lt.default=h;function l(k,y){switch(k.type){case r.Root:return h(k.children,y);case r.Doctype:case r.Directive:return b(k);case r.Comment:return _(k);case r.CDATA:return v(k);case r.Script:case r.Style:case r.Tag:return w(k,y);case r.Text:return g(k,y)}}var p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),x=new Set(["svg","math"]);function w(k,y){var m;y.xmlMode==="foreign"&&(k.name=(m=u.elementNames.get(k.name))!==null&&m!==void 0?m:k.name,k.parent&&p.has(k.parent.name)&&(y=e(e({},y),{xmlMode:!1}))),!y.xmlMode&&x.has(k.name)&&(y=e(e({},y),{xmlMode:"foreign"}));var N="<".concat(k.name),j=f(k.attribs,y);return j&&(N+=" ".concat(j)),k.children.length===0&&(y.xmlMode?y.selfClosingTags!==!1:y.selfClosingTags&&o.has(k.name))?(y.xmlMode||(N+=" "),N+="/>"):(N+=">",k.children.length>0&&(N+=h(k.children,y)),(y.xmlMode||!o.has(k.name))&&(N+="</".concat(k.name,">"))),N}function b(k){return"<".concat(k.data,">")}function g(k,y){var m,N=k.data||"";return((m=y.encodeEntities)!==null&&m!==void 0?m:y.decodeEntities)!==!1&&!(!y.xmlMode&&k.parent&&c.has(k.parent.name))&&(N=y.xmlMode||y.encodeEntities!=="utf8"?(0,n.encodeXML)(N):(0,n.escapeText)(N)),N}function v(k){return"<![CDATA[".concat(k.children[0].data,"]]>")}function _(k){return"<!--".concat(k.data,"-->")}return lt}var yl;function sd(){if(yl)return Wt;yl=1;var e=Wt&&Wt.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.getOuterHTML=r,Wt.getInnerHTML=n,Wt.getText=u,Wt.textContent=c,Wt.innerText=d;var a=xr(),i=e(Ih()),s=nn();function r(f,o){return(0,i.default)(f,o)}function n(f,o){return(0,a.hasChildren)(f)?f.children.map(function(h){return r(h,o)}).join(""):""}function u(f){return Array.isArray(f)?f.map(u).join(""):(0,a.isTag)(f)?f.name==="br"?`
1048
- `:u(f.children):(0,a.isCDATA)(f)?u(f.children):(0,a.isText)(f)?f.data:""}function c(f){return Array.isArray(f)?f.map(c).join(""):(0,a.hasChildren)(f)&&!(0,a.isComment)(f)?c(f.children):(0,a.isText)(f)?f.data:""}function d(f){return Array.isArray(f)?f.map(d).join(""):(0,a.hasChildren)(f)&&(f.type===s.ElementType.Tag||(0,a.isCDATA)(f))?d(f.children):(0,a.isText)(f)?f.data:""}return Wt}var qt={},vl;function Fh(){if(vl)return qt;vl=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.getChildren=a,qt.getParent=i,qt.getSiblings=s,qt.getAttributeValue=r,qt.hasAttrib=n,qt.getName=u,qt.nextElementSibling=c,qt.prevElementSibling=d;var e=xr();function a(f){return(0,e.hasChildren)(f)?f.children:[]}function i(f){return f.parent||null}function s(f){var o,h,l=i(f);if(l!=null)return a(l);for(var p=[f],x=f.prev,w=f.next;x!=null;)p.unshift(x),o=x,x=o.prev;for(;w!=null;)p.push(w),h=w,w=h.next;return p}function r(f,o){var h;return(h=f.attribs)===null||h===void 0?void 0:h[o]}function n(f,o){return f.attribs!=null&&Object.prototype.hasOwnProperty.call(f.attribs,o)&&f.attribs[o]!=null}function u(f){return f.name}function c(f){for(var o,h=f.next;h!==null&&!(0,e.isTag)(h);)o=h,h=o.next;return h}function d(f){for(var o,h=f.prev;h!==null&&!(0,e.isTag)(h);)o=h,h=o.prev;return h}return qt}var rr={},wl;function qh(){if(wl)return rr;wl=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.removeElement=e,rr.replaceElement=a,rr.appendChild=i,rr.append=s,rr.prependChild=r,rr.prepend=n;function e(u){if(u.prev&&(u.prev.next=u.next),u.next&&(u.next.prev=u.prev),u.parent){var c=u.parent.children,d=c.lastIndexOf(u);d>=0&&c.splice(d,1)}u.next=null,u.prev=null,u.parent=null}function a(u,c){var d=c.prev=u.prev;d&&(d.next=c);var f=c.next=u.next;f&&(f.prev=c);var o=c.parent=u.parent;if(o){var h=o.children;h[h.lastIndexOf(u)]=c,u.parent=null}}function i(u,c){if(e(c),c.next=null,c.parent=u,u.children.push(c)>1){var d=u.children[u.children.length-2];d.next=c,c.prev=d}else c.prev=null}function s(u,c){e(c);var d=u.parent,f=u.next;if(c.next=f,c.prev=u,u.next=c,c.parent=d,f){if(f.prev=c,d){var o=d.children;o.splice(o.lastIndexOf(f),0,c)}}else d&&d.children.push(c)}function r(u,c){if(e(c),c.parent=u,c.prev=null,u.children.unshift(c)!==1){var d=u.children[1];d.prev=c,c.next=d}else c.next=null}function n(u,c){e(c);var d=u.parent;if(d){var f=d.children;f.splice(f.indexOf(u),0,c)}u.prev&&(u.prev.next=c),c.parent=d,c.prev=u.prev,c.next=u,u.prev=c}return rr}var ar={},_l;function id(){if(_l)return ar;_l=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.filter=a,ar.find=i,ar.findOneChild=s,ar.findOne=r,ar.existsOne=n,ar.findAll=u;var e=xr();function a(c,d,f,o){return f===void 0&&(f=!0),o===void 0&&(o=1/0),i(c,Array.isArray(d)?d:[d],f,o)}function i(c,d,f,o){for(var h=[],l=[Array.isArray(d)?d:[d]],p=[0];;){if(p[0]>=l[0].length){if(p.length===1)return h;l.shift(),p.shift();continue}var x=l[0][p[0]++];if(c(x)&&(h.push(x),--o<=0))return h;f&&(0,e.hasChildren)(x)&&x.children.length>0&&(p.unshift(0),l.unshift(x.children))}}function s(c,d){return d.find(c)}function r(c,d,f){f===void 0&&(f=!0);for(var o=Array.isArray(d)?d:[d],h=0;h<o.length;h++){var l=o[h];if((0,e.isTag)(l)&&c(l))return l;if(f&&(0,e.hasChildren)(l)&&l.children.length>0){var p=r(c,l.children,!0);if(p)return p}}return null}function n(c,d){return(Array.isArray(d)?d:[d]).some(function(f){return(0,e.isTag)(f)&&c(f)||(0,e.hasChildren)(f)&&n(c,f.children)})}function u(c,d){for(var f=[],o=[Array.isArray(d)?d:[d]],h=[0];;){if(h[0]>=o[0].length){if(o.length===1)return f;o.shift(),h.shift();continue}var l=o[0][h[0]++];(0,e.isTag)(l)&&c(l)&&f.push(l),(0,e.hasChildren)(l)&&l.children.length>0&&(h.unshift(0),o.unshift(l.children))}}return ar}var nr={},kl;function od(){if(kl)return nr;kl=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.testElement=u,nr.getElements=c,nr.getElementById=d,nr.getElementsByTagName=f,nr.getElementsByClassName=o,nr.getElementsByTagType=h;var e=xr(),a=id(),i={tag_name:function(l){return typeof l=="function"?function(p){return(0,e.isTag)(p)&&l(p.name)}:l==="*"?e.isTag:function(p){return(0,e.isTag)(p)&&p.name===l}},tag_type:function(l){return typeof l=="function"?function(p){return l(p.type)}:function(p){return p.type===l}},tag_contains:function(l){return typeof l=="function"?function(p){return(0,e.isText)(p)&&l(p.data)}:function(p){return(0,e.isText)(p)&&p.data===l}}};function s(l,p){return typeof p=="function"?function(x){return(0,e.isTag)(x)&&p(x.attribs[l])}:function(x){return(0,e.isTag)(x)&&x.attribs[l]===p}}function r(l,p){return function(x){return l(x)||p(x)}}function n(l){var p=Object.keys(l).map(function(x){var w=l[x];return Object.prototype.hasOwnProperty.call(i,x)?i[x](w):s(x,w)});return p.length===0?null:p.reduce(r)}function u(l,p){var x=n(l);return x?x(p):!0}function c(l,p,x,w){w===void 0&&(w=1/0);var b=n(l);return b?(0,a.filter)(b,p,x,w):[]}function d(l,p,x){return x===void 0&&(x=!0),Array.isArray(p)||(p=[p]),(0,a.findOne)(s("id",l),p,x)}function f(l,p,x,w){return x===void 0&&(x=!0),w===void 0&&(w=1/0),(0,a.filter)(i.tag_name(l),p,x,w)}function o(l,p,x,w){return x===void 0&&(x=!0),w===void 0&&(w=1/0),(0,a.filter)(s("class",l),p,x,w)}function h(l,p,x,w){return x===void 0&&(x=!0),w===void 0&&(w=1/0),(0,a.filter)(i.tag_type(l),p,x,w)}return nr}var mr={},Nl;function Bh(){if(Nl)return mr;Nl=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.DocumentPosition=void 0,mr.removeSubsets=a,mr.compareDocumentPosition=s,mr.uniqueSort=r;var e=xr();function a(n){for(var u=n.length;--u>=0;){var c=n[u];if(u>0&&n.lastIndexOf(c,u-1)>=0){n.splice(u,1);continue}for(var d=c.parent;d;d=d.parent)if(n.includes(d)){n.splice(u,1);break}}return n}var i;(function(n){n[n.DISCONNECTED=1]="DISCONNECTED",n[n.PRECEDING=2]="PRECEDING",n[n.FOLLOWING=4]="FOLLOWING",n[n.CONTAINS=8]="CONTAINS",n[n.CONTAINED_BY=16]="CONTAINED_BY"})(i||(mr.DocumentPosition=i={}));function s(n,u){var c=[],d=[];if(n===u)return 0;for(var f=(0,e.hasChildren)(n)?n:n.parent;f;)c.unshift(f),f=f.parent;for(f=(0,e.hasChildren)(u)?u:u.parent;f;)d.unshift(f),f=f.parent;for(var o=Math.min(c.length,d.length),h=0;h<o&&c[h]===d[h];)h++;if(h===0)return i.DISCONNECTED;var l=c[h-1],p=l.children,x=c[h],w=d[h];return p.indexOf(x)>p.indexOf(w)?l===u?i.FOLLOWING|i.CONTAINED_BY:i.FOLLOWING:l===n?i.PRECEDING|i.CONTAINS:i.PRECEDING}function r(n){return n=n.filter(function(u,c,d){return!d.includes(u,c+1)}),n.sort(function(u,c){var d=s(u,c);return d&i.PRECEDING?-1:d&i.FOLLOWING?1:0}),n}return mr}var Un={},jl;function Vh(){if(jl)return Un;jl=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.getFeed=i;var e=sd(),a=od();function i(l){var p=d(h,l);return p?p.name==="feed"?s(p):r(p):null}function s(l){var p,x=l.children,w={type:"atom",items:(0,a.getElementsByTagName)("entry",x).map(function(v){var _,k=v.children,y={media:c(k)};o(y,"id","id",k),o(y,"title","title",k);var m=(_=d("link",k))===null||_===void 0?void 0:_.attribs.href;m&&(y.link=m);var N=f("summary",k)||f("content",k);N&&(y.description=N);var j=f("updated",k);return j&&(y.pubDate=new Date(j)),y})};o(w,"id","id",x),o(w,"title","title",x);var b=(p=d("link",x))===null||p===void 0?void 0:p.attribs.href;b&&(w.link=b),o(w,"description","subtitle",x);var g=f("updated",x);return g&&(w.updated=new Date(g)),o(w,"author","email",x,!0),w}function r(l){var p,x,w=(x=(p=d("channel",l.children))===null||p===void 0?void 0:p.children)!==null&&x!==void 0?x:[],b={type:l.name.substr(0,3),id:"",items:(0,a.getElementsByTagName)("item",l.children).map(function(v){var _=v.children,k={media:c(_)};o(k,"id","guid",_),o(k,"title","title",_),o(k,"link","link",_),o(k,"description","description",_);var y=f("pubDate",_)||f("dc:date",_);return y&&(k.pubDate=new Date(y)),k})};o(b,"title","title",w),o(b,"link","link",w),o(b,"description","description",w);var g=f("lastBuildDate",w);return g&&(b.updated=new Date(g)),o(b,"author","managingEditor",w,!0),b}var n=["url","type","lang"],u=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function c(l){return(0,a.getElementsByTagName)("media:content",l).map(function(p){for(var x=p.attribs,w={medium:x.medium,isDefault:!!x.isDefault},b=0,g=n;b<g.length;b++){var v=g[b];x[v]&&(w[v]=x[v])}for(var _=0,k=u;_<k.length;_++){var v=k[_];x[v]&&(w[v]=parseInt(x[v],10))}return x.expression&&(w.expression=x.expression),w})}function d(l,p){return(0,a.getElementsByTagName)(l,p,!0,1)[0]}function f(l,p,x){return x===void 0&&(x=!1),(0,e.textContent)((0,a.getElementsByTagName)(l,p,x,1)).trim()}function o(l,p,x,w,b){b===void 0&&(b=!1);var g=f(x,w,b);g&&(l[p]=g)}function h(l){return l==="rss"||l==="feed"||l==="rdf:RDF"}return Un}var El;function Ks(){return El||(El=1,(function(e){var a=Fr&&Fr.__createBinding||(Object.create?(function(r,n,u,c){c===void 0&&(c=u);var d=Object.getOwnPropertyDescriptor(n,u);(!d||("get"in d?!n.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return n[u]}}),Object.defineProperty(r,c,d)}):(function(r,n,u,c){c===void 0&&(c=u),r[c]=n[u]})),i=Fr&&Fr.__exportStar||function(r,n){for(var u in r)u!=="default"&&!Object.prototype.hasOwnProperty.call(n,u)&&a(n,r,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.hasChildren=e.isDocument=e.isComment=e.isText=e.isCDATA=e.isTag=void 0,i(sd(),e),i(Fh(),e),i(qh(),e),i(id(),e),i(od(),e),i(Bh(),e),i(Vh(),e);var s=xr();Object.defineProperty(e,"isTag",{enumerable:!0,get:function(){return s.isTag}}),Object.defineProperty(e,"isCDATA",{enumerable:!0,get:function(){return s.isCDATA}}),Object.defineProperty(e,"isText",{enumerable:!0,get:function(){return s.isText}}),Object.defineProperty(e,"isComment",{enumerable:!0,get:function(){return s.isComment}}),Object.defineProperty(e,"isDocument",{enumerable:!0,get:function(){return s.isDocument}}),Object.defineProperty(e,"hasChildren",{enumerable:!0,get:function(){return s.hasChildren}})})(Fr)),Fr}var Al;function Uh(){return Al||(Al=1,(function(e){var a=Rt&&Rt.__createBinding||(Object.create?(function(g,v,_,k){k===void 0&&(k=_);var y=Object.getOwnPropertyDescriptor(v,_);(!y||("get"in y?!v.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return v[_]}}),Object.defineProperty(g,k,y)}):(function(g,v,_,k){k===void 0&&(k=_),g[k]=v[_]})),i=Rt&&Rt.__setModuleDefault||(Object.create?(function(g,v){Object.defineProperty(g,"default",{enumerable:!0,value:v})}):function(g,v){g.default=v}),s=Rt&&Rt.__importStar||function(g){if(g&&g.__esModule)return g;var v={};if(g!=null)for(var _ in g)_!=="default"&&Object.prototype.hasOwnProperty.call(g,_)&&a(v,g,_);return i(v,g),v},r=Rt&&Rt.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.DomUtils=e.parseFeed=e.getFeed=e.ElementType=e.Tokenizer=e.createDomStream=e.parseDOM=e.parseDocument=e.DefaultHandler=e.DomHandler=e.Parser=void 0;var n=ol(),u=ol();Object.defineProperty(e,"Parser",{enumerable:!0,get:function(){return u.Parser}});var c=xr(),d=xr();Object.defineProperty(e,"DomHandler",{enumerable:!0,get:function(){return d.DomHandler}}),Object.defineProperty(e,"DefaultHandler",{enumerable:!0,get:function(){return d.DomHandler}});function f(g,v){var _=new c.DomHandler(void 0,v);return new n.Parser(_,v).end(g),_.root}e.parseDocument=f;function o(g,v){return f(g,v).children}e.parseDOM=o;function h(g,v,_){var k=new c.DomHandler(g,v,_);return new n.Parser(k,v)}e.createDomStream=h;var l=nd();Object.defineProperty(e,"Tokenizer",{enumerable:!0,get:function(){return r(l).default}}),e.ElementType=s(nn());var p=Ks(),x=Ks();Object.defineProperty(e,"getFeed",{enumerable:!0,get:function(){return x.getFeed}});var w={xmlMode:!0};function b(g,v){return v===void 0&&(v=w),(0,p.getFeed)(o(g,v))}e.parseFeed=b,e.DomUtils=s(Ks())})(Rt)),Rt}var Qs,Sl;function zh(){return Sl||(Sl=1,Qs=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),Qs}var zn={},Cl;function Hh(){if(Cl)return zn;Cl=1,Object.defineProperty(zn,"__esModule",{value:!0});/*!
1047
+ `);return Fn.default=e,Fn}var Xu;function Dh(){if(Xu)return Mr;Xu=1;var e=Mr&&Mr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.AccountNameValidator=void 0;const a=e(Ch());let i=class{static validateAccountName(r,n){let u,c,d;if(!r)return n.accountNameWrongLength;const f=r.length;if(f<3||f>16)return n.accountNameWrongLength;if(a.default.includes(r))return n.accountNameBadActor;const o=r.split(".");for(u=0,d=o.length;u<d;u++)if(c=o[u],!/^[a-z]/.test(c)||!/^[a-z0-9-]*$/.test(c)||!/[a-z0-9]$/.test(c)||!(c.length>=3))return n.accountNameWrongSegment;return null}};return Mr.AccountNameValidator=i,Mr}var Ku;function Th(){if(Ku)return st;Ku=1;var e=st&&st.__createBinding||(Object.create?(function(w,b,g,v){v===void 0&&(v=g);var k=Object.getOwnPropertyDescriptor(b,g);(!k||("get"in k?!b.__esModule:k.writable||k.configurable))&&(k={enumerable:!0,get:function(){return b[g]}}),Object.defineProperty(w,v,k)}):(function(w,b,g,v){v===void 0&&(v=g),w[v]=b[g]})),a=st&&st.__setModuleDefault||(Object.create?(function(w,b){Object.defineProperty(w,"default",{enumerable:!0,value:b})}):function(w,b){w.default=b}),i=st&&st.__importStar||function(w){if(w&&w.__esModule)return w;var b={};if(w!=null)for(var g in w)g!=="default"&&Object.prototype.hasOwnProperty.call(w,g)&&e(b,w,g);return a(b,w),b},s=st&&st.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(st,"__esModule",{value:!0}),st.HtmlDOMParserError=st.HtmlDOMParser=void 0;const r=i(hh()),n=s(ds()),u=ir(),c=_h(),d=Gi(),f=Sh(),o=td(),h=Dh(),l=i(Kc());let p=class{constructor(b,g=d.Localization.DEFAULT){this.domParser=new r.DOMParser({errorHandler:{warning:()=>{},error:()=>{}}}),this.xmlSerializer=new r.XMLSerializer,this.mutate=!0,this.parsedDocument=void 0,f.AssetEmbedder.validate(b),d.Localization.validate(g),this.options=b,this.localization=g,this.linkSanitizer=new c.LinkSanitizer({baseUrl:this.options.baseUrl}),this.embedder=new f.AssetEmbedder({ipfsPrefix:this.options.ipfsPrefix,width:this.options.width,height:this.options.height,hideImages:this.options.hideImages,imageProxyFn:this.options.imageProxyFn,hashtagUrlFn:this.options.hashtagUrlFn,usertagUrlFn:this.options.usertagUrlFn,baseUrl:this.options.baseUrl},g),this.state={hashtags:new Set,usertags:new Set,htmltags:new Set,images:new Set,links:new Set}}setMutateEnabled(b){return this.mutate=b,this}parse(b){try{const g=this.domParser.parseFromString(b,"text/html");this.traverseDOMNode(g),this.mutate&&this.postprocessDOM(g),this.parsedDocument=g}catch(g){throw new x("Parsing error",g)}return this}getState(){if(!this.parsedDocument)throw new x("Html has not been parsed yet");return this.state}getParsedDocument(){if(!this.parsedDocument)throw new x("Html has not been parsed yet");return this.parsedDocument}getParsedDocumentAsString(){return this.xmlSerializer.serializeToString(this.getParsedDocument())}traverseDOMNode(b,g=0){!b||!b.childNodes||Array.from(b.childNodes).forEach(v=>{const k=v.tagName?v.tagName.toLowerCase():null;k&&this.state.htmltags.add(k),k==="img"?this.processImgTag(v):k==="iframe"?this.processIframeTag(v):k==="a"?this.processLinkTag(v):v.nodeName==="#text"&&this.processTextNode(v),this.traverseDOMNode(v,g+1)})}processLinkTag(b){const g=b.getAttribute("href");if(g&&(this.state.links.add(g),this.mutate)){const v=b.textContent+"",k=this.linkSanitizer.sanitizeLink(g,v);if(k===!1){const _=b.ownerDocument.createElement("div");_.textContent=`${b.textContent} / ${g}`,_.setAttribute("title",this.localization.phishingWarning),_.setAttribute("class","phishy");const y=b.parentNode;y&&(y.appendChild(_),y.removeChild(b))}else b.setAttribute("href",k)}}processIframeTag(b){const g=b.getAttribute("src");if(g&&this.reportIframeLink(g),!this.mutate||(b.parentNode.tagName?b.parentNode.tagName.toLowerCase():b.parentNode.tagName)==="div"&&b.parentNode.getAttribute("class")==="videoWrapper")return;const k=this.xmlSerializer.serializeToString(b),_=this.domParser.parseFromString(`<div class="videoWrapper">${k}</div>`),y=b.parentNode;y&&(y.appendChild(_),y.removeChild(b))}reportIframeLink(b){const g=o.YoutubeEmbedder.getYoutubeMetadataFromLink(b);g&&(this.state.links.add(g.url),this.state.images.add("https://img.youtube.com/vi/"+g.id+"/0.jpg"))}processImgTag(b){const g=b.getAttribute("src");if(g&&(this.state.images.add(g),this.mutate)){let v=this.normalizeUrl(g);/^\/\//.test(v)&&(v="https:"+v),v!==g&&b.setAttribute("src",v)}}processTextNode(b){try{const g=b.parentNode.tagName?b.parentNode.tagName.toLowerCase():b.parentNode.tagName;if(g==="code"||g==="a"||!b.data)return;const v=this.embedder.processTextNodeAndInsertEmbeds(b);v.images.forEach(y=>this.state.images.add(y)),v.links.forEach(y=>this.state.links.add(y));const k=this.xmlSerializer.serializeToString(b),_=this.linkify(k);if(this.mutate&&_!==k){const y=this.domParser.parseFromString(`<span>${_}</span>`),m=b.parentNode;return m&&(m.appendChild(y),m.removeChild(b)),y}}catch(g){u.Log.log().error(g)}}linkify(b){return b=b.replace((0,l.any)("gi"),g=>{if(l.default.image.test(g))return this.state.images.add(g),`<img src="${this.normalizeUrl(g)}" />`;if(/\.(zip|exe)$/i.test(g))return g;const v=this.linkSanitizer.sanitizeLink(g,g);return v===!1?`<div title='${this.localization.phishingWarning}' class='phishy'>${g}</div>`:(this.state.links.add(v),`<a href="${this.normalizeUrl(g)}">${v}</a>`)}),b=b.replace(/(^|\s)(#[-a-z\d]+)/gi,g=>{if(/#[\d]+$/.test(g))return g;const v=/^\s/.test(g)?g[0]:"",_=g.trim().substring(1).toLowerCase();if(this.state.hashtags.add(_),!this.mutate)return g;const y=this.options.hashtagUrlFn(_);return v+`<a href="${y}">${g.trim()}</a>`}),b=b.replace(/(^|[^a-zA-Z0-9_!#$%&*@@/]|(^|[^a-zA-Z0-9_+~.-/#]))[@@]([a-z][-.a-z\d]+[a-z\d])/gi,(g,v,k,_)=>{const y=_.toLowerCase(),m=h.AccountNameValidator.validateAccountName(y,this.localization)==null;m&&this.state.usertags&&this.state.usertags.add(y);const N=(v||"")+(k||"");if(!this.mutate)return`${N}${_}`;const j=this.options.usertagUrlFn(y);return m?`${N}<a href="${j}">@${_}</a>`:`${N}@${_}`}),b}postprocessDOM(b){this.hideImagesIfNeeded(b),this.proxifyImagesIfNeeded(b)}hideImagesIfNeeded(b){if(this.mutate&&this.options.hideImages)for(const g of Array.from(b.getElementsByTagName("img"))){const v=b.createElement("pre");v.setAttribute("class","image-url-only"),v.appendChild(b.createTextNode(g.getAttribute("src")||""));const k=g.parentNode;k&&(k.appendChild(v),k.removeChild(g))}}proxifyImagesIfNeeded(b){this.mutate&&!this.options.hideImages&&this.proxifyImages(b)}proxifyImages(b){b&&Array.from(b.getElementsByTagName("img")).forEach(g=>{const v=g.getAttribute("src")||"";l.default.local.test(v)||g.setAttribute("src",this.options.imageProxyFn(v))})}normalizeUrl(b){if(this.options.ipfsPrefix&&l.default.ipfsProtocol.test(b)){const[g]=b.match(l.default.ipfsProtocol),v=b.replace(g,"");return`${this.options.ipfsPrefix.replace(/\/+$/,"")}/${v}`}return b}};st.HtmlDOMParser=p;class x extends n.default{constructor(b,g){super(b,g)}}return st.HtmlDOMParserError=x,st}var Za={},Qu;function Oh(){if(Qu)return Za;Qu=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.PreliminarySanitizer=void 0;let e=class ad{static preliminarySanitize(i){return ad.stripHtmlComments(i)}static stripHtmlComments(i){return i.replace(/<!--([\s\S]+?)(-->|$)/g,"(html comment removed: $1)")}};return Za.PreliminarySanitizer=e,Za}var Rr={},Rt={},It={},Gs={},Ft={},qn={},el;function Ph(){return el||(el=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}))),qn}var Bn={},tl;function $h(){return tl||(tl=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}))),Bn}var Js={},rl;function al(){return rl||(rl=1,(function(e){var a;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var i=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(a=String.fromCodePoint)!==null&&a!==void 0?a:function(n){var u="";return n>65535&&(n-=65536,u+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023),u+=String.fromCharCode(n),u};function s(n){var u;return n>=55296&&n<=57343||n>1114111?65533:(u=i.get(n))!==null&&u!==void 0?u:n}e.replaceCodePoint=s;function r(n){return(0,e.fromCodePoint)(s(n))}e.default=r})(Js)),Js}var nl;function ts(){return nl||(nl=1,(function(e){var a=Ft&&Ft.__createBinding||(Object.create?(function(C,O,$,H){H===void 0&&(H=$);var F=Object.getOwnPropertyDescriptor(O,$);(!F||("get"in F?!O.__esModule:F.writable||F.configurable))&&(F={enumerable:!0,get:function(){return O[$]}}),Object.defineProperty(C,H,F)}):(function(C,O,$,H){H===void 0&&(H=$),C[H]=O[$]})),i=Ft&&Ft.__setModuleDefault||(Object.create?(function(C,O){Object.defineProperty(C,"default",{enumerable:!0,value:O})}):function(C,O){C.default=O}),s=Ft&&Ft.__importStar||function(C){if(C&&C.__esModule)return C;var O={};if(C!=null)for(var $ in C)$!=="default"&&Object.prototype.hasOwnProperty.call(C,$)&&a(O,C,$);return i(O,C),O},r=Ft&&Ft.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var n=r(Ph());e.htmlDecodeTree=n.default;var u=r($h());e.xmlDecodeTree=u.default;var c=s(al());e.decodeCodePoint=c.default;var d=al();Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return d.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return d.fromCodePoint}});var f;(function(C){C[C.NUM=35]="NUM",C[C.SEMI=59]="SEMI",C[C.EQUALS=61]="EQUALS",C[C.ZERO=48]="ZERO",C[C.NINE=57]="NINE",C[C.LOWER_A=97]="LOWER_A",C[C.LOWER_F=102]="LOWER_F",C[C.LOWER_X=120]="LOWER_X",C[C.LOWER_Z=122]="LOWER_Z",C[C.UPPER_A=65]="UPPER_A",C[C.UPPER_F=70]="UPPER_F",C[C.UPPER_Z=90]="UPPER_Z"})(f||(f={}));var o=32,h;(function(C){C[C.VALUE_LENGTH=49152]="VALUE_LENGTH",C[C.BRANCH_LENGTH=16256]="BRANCH_LENGTH",C[C.JUMP_TABLE=127]="JUMP_TABLE"})(h=e.BinTrieFlags||(e.BinTrieFlags={}));function l(C){return C>=f.ZERO&&C<=f.NINE}function p(C){return C>=f.UPPER_A&&C<=f.UPPER_F||C>=f.LOWER_A&&C<=f.LOWER_F}function x(C){return C>=f.UPPER_A&&C<=f.UPPER_Z||C>=f.LOWER_A&&C<=f.LOWER_Z||l(C)}function w(C){return C===f.EQUALS||x(C)}var b;(function(C){C[C.EntityStart=0]="EntityStart",C[C.NumericStart=1]="NumericStart",C[C.NumericDecimal=2]="NumericDecimal",C[C.NumericHex=3]="NumericHex",C[C.NamedEntity=4]="NamedEntity"})(b||(b={}));var g;(function(C){C[C.Legacy=0]="Legacy",C[C.Strict=1]="Strict",C[C.Attribute=2]="Attribute"})(g=e.DecodingMode||(e.DecodingMode={}));var v=(function(){function C(O,$,H){this.decodeTree=O,this.emitCodePoint=$,this.errors=H,this.state=b.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=g.Strict}return C.prototype.startEntity=function(O){this.decodeMode=O,this.state=b.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},C.prototype.write=function(O,$){switch(this.state){case b.EntityStart:return O.charCodeAt($)===f.NUM?(this.state=b.NumericStart,this.consumed+=1,this.stateNumericStart(O,$+1)):(this.state=b.NamedEntity,this.stateNamedEntity(O,$));case b.NumericStart:return this.stateNumericStart(O,$);case b.NumericDecimal:return this.stateNumericDecimal(O,$);case b.NumericHex:return this.stateNumericHex(O,$);case b.NamedEntity:return this.stateNamedEntity(O,$)}},C.prototype.stateNumericStart=function(O,$){return $>=O.length?-1:(O.charCodeAt($)|o)===f.LOWER_X?(this.state=b.NumericHex,this.consumed+=1,this.stateNumericHex(O,$+1)):(this.state=b.NumericDecimal,this.stateNumericDecimal(O,$))},C.prototype.addToNumericResult=function(O,$,H,F){if($!==H){var q=H-$;this.result=this.result*Math.pow(F,q)+parseInt(O.substr($,q),F),this.consumed+=q}},C.prototype.stateNumericHex=function(O,$){for(var H=$;$<O.length;){var F=O.charCodeAt($);if(l(F)||p(F))$+=1;else return this.addToNumericResult(O,H,$,16),this.emitNumericEntity(F,3)}return this.addToNumericResult(O,H,$,16),-1},C.prototype.stateNumericDecimal=function(O,$){for(var H=$;$<O.length;){var F=O.charCodeAt($);if(l(F))$+=1;else return this.addToNumericResult(O,H,$,10),this.emitNumericEntity(F,2)}return this.addToNumericResult(O,H,$,10),-1},C.prototype.emitNumericEntity=function(O,$){var H;if(this.consumed<=$)return(H=this.errors)===null||H===void 0||H.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(O===f.SEMI)this.consumed+=1;else if(this.decodeMode===g.Strict)return 0;return this.emitCodePoint((0,c.replaceCodePoint)(this.result),this.consumed),this.errors&&(O!==f.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed},C.prototype.stateNamedEntity=function(O,$){for(var H=this.decodeTree,F=H[this.treeIndex],q=(F&h.VALUE_LENGTH)>>14;$<O.length;$++,this.excess++){var M=O.charCodeAt($);if(this.treeIndex=_(H,F,this.treeIndex+Math.max(1,q),M),this.treeIndex<0)return this.result===0||this.decodeMode===g.Attribute&&(q===0||w(M))?0:this.emitNotTerminatedNamedEntity();if(F=H[this.treeIndex],q=(F&h.VALUE_LENGTH)>>14,q!==0){if(M===f.SEMI)return this.emitNamedEntityData(this.treeIndex,q,this.consumed+this.excess);this.decodeMode!==g.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},C.prototype.emitNotTerminatedNamedEntity=function(){var O,$=this,H=$.result,F=$.decodeTree,q=(F[H]&h.VALUE_LENGTH)>>14;return this.emitNamedEntityData(H,q,this.consumed),(O=this.errors)===null||O===void 0||O.missingSemicolonAfterCharacterReference(),this.consumed},C.prototype.emitNamedEntityData=function(O,$,H){var F=this.decodeTree;return this.emitCodePoint($===1?F[O]&~h.VALUE_LENGTH:F[O+1],H),$===3&&this.emitCodePoint(F[O+2],H),H},C.prototype.end=function(){var O;switch(this.state){case b.NamedEntity:return this.result!==0&&(this.decodeMode!==g.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case b.NumericDecimal:return this.emitNumericEntity(0,2);case b.NumericHex:return this.emitNumericEntity(0,3);case b.NumericStart:return(O=this.errors)===null||O===void 0||O.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case b.EntityStart:return 0}},C})();e.EntityDecoder=v;function k(C){var O="",$=new v(C,function(H){return O+=(0,c.fromCodePoint)(H)});return function(F,q){for(var M=0,Y=0;(Y=F.indexOf("&",Y))>=0;){O+=F.slice(M,Y),$.startEntity(q);var X=$.write(F,Y+1);if(X<0){M=Y+$.end();break}M=Y+X,Y=X===0?M+1:M}var ae=O+F.slice(M);return O="",ae}}function _(C,O,$,H){var F=(O&h.BRANCH_LENGTH)>>7,q=O&h.JUMP_TABLE;if(F===0)return q!==0&&H===q?$:-1;if(q){var M=H-q;return M<0||M>=F?-1:C[$+M]-1}for(var Y=$,X=Y+F-1;Y<=X;){var ae=Y+X>>>1,I=C[ae];if(I<H)Y=ae+1;else if(I>H)X=ae-1;else return C[ae+F]}return-1}e.determineBranch=_;var y=k(n.default),m=k(u.default);function N(C,O){return O===void 0&&(O=g.Legacy),y(C,O)}e.decodeHTML=N;function j(C){return y(C,g.Attribute)}e.decodeHTMLAttribute=j;function A(C){return y(C,g.Strict)}e.decodeHTMLStrict=A;function D(C){return m(C,g.Strict)}e.decodeXML=D})(Ft)),Ft}var sl;function nd(){return sl||(sl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var a=ts(),i;(function(l){l[l.Tab=9]="Tab",l[l.NewLine=10]="NewLine",l[l.FormFeed=12]="FormFeed",l[l.CarriageReturn=13]="CarriageReturn",l[l.Space=32]="Space",l[l.ExclamationMark=33]="ExclamationMark",l[l.Number=35]="Number",l[l.Amp=38]="Amp",l[l.SingleQuote=39]="SingleQuote",l[l.DoubleQuote=34]="DoubleQuote",l[l.Dash=45]="Dash",l[l.Slash=47]="Slash",l[l.Zero=48]="Zero",l[l.Nine=57]="Nine",l[l.Semi=59]="Semi",l[l.Lt=60]="Lt",l[l.Eq=61]="Eq",l[l.Gt=62]="Gt",l[l.Questionmark=63]="Questionmark",l[l.UpperA=65]="UpperA",l[l.LowerA=97]="LowerA",l[l.UpperF=70]="UpperF",l[l.LowerF=102]="LowerF",l[l.UpperZ=90]="UpperZ",l[l.LowerZ=122]="LowerZ",l[l.LowerX=120]="LowerX",l[l.OpeningSquareBracket=91]="OpeningSquareBracket"})(i||(i={}));var s;(function(l){l[l.Text=1]="Text",l[l.BeforeTagName=2]="BeforeTagName",l[l.InTagName=3]="InTagName",l[l.InSelfClosingTag=4]="InSelfClosingTag",l[l.BeforeClosingTagName=5]="BeforeClosingTagName",l[l.InClosingTagName=6]="InClosingTagName",l[l.AfterClosingTagName=7]="AfterClosingTagName",l[l.BeforeAttributeName=8]="BeforeAttributeName",l[l.InAttributeName=9]="InAttributeName",l[l.AfterAttributeName=10]="AfterAttributeName",l[l.BeforeAttributeValue=11]="BeforeAttributeValue",l[l.InAttributeValueDq=12]="InAttributeValueDq",l[l.InAttributeValueSq=13]="InAttributeValueSq",l[l.InAttributeValueNq=14]="InAttributeValueNq",l[l.BeforeDeclaration=15]="BeforeDeclaration",l[l.InDeclaration=16]="InDeclaration",l[l.InProcessingInstruction=17]="InProcessingInstruction",l[l.BeforeComment=18]="BeforeComment",l[l.CDATASequence=19]="CDATASequence",l[l.InSpecialComment=20]="InSpecialComment",l[l.InCommentLike=21]="InCommentLike",l[l.BeforeSpecialS=22]="BeforeSpecialS",l[l.SpecialStartSequence=23]="SpecialStartSequence",l[l.InSpecialTag=24]="InSpecialTag",l[l.BeforeEntity=25]="BeforeEntity",l[l.BeforeNumericEntity=26]="BeforeNumericEntity",l[l.InNamedEntity=27]="InNamedEntity",l[l.InNumericEntity=28]="InNumericEntity",l[l.InHexEntity=29]="InHexEntity"})(s||(s={}));function r(l){return l===i.Space||l===i.NewLine||l===i.Tab||l===i.FormFeed||l===i.CarriageReturn}function n(l){return l===i.Slash||l===i.Gt||r(l)}function u(l){return l>=i.Zero&&l<=i.Nine}function c(l){return l>=i.LowerA&&l<=i.LowerZ||l>=i.UpperA&&l<=i.UpperZ}function d(l){return l>=i.UpperA&&l<=i.UpperF||l>=i.LowerA&&l<=i.LowerF}var f;(function(l){l[l.NoValue=0]="NoValue",l[l.Unquoted=1]="Unquoted",l[l.Single=2]="Single",l[l.Double=3]="Double"})(f=e.QuoteType||(e.QuoteType={}));var o={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},h=(function(){function l(p,x){var w=p.xmlMode,b=w===void 0?!1:w,g=p.decodeEntities,v=g===void 0?!0:g;this.cbs=x,this.state=s.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=s.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=b,this.decodeEntities=v,this.entityTrie=b?a.xmlDecodeTree:a.htmlDecodeTree}return l.prototype.reset=function(){this.state=s.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=s.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},l.prototype.write=function(p){this.offset+=this.buffer.length,this.buffer=p,this.parse()},l.prototype.end=function(){this.running&&this.finish()},l.prototype.pause=function(){this.running=!1},l.prototype.resume=function(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()},l.prototype.getIndex=function(){return this.index},l.prototype.getSectionStart=function(){return this.sectionStart},l.prototype.stateText=function(p){p===i.Lt||!this.decodeEntities&&this.fastForwardTo(i.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=s.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&p===i.Amp&&(this.state=s.BeforeEntity)},l.prototype.stateSpecialStartSequence=function(p){var x=this.sequenceIndex===this.currentSequence.length,w=x?n(p):(p|32)===this.currentSequence[this.sequenceIndex];if(!w)this.isSpecial=!1;else if(!x){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=s.InTagName,this.stateInTagName(p)},l.prototype.stateInSpecialTag=function(p){if(this.sequenceIndex===this.currentSequence.length){if(p===i.Gt||r(p)){var x=this.index-this.currentSequence.length;if(this.sectionStart<x){var w=this.index;this.index=x,this.cbs.ontext(this.sectionStart,x),this.index=w}this.isSpecial=!1,this.sectionStart=x+2,this.stateInClosingTagName(p);return}this.sequenceIndex=0}(p|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===o.TitleEnd?this.decodeEntities&&p===i.Amp&&(this.state=s.BeforeEntity):this.fastForwardTo(i.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(p===i.Lt)},l.prototype.stateCDATASequence=function(p){p===o.Cdata[this.sequenceIndex]?++this.sequenceIndex===o.Cdata.length&&(this.state=s.InCommentLike,this.currentSequence=o.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=s.InDeclaration,this.stateInDeclaration(p))},l.prototype.fastForwardTo=function(p){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===p)return!0;return this.index=this.buffer.length+this.offset-1,!1},l.prototype.stateInCommentLike=function(p){p===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===o.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=s.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):p!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)},l.prototype.isTagStartChar=function(p){return this.xmlMode?!n(p):c(p)},l.prototype.startSpecial=function(p,x){this.isSpecial=!0,this.currentSequence=p,this.sequenceIndex=x,this.state=s.SpecialStartSequence},l.prototype.stateBeforeTagName=function(p){if(p===i.ExclamationMark)this.state=s.BeforeDeclaration,this.sectionStart=this.index+1;else if(p===i.Questionmark)this.state=s.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(p)){var x=p|32;this.sectionStart=this.index,!this.xmlMode&&x===o.TitleEnd[2]?this.startSpecial(o.TitleEnd,3):this.state=!this.xmlMode&&x===o.ScriptEnd[2]?s.BeforeSpecialS:s.InTagName}else p===i.Slash?this.state=s.BeforeClosingTagName:(this.state=s.Text,this.stateText(p))},l.prototype.stateInTagName=function(p){n(p)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p))},l.prototype.stateBeforeClosingTagName=function(p){r(p)||(p===i.Gt?this.state=s.Text:(this.state=this.isTagStartChar(p)?s.InClosingTagName:s.InSpecialComment,this.sectionStart=this.index))},l.prototype.stateInClosingTagName=function(p){(p===i.Gt||r(p))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.AfterClosingTagName,this.stateAfterClosingTagName(p))},l.prototype.stateAfterClosingTagName=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.state=s.Text,this.baseState=s.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeAttributeName=function(p){p===i.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=s.InSpecialTag,this.sequenceIndex=0):this.state=s.Text,this.baseState=this.state,this.sectionStart=this.index+1):p===i.Slash?this.state=s.InSelfClosingTag:r(p)||(this.state=s.InAttributeName,this.sectionStart=this.index)},l.prototype.stateInSelfClosingTag=function(p){p===i.Gt?(this.cbs.onselfclosingtag(this.index),this.state=s.Text,this.baseState=s.Text,this.sectionStart=this.index+1,this.isSpecial=!1):r(p)||(this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p))},l.prototype.stateInAttributeName=function(p){(p===i.Eq||n(p))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=s.AfterAttributeName,this.stateAfterAttributeName(p))},l.prototype.stateAfterAttributeName=function(p){p===i.Eq?this.state=s.BeforeAttributeValue:p===i.Slash||p===i.Gt?(this.cbs.onattribend(f.NoValue,this.index),this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p)):r(p)||(this.cbs.onattribend(f.NoValue,this.index),this.state=s.InAttributeName,this.sectionStart=this.index)},l.prototype.stateBeforeAttributeValue=function(p){p===i.DoubleQuote?(this.state=s.InAttributeValueDq,this.sectionStart=this.index+1):p===i.SingleQuote?(this.state=s.InAttributeValueSq,this.sectionStart=this.index+1):r(p)||(this.sectionStart=this.index,this.state=s.InAttributeValueNq,this.stateInAttributeValueNoQuotes(p))},l.prototype.handleInAttributeValue=function(p,x){p===x||!this.decodeEntities&&this.fastForwardTo(x)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(x===i.DoubleQuote?f.Double:f.Single,this.index),this.state=s.BeforeAttributeName):this.decodeEntities&&p===i.Amp&&(this.baseState=this.state,this.state=s.BeforeEntity)},l.prototype.stateInAttributeValueDoubleQuotes=function(p){this.handleInAttributeValue(p,i.DoubleQuote)},l.prototype.stateInAttributeValueSingleQuotes=function(p){this.handleInAttributeValue(p,i.SingleQuote)},l.prototype.stateInAttributeValueNoQuotes=function(p){r(p)||p===i.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(f.Unquoted,this.index),this.state=s.BeforeAttributeName,this.stateBeforeAttributeName(p)):this.decodeEntities&&p===i.Amp&&(this.baseState=this.state,this.state=s.BeforeEntity)},l.prototype.stateBeforeDeclaration=function(p){p===i.OpeningSquareBracket?(this.state=s.CDATASequence,this.sequenceIndex=0):this.state=p===i.Dash?s.BeforeComment:s.InDeclaration},l.prototype.stateInDeclaration=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=s.Text,this.sectionStart=this.index+1)},l.prototype.stateInProcessingInstruction=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=s.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeComment=function(p){p===i.Dash?(this.state=s.InCommentLike,this.currentSequence=o.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=s.InDeclaration},l.prototype.stateInSpecialComment=function(p){(p===i.Gt||this.fastForwardTo(i.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=s.Text,this.sectionStart=this.index+1)},l.prototype.stateBeforeSpecialS=function(p){var x=p|32;x===o.ScriptEnd[3]?this.startSpecial(o.ScriptEnd,4):x===o.StyleEnd[3]?this.startSpecial(o.StyleEnd,4):(this.state=s.InTagName,this.stateInTagName(p))},l.prototype.stateBeforeEntity=function(p){this.entityExcess=1,this.entityResult=0,p===i.Number?this.state=s.BeforeNumericEntity:p===i.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=s.InNamedEntity,this.stateInNamedEntity(p))},l.prototype.stateInNamedEntity=function(p){if(this.entityExcess+=1,this.trieIndex=(0,a.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,p),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];var x=this.trieCurrent&a.BinTrieFlags.VALUE_LENGTH;if(x){var w=(x>>14)-1;if(!this.allowLegacyEntity()&&p!==i.Semi)this.trieIndex+=w;else{var b=this.index-this.entityExcess+1;b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.entityResult=this.trieIndex,this.trieIndex+=w,this.entityExcess=0,this.sectionStart=this.index+1,w===0&&this.emitNamedEntity()}}},l.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var p=(this.entityTrie[this.entityResult]&a.BinTrieFlags.VALUE_LENGTH)>>14;switch(p){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~a.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},l.prototype.stateBeforeNumericEntity=function(p){(p|32)===i.LowerX?(this.entityExcess++,this.state=s.InHexEntity):(this.state=s.InNumericEntity,this.stateInNumericEntity(p))},l.prototype.emitNumericEntity=function(p){var x=this.index-this.entityExcess-1,w=x+2+ +(this.state===s.InHexEntity);w!==this.index&&(x>this.sectionStart&&this.emitPartial(this.sectionStart,x),this.sectionStart=this.index+Number(p),this.emitCodePoint((0,a.replaceCodePoint)(this.entityResult))),this.state=this.baseState},l.prototype.stateInNumericEntity=function(p){p===i.Semi?this.emitNumericEntity(!0):u(p)?(this.entityResult=this.entityResult*10+(p-i.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.stateInHexEntity=function(p){p===i.Semi?this.emitNumericEntity(!0):u(p)?(this.entityResult=this.entityResult*16+(p-i.Zero),this.entityExcess++):d(p)?(this.entityResult=this.entityResult*16+((p|32)-i.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},l.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===s.Text||this.baseState===s.InSpecialTag)},l.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===s.Text||this.state===s.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===s.InAttributeValueDq||this.state===s.InAttributeValueSq||this.state===s.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},l.prototype.shouldContinue=function(){return this.index<this.buffer.length+this.offset&&this.running},l.prototype.parse=function(){for(;this.shouldContinue();){var p=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case s.Text:{this.stateText(p);break}case s.SpecialStartSequence:{this.stateSpecialStartSequence(p);break}case s.InSpecialTag:{this.stateInSpecialTag(p);break}case s.CDATASequence:{this.stateCDATASequence(p);break}case s.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(p);break}case s.InAttributeName:{this.stateInAttributeName(p);break}case s.InCommentLike:{this.stateInCommentLike(p);break}case s.InSpecialComment:{this.stateInSpecialComment(p);break}case s.BeforeAttributeName:{this.stateBeforeAttributeName(p);break}case s.InTagName:{this.stateInTagName(p);break}case s.InClosingTagName:{this.stateInClosingTagName(p);break}case s.BeforeTagName:{this.stateBeforeTagName(p);break}case s.AfterAttributeName:{this.stateAfterAttributeName(p);break}case s.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(p);break}case s.BeforeAttributeValue:{this.stateBeforeAttributeValue(p);break}case s.BeforeClosingTagName:{this.stateBeforeClosingTagName(p);break}case s.AfterClosingTagName:{this.stateAfterClosingTagName(p);break}case s.BeforeSpecialS:{this.stateBeforeSpecialS(p);break}case s.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(p);break}case s.InSelfClosingTag:{this.stateInSelfClosingTag(p);break}case s.InDeclaration:{this.stateInDeclaration(p);break}case s.BeforeDeclaration:{this.stateBeforeDeclaration(p);break}case s.BeforeComment:{this.stateBeforeComment(p);break}case s.InProcessingInstruction:{this.stateInProcessingInstruction(p);break}case s.InNamedEntity:{this.stateInNamedEntity(p);break}case s.BeforeEntity:{this.stateBeforeEntity(p);break}case s.InHexEntity:{this.stateInHexEntity(p);break}case s.InNumericEntity:{this.stateInNumericEntity(p);break}default:this.stateBeforeNumericEntity(p)}this.index++}this.cleanup()},l.prototype.finish=function(){this.state===s.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()},l.prototype.handleTrailingData=function(){var p=this.buffer.length+this.offset;this.state===s.InCommentLike?this.currentSequence===o.CdataEnd?this.cbs.oncdata(this.sectionStart,p,0):this.cbs.oncomment(this.sectionStart,p,0):this.state===s.InNumericEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===s.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===s.InTagName||this.state===s.BeforeAttributeName||this.state===s.BeforeAttributeValue||this.state===s.AfterAttributeName||this.state===s.InAttributeName||this.state===s.InAttributeValueSq||this.state===s.InAttributeValueDq||this.state===s.InAttributeValueNq||this.state===s.InClosingTagName||this.cbs.ontext(this.sectionStart,p)},l.prototype.emitPartial=function(p,x){this.baseState!==s.Text&&this.baseState!==s.InSpecialTag?this.cbs.onattribdata(p,x):this.cbs.ontext(p,x)},l.prototype.emitCodePoint=function(p){this.baseState!==s.Text&&this.baseState!==s.InSpecialTag?this.cbs.onattribentity(p):this.cbs.ontextentity(p)},l})();e.default=h})(Gs)),Gs}var il;function ol(){if(il)return It;il=1;var e=It&&It.__createBinding||(Object.create?(function(b,g,v,k){k===void 0&&(k=v);var _=Object.getOwnPropertyDescriptor(g,v);(!_||("get"in _?!g.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return g[v]}}),Object.defineProperty(b,k,_)}):(function(b,g,v,k){k===void 0&&(k=v),b[k]=g[v]})),a=It&&It.__setModuleDefault||(Object.create?(function(b,g){Object.defineProperty(b,"default",{enumerable:!0,value:g})}):function(b,g){b.default=g}),i=It&&It.__importStar||function(b){if(b&&b.__esModule)return b;var g={};if(b!=null)for(var v in b)v!=="default"&&Object.prototype.hasOwnProperty.call(b,v)&&e(g,b,v);return a(g,b),g};Object.defineProperty(It,"__esModule",{value:!0}),It.Parser=void 0;var s=i(nd()),r=ts(),n=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),c=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),f=new Set(["rt","rp"]),o=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",n],["input",n],["output",n],["button",n],["datalist",n],["textarea",n],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",f],["rp",f],["tbody",c],["tfoot",c]]),h=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),l=new Set(["math","svg"]),p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),x=/\s|\//,w=(function(){function b(g,v){v===void 0&&(v={});var k,_,y,m,N;this.options=v,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=g??{},this.lowerCaseTagNames=(k=v.lowerCaseTags)!==null&&k!==void 0?k:!v.xmlMode,this.lowerCaseAttributeNames=(_=v.lowerCaseAttributeNames)!==null&&_!==void 0?_:!v.xmlMode,this.tokenizer=new((y=v.Tokenizer)!==null&&y!==void 0?y:s.default)(this.options,this),(N=(m=this.cbs).onparserinit)===null||N===void 0||N.call(m,this)}return b.prototype.ontext=function(g,v){var k,_,y=this.getSlice(g,v);this.endIndex=v-1,(_=(k=this.cbs).ontext)===null||_===void 0||_.call(k,y),this.startIndex=v},b.prototype.ontextentity=function(g){var v,k,_=this.tokenizer.getSectionStart();this.endIndex=_-1,(k=(v=this.cbs).ontext)===null||k===void 0||k.call(v,(0,r.fromCodePoint)(g)),this.startIndex=_},b.prototype.isVoidElement=function(g){return!this.options.xmlMode&&h.has(g)},b.prototype.onopentagname=function(g,v){this.endIndex=v;var k=this.getSlice(g,v);this.lowerCaseTagNames&&(k=k.toLowerCase()),this.emitOpenTag(k)},b.prototype.emitOpenTag=function(g){var v,k,_,y;this.openTagStart=this.startIndex,this.tagname=g;var m=!this.options.xmlMode&&o.get(g);if(m)for(;this.stack.length>0&&m.has(this.stack[this.stack.length-1]);){var N=this.stack.pop();(k=(v=this.cbs).onclosetag)===null||k===void 0||k.call(v,N,!0)}this.isVoidElement(g)||(this.stack.push(g),l.has(g)?this.foreignContext.push(!0):p.has(g)&&this.foreignContext.push(!1)),(y=(_=this.cbs).onopentagname)===null||y===void 0||y.call(_,g),this.cbs.onopentag&&(this.attribs={})},b.prototype.endOpenTag=function(g){var v,k;this.startIndex=this.openTagStart,this.attribs&&((k=(v=this.cbs).onopentag)===null||k===void 0||k.call(v,this.tagname,this.attribs,g),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},b.prototype.onopentagend=function(g){this.endIndex=g,this.endOpenTag(!1),this.startIndex=g+1},b.prototype.onclosetag=function(g,v){var k,_,y,m,N,j;this.endIndex=v;var A=this.getSlice(g,v);if(this.lowerCaseTagNames&&(A=A.toLowerCase()),(l.has(A)||p.has(A))&&this.foreignContext.pop(),this.isVoidElement(A))!this.options.xmlMode&&A==="br"&&((_=(k=this.cbs).onopentagname)===null||_===void 0||_.call(k,"br"),(m=(y=this.cbs).onopentag)===null||m===void 0||m.call(y,"br",{},!0),(j=(N=this.cbs).onclosetag)===null||j===void 0||j.call(N,"br",!1));else{var D=this.stack.lastIndexOf(A);if(D!==-1)if(this.cbs.onclosetag)for(var C=this.stack.length-D;C--;)this.cbs.onclosetag(this.stack.pop(),C!==0);else this.stack.length=D;else!this.options.xmlMode&&A==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=v+1},b.prototype.onselfclosingtag=function(g){this.endIndex=g,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=g+1):this.onopentagend(g)},b.prototype.closeCurrentTag=function(g){var v,k,_=this.tagname;this.endOpenTag(g),this.stack[this.stack.length-1]===_&&((k=(v=this.cbs).onclosetag)===null||k===void 0||k.call(v,_,!g),this.stack.pop())},b.prototype.onattribname=function(g,v){this.startIndex=g;var k=this.getSlice(g,v);this.attribname=this.lowerCaseAttributeNames?k.toLowerCase():k},b.prototype.onattribdata=function(g,v){this.attribvalue+=this.getSlice(g,v)},b.prototype.onattribentity=function(g){this.attribvalue+=(0,r.fromCodePoint)(g)},b.prototype.onattribend=function(g,v){var k,_;this.endIndex=v,(_=(k=this.cbs).onattribute)===null||_===void 0||_.call(k,this.attribname,this.attribvalue,g===s.QuoteType.Double?'"':g===s.QuoteType.Single?"'":g===s.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},b.prototype.getInstructionName=function(g){var v=g.search(x),k=v<0?g:g.substr(0,v);return this.lowerCaseTagNames&&(k=k.toLowerCase()),k},b.prototype.ondeclaration=function(g,v){this.endIndex=v;var k=this.getSlice(g,v);if(this.cbs.onprocessinginstruction){var _=this.getInstructionName(k);this.cbs.onprocessinginstruction("!".concat(_),"!".concat(k))}this.startIndex=v+1},b.prototype.onprocessinginstruction=function(g,v){this.endIndex=v;var k=this.getSlice(g,v);if(this.cbs.onprocessinginstruction){var _=this.getInstructionName(k);this.cbs.onprocessinginstruction("?".concat(_),"?".concat(k))}this.startIndex=v+1},b.prototype.oncomment=function(g,v,k){var _,y,m,N;this.endIndex=v,(y=(_=this.cbs).oncomment)===null||y===void 0||y.call(_,this.getSlice(g,v-k)),(N=(m=this.cbs).oncommentend)===null||N===void 0||N.call(m),this.startIndex=v+1},b.prototype.oncdata=function(g,v,k){var _,y,m,N,j,A,D,C,O,$;this.endIndex=v;var H=this.getSlice(g,v-k);this.options.xmlMode||this.options.recognizeCDATA?((y=(_=this.cbs).oncdatastart)===null||y===void 0||y.call(_),(N=(m=this.cbs).ontext)===null||N===void 0||N.call(m,H),(A=(j=this.cbs).oncdataend)===null||A===void 0||A.call(j)):((C=(D=this.cbs).oncomment)===null||C===void 0||C.call(D,"[CDATA[".concat(H,"]]")),($=(O=this.cbs).oncommentend)===null||$===void 0||$.call(O)),this.startIndex=v+1},b.prototype.onend=function(){var g,v;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var k=this.stack.length;k>0;this.cbs.onclosetag(this.stack[--k],!0));}(v=(g=this.cbs).onend)===null||v===void 0||v.call(g)},b.prototype.reset=function(){var g,v,k,_;(v=(g=this.cbs).onreset)===null||v===void 0||v.call(g),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(_=(k=this.cbs).onparserinit)===null||_===void 0||_.call(k,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},b.prototype.parseComplete=function(g){this.reset(),this.end(g)},b.prototype.getSlice=function(g,v){for(;g-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var k=this.buffers[0].slice(g-this.bufferOffset,v-this.bufferOffset);v-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),k+=this.buffers[0].slice(0,v-this.bufferOffset);return k},b.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},b.prototype.write=function(g){var v,k;if(this.ended){(k=(v=this.cbs).onerror)===null||k===void 0||k.call(v,new Error(".write() after done!"));return}this.buffers.push(g),this.tokenizer.running&&(this.tokenizer.write(g),this.writeIndex++)},b.prototype.end=function(g){var v,k;if(this.ended){(k=(v=this.cbs).onerror)===null||k===void 0||k.call(v,new Error(".end() after done!"));return}g&&this.write(g),this.ended=!0,this.tokenizer.end()},b.prototype.pause=function(){this.tokenizer.pause()},b.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()},b.prototype.parseChunk=function(g){this.write(g)},b.prototype.done=function(g){this.end(g)},b})();return It.Parser=w,It}var Ir={},Ys={},ul;function nn(){return ul||(ul=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var a;(function(s){s.Root="root",s.Text="text",s.Directive="directive",s.Comment="comment",s.Script="script",s.Style="style",s.Tag="tag",s.CDATA="cdata",s.Doctype="doctype"})(a=e.ElementType||(e.ElementType={}));function i(s){return s.type===a.Tag||s.type===a.Script||s.type===a.Style}e.isTag=i,e.Root=a.Root,e.Text=a.Text,e.Directive=a.Directive,e.Comment=a.Comment,e.Script=a.Script,e.Style=a.Style,e.Tag=a.Tag,e.CDATA=a.CDATA,e.Doctype=a.Doctype})(Ys)),Ys}var ve={},ll;function cl(){if(ll)return ve;ll=1;var e=ve&&ve.__extends||(function(){var y=function(m,N){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,A){j.__proto__=A}||function(j,A){for(var D in A)Object.prototype.hasOwnProperty.call(A,D)&&(j[D]=A[D])},y(m,N)};return function(m,N){if(typeof N!="function"&&N!==null)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");y(m,N);function j(){this.constructor=m}m.prototype=N===null?Object.create(N):(j.prototype=N.prototype,new j)}})(),a=ve&&ve.__assign||function(){return a=Object.assign||function(y){for(var m,N=1,j=arguments.length;N<j;N++){m=arguments[N];for(var A in m)Object.prototype.hasOwnProperty.call(m,A)&&(y[A]=m[A])}return y},a.apply(this,arguments)};Object.defineProperty(ve,"__esModule",{value:!0}),ve.cloneNode=ve.hasChildren=ve.isDocument=ve.isDirective=ve.isComment=ve.isText=ve.isCDATA=ve.isTag=ve.Element=ve.Document=ve.CDATA=ve.NodeWithChildren=ve.ProcessingInstruction=ve.Comment=ve.Text=ve.DataNode=ve.Node=void 0;var i=nn(),s=(function(){function y(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(y.prototype,"parentNode",{get:function(){return this.parent},set:function(m){this.parent=m},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"previousSibling",{get:function(){return this.prev},set:function(m){this.prev=m},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"nextSibling",{get:function(){return this.next},set:function(m){this.next=m},enumerable:!1,configurable:!0}),y.prototype.cloneNode=function(m){return m===void 0&&(m=!1),k(this,m)},y})();ve.Node=s;var r=(function(y){e(m,y);function m(N){var j=y.call(this)||this;return j.data=N,j}return Object.defineProperty(m.prototype,"nodeValue",{get:function(){return this.data},set:function(N){this.data=N},enumerable:!1,configurable:!0}),m})(s);ve.DataNode=r;var n=(function(y){e(m,y);function m(){var N=y!==null&&y.apply(this,arguments)||this;return N.type=i.ElementType.Text,N}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),m})(r);ve.Text=n;var u=(function(y){e(m,y);function m(){var N=y!==null&&y.apply(this,arguments)||this;return N.type=i.ElementType.Comment,N}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),m})(r);ve.Comment=u;var c=(function(y){e(m,y);function m(N,j){var A=y.call(this,j)||this;return A.name=N,A.type=i.ElementType.Directive,A}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),m})(r);ve.ProcessingInstruction=c;var d=(function(y){e(m,y);function m(N){var j=y.call(this)||this;return j.children=N,j}return Object.defineProperty(m.prototype,"firstChild",{get:function(){var N;return(N=this.children[0])!==null&&N!==void 0?N:null},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"childNodes",{get:function(){return this.children},set:function(N){this.children=N},enumerable:!1,configurable:!0}),m})(s);ve.NodeWithChildren=d;var f=(function(y){e(m,y);function m(){var N=y!==null&&y.apply(this,arguments)||this;return N.type=i.ElementType.CDATA,N}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),m})(d);ve.CDATA=f;var o=(function(y){e(m,y);function m(){var N=y!==null&&y.apply(this,arguments)||this;return N.type=i.ElementType.Root,N}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),m})(d);ve.Document=o;var h=(function(y){e(m,y);function m(N,j,A,D){A===void 0&&(A=[]),D===void 0&&(D=N==="script"?i.ElementType.Script:N==="style"?i.ElementType.Style:i.ElementType.Tag);var C=y.call(this,A)||this;return C.name=N,C.attribs=j,C.type=D,C}return Object.defineProperty(m.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"tagName",{get:function(){return this.name},set:function(N){this.name=N},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"attributes",{get:function(){var N=this;return Object.keys(this.attribs).map(function(j){var A,D;return{name:j,value:N.attribs[j],namespace:(A=N["x-attribsNamespace"])===null||A===void 0?void 0:A[j],prefix:(D=N["x-attribsPrefix"])===null||D===void 0?void 0:D[j]}})},enumerable:!1,configurable:!0}),m})(d);ve.Element=h;function l(y){return(0,i.isTag)(y)}ve.isTag=l;function p(y){return y.type===i.ElementType.CDATA}ve.isCDATA=p;function x(y){return y.type===i.ElementType.Text}ve.isText=x;function w(y){return y.type===i.ElementType.Comment}ve.isComment=w;function b(y){return y.type===i.ElementType.Directive}ve.isDirective=b;function g(y){return y.type===i.ElementType.Root}ve.isDocument=g;function v(y){return Object.prototype.hasOwnProperty.call(y,"children")}ve.hasChildren=v;function k(y,m){m===void 0&&(m=!1);var N;if(x(y))N=new n(y.data);else if(w(y))N=new u(y.data);else if(l(y)){var j=m?_(y.children):[],A=new h(y.name,a({},y.attribs),j);j.forEach(function($){return $.parent=A}),y.namespace!=null&&(A.namespace=y.namespace),y["x-attribsNamespace"]&&(A["x-attribsNamespace"]=a({},y["x-attribsNamespace"])),y["x-attribsPrefix"]&&(A["x-attribsPrefix"]=a({},y["x-attribsPrefix"])),N=A}else if(p(y)){var j=m?_(y.children):[],D=new f(j);j.forEach(function(H){return H.parent=D}),N=D}else if(g(y)){var j=m?_(y.children):[],C=new o(j);j.forEach(function(H){return H.parent=C}),y["x-mode"]&&(C["x-mode"]=y["x-mode"]),N=C}else if(b(y)){var O=new c(y.name,y.data);y["x-name"]!=null&&(O["x-name"]=y["x-name"],O["x-publicId"]=y["x-publicId"],O["x-systemId"]=y["x-systemId"]),N=O}else throw new Error("Not implemented yet: ".concat(y.type));return N.startIndex=y.startIndex,N.endIndex=y.endIndex,y.sourceCodeLocation!=null&&(N.sourceCodeLocation=y.sourceCodeLocation),N}ve.cloneNode=k;function _(y){for(var m=y.map(function(j){return k(j,!0)}),N=1;N<m.length;N++)m[N].prev=m[N-1],m[N-1].next=m[N];return m}return ve}var dl;function xr(){return dl||(dl=1,(function(e){var a=Ir&&Ir.__createBinding||(Object.create?(function(c,d,f,o){o===void 0&&(o=f);var h=Object.getOwnPropertyDescriptor(d,f);(!h||("get"in h?!d.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return d[f]}}),Object.defineProperty(c,o,h)}):(function(c,d,f,o){o===void 0&&(o=f),c[o]=d[f]})),i=Ir&&Ir.__exportStar||function(c,d){for(var f in c)f!=="default"&&!Object.prototype.hasOwnProperty.call(d,f)&&a(d,c,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var s=nn(),r=cl();i(cl(),e);var n={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},u=(function(){function c(d,f,o){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof f=="function"&&(o=f,f=n),typeof d=="object"&&(f=d,d=void 0),this.callback=d??null,this.options=f??n,this.elementCB=o??null}return c.prototype.onparserinit=function(d){this.parser=d},c.prototype.onreset=function(){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},c.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},c.prototype.onerror=function(d){this.handleCallback(d)},c.prototype.onclosetag=function(){this.lastNode=null;var d=this.tagStack.pop();this.options.withEndIndices&&(d.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(d)},c.prototype.onopentag=function(d,f){var o=this.options.xmlMode?s.ElementType.Tag:void 0,h=new r.Element(d,f,void 0,o);this.addNode(h),this.tagStack.push(h)},c.prototype.ontext=function(d){var f=this.lastNode;if(f&&f.type===s.ElementType.Text)f.data+=d,this.options.withEndIndices&&(f.endIndex=this.parser.endIndex);else{var o=new r.Text(d);this.addNode(o),this.lastNode=o}},c.prototype.oncomment=function(d){if(this.lastNode&&this.lastNode.type===s.ElementType.Comment){this.lastNode.data+=d;return}var f=new r.Comment(d);this.addNode(f),this.lastNode=f},c.prototype.oncommentend=function(){this.lastNode=null},c.prototype.oncdatastart=function(){var d=new r.Text(""),f=new r.CDATA([d]);this.addNode(f),d.parent=f,this.lastNode=d},c.prototype.oncdataend=function(){this.lastNode=null},c.prototype.onprocessinginstruction=function(d,f){var o=new r.ProcessingInstruction(d,f);this.addNode(o)},c.prototype.handleCallback=function(d){if(typeof this.callback=="function")this.callback(d,this.dom);else if(d)throw d},c.prototype.addNode=function(d){var f=this.tagStack[this.tagStack.length-1],o=f.children[f.children.length-1];this.options.withStartIndices&&(d.startIndex=this.parser.startIndex),this.options.withEndIndices&&(d.endIndex=this.parser.endIndex),f.children.push(d),o&&(d.prev=o,o.next=d),d.parent=f,this.lastNode=null},c})();e.DomHandler=u,e.default=u})(Ir)),Ir}var Fr={},Wt={},lt={},Zs={},tr={},Vn={},fl;function Lh(){if(fl)return Vn;fl=1,Object.defineProperty(Vn,"__esModule",{value:!0});function e(a){for(var i=1;i<a.length;i++)a[i][0]+=a[i-1][0]+1;return a}return Vn.default=new Map(e([[9,"&Tab;"],[0,"&NewLine;"],[22,"&excl;"],[0,"&quot;"],[0,"&num;"],[0,"&dollar;"],[0,"&percnt;"],[0,"&amp;"],[0,"&apos;"],[0,"&lpar;"],[0,"&rpar;"],[0,"&ast;"],[0,"&plus;"],[0,"&comma;"],[1,"&period;"],[0,"&sol;"],[10,"&colon;"],[0,"&semi;"],[0,{v:"&lt;",n:8402,o:"&nvlt;"}],[0,{v:"&equals;",n:8421,o:"&bne;"}],[0,{v:"&gt;",n:8402,o:"&nvgt;"}],[0,"&quest;"],[0,"&commat;"],[26,"&lbrack;"],[0,"&bsol;"],[0,"&rbrack;"],[0,"&Hat;"],[0,"&lowbar;"],[0,"&DiacriticalGrave;"],[5,{n:106,o:"&fjlig;"}],[20,"&lbrace;"],[0,"&verbar;"],[0,"&rbrace;"],[34,"&nbsp;"],[0,"&iexcl;"],[0,"&cent;"],[0,"&pound;"],[0,"&curren;"],[0,"&yen;"],[0,"&brvbar;"],[0,"&sect;"],[0,"&die;"],[0,"&copy;"],[0,"&ordf;"],[0,"&laquo;"],[0,"&not;"],[0,"&shy;"],[0,"&circledR;"],[0,"&macr;"],[0,"&deg;"],[0,"&PlusMinus;"],[0,"&sup2;"],[0,"&sup3;"],[0,"&acute;"],[0,"&micro;"],[0,"&para;"],[0,"&centerdot;"],[0,"&cedil;"],[0,"&sup1;"],[0,"&ordm;"],[0,"&raquo;"],[0,"&frac14;"],[0,"&frac12;"],[0,"&frac34;"],[0,"&iquest;"],[0,"&Agrave;"],[0,"&Aacute;"],[0,"&Acirc;"],[0,"&Atilde;"],[0,"&Auml;"],[0,"&angst;"],[0,"&AElig;"],[0,"&Ccedil;"],[0,"&Egrave;"],[0,"&Eacute;"],[0,"&Ecirc;"],[0,"&Euml;"],[0,"&Igrave;"],[0,"&Iacute;"],[0,"&Icirc;"],[0,"&Iuml;"],[0,"&ETH;"],[0,"&Ntilde;"],[0,"&Ograve;"],[0,"&Oacute;"],[0,"&Ocirc;"],[0,"&Otilde;"],[0,"&Ouml;"],[0,"&times;"],[0,"&Oslash;"],[0,"&Ugrave;"],[0,"&Uacute;"],[0,"&Ucirc;"],[0,"&Uuml;"],[0,"&Yacute;"],[0,"&THORN;"],[0,"&szlig;"],[0,"&agrave;"],[0,"&aacute;"],[0,"&acirc;"],[0,"&atilde;"],[0,"&auml;"],[0,"&aring;"],[0,"&aelig;"],[0,"&ccedil;"],[0,"&egrave;"],[0,"&eacute;"],[0,"&ecirc;"],[0,"&euml;"],[0,"&igrave;"],[0,"&iacute;"],[0,"&icirc;"],[0,"&iuml;"],[0,"&eth;"],[0,"&ntilde;"],[0,"&ograve;"],[0,"&oacute;"],[0,"&ocirc;"],[0,"&otilde;"],[0,"&ouml;"],[0,"&div;"],[0,"&oslash;"],[0,"&ugrave;"],[0,"&uacute;"],[0,"&ucirc;"],[0,"&uuml;"],[0,"&yacute;"],[0,"&thorn;"],[0,"&yuml;"],[0,"&Amacr;"],[0,"&amacr;"],[0,"&Abreve;"],[0,"&abreve;"],[0,"&Aogon;"],[0,"&aogon;"],[0,"&Cacute;"],[0,"&cacute;"],[0,"&Ccirc;"],[0,"&ccirc;"],[0,"&Cdot;"],[0,"&cdot;"],[0,"&Ccaron;"],[0,"&ccaron;"],[0,"&Dcaron;"],[0,"&dcaron;"],[0,"&Dstrok;"],[0,"&dstrok;"],[0,"&Emacr;"],[0,"&emacr;"],[2,"&Edot;"],[0,"&edot;"],[0,"&Eogon;"],[0,"&eogon;"],[0,"&Ecaron;"],[0,"&ecaron;"],[0,"&Gcirc;"],[0,"&gcirc;"],[0,"&Gbreve;"],[0,"&gbreve;"],[0,"&Gdot;"],[0,"&gdot;"],[0,"&Gcedil;"],[1,"&Hcirc;"],[0,"&hcirc;"],[0,"&Hstrok;"],[0,"&hstrok;"],[0,"&Itilde;"],[0,"&itilde;"],[0,"&Imacr;"],[0,"&imacr;"],[2,"&Iogon;"],[0,"&iogon;"],[0,"&Idot;"],[0,"&imath;"],[0,"&IJlig;"],[0,"&ijlig;"],[0,"&Jcirc;"],[0,"&jcirc;"],[0,"&Kcedil;"],[0,"&kcedil;"],[0,"&kgreen;"],[0,"&Lacute;"],[0,"&lacute;"],[0,"&Lcedil;"],[0,"&lcedil;"],[0,"&Lcaron;"],[0,"&lcaron;"],[0,"&Lmidot;"],[0,"&lmidot;"],[0,"&Lstrok;"],[0,"&lstrok;"],[0,"&Nacute;"],[0,"&nacute;"],[0,"&Ncedil;"],[0,"&ncedil;"],[0,"&Ncaron;"],[0,"&ncaron;"],[0,"&napos;"],[0,"&ENG;"],[0,"&eng;"],[0,"&Omacr;"],[0,"&omacr;"],[2,"&Odblac;"],[0,"&odblac;"],[0,"&OElig;"],[0,"&oelig;"],[0,"&Racute;"],[0,"&racute;"],[0,"&Rcedil;"],[0,"&rcedil;"],[0,"&Rcaron;"],[0,"&rcaron;"],[0,"&Sacute;"],[0,"&sacute;"],[0,"&Scirc;"],[0,"&scirc;"],[0,"&Scedil;"],[0,"&scedil;"],[0,"&Scaron;"],[0,"&scaron;"],[0,"&Tcedil;"],[0,"&tcedil;"],[0,"&Tcaron;"],[0,"&tcaron;"],[0,"&Tstrok;"],[0,"&tstrok;"],[0,"&Utilde;"],[0,"&utilde;"],[0,"&Umacr;"],[0,"&umacr;"],[0,"&Ubreve;"],[0,"&ubreve;"],[0,"&Uring;"],[0,"&uring;"],[0,"&Udblac;"],[0,"&udblac;"],[0,"&Uogon;"],[0,"&uogon;"],[0,"&Wcirc;"],[0,"&wcirc;"],[0,"&Ycirc;"],[0,"&ycirc;"],[0,"&Yuml;"],[0,"&Zacute;"],[0,"&zacute;"],[0,"&Zdot;"],[0,"&zdot;"],[0,"&Zcaron;"],[0,"&zcaron;"],[19,"&fnof;"],[34,"&imped;"],[63,"&gacute;"],[65,"&jmath;"],[142,"&circ;"],[0,"&caron;"],[16,"&breve;"],[0,"&DiacriticalDot;"],[0,"&ring;"],[0,"&ogon;"],[0,"&DiacriticalTilde;"],[0,"&dblac;"],[51,"&DownBreve;"],[127,"&Alpha;"],[0,"&Beta;"],[0,"&Gamma;"],[0,"&Delta;"],[0,"&Epsilon;"],[0,"&Zeta;"],[0,"&Eta;"],[0,"&Theta;"],[0,"&Iota;"],[0,"&Kappa;"],[0,"&Lambda;"],[0,"&Mu;"],[0,"&Nu;"],[0,"&Xi;"],[0,"&Omicron;"],[0,"&Pi;"],[0,"&Rho;"],[1,"&Sigma;"],[0,"&Tau;"],[0,"&Upsilon;"],[0,"&Phi;"],[0,"&Chi;"],[0,"&Psi;"],[0,"&ohm;"],[7,"&alpha;"],[0,"&beta;"],[0,"&gamma;"],[0,"&delta;"],[0,"&epsi;"],[0,"&zeta;"],[0,"&eta;"],[0,"&theta;"],[0,"&iota;"],[0,"&kappa;"],[0,"&lambda;"],[0,"&mu;"],[0,"&nu;"],[0,"&xi;"],[0,"&omicron;"],[0,"&pi;"],[0,"&rho;"],[0,"&sigmaf;"],[0,"&sigma;"],[0,"&tau;"],[0,"&upsi;"],[0,"&phi;"],[0,"&chi;"],[0,"&psi;"],[0,"&omega;"],[7,"&thetasym;"],[0,"&Upsi;"],[2,"&phiv;"],[0,"&piv;"],[5,"&Gammad;"],[0,"&digamma;"],[18,"&kappav;"],[0,"&rhov;"],[3,"&epsiv;"],[0,"&backepsilon;"],[10,"&IOcy;"],[0,"&DJcy;"],[0,"&GJcy;"],[0,"&Jukcy;"],[0,"&DScy;"],[0,"&Iukcy;"],[0,"&YIcy;"],[0,"&Jsercy;"],[0,"&LJcy;"],[0,"&NJcy;"],[0,"&TSHcy;"],[0,"&KJcy;"],[1,"&Ubrcy;"],[0,"&DZcy;"],[0,"&Acy;"],[0,"&Bcy;"],[0,"&Vcy;"],[0,"&Gcy;"],[0,"&Dcy;"],[0,"&IEcy;"],[0,"&ZHcy;"],[0,"&Zcy;"],[0,"&Icy;"],[0,"&Jcy;"],[0,"&Kcy;"],[0,"&Lcy;"],[0,"&Mcy;"],[0,"&Ncy;"],[0,"&Ocy;"],[0,"&Pcy;"],[0,"&Rcy;"],[0,"&Scy;"],[0,"&Tcy;"],[0,"&Ucy;"],[0,"&Fcy;"],[0,"&KHcy;"],[0,"&TScy;"],[0,"&CHcy;"],[0,"&SHcy;"],[0,"&SHCHcy;"],[0,"&HARDcy;"],[0,"&Ycy;"],[0,"&SOFTcy;"],[0,"&Ecy;"],[0,"&YUcy;"],[0,"&YAcy;"],[0,"&acy;"],[0,"&bcy;"],[0,"&vcy;"],[0,"&gcy;"],[0,"&dcy;"],[0,"&iecy;"],[0,"&zhcy;"],[0,"&zcy;"],[0,"&icy;"],[0,"&jcy;"],[0,"&kcy;"],[0,"&lcy;"],[0,"&mcy;"],[0,"&ncy;"],[0,"&ocy;"],[0,"&pcy;"],[0,"&rcy;"],[0,"&scy;"],[0,"&tcy;"],[0,"&ucy;"],[0,"&fcy;"],[0,"&khcy;"],[0,"&tscy;"],[0,"&chcy;"],[0,"&shcy;"],[0,"&shchcy;"],[0,"&hardcy;"],[0,"&ycy;"],[0,"&softcy;"],[0,"&ecy;"],[0,"&yucy;"],[0,"&yacy;"],[1,"&iocy;"],[0,"&djcy;"],[0,"&gjcy;"],[0,"&jukcy;"],[0,"&dscy;"],[0,"&iukcy;"],[0,"&yicy;"],[0,"&jsercy;"],[0,"&ljcy;"],[0,"&njcy;"],[0,"&tshcy;"],[0,"&kjcy;"],[1,"&ubrcy;"],[0,"&dzcy;"],[7074,"&ensp;"],[0,"&emsp;"],[0,"&emsp13;"],[0,"&emsp14;"],[1,"&numsp;"],[0,"&puncsp;"],[0,"&ThinSpace;"],[0,"&hairsp;"],[0,"&NegativeMediumSpace;"],[0,"&zwnj;"],[0,"&zwj;"],[0,"&lrm;"],[0,"&rlm;"],[0,"&dash;"],[2,"&ndash;"],[0,"&mdash;"],[0,"&horbar;"],[0,"&Verbar;"],[1,"&lsquo;"],[0,"&CloseCurlyQuote;"],[0,"&lsquor;"],[1,"&ldquo;"],[0,"&CloseCurlyDoubleQuote;"],[0,"&bdquo;"],[1,"&dagger;"],[0,"&Dagger;"],[0,"&bull;"],[2,"&nldr;"],[0,"&hellip;"],[9,"&permil;"],[0,"&pertenk;"],[0,"&prime;"],[0,"&Prime;"],[0,"&tprime;"],[0,"&backprime;"],[3,"&lsaquo;"],[0,"&rsaquo;"],[3,"&oline;"],[2,"&caret;"],[1,"&hybull;"],[0,"&frasl;"],[10,"&bsemi;"],[7,"&qprime;"],[7,{v:"&MediumSpace;",n:8202,o:"&ThickSpace;"}],[0,"&NoBreak;"],[0,"&af;"],[0,"&InvisibleTimes;"],[0,"&ic;"],[72,"&euro;"],[46,"&tdot;"],[0,"&DotDot;"],[37,"&complexes;"],[2,"&incare;"],[4,"&gscr;"],[0,"&hamilt;"],[0,"&Hfr;"],[0,"&Hopf;"],[0,"&planckh;"],[0,"&hbar;"],[0,"&imagline;"],[0,"&Ifr;"],[0,"&lagran;"],[0,"&ell;"],[1,"&naturals;"],[0,"&numero;"],[0,"&copysr;"],[0,"&weierp;"],[0,"&Popf;"],[0,"&Qopf;"],[0,"&realine;"],[0,"&real;"],[0,"&reals;"],[0,"&rx;"],[3,"&trade;"],[1,"&integers;"],[2,"&mho;"],[0,"&zeetrf;"],[0,"&iiota;"],[2,"&bernou;"],[0,"&Cayleys;"],[1,"&escr;"],[0,"&Escr;"],[0,"&Fouriertrf;"],[1,"&Mellintrf;"],[0,"&order;"],[0,"&alefsym;"],[0,"&beth;"],[0,"&gimel;"],[0,"&daleth;"],[12,"&CapitalDifferentialD;"],[0,"&dd;"],[0,"&ee;"],[0,"&ii;"],[10,"&frac13;"],[0,"&frac23;"],[0,"&frac15;"],[0,"&frac25;"],[0,"&frac35;"],[0,"&frac45;"],[0,"&frac16;"],[0,"&frac56;"],[0,"&frac18;"],[0,"&frac38;"],[0,"&frac58;"],[0,"&frac78;"],[49,"&larr;"],[0,"&ShortUpArrow;"],[0,"&rarr;"],[0,"&darr;"],[0,"&harr;"],[0,"&updownarrow;"],[0,"&nwarr;"],[0,"&nearr;"],[0,"&LowerRightArrow;"],[0,"&LowerLeftArrow;"],[0,"&nlarr;"],[0,"&nrarr;"],[1,{v:"&rarrw;",n:824,o:"&nrarrw;"}],[0,"&Larr;"],[0,"&Uarr;"],[0,"&Rarr;"],[0,"&Darr;"],[0,"&larrtl;"],[0,"&rarrtl;"],[0,"&LeftTeeArrow;"],[0,"&mapstoup;"],[0,"&map;"],[0,"&DownTeeArrow;"],[1,"&hookleftarrow;"],[0,"&hookrightarrow;"],[0,"&larrlp;"],[0,"&looparrowright;"],[0,"&harrw;"],[0,"&nharr;"],[1,"&lsh;"],[0,"&rsh;"],[0,"&ldsh;"],[0,"&rdsh;"],[1,"&crarr;"],[0,"&cularr;"],[0,"&curarr;"],[2,"&circlearrowleft;"],[0,"&circlearrowright;"],[0,"&leftharpoonup;"],[0,"&DownLeftVector;"],[0,"&RightUpVector;"],[0,"&LeftUpVector;"],[0,"&rharu;"],[0,"&DownRightVector;"],[0,"&dharr;"],[0,"&dharl;"],[0,"&RightArrowLeftArrow;"],[0,"&udarr;"],[0,"&LeftArrowRightArrow;"],[0,"&leftleftarrows;"],[0,"&upuparrows;"],[0,"&rightrightarrows;"],[0,"&ddarr;"],[0,"&leftrightharpoons;"],[0,"&Equilibrium;"],[0,"&nlArr;"],[0,"&nhArr;"],[0,"&nrArr;"],[0,"&DoubleLeftArrow;"],[0,"&DoubleUpArrow;"],[0,"&DoubleRightArrow;"],[0,"&dArr;"],[0,"&DoubleLeftRightArrow;"],[0,"&DoubleUpDownArrow;"],[0,"&nwArr;"],[0,"&neArr;"],[0,"&seArr;"],[0,"&swArr;"],[0,"&lAarr;"],[0,"&rAarr;"],[1,"&zigrarr;"],[6,"&larrb;"],[0,"&rarrb;"],[15,"&DownArrowUpArrow;"],[7,"&loarr;"],[0,"&roarr;"],[0,"&hoarr;"],[0,"&forall;"],[0,"&comp;"],[0,{v:"&part;",n:824,o:"&npart;"}],[0,"&exist;"],[0,"&nexist;"],[0,"&empty;"],[1,"&Del;"],[0,"&Element;"],[0,"&NotElement;"],[1,"&ni;"],[0,"&notni;"],[2,"&prod;"],[0,"&coprod;"],[0,"&sum;"],[0,"&minus;"],[0,"&MinusPlus;"],[0,"&dotplus;"],[1,"&Backslash;"],[0,"&lowast;"],[0,"&compfn;"],[1,"&radic;"],[2,"&prop;"],[0,"&infin;"],[0,"&angrt;"],[0,{v:"&ang;",n:8402,o:"&nang;"}],[0,"&angmsd;"],[0,"&angsph;"],[0,"&mid;"],[0,"&nmid;"],[0,"&DoubleVerticalBar;"],[0,"&NotDoubleVerticalBar;"],[0,"&and;"],[0,"&or;"],[0,{v:"&cap;",n:65024,o:"&caps;"}],[0,{v:"&cup;",n:65024,o:"&cups;"}],[0,"&int;"],[0,"&Int;"],[0,"&iiint;"],[0,"&conint;"],[0,"&Conint;"],[0,"&Cconint;"],[0,"&cwint;"],[0,"&ClockwiseContourIntegral;"],[0,"&awconint;"],[0,"&there4;"],[0,"&becaus;"],[0,"&ratio;"],[0,"&Colon;"],[0,"&dotminus;"],[1,"&mDDot;"],[0,"&homtht;"],[0,{v:"&sim;",n:8402,o:"&nvsim;"}],[0,{v:"&backsim;",n:817,o:"&race;"}],[0,{v:"&ac;",n:819,o:"&acE;"}],[0,"&acd;"],[0,"&VerticalTilde;"],[0,"&NotTilde;"],[0,{v:"&eqsim;",n:824,o:"&nesim;"}],[0,"&sime;"],[0,"&NotTildeEqual;"],[0,"&cong;"],[0,"&simne;"],[0,"&ncong;"],[0,"&ap;"],[0,"&nap;"],[0,"&ape;"],[0,{v:"&apid;",n:824,o:"&napid;"}],[0,"&backcong;"],[0,{v:"&asympeq;",n:8402,o:"&nvap;"}],[0,{v:"&bump;",n:824,o:"&nbump;"}],[0,{v:"&bumpe;",n:824,o:"&nbumpe;"}],[0,{v:"&doteq;",n:824,o:"&nedot;"}],[0,"&doteqdot;"],[0,"&efDot;"],[0,"&erDot;"],[0,"&Assign;"],[0,"&ecolon;"],[0,"&ecir;"],[0,"&circeq;"],[1,"&wedgeq;"],[0,"&veeeq;"],[1,"&triangleq;"],[2,"&equest;"],[0,"&ne;"],[0,{v:"&Congruent;",n:8421,o:"&bnequiv;"}],[0,"&nequiv;"],[1,{v:"&le;",n:8402,o:"&nvle;"}],[0,{v:"&ge;",n:8402,o:"&nvge;"}],[0,{v:"&lE;",n:824,o:"&nlE;"}],[0,{v:"&gE;",n:824,o:"&ngE;"}],[0,{v:"&lnE;",n:65024,o:"&lvertneqq;"}],[0,{v:"&gnE;",n:65024,o:"&gvertneqq;"}],[0,{v:"&ll;",n:new Map(e([[824,"&nLtv;"],[7577,"&nLt;"]]))}],[0,{v:"&gg;",n:new Map(e([[824,"&nGtv;"],[7577,"&nGt;"]]))}],[0,"&between;"],[0,"&NotCupCap;"],[0,"&nless;"],[0,"&ngt;"],[0,"&nle;"],[0,"&nge;"],[0,"&lesssim;"],[0,"&GreaterTilde;"],[0,"&nlsim;"],[0,"&ngsim;"],[0,"&LessGreater;"],[0,"&gl;"],[0,"&NotLessGreater;"],[0,"&NotGreaterLess;"],[0,"&pr;"],[0,"&sc;"],[0,"&prcue;"],[0,"&sccue;"],[0,"&PrecedesTilde;"],[0,{v:"&scsim;",n:824,o:"&NotSucceedsTilde;"}],[0,"&NotPrecedes;"],[0,"&NotSucceeds;"],[0,{v:"&sub;",n:8402,o:"&NotSubset;"}],[0,{v:"&sup;",n:8402,o:"&NotSuperset;"}],[0,"&nsub;"],[0,"&nsup;"],[0,"&sube;"],[0,"&supe;"],[0,"&NotSubsetEqual;"],[0,"&NotSupersetEqual;"],[0,{v:"&subne;",n:65024,o:"&varsubsetneq;"}],[0,{v:"&supne;",n:65024,o:"&varsupsetneq;"}],[1,"&cupdot;"],[0,"&UnionPlus;"],[0,{v:"&sqsub;",n:824,o:"&NotSquareSubset;"}],[0,{v:"&sqsup;",n:824,o:"&NotSquareSuperset;"}],[0,"&sqsube;"],[0,"&sqsupe;"],[0,{v:"&sqcap;",n:65024,o:"&sqcaps;"}],[0,{v:"&sqcup;",n:65024,o:"&sqcups;"}],[0,"&CirclePlus;"],[0,"&CircleMinus;"],[0,"&CircleTimes;"],[0,"&osol;"],[0,"&CircleDot;"],[0,"&circledcirc;"],[0,"&circledast;"],[1,"&circleddash;"],[0,"&boxplus;"],[0,"&boxminus;"],[0,"&boxtimes;"],[0,"&dotsquare;"],[0,"&RightTee;"],[0,"&dashv;"],[0,"&DownTee;"],[0,"&bot;"],[1,"&models;"],[0,"&DoubleRightTee;"],[0,"&Vdash;"],[0,"&Vvdash;"],[0,"&VDash;"],[0,"&nvdash;"],[0,"&nvDash;"],[0,"&nVdash;"],[0,"&nVDash;"],[0,"&prurel;"],[1,"&LeftTriangle;"],[0,"&RightTriangle;"],[0,{v:"&LeftTriangleEqual;",n:8402,o:"&nvltrie;"}],[0,{v:"&RightTriangleEqual;",n:8402,o:"&nvrtrie;"}],[0,"&origof;"],[0,"&imof;"],[0,"&multimap;"],[0,"&hercon;"],[0,"&intcal;"],[0,"&veebar;"],[1,"&barvee;"],[0,"&angrtvb;"],[0,"&lrtri;"],[0,"&bigwedge;"],[0,"&bigvee;"],[0,"&bigcap;"],[0,"&bigcup;"],[0,"&diam;"],[0,"&sdot;"],[0,"&sstarf;"],[0,"&divideontimes;"],[0,"&bowtie;"],[0,"&ltimes;"],[0,"&rtimes;"],[0,"&leftthreetimes;"],[0,"&rightthreetimes;"],[0,"&backsimeq;"],[0,"&curlyvee;"],[0,"&curlywedge;"],[0,"&Sub;"],[0,"&Sup;"],[0,"&Cap;"],[0,"&Cup;"],[0,"&fork;"],[0,"&epar;"],[0,"&lessdot;"],[0,"&gtdot;"],[0,{v:"&Ll;",n:824,o:"&nLl;"}],[0,{v:"&Gg;",n:824,o:"&nGg;"}],[0,{v:"&leg;",n:65024,o:"&lesg;"}],[0,{v:"&gel;",n:65024,o:"&gesl;"}],[2,"&cuepr;"],[0,"&cuesc;"],[0,"&NotPrecedesSlantEqual;"],[0,"&NotSucceedsSlantEqual;"],[0,"&NotSquareSubsetEqual;"],[0,"&NotSquareSupersetEqual;"],[2,"&lnsim;"],[0,"&gnsim;"],[0,"&precnsim;"],[0,"&scnsim;"],[0,"&nltri;"],[0,"&NotRightTriangle;"],[0,"&nltrie;"],[0,"&NotRightTriangleEqual;"],[0,"&vellip;"],[0,"&ctdot;"],[0,"&utdot;"],[0,"&dtdot;"],[0,"&disin;"],[0,"&isinsv;"],[0,"&isins;"],[0,{v:"&isindot;",n:824,o:"&notindot;"}],[0,"&notinvc;"],[0,"&notinvb;"],[1,{v:"&isinE;",n:824,o:"&notinE;"}],[0,"&nisd;"],[0,"&xnis;"],[0,"&nis;"],[0,"&notnivc;"],[0,"&notnivb;"],[6,"&barwed;"],[0,"&Barwed;"],[1,"&lceil;"],[0,"&rceil;"],[0,"&LeftFloor;"],[0,"&rfloor;"],[0,"&drcrop;"],[0,"&dlcrop;"],[0,"&urcrop;"],[0,"&ulcrop;"],[0,"&bnot;"],[1,"&profline;"],[0,"&profsurf;"],[1,"&telrec;"],[0,"&target;"],[5,"&ulcorn;"],[0,"&urcorn;"],[0,"&dlcorn;"],[0,"&drcorn;"],[2,"&frown;"],[0,"&smile;"],[9,"&cylcty;"],[0,"&profalar;"],[7,"&topbot;"],[6,"&ovbar;"],[1,"&solbar;"],[60,"&angzarr;"],[51,"&lmoustache;"],[0,"&rmoustache;"],[2,"&OverBracket;"],[0,"&bbrk;"],[0,"&bbrktbrk;"],[37,"&OverParenthesis;"],[0,"&UnderParenthesis;"],[0,"&OverBrace;"],[0,"&UnderBrace;"],[2,"&trpezium;"],[4,"&elinters;"],[59,"&blank;"],[164,"&circledS;"],[55,"&boxh;"],[1,"&boxv;"],[9,"&boxdr;"],[3,"&boxdl;"],[3,"&boxur;"],[3,"&boxul;"],[3,"&boxvr;"],[7,"&boxvl;"],[7,"&boxhd;"],[7,"&boxhu;"],[7,"&boxvh;"],[19,"&boxH;"],[0,"&boxV;"],[0,"&boxdR;"],[0,"&boxDr;"],[0,"&boxDR;"],[0,"&boxdL;"],[0,"&boxDl;"],[0,"&boxDL;"],[0,"&boxuR;"],[0,"&boxUr;"],[0,"&boxUR;"],[0,"&boxuL;"],[0,"&boxUl;"],[0,"&boxUL;"],[0,"&boxvR;"],[0,"&boxVr;"],[0,"&boxVR;"],[0,"&boxvL;"],[0,"&boxVl;"],[0,"&boxVL;"],[0,"&boxHd;"],[0,"&boxhD;"],[0,"&boxHD;"],[0,"&boxHu;"],[0,"&boxhU;"],[0,"&boxHU;"],[0,"&boxvH;"],[0,"&boxVh;"],[0,"&boxVH;"],[19,"&uhblk;"],[3,"&lhblk;"],[3,"&block;"],[8,"&blk14;"],[0,"&blk12;"],[0,"&blk34;"],[13,"&square;"],[8,"&blacksquare;"],[0,"&EmptyVerySmallSquare;"],[1,"&rect;"],[0,"&marker;"],[2,"&fltns;"],[1,"&bigtriangleup;"],[0,"&blacktriangle;"],[0,"&triangle;"],[2,"&blacktriangleright;"],[0,"&rtri;"],[3,"&bigtriangledown;"],[0,"&blacktriangledown;"],[0,"&dtri;"],[2,"&blacktriangleleft;"],[0,"&ltri;"],[6,"&loz;"],[0,"&cir;"],[32,"&tridot;"],[2,"&bigcirc;"],[8,"&ultri;"],[0,"&urtri;"],[0,"&lltri;"],[0,"&EmptySmallSquare;"],[0,"&FilledSmallSquare;"],[8,"&bigstar;"],[0,"&star;"],[7,"&phone;"],[49,"&female;"],[1,"&male;"],[29,"&spades;"],[2,"&clubs;"],[1,"&hearts;"],[0,"&diamondsuit;"],[3,"&sung;"],[2,"&flat;"],[0,"&natural;"],[0,"&sharp;"],[163,"&check;"],[3,"&cross;"],[8,"&malt;"],[21,"&sext;"],[33,"&VerticalSeparator;"],[25,"&lbbrk;"],[0,"&rbbrk;"],[84,"&bsolhsub;"],[0,"&suphsol;"],[28,"&LeftDoubleBracket;"],[0,"&RightDoubleBracket;"],[0,"&lang;"],[0,"&rang;"],[0,"&Lang;"],[0,"&Rang;"],[0,"&loang;"],[0,"&roang;"],[7,"&longleftarrow;"],[0,"&longrightarrow;"],[0,"&longleftrightarrow;"],[0,"&DoubleLongLeftArrow;"],[0,"&DoubleLongRightArrow;"],[0,"&DoubleLongLeftRightArrow;"],[1,"&longmapsto;"],[2,"&dzigrarr;"],[258,"&nvlArr;"],[0,"&nvrArr;"],[0,"&nvHarr;"],[0,"&Map;"],[6,"&lbarr;"],[0,"&bkarow;"],[0,"&lBarr;"],[0,"&dbkarow;"],[0,"&drbkarow;"],[0,"&DDotrahd;"],[0,"&UpArrowBar;"],[0,"&DownArrowBar;"],[2,"&Rarrtl;"],[2,"&latail;"],[0,"&ratail;"],[0,"&lAtail;"],[0,"&rAtail;"],[0,"&larrfs;"],[0,"&rarrfs;"],[0,"&larrbfs;"],[0,"&rarrbfs;"],[2,"&nwarhk;"],[0,"&nearhk;"],[0,"&hksearow;"],[0,"&hkswarow;"],[0,"&nwnear;"],[0,"&nesear;"],[0,"&seswar;"],[0,"&swnwar;"],[8,{v:"&rarrc;",n:824,o:"&nrarrc;"}],[1,"&cudarrr;"],[0,"&ldca;"],[0,"&rdca;"],[0,"&cudarrl;"],[0,"&larrpl;"],[2,"&curarrm;"],[0,"&cularrp;"],[7,"&rarrpl;"],[2,"&harrcir;"],[0,"&Uarrocir;"],[0,"&lurdshar;"],[0,"&ldrushar;"],[2,"&LeftRightVector;"],[0,"&RightUpDownVector;"],[0,"&DownLeftRightVector;"],[0,"&LeftUpDownVector;"],[0,"&LeftVectorBar;"],[0,"&RightVectorBar;"],[0,"&RightUpVectorBar;"],[0,"&RightDownVectorBar;"],[0,"&DownLeftVectorBar;"],[0,"&DownRightVectorBar;"],[0,"&LeftUpVectorBar;"],[0,"&LeftDownVectorBar;"],[0,"&LeftTeeVector;"],[0,"&RightTeeVector;"],[0,"&RightUpTeeVector;"],[0,"&RightDownTeeVector;"],[0,"&DownLeftTeeVector;"],[0,"&DownRightTeeVector;"],[0,"&LeftUpTeeVector;"],[0,"&LeftDownTeeVector;"],[0,"&lHar;"],[0,"&uHar;"],[0,"&rHar;"],[0,"&dHar;"],[0,"&luruhar;"],[0,"&ldrdhar;"],[0,"&ruluhar;"],[0,"&rdldhar;"],[0,"&lharul;"],[0,"&llhard;"],[0,"&rharul;"],[0,"&lrhard;"],[0,"&udhar;"],[0,"&duhar;"],[0,"&RoundImplies;"],[0,"&erarr;"],[0,"&simrarr;"],[0,"&larrsim;"],[0,"&rarrsim;"],[0,"&rarrap;"],[0,"&ltlarr;"],[1,"&gtrarr;"],[0,"&subrarr;"],[1,"&suplarr;"],[0,"&lfisht;"],[0,"&rfisht;"],[0,"&ufisht;"],[0,"&dfisht;"],[5,"&lopar;"],[0,"&ropar;"],[4,"&lbrke;"],[0,"&rbrke;"],[0,"&lbrkslu;"],[0,"&rbrksld;"],[0,"&lbrksld;"],[0,"&rbrkslu;"],[0,"&langd;"],[0,"&rangd;"],[0,"&lparlt;"],[0,"&rpargt;"],[0,"&gtlPar;"],[0,"&ltrPar;"],[3,"&vzigzag;"],[1,"&vangrt;"],[0,"&angrtvbd;"],[6,"&ange;"],[0,"&range;"],[0,"&dwangle;"],[0,"&uwangle;"],[0,"&angmsdaa;"],[0,"&angmsdab;"],[0,"&angmsdac;"],[0,"&angmsdad;"],[0,"&angmsdae;"],[0,"&angmsdaf;"],[0,"&angmsdag;"],[0,"&angmsdah;"],[0,"&bemptyv;"],[0,"&demptyv;"],[0,"&cemptyv;"],[0,"&raemptyv;"],[0,"&laemptyv;"],[0,"&ohbar;"],[0,"&omid;"],[0,"&opar;"],[1,"&operp;"],[1,"&olcross;"],[0,"&odsold;"],[1,"&olcir;"],[0,"&ofcir;"],[0,"&olt;"],[0,"&ogt;"],[0,"&cirscir;"],[0,"&cirE;"],[0,"&solb;"],[0,"&bsolb;"],[3,"&boxbox;"],[3,"&trisb;"],[0,"&rtriltri;"],[0,{v:"&LeftTriangleBar;",n:824,o:"&NotLeftTriangleBar;"}],[0,{v:"&RightTriangleBar;",n:824,o:"&NotRightTriangleBar;"}],[11,"&iinfin;"],[0,"&infintie;"],[0,"&nvinfin;"],[4,"&eparsl;"],[0,"&smeparsl;"],[0,"&eqvparsl;"],[5,"&blacklozenge;"],[8,"&RuleDelayed;"],[1,"&dsol;"],[9,"&bigodot;"],[0,"&bigoplus;"],[0,"&bigotimes;"],[1,"&biguplus;"],[1,"&bigsqcup;"],[5,"&iiiint;"],[0,"&fpartint;"],[2,"&cirfnint;"],[0,"&awint;"],[0,"&rppolint;"],[0,"&scpolint;"],[0,"&npolint;"],[0,"&pointint;"],[0,"&quatint;"],[0,"&intlarhk;"],[10,"&pluscir;"],[0,"&plusacir;"],[0,"&simplus;"],[0,"&plusdu;"],[0,"&plussim;"],[0,"&plustwo;"],[1,"&mcomma;"],[0,"&minusdu;"],[2,"&loplus;"],[0,"&roplus;"],[0,"&Cross;"],[0,"&timesd;"],[0,"&timesbar;"],[1,"&smashp;"],[0,"&lotimes;"],[0,"&rotimes;"],[0,"&otimesas;"],[0,"&Otimes;"],[0,"&odiv;"],[0,"&triplus;"],[0,"&triminus;"],[0,"&tritime;"],[0,"&intprod;"],[2,"&amalg;"],[0,"&capdot;"],[1,"&ncup;"],[0,"&ncap;"],[0,"&capand;"],[0,"&cupor;"],[0,"&cupcap;"],[0,"&capcup;"],[0,"&cupbrcap;"],[0,"&capbrcup;"],[0,"&cupcup;"],[0,"&capcap;"],[0,"&ccups;"],[0,"&ccaps;"],[2,"&ccupssm;"],[2,"&And;"],[0,"&Or;"],[0,"&andand;"],[0,"&oror;"],[0,"&orslope;"],[0,"&andslope;"],[1,"&andv;"],[0,"&orv;"],[0,"&andd;"],[0,"&ord;"],[1,"&wedbar;"],[6,"&sdote;"],[3,"&simdot;"],[2,{v:"&congdot;",n:824,o:"&ncongdot;"}],[0,"&easter;"],[0,"&apacir;"],[0,{v:"&apE;",n:824,o:"&napE;"}],[0,"&eplus;"],[0,"&pluse;"],[0,"&Esim;"],[0,"&Colone;"],[0,"&Equal;"],[1,"&ddotseq;"],[0,"&equivDD;"],[0,"&ltcir;"],[0,"&gtcir;"],[0,"&ltquest;"],[0,"&gtquest;"],[0,{v:"&leqslant;",n:824,o:"&nleqslant;"}],[0,{v:"&geqslant;",n:824,o:"&ngeqslant;"}],[0,"&lesdot;"],[0,"&gesdot;"],[0,"&lesdoto;"],[0,"&gesdoto;"],[0,"&lesdotor;"],[0,"&gesdotol;"],[0,"&lap;"],[0,"&gap;"],[0,"&lne;"],[0,"&gne;"],[0,"&lnap;"],[0,"&gnap;"],[0,"&lEg;"],[0,"&gEl;"],[0,"&lsime;"],[0,"&gsime;"],[0,"&lsimg;"],[0,"&gsiml;"],[0,"&lgE;"],[0,"&glE;"],[0,"&lesges;"],[0,"&gesles;"],[0,"&els;"],[0,"&egs;"],[0,"&elsdot;"],[0,"&egsdot;"],[0,"&el;"],[0,"&eg;"],[2,"&siml;"],[0,"&simg;"],[0,"&simlE;"],[0,"&simgE;"],[0,{v:"&LessLess;",n:824,o:"&NotNestedLessLess;"}],[0,{v:"&GreaterGreater;",n:824,o:"&NotNestedGreaterGreater;"}],[1,"&glj;"],[0,"&gla;"],[0,"&ltcc;"],[0,"&gtcc;"],[0,"&lescc;"],[0,"&gescc;"],[0,"&smt;"],[0,"&lat;"],[0,{v:"&smte;",n:65024,o:"&smtes;"}],[0,{v:"&late;",n:65024,o:"&lates;"}],[0,"&bumpE;"],[0,{v:"&PrecedesEqual;",n:824,o:"&NotPrecedesEqual;"}],[0,{v:"&sce;",n:824,o:"&NotSucceedsEqual;"}],[2,"&prE;"],[0,"&scE;"],[0,"&precneqq;"],[0,"&scnE;"],[0,"&prap;"],[0,"&scap;"],[0,"&precnapprox;"],[0,"&scnap;"],[0,"&Pr;"],[0,"&Sc;"],[0,"&subdot;"],[0,"&supdot;"],[0,"&subplus;"],[0,"&supplus;"],[0,"&submult;"],[0,"&supmult;"],[0,"&subedot;"],[0,"&supedot;"],[0,{v:"&subE;",n:824,o:"&nsubE;"}],[0,{v:"&supE;",n:824,o:"&nsupE;"}],[0,"&subsim;"],[0,"&supsim;"],[2,{v:"&subnE;",n:65024,o:"&varsubsetneqq;"}],[0,{v:"&supnE;",n:65024,o:"&varsupsetneqq;"}],[2,"&csub;"],[0,"&csup;"],[0,"&csube;"],[0,"&csupe;"],[0,"&subsup;"],[0,"&supsub;"],[0,"&subsub;"],[0,"&supsup;"],[0,"&suphsub;"],[0,"&supdsub;"],[0,"&forkv;"],[0,"&topfork;"],[0,"&mlcp;"],[8,"&Dashv;"],[1,"&Vdashl;"],[0,"&Barv;"],[0,"&vBar;"],[0,"&vBarv;"],[1,"&Vbar;"],[0,"&Not;"],[0,"&bNot;"],[0,"&rnmid;"],[0,"&cirmid;"],[0,"&midcir;"],[0,"&topcir;"],[0,"&nhpar;"],[0,"&parsim;"],[9,{v:"&parsl;",n:8421,o:"&nparsl;"}],[44343,{n:new Map(e([[56476,"&Ascr;"],[1,"&Cscr;"],[0,"&Dscr;"],[2,"&Gscr;"],[2,"&Jscr;"],[0,"&Kscr;"],[2,"&Nscr;"],[0,"&Oscr;"],[0,"&Pscr;"],[0,"&Qscr;"],[1,"&Sscr;"],[0,"&Tscr;"],[0,"&Uscr;"],[0,"&Vscr;"],[0,"&Wscr;"],[0,"&Xscr;"],[0,"&Yscr;"],[0,"&Zscr;"],[0,"&ascr;"],[0,"&bscr;"],[0,"&cscr;"],[0,"&dscr;"],[1,"&fscr;"],[1,"&hscr;"],[0,"&iscr;"],[0,"&jscr;"],[0,"&kscr;"],[0,"&lscr;"],[0,"&mscr;"],[0,"&nscr;"],[1,"&pscr;"],[0,"&qscr;"],[0,"&rscr;"],[0,"&sscr;"],[0,"&tscr;"],[0,"&uscr;"],[0,"&vscr;"],[0,"&wscr;"],[0,"&xscr;"],[0,"&yscr;"],[0,"&zscr;"],[52,"&Afr;"],[0,"&Bfr;"],[1,"&Dfr;"],[0,"&Efr;"],[0,"&Ffr;"],[0,"&Gfr;"],[2,"&Jfr;"],[0,"&Kfr;"],[0,"&Lfr;"],[0,"&Mfr;"],[0,"&Nfr;"],[0,"&Ofr;"],[0,"&Pfr;"],[0,"&Qfr;"],[1,"&Sfr;"],[0,"&Tfr;"],[0,"&Ufr;"],[0,"&Vfr;"],[0,"&Wfr;"],[0,"&Xfr;"],[0,"&Yfr;"],[1,"&afr;"],[0,"&bfr;"],[0,"&cfr;"],[0,"&dfr;"],[0,"&efr;"],[0,"&ffr;"],[0,"&gfr;"],[0,"&hfr;"],[0,"&ifr;"],[0,"&jfr;"],[0,"&kfr;"],[0,"&lfr;"],[0,"&mfr;"],[0,"&nfr;"],[0,"&ofr;"],[0,"&pfr;"],[0,"&qfr;"],[0,"&rfr;"],[0,"&sfr;"],[0,"&tfr;"],[0,"&ufr;"],[0,"&vfr;"],[0,"&wfr;"],[0,"&xfr;"],[0,"&yfr;"],[0,"&zfr;"],[0,"&Aopf;"],[0,"&Bopf;"],[1,"&Dopf;"],[0,"&Eopf;"],[0,"&Fopf;"],[0,"&Gopf;"],[1,"&Iopf;"],[0,"&Jopf;"],[0,"&Kopf;"],[0,"&Lopf;"],[0,"&Mopf;"],[1,"&Oopf;"],[3,"&Sopf;"],[0,"&Topf;"],[0,"&Uopf;"],[0,"&Vopf;"],[0,"&Wopf;"],[0,"&Xopf;"],[0,"&Yopf;"],[1,"&aopf;"],[0,"&bopf;"],[0,"&copf;"],[0,"&dopf;"],[0,"&eopf;"],[0,"&fopf;"],[0,"&gopf;"],[0,"&hopf;"],[0,"&iopf;"],[0,"&jopf;"],[0,"&kopf;"],[0,"&lopf;"],[0,"&mopf;"],[0,"&nopf;"],[0,"&oopf;"],[0,"&popf;"],[0,"&qopf;"],[0,"&ropf;"],[0,"&sopf;"],[0,"&topf;"],[0,"&uopf;"],[0,"&vopf;"],[0,"&wopf;"],[0,"&xopf;"],[0,"&yopf;"],[0,"&zopf;"]]))}],[8906,"&fflig;"],[0,"&filig;"],[0,"&fllig;"],[0,"&ffilig;"],[0,"&ffllig;"]])),Vn}var Xs={},hl;function Fi(){return hl||(hl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.getCodePoint=e.xmlReplacer=void 0,e.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var a=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(r,n){return r.codePointAt(n)}:function(r,n){return(r.charCodeAt(n)&64512)===55296?(r.charCodeAt(n)-55296)*1024+r.charCodeAt(n+1)-56320+65536:r.charCodeAt(n)};function i(r){for(var n="",u=0,c;(c=e.xmlReplacer.exec(r))!==null;){var d=c.index,f=r.charCodeAt(d),o=a.get(f);o!==void 0?(n+=r.substring(u,d)+o,u=d+1):(n+="".concat(r.substring(u,d),"&#x").concat((0,e.getCodePoint)(r,d).toString(16),";"),u=e.xmlReplacer.lastIndex+=+((f&64512)===55296))}return n+r.substr(u)}e.encodeXML=i,e.escape=i;function s(r,n){return function(c){for(var d,f=0,o="";d=r.exec(c);)f!==d.index&&(o+=c.substring(f,d.index)),o+=n.get(d[0].charCodeAt(0)),f=d.index+1;return o+c.substring(f)}}e.escapeUTF8=s(/[&<>'"]/g,a),e.escapeAttribute=s(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),e.escapeText=s(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]))})(Xs)),Xs}var pl;function ml(){if(pl)return tr;pl=1;var e=tr&&tr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.encodeNonAsciiHTML=tr.encodeHTML=void 0;var a=e(Lh()),i=Fi(),s=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function r(c){return u(s,c)}tr.encodeHTML=r;function n(c){return u(i.xmlReplacer,c)}tr.encodeNonAsciiHTML=n;function u(c,d){for(var f="",o=0,h;(h=c.exec(d))!==null;){var l=h.index;f+=d.substring(o,l);var p=d.charCodeAt(l),x=a.default.get(p);if(typeof x=="object"){if(l+1<d.length){var w=d.charCodeAt(l+1),b=typeof x.n=="number"?x.n===w?x.o:void 0:x.n.get(w);if(b!==void 0){f+=b,o=c.lastIndex+=1;continue}}x=x.v}if(x!==void 0)f+=x,o=l+1;else{var g=(0,i.getCodePoint)(d,l);f+="&#x".concat(g.toString(16),";"),o=c.lastIndex+=+(g!==p)}}return f+d.substr(o)}return tr}var gl;function Mh(){return gl||(gl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLAttribute=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.DecodingMode=e.EntityDecoder=e.encodeHTML5=e.encodeHTML4=e.encodeNonAsciiHTML=e.encodeHTML=e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.encode=e.decodeStrict=e.decode=e.EncodingMode=e.EntityLevel=void 0;var a=ts(),i=ml(),s=Fi(),r;(function(l){l[l.XML=0]="XML",l[l.HTML=1]="HTML"})(r=e.EntityLevel||(e.EntityLevel={}));var n;(function(l){l[l.UTF8=0]="UTF8",l[l.ASCII=1]="ASCII",l[l.Extensive=2]="Extensive",l[l.Attribute=3]="Attribute",l[l.Text=4]="Text"})(n=e.EncodingMode||(e.EncodingMode={}));function u(l,p){p===void 0&&(p=r.XML);var x=typeof p=="number"?p:p.level;if(x===r.HTML){var w=typeof p=="object"?p.mode:void 0;return(0,a.decodeHTML)(l,w)}return(0,a.decodeXML)(l)}e.decode=u;function c(l,p){var x;p===void 0&&(p=r.XML);var w=typeof p=="number"?{level:p}:p;return(x=w.mode)!==null&&x!==void 0||(w.mode=a.DecodingMode.Strict),u(l,w)}e.decodeStrict=c;function d(l,p){p===void 0&&(p=r.XML);var x=typeof p=="number"?{level:p}:p;return x.mode===n.UTF8?(0,s.escapeUTF8)(l):x.mode===n.Attribute?(0,s.escapeAttribute)(l):x.mode===n.Text?(0,s.escapeText)(l):x.level===r.HTML?x.mode===n.ASCII?(0,i.encodeNonAsciiHTML)(l):(0,i.encodeHTML)(l):(0,s.encodeXML)(l)}e.encode=d;var f=Fi();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return f.encodeXML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return f.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return f.escapeUTF8}}),Object.defineProperty(e,"escapeAttribute",{enumerable:!0,get:function(){return f.escapeAttribute}}),Object.defineProperty(e,"escapeText",{enumerable:!0,get:function(){return f.escapeText}});var o=ml();Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var h=ts();Object.defineProperty(e,"EntityDecoder",{enumerable:!0,get:function(){return h.EntityDecoder}}),Object.defineProperty(e,"DecodingMode",{enumerable:!0,get:function(){return h.DecodingMode}}),Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return h.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTMLAttribute",{enumerable:!0,get:function(){return h.decodeHTMLAttribute}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return h.decodeXML}})})(Zs)),Zs}var qr={},bl;function Rh(){return bl||(bl=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.attributeNames=qr.elementNames=void 0,qr.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(function(e){return[e.toLowerCase(),e]})),qr.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(function(e){return[e.toLowerCase(),e]}))),qr}var xl;function Ih(){if(xl)return lt;xl=1;var e=lt&&lt.__assign||function(){return e=Object.assign||function(_){for(var y,m=1,N=arguments.length;m<N;m++){y=arguments[m];for(var j in y)Object.prototype.hasOwnProperty.call(y,j)&&(_[j]=y[j])}return _},e.apply(this,arguments)},a=lt&&lt.__createBinding||(Object.create?(function(_,y,m,N){N===void 0&&(N=m);var j=Object.getOwnPropertyDescriptor(y,m);(!j||("get"in j?!y.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return y[m]}}),Object.defineProperty(_,N,j)}):(function(_,y,m,N){N===void 0&&(N=m),_[N]=y[m]})),i=lt&&lt.__setModuleDefault||(Object.create?(function(_,y){Object.defineProperty(_,"default",{enumerable:!0,value:y})}):function(_,y){_.default=y}),s=lt&&lt.__importStar||function(_){if(_&&_.__esModule)return _;var y={};if(_!=null)for(var m in _)m!=="default"&&Object.prototype.hasOwnProperty.call(_,m)&&a(y,_,m);return i(y,_),y};Object.defineProperty(lt,"__esModule",{value:!0}),lt.render=void 0;var r=s(nn()),n=Mh(),u=Rh(),c=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function d(_){return _.replace(/"/g,"&quot;")}function f(_,y){var m;if(_){var N=((m=y.encodeEntities)!==null&&m!==void 0?m:y.decodeEntities)===!1?d:y.xmlMode||y.encodeEntities!=="utf8"?n.encodeXML:n.escapeAttribute;return Object.keys(_).map(function(j){var A,D,C=(A=_[j])!==null&&A!==void 0?A:"";return y.xmlMode==="foreign"&&(j=(D=u.attributeNames.get(j))!==null&&D!==void 0?D:j),!y.emptyAttrs&&!y.xmlMode&&C===""?j:"".concat(j,'="').concat(N(C),'"')}).join(" ")}}var o=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function h(_,y){y===void 0&&(y={});for(var m=("length"in _)?_:[_],N="",j=0;j<m.length;j++)N+=l(m[j],y);return N}lt.render=h,lt.default=h;function l(_,y){switch(_.type){case r.Root:return h(_.children,y);case r.Doctype:case r.Directive:return b(_);case r.Comment:return k(_);case r.CDATA:return v(_);case r.Script:case r.Style:case r.Tag:return w(_,y);case r.Text:return g(_,y)}}var p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),x=new Set(["svg","math"]);function w(_,y){var m;y.xmlMode==="foreign"&&(_.name=(m=u.elementNames.get(_.name))!==null&&m!==void 0?m:_.name,_.parent&&p.has(_.parent.name)&&(y=e(e({},y),{xmlMode:!1}))),!y.xmlMode&&x.has(_.name)&&(y=e(e({},y),{xmlMode:"foreign"}));var N="<".concat(_.name),j=f(_.attribs,y);return j&&(N+=" ".concat(j)),_.children.length===0&&(y.xmlMode?y.selfClosingTags!==!1:y.selfClosingTags&&o.has(_.name))?(y.xmlMode||(N+=" "),N+="/>"):(N+=">",_.children.length>0&&(N+=h(_.children,y)),(y.xmlMode||!o.has(_.name))&&(N+="</".concat(_.name,">"))),N}function b(_){return"<".concat(_.data,">")}function g(_,y){var m,N=_.data||"";return((m=y.encodeEntities)!==null&&m!==void 0?m:y.decodeEntities)!==!1&&!(!y.xmlMode&&_.parent&&c.has(_.parent.name))&&(N=y.xmlMode||y.encodeEntities!=="utf8"?(0,n.encodeXML)(N):(0,n.escapeText)(N)),N}function v(_){return"<![CDATA[".concat(_.children[0].data,"]]>")}function k(_){return"<!--".concat(_.data,"-->")}return lt}var yl;function sd(){if(yl)return Wt;yl=1;var e=Wt&&Wt.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.getOuterHTML=r,Wt.getInnerHTML=n,Wt.getText=u,Wt.textContent=c,Wt.innerText=d;var a=xr(),i=e(Ih()),s=nn();function r(f,o){return(0,i.default)(f,o)}function n(f,o){return(0,a.hasChildren)(f)?f.children.map(function(h){return r(h,o)}).join(""):""}function u(f){return Array.isArray(f)?f.map(u).join(""):(0,a.isTag)(f)?f.name==="br"?`
1048
+ `:u(f.children):(0,a.isCDATA)(f)?u(f.children):(0,a.isText)(f)?f.data:""}function c(f){return Array.isArray(f)?f.map(c).join(""):(0,a.hasChildren)(f)&&!(0,a.isComment)(f)?c(f.children):(0,a.isText)(f)?f.data:""}function d(f){return Array.isArray(f)?f.map(d).join(""):(0,a.hasChildren)(f)&&(f.type===s.ElementType.Tag||(0,a.isCDATA)(f))?d(f.children):(0,a.isText)(f)?f.data:""}return Wt}var qt={},vl;function Fh(){if(vl)return qt;vl=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.getChildren=a,qt.getParent=i,qt.getSiblings=s,qt.getAttributeValue=r,qt.hasAttrib=n,qt.getName=u,qt.nextElementSibling=c,qt.prevElementSibling=d;var e=xr();function a(f){return(0,e.hasChildren)(f)?f.children:[]}function i(f){return f.parent||null}function s(f){var o,h,l=i(f);if(l!=null)return a(l);for(var p=[f],x=f.prev,w=f.next;x!=null;)p.unshift(x),o=x,x=o.prev;for(;w!=null;)p.push(w),h=w,w=h.next;return p}function r(f,o){var h;return(h=f.attribs)===null||h===void 0?void 0:h[o]}function n(f,o){return f.attribs!=null&&Object.prototype.hasOwnProperty.call(f.attribs,o)&&f.attribs[o]!=null}function u(f){return f.name}function c(f){for(var o,h=f.next;h!==null&&!(0,e.isTag)(h);)o=h,h=o.next;return h}function d(f){for(var o,h=f.prev;h!==null&&!(0,e.isTag)(h);)o=h,h=o.prev;return h}return qt}var rr={},wl;function qh(){if(wl)return rr;wl=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.removeElement=e,rr.replaceElement=a,rr.appendChild=i,rr.append=s,rr.prependChild=r,rr.prepend=n;function e(u){if(u.prev&&(u.prev.next=u.next),u.next&&(u.next.prev=u.prev),u.parent){var c=u.parent.children,d=c.lastIndexOf(u);d>=0&&c.splice(d,1)}u.next=null,u.prev=null,u.parent=null}function a(u,c){var d=c.prev=u.prev;d&&(d.next=c);var f=c.next=u.next;f&&(f.prev=c);var o=c.parent=u.parent;if(o){var h=o.children;h[h.lastIndexOf(u)]=c,u.parent=null}}function i(u,c){if(e(c),c.next=null,c.parent=u,u.children.push(c)>1){var d=u.children[u.children.length-2];d.next=c,c.prev=d}else c.prev=null}function s(u,c){e(c);var d=u.parent,f=u.next;if(c.next=f,c.prev=u,u.next=c,c.parent=d,f){if(f.prev=c,d){var o=d.children;o.splice(o.lastIndexOf(f),0,c)}}else d&&d.children.push(c)}function r(u,c){if(e(c),c.parent=u,c.prev=null,u.children.unshift(c)!==1){var d=u.children[1];d.prev=c,c.next=d}else c.next=null}function n(u,c){e(c);var d=u.parent;if(d){var f=d.children;f.splice(f.indexOf(u),0,c)}u.prev&&(u.prev.next=c),c.parent=d,c.prev=u.prev,c.next=u,u.prev=c}return rr}var ar={},_l;function id(){if(_l)return ar;_l=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.filter=a,ar.find=i,ar.findOneChild=s,ar.findOne=r,ar.existsOne=n,ar.findAll=u;var e=xr();function a(c,d,f,o){return f===void 0&&(f=!0),o===void 0&&(o=1/0),i(c,Array.isArray(d)?d:[d],f,o)}function i(c,d,f,o){for(var h=[],l=[Array.isArray(d)?d:[d]],p=[0];;){if(p[0]>=l[0].length){if(p.length===1)return h;l.shift(),p.shift();continue}var x=l[0][p[0]++];if(c(x)&&(h.push(x),--o<=0))return h;f&&(0,e.hasChildren)(x)&&x.children.length>0&&(p.unshift(0),l.unshift(x.children))}}function s(c,d){return d.find(c)}function r(c,d,f){f===void 0&&(f=!0);for(var o=Array.isArray(d)?d:[d],h=0;h<o.length;h++){var l=o[h];if((0,e.isTag)(l)&&c(l))return l;if(f&&(0,e.hasChildren)(l)&&l.children.length>0){var p=r(c,l.children,!0);if(p)return p}}return null}function n(c,d){return(Array.isArray(d)?d:[d]).some(function(f){return(0,e.isTag)(f)&&c(f)||(0,e.hasChildren)(f)&&n(c,f.children)})}function u(c,d){for(var f=[],o=[Array.isArray(d)?d:[d]],h=[0];;){if(h[0]>=o[0].length){if(o.length===1)return f;o.shift(),h.shift();continue}var l=o[0][h[0]++];(0,e.isTag)(l)&&c(l)&&f.push(l),(0,e.hasChildren)(l)&&l.children.length>0&&(h.unshift(0),o.unshift(l.children))}}return ar}var nr={},kl;function od(){if(kl)return nr;kl=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.testElement=u,nr.getElements=c,nr.getElementById=d,nr.getElementsByTagName=f,nr.getElementsByClassName=o,nr.getElementsByTagType=h;var e=xr(),a=id(),i={tag_name:function(l){return typeof l=="function"?function(p){return(0,e.isTag)(p)&&l(p.name)}:l==="*"?e.isTag:function(p){return(0,e.isTag)(p)&&p.name===l}},tag_type:function(l){return typeof l=="function"?function(p){return l(p.type)}:function(p){return p.type===l}},tag_contains:function(l){return typeof l=="function"?function(p){return(0,e.isText)(p)&&l(p.data)}:function(p){return(0,e.isText)(p)&&p.data===l}}};function s(l,p){return typeof p=="function"?function(x){return(0,e.isTag)(x)&&p(x.attribs[l])}:function(x){return(0,e.isTag)(x)&&x.attribs[l]===p}}function r(l,p){return function(x){return l(x)||p(x)}}function n(l){var p=Object.keys(l).map(function(x){var w=l[x];return Object.prototype.hasOwnProperty.call(i,x)?i[x](w):s(x,w)});return p.length===0?null:p.reduce(r)}function u(l,p){var x=n(l);return x?x(p):!0}function c(l,p,x,w){w===void 0&&(w=1/0);var b=n(l);return b?(0,a.filter)(b,p,x,w):[]}function d(l,p,x){return x===void 0&&(x=!0),Array.isArray(p)||(p=[p]),(0,a.findOne)(s("id",l),p,x)}function f(l,p,x,w){return x===void 0&&(x=!0),w===void 0&&(w=1/0),(0,a.filter)(i.tag_name(l),p,x,w)}function o(l,p,x,w){return x===void 0&&(x=!0),w===void 0&&(w=1/0),(0,a.filter)(s("class",l),p,x,w)}function h(l,p,x,w){return x===void 0&&(x=!0),w===void 0&&(w=1/0),(0,a.filter)(i.tag_type(l),p,x,w)}return nr}var mr={},Nl;function Bh(){if(Nl)return mr;Nl=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.DocumentPosition=void 0,mr.removeSubsets=a,mr.compareDocumentPosition=s,mr.uniqueSort=r;var e=xr();function a(n){for(var u=n.length;--u>=0;){var c=n[u];if(u>0&&n.lastIndexOf(c,u-1)>=0){n.splice(u,1);continue}for(var d=c.parent;d;d=d.parent)if(n.includes(d)){n.splice(u,1);break}}return n}var i;(function(n){n[n.DISCONNECTED=1]="DISCONNECTED",n[n.PRECEDING=2]="PRECEDING",n[n.FOLLOWING=4]="FOLLOWING",n[n.CONTAINS=8]="CONTAINS",n[n.CONTAINED_BY=16]="CONTAINED_BY"})(i||(mr.DocumentPosition=i={}));function s(n,u){var c=[],d=[];if(n===u)return 0;for(var f=(0,e.hasChildren)(n)?n:n.parent;f;)c.unshift(f),f=f.parent;for(f=(0,e.hasChildren)(u)?u:u.parent;f;)d.unshift(f),f=f.parent;for(var o=Math.min(c.length,d.length),h=0;h<o&&c[h]===d[h];)h++;if(h===0)return i.DISCONNECTED;var l=c[h-1],p=l.children,x=c[h],w=d[h];return p.indexOf(x)>p.indexOf(w)?l===u?i.FOLLOWING|i.CONTAINED_BY:i.FOLLOWING:l===n?i.PRECEDING|i.CONTAINS:i.PRECEDING}function r(n){return n=n.filter(function(u,c,d){return!d.includes(u,c+1)}),n.sort(function(u,c){var d=s(u,c);return d&i.PRECEDING?-1:d&i.FOLLOWING?1:0}),n}return mr}var Un={},jl;function Vh(){if(jl)return Un;jl=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.getFeed=i;var e=sd(),a=od();function i(l){var p=d(h,l);return p?p.name==="feed"?s(p):r(p):null}function s(l){var p,x=l.children,w={type:"atom",items:(0,a.getElementsByTagName)("entry",x).map(function(v){var k,_=v.children,y={media:c(_)};o(y,"id","id",_),o(y,"title","title",_);var m=(k=d("link",_))===null||k===void 0?void 0:k.attribs.href;m&&(y.link=m);var N=f("summary",_)||f("content",_);N&&(y.description=N);var j=f("updated",_);return j&&(y.pubDate=new Date(j)),y})};o(w,"id","id",x),o(w,"title","title",x);var b=(p=d("link",x))===null||p===void 0?void 0:p.attribs.href;b&&(w.link=b),o(w,"description","subtitle",x);var g=f("updated",x);return g&&(w.updated=new Date(g)),o(w,"author","email",x,!0),w}function r(l){var p,x,w=(x=(p=d("channel",l.children))===null||p===void 0?void 0:p.children)!==null&&x!==void 0?x:[],b={type:l.name.substr(0,3),id:"",items:(0,a.getElementsByTagName)("item",l.children).map(function(v){var k=v.children,_={media:c(k)};o(_,"id","guid",k),o(_,"title","title",k),o(_,"link","link",k),o(_,"description","description",k);var y=f("pubDate",k)||f("dc:date",k);return y&&(_.pubDate=new Date(y)),_})};o(b,"title","title",w),o(b,"link","link",w),o(b,"description","description",w);var g=f("lastBuildDate",w);return g&&(b.updated=new Date(g)),o(b,"author","managingEditor",w,!0),b}var n=["url","type","lang"],u=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function c(l){return(0,a.getElementsByTagName)("media:content",l).map(function(p){for(var x=p.attribs,w={medium:x.medium,isDefault:!!x.isDefault},b=0,g=n;b<g.length;b++){var v=g[b];x[v]&&(w[v]=x[v])}for(var k=0,_=u;k<_.length;k++){var v=_[k];x[v]&&(w[v]=parseInt(x[v],10))}return x.expression&&(w.expression=x.expression),w})}function d(l,p){return(0,a.getElementsByTagName)(l,p,!0,1)[0]}function f(l,p,x){return x===void 0&&(x=!1),(0,e.textContent)((0,a.getElementsByTagName)(l,p,x,1)).trim()}function o(l,p,x,w,b){b===void 0&&(b=!1);var g=f(x,w,b);g&&(l[p]=g)}function h(l){return l==="rss"||l==="feed"||l==="rdf:RDF"}return Un}var El;function Ks(){return El||(El=1,(function(e){var a=Fr&&Fr.__createBinding||(Object.create?(function(r,n,u,c){c===void 0&&(c=u);var d=Object.getOwnPropertyDescriptor(n,u);(!d||("get"in d?!n.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return n[u]}}),Object.defineProperty(r,c,d)}):(function(r,n,u,c){c===void 0&&(c=u),r[c]=n[u]})),i=Fr&&Fr.__exportStar||function(r,n){for(var u in r)u!=="default"&&!Object.prototype.hasOwnProperty.call(n,u)&&a(n,r,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.hasChildren=e.isDocument=e.isComment=e.isText=e.isCDATA=e.isTag=void 0,i(sd(),e),i(Fh(),e),i(qh(),e),i(id(),e),i(od(),e),i(Bh(),e),i(Vh(),e);var s=xr();Object.defineProperty(e,"isTag",{enumerable:!0,get:function(){return s.isTag}}),Object.defineProperty(e,"isCDATA",{enumerable:!0,get:function(){return s.isCDATA}}),Object.defineProperty(e,"isText",{enumerable:!0,get:function(){return s.isText}}),Object.defineProperty(e,"isComment",{enumerable:!0,get:function(){return s.isComment}}),Object.defineProperty(e,"isDocument",{enumerable:!0,get:function(){return s.isDocument}}),Object.defineProperty(e,"hasChildren",{enumerable:!0,get:function(){return s.hasChildren}})})(Fr)),Fr}var Al;function Uh(){return Al||(Al=1,(function(e){var a=Rt&&Rt.__createBinding||(Object.create?(function(g,v,k,_){_===void 0&&(_=k);var y=Object.getOwnPropertyDescriptor(v,k);(!y||("get"in y?!v.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return v[k]}}),Object.defineProperty(g,_,y)}):(function(g,v,k,_){_===void 0&&(_=k),g[_]=v[k]})),i=Rt&&Rt.__setModuleDefault||(Object.create?(function(g,v){Object.defineProperty(g,"default",{enumerable:!0,value:v})}):function(g,v){g.default=v}),s=Rt&&Rt.__importStar||function(g){if(g&&g.__esModule)return g;var v={};if(g!=null)for(var k in g)k!=="default"&&Object.prototype.hasOwnProperty.call(g,k)&&a(v,g,k);return i(v,g),v},r=Rt&&Rt.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.DomUtils=e.parseFeed=e.getFeed=e.ElementType=e.Tokenizer=e.createDomStream=e.parseDOM=e.parseDocument=e.DefaultHandler=e.DomHandler=e.Parser=void 0;var n=ol(),u=ol();Object.defineProperty(e,"Parser",{enumerable:!0,get:function(){return u.Parser}});var c=xr(),d=xr();Object.defineProperty(e,"DomHandler",{enumerable:!0,get:function(){return d.DomHandler}}),Object.defineProperty(e,"DefaultHandler",{enumerable:!0,get:function(){return d.DomHandler}});function f(g,v){var k=new c.DomHandler(void 0,v);return new n.Parser(k,v).end(g),k.root}e.parseDocument=f;function o(g,v){return f(g,v).children}e.parseDOM=o;function h(g,v,k){var _=new c.DomHandler(g,v,k);return new n.Parser(_,v)}e.createDomStream=h;var l=nd();Object.defineProperty(e,"Tokenizer",{enumerable:!0,get:function(){return r(l).default}}),e.ElementType=s(nn());var p=Ks(),x=Ks();Object.defineProperty(e,"getFeed",{enumerable:!0,get:function(){return x.getFeed}});var w={xmlMode:!0};function b(g,v){return v===void 0&&(v=w),(0,p.getFeed)(o(g,v))}e.parseFeed=b,e.DomUtils=s(Ks())})(Rt)),Rt}var Qs,Sl;function zh(){return Sl||(Sl=1,Qs=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}),Qs}var zn={},Cl;function Hh(){if(Cl)return zn;Cl=1,Object.defineProperty(zn,"__esModule",{value:!0});/*!
1049
1049
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
1050
1050
  *
1051
1051
  * Copyright (c) 2014-2017, Jon Schlinkert.
1052
1052
  * Released under the MIT License.
1053
- */function e(i){return Object.prototype.toString.call(i)==="[object Object]"}function a(i){var s,r;return e(i)===!1?!1:(s=i.constructor,s===void 0?!0:(r=s.prototype,!(e(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}return zn.isPlainObject=a,zn}var Yn={exports:{}},Wh=Yn.exports,Dl;function Gh(){return Dl||(Dl=1,(function(e){(function(a,i){e.exports?e.exports=i():a.parseSrcset=i()})(Wh,function(){return function(a){function i(k){return k===" "||k===" "||k===`
1054
- `||k==="\f"||k==="\r"}function s(k){var y,m=k.exec(a.substring(b));if(m)return y=m[0],b+=y.length,y}for(var r=a.length,n=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,c=/^[^ \t\n\r\u000c]+/,d=/[,]+$/,f=/^\d+$/,o=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,h,l,p,x,w,b=0,g=[];;){if(s(u),b>=r)return g;h=s(c),l=[],h.slice(-1)===","?(h=h.replace(d,""),_()):v()}function v(){for(s(n),p="",x="in descriptor";;){if(w=a.charAt(b),x==="in descriptor")if(i(w))p&&(l.push(p),p="",x="after descriptor");else if(w===","){b+=1,p&&l.push(p),_();return}else if(w==="(")p=p+w,x="in parens";else if(w===""){p&&l.push(p),_();return}else p=p+w;else if(x==="in parens")if(w===")")p=p+w,x="in descriptor";else if(w===""){l.push(p),_();return}else p=p+w;else if(x==="after descriptor"&&!i(w))if(w===""){_();return}else x="in descriptor",b-=1;b+=1}}function _(){var k=!1,y,m,N,j,A={},D,C,T,M,W;for(j=0;j<l.length;j++)D=l[j],C=D[D.length-1],T=D.substring(0,D.length-1),M=parseInt(T,10),W=parseFloat(T),f.test(T)&&C==="w"?((y||m)&&(k=!0),M===0?k=!0:y=M):o.test(T)&&C==="x"?((y||m||N)&&(k=!0),W<0?k=!0:m=W):f.test(T)&&C==="h"?((N||m)&&(k=!0),M===0?k=!0:N=M):k=!0;k?console&&console.log&&console.log("Invalid srcset descriptor found in '"+a+"' at '"+D+"'."):(A.url=h,y&&(A.w=y),m&&(A.d=m),N&&(A.h=N),g.push(A))}}})})(Yn)),Yn.exports}var Hn={exports:{}},Tl;function Jh(){if(Tl)return Hn.exports;Tl=1;var e=String,a=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Hn.exports=a(),Hn.exports.createColors=a,Hn.exports}var ei,Ol;function Ji(){if(Ol)return ei;Ol=1;let e=Jh(),a=dt;class i extends Error{constructor(r,n,u,c,d,f){super(r),this.name="CssSyntaxError",this.reason=r,d&&(this.file=d),c&&(this.source=c),f&&(this.plugin=f),typeof n<"u"&&typeof u<"u"&&(typeof n=="number"?(this.line=n,this.column=u):(this.line=n.line,this.column=n.column,this.endLine=u.line,this.endColumn=u.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let n=this.source;r==null&&(r=e.isColorSupported);let u=p=>p,c=p=>p,d=p=>p;if(r){let{bold:p,gray:x,red:w}=e.createColors(!0);c=b=>p(w(b)),u=b=>x(b),a&&(d=b=>a(b))}let f=n.split(/\r?\n/),o=Math.max(this.line-3,0),h=Math.min(this.line+2,f.length),l=String(h).length;return f.slice(o,h).map((p,x)=>{let w=o+1+x,b=" "+(" "+w).slice(-l)+" | ";if(w===this.line){if(p.length>160){let v=20,_=Math.max(0,this.column-v),k=Math.max(this.column+v,this.endColumn+v),y=p.slice(_,k),m=u(b.replace(/\d/g," "))+p.slice(0,Math.min(this.column-1,v-1)).replace(/[^\t]/g," ");return c(">")+u(b)+d(y)+`
1053
+ */function e(i){return Object.prototype.toString.call(i)==="[object Object]"}function a(i){var s,r;return e(i)===!1?!1:(s=i.constructor,s===void 0?!0:(r=s.prototype,!(e(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}return zn.isPlainObject=a,zn}var Yn={exports:{}},Wh=Yn.exports,Dl;function Gh(){return Dl||(Dl=1,(function(e){(function(a,i){e.exports?e.exports=i():a.parseSrcset=i()})(Wh,function(){return function(a){function i(_){return _===" "||_===" "||_===`
1054
+ `||_==="\f"||_==="\r"}function s(_){var y,m=_.exec(a.substring(b));if(m)return y=m[0],b+=y.length,y}for(var r=a.length,n=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,c=/^[^ \t\n\r\u000c]+/,d=/[,]+$/,f=/^\d+$/,o=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,h,l,p,x,w,b=0,g=[];;){if(s(u),b>=r)return g;h=s(c),l=[],h.slice(-1)===","?(h=h.replace(d,""),k()):v()}function v(){for(s(n),p="",x="in descriptor";;){if(w=a.charAt(b),x==="in descriptor")if(i(w))p&&(l.push(p),p="",x="after descriptor");else if(w===","){b+=1,p&&l.push(p),k();return}else if(w==="(")p=p+w,x="in parens";else if(w===""){p&&l.push(p),k();return}else p=p+w;else if(x==="in parens")if(w===")")p=p+w,x="in descriptor";else if(w===""){l.push(p),k();return}else p=p+w;else if(x==="after descriptor"&&!i(w))if(w===""){k();return}else x="in descriptor",b-=1;b+=1}}function k(){var _=!1,y,m,N,j,A={},D,C,O,$,H;for(j=0;j<l.length;j++)D=l[j],C=D[D.length-1],O=D.substring(0,D.length-1),$=parseInt(O,10),H=parseFloat(O),f.test(O)&&C==="w"?((y||m)&&(_=!0),$===0?_=!0:y=$):o.test(O)&&C==="x"?((y||m||N)&&(_=!0),H<0?_=!0:m=H):f.test(O)&&C==="h"?((N||m)&&(_=!0),$===0?_=!0:N=$):_=!0;_?console&&console.log&&console.log("Invalid srcset descriptor found in '"+a+"' at '"+D+"'."):(A.url=h,y&&(A.w=y),m&&(A.d=m),N&&(A.h=N),g.push(A))}}})})(Yn)),Yn.exports}var Hn={exports:{}},Tl;function Jh(){if(Tl)return Hn.exports;Tl=1;var e=String,a=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Hn.exports=a(),Hn.exports.createColors=a,Hn.exports}var ei,Ol;function Ji(){if(Ol)return ei;Ol=1;let e=Jh(),a=dt;class i extends Error{constructor(r,n,u,c,d,f){super(r),this.name="CssSyntaxError",this.reason=r,d&&(this.file=d),c&&(this.source=c),f&&(this.plugin=f),typeof n<"u"&&typeof u<"u"&&(typeof n=="number"?(this.line=n,this.column=u):(this.line=n.line,this.column=n.column,this.endLine=u.line,this.endColumn=u.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let n=this.source;r==null&&(r=e.isColorSupported);let u=p=>p,c=p=>p,d=p=>p;if(r){let{bold:p,gray:x,red:w}=e.createColors(!0);c=b=>p(w(b)),u=b=>x(b),a&&(d=b=>a(b))}let f=n.split(/\r?\n/),o=Math.max(this.line-3,0),h=Math.min(this.line+2,f.length),l=String(h).length;return f.slice(o,h).map((p,x)=>{let w=o+1+x,b=" "+(" "+w).slice(-l)+" | ";if(w===this.line){if(p.length>160){let v=20,k=Math.max(0,this.column-v),_=Math.max(this.column+v,this.endColumn+v),y=p.slice(k,_),m=u(b.replace(/\d/g," "))+p.slice(0,Math.min(this.column-1,v-1)).replace(/[^\t]/g," ");return c(">")+u(b)+d(y)+`
1055
1055
  `+m+c("^")}let g=u(b.replace(/\d/g," "))+p.slice(0,this.column-1).replace(/[^\t]/g," ");return c(">")+u(b)+d(p)+`
1056
1056
  `+g+c("^")}return" "+u(b)+d(p)}).join(`
1057
1057
  `)}toString(){let r=this.showSourceCode();return r&&(r=`
@@ -1068,43 +1068,43 @@ zenieix
1068
1068
  `)&&(u=u.replace(/[^\n]+$/,"")),!1}),typeof u>"u"?u=this.raw(n,null,"beforeDecl"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeDecl(r,n){let u;return r.walkDecls(c=>{if(typeof c.raws.before<"u")return u=c.raws.before,u.includes(`
1069
1069
  `)&&(u=u.replace(/[^\n]+$/,"")),!1}),typeof u>"u"?u=this.raw(n,null,"beforeRule"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeOpen(r){let n;return r.walk(u=>{if(u.type!=="decl"&&(n=u.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(r){let n;return r.walk(u=>{if(u.nodes&&(u.parent!==r||r.first!==u)&&typeof u.raws.before<"u")return n=u.raws.before,n.includes(`
1070
1070
  `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(r){let n;return r.walkDecls(u=>{if(typeof u.raws.between<"u")return n=u.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(r){let n;return r.walk(u=>{if(u.nodes&&u.nodes.length===0&&(n=u.raws.after,typeof n<"u"))return!1}),n}rawIndent(r){if(r.raws.indent)return r.raws.indent;let n;return r.walk(u=>{let c=u.parent;if(c&&c!==r&&c.parent&&c.parent===r&&typeof u.raws.before<"u"){let d=u.raws.before.split(`
1071
- `);return n=d[d.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(r){let n;return r.walk(u=>{if(u.nodes&&u.nodes.length&&u.last.type==="decl"&&(n=u.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(r,n){let u=r[n],c=r.raws[n];return c&&c.value===u?c.raw:u}root(r){this.body(r),r.raws.after&&this.builder(r.raws.after)}rule(r){this.block(r,this.rawValue(r,"selector")),r.raws.ownSemicolon&&this.builder(r.raws.ownSemicolon,r,"end")}stringify(r,n){if(!this[r.type])throw new Error("Unknown AST node type "+r.type+". Maybe you need to change PostCSS stringifier.");this[r.type](r,n)}}return ti=i,i.default=i,ti}var ri,Ll;function gs(){if(Ll)return ri;Ll=1;let e=ud();function a(i,s){new e(s).stringify(i)}return ri=a,a.default=a,ri}var Wn={},$l;function Yi(){return $l||($l=1,Wn.isClean=Symbol("isClean"),Wn.my=Symbol("my")),Wn}var ai,Ml;function bs(){if(Ml)return ai;Ml=1;let e=Ji(),a=ud(),i=gs(),{isClean:s,my:r}=Yi();function n(d,f){let o=new d.constructor;for(let h in d){if(!Object.prototype.hasOwnProperty.call(d,h)||h==="proxyCache")continue;let l=d[h],p=typeof l;h==="parent"&&p==="object"?f&&(o[h]=f):h==="source"?o[h]=l:Array.isArray(l)?o[h]=l.map(x=>n(x,o)):(p==="object"&&l!==null&&(l=n(l)),o[h]=l)}return o}function u(d,f){if(f&&typeof f.offset<"u")return f.offset;let o=1,h=1,l=0;for(let p=0;p<d.length;p++){if(h===f.line&&o===f.column){l=p;break}d[p]===`
1071
+ `);return n=d[d.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(r){let n;return r.walk(u=>{if(u.nodes&&u.nodes.length&&u.last.type==="decl"&&(n=u.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(r,n){let u=r[n],c=r.raws[n];return c&&c.value===u?c.raw:u}root(r){this.body(r),r.raws.after&&this.builder(r.raws.after)}rule(r){this.block(r,this.rawValue(r,"selector")),r.raws.ownSemicolon&&this.builder(r.raws.ownSemicolon,r,"end")}stringify(r,n){if(!this[r.type])throw new Error("Unknown AST node type "+r.type+". Maybe you need to change PostCSS stringifier.");this[r.type](r,n)}}return ti=i,i.default=i,ti}var ri,$l;function gs(){if($l)return ri;$l=1;let e=ud();function a(i,s){new e(s).stringify(i)}return ri=a,a.default=a,ri}var Wn={},Ll;function Yi(){return Ll||(Ll=1,Wn.isClean=Symbol("isClean"),Wn.my=Symbol("my")),Wn}var ai,Ml;function bs(){if(Ml)return ai;Ml=1;let e=Ji(),a=ud(),i=gs(),{isClean:s,my:r}=Yi();function n(d,f){let o=new d.constructor;for(let h in d){if(!Object.prototype.hasOwnProperty.call(d,h)||h==="proxyCache")continue;let l=d[h],p=typeof l;h==="parent"&&p==="object"?f&&(o[h]=f):h==="source"?o[h]=l:Array.isArray(l)?o[h]=l.map(x=>n(x,o)):(p==="object"&&l!==null&&(l=n(l)),o[h]=l)}return o}function u(d,f){if(f&&typeof f.offset<"u")return f.offset;let o=1,h=1,l=0;for(let p=0;p<d.length;p++){if(h===f.line&&o===f.column){l=p;break}d[p]===`
1072
1072
  `?(o=1,h+=1):o+=1}return l}class c{get proxyOf(){return this}constructor(f={}){this.raws={},this[s]=!1,this[r]=!0;for(let o in f)if(o==="nodes"){this.nodes=[];for(let h of f[o])typeof h.clone=="function"?this.append(h.clone()):this.append(h)}else this[o]=f[o]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let o=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${o.input.from}:${o.start.line}:${o.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let o in f)this[o]=f[o];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let o=n(this);for(let h in f)o[h]=f[h];return o}cloneAfter(f={}){let o=this.clone(f);return this.parent.insertAfter(this,o),o}cloneBefore(f={}){let o=this.clone(f);return this.parent.insertBefore(this,o),o}error(f,o={}){if(this.source){let{end:h,start:l}=this.rangeBy(o);return this.source.input.error(f,{column:l.column,line:l.line},{column:h.column,line:h.line},o)}return new e(f)}getProxyProcessor(){return{get(f,o){return o==="proxyOf"?f:o==="root"?()=>f.root().toProxy():f[o]},set(f,o,h){return f[o]===h||(f[o]=h,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&f.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let f=this;for(;f=f.parent;)f[s]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f={}){let o=this.source.start;if(f.index)o=this.positionInside(f.index);else if(f.word){let h="document"in this.source.input?this.source.input.document:this.source.input.css,p=h.slice(u(h,this.source.start),u(h,this.source.end)).indexOf(f.word);p!==-1&&(o=this.positionInside(p))}return o}positionInside(f){let o=this.source.start.column,h=this.source.start.line,l="document"in this.source.input?this.source.input.document:this.source.input.css,p=u(l,this.source.start),x=p+f;for(let w=p;w<x;w++)l[w]===`
1073
- `?(o=1,h+=1):o+=1;return{column:o,line:h,offset:x}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f={}){let o="document"in this.source.input?this.source.input.document:this.source.input.css,h={column:this.source.start.column,line:this.source.start.line,offset:u(o,this.source.start)},l=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:u(o,this.source.end)+1}:{column:h.column+1,line:h.line,offset:h.offset+1};if(f.word){let x=o.slice(u(o,this.source.start),u(o,this.source.end)).indexOf(f.word);x!==-1&&(h=this.positionInside(x),l=this.positionInside(x+f.word.length))}else f.start?h={column:f.start.column,line:f.start.line,offset:u(o,f.start)}:f.index&&(h=this.positionInside(f.index)),f.end?l={column:f.end.column,line:f.end.line,offset:u(o,f.end)}:typeof f.endIndex=="number"?l=this.positionInside(f.endIndex):f.index&&(l=this.positionInside(f.index+1));return(l.line<h.line||l.line===h.line&&l.column<=h.column)&&(l={column:h.column+1,line:h.line,offset:h.offset+1}),{end:l,start:h}}raw(f,o){return new a().raw(this,f,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let o=this,h=!1;for(let l of f)l===this?h=!0:h?(this.parent.insertAfter(o,l),o=l):this.parent.insertBefore(o,l);h||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,o){let h={},l=o==null;o=o||new Map;let p=0;for(let x in this){if(!Object.prototype.hasOwnProperty.call(this,x)||x==="parent"||x==="proxyCache")continue;let w=this[x];if(Array.isArray(w))h[x]=w.map(b=>typeof b=="object"&&b.toJSON?b.toJSON(null,o):b);else if(typeof w=="object"&&w.toJSON)h[x]=w.toJSON(null,o);else if(x==="source"){if(w==null)continue;let b=o.get(w.input);b==null&&(b=p,o.set(w.input,p),p++),h[x]={end:w.end,inputId:b,start:w.start}}else h[x]=w}return l&&(h.inputs=[...o.keys()].map(x=>x.toJSON())),h}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=i){f.stringify&&(f=f.stringify);let o="";return f(this,h=>{o+=h}),o}warn(f,o,h={}){let l={node:this};for(let p in h)l[p]=h[p];return f.warn(o,l)}}return ai=c,c.default=c,ai}var ni,Rl;function xs(){if(Rl)return ni;Rl=1;let e=bs();class a extends e{constructor(s){super(s),this.type="comment"}}return ni=a,a.default=a,ni}var si,Il;function ys(){if(Il)return si;Il=1;let e=bs();class a extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(s){s&&typeof s.value<"u"&&typeof s.value!="string"&&(s={...s,value:String(s.value)}),super(s),this.type="decl"}}return si=a,a.default=a,si}var ii,Fl;function Wr(){if(Fl)return ii;Fl=1;let e=xs(),a=ys(),i=bs(),{isClean:s,my:r}=Yi(),n,u,c,d;function f(l){return l.map(p=>(p.nodes&&(p.nodes=f(p.nodes)),delete p.source,p))}function o(l){if(l[s]=!1,l.proxyOf.nodes)for(let p of l.proxyOf.nodes)o(p)}class h extends i{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...p){for(let x of p){let w=this.normalize(x,this.last);for(let b of w)this.proxyOf.nodes.push(b)}return this.markDirty(),this}cleanRaws(p){if(super.cleanRaws(p),this.nodes)for(let x of this.nodes)x.cleanRaws(p)}each(p){if(!this.proxyOf.nodes)return;let x=this.getIterator(),w,b;for(;this.indexes[x]<this.proxyOf.nodes.length&&(w=this.indexes[x],b=p(this.proxyOf.nodes[w],w),b!==!1);)this.indexes[x]+=1;return delete this.indexes[x],b}every(p){return this.nodes.every(p)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let p=this.lastEach;return this.indexes[p]=0,p}getProxyProcessor(){return{get(p,x){return x==="proxyOf"?p:p[x]?x==="each"||typeof x=="string"&&x.startsWith("walk")?(...w)=>p[x](...w.map(b=>typeof b=="function"?(g,v)=>b(g.toProxy(),v):b)):x==="every"||x==="some"?w=>p[x]((b,...g)=>w(b.toProxy(),...g)):x==="root"?()=>p.root().toProxy():x==="nodes"?p.nodes.map(w=>w.toProxy()):x==="first"||x==="last"?p[x].toProxy():p[x]:p[x]},set(p,x,w){return p[x]===w||(p[x]=w,(x==="name"||x==="params"||x==="selector")&&p.markDirty()),!0}}}index(p){return typeof p=="number"?p:(p.proxyOf&&(p=p.proxyOf),this.proxyOf.nodes.indexOf(p))}insertAfter(p,x){let w=this.index(p),b=this.normalize(x,this.proxyOf.nodes[w]).reverse();w=this.index(p);for(let v of b)this.proxyOf.nodes.splice(w+1,0,v);let g;for(let v in this.indexes)g=this.indexes[v],w<g&&(this.indexes[v]=g+b.length);return this.markDirty(),this}insertBefore(p,x){let w=this.index(p),b=w===0?"prepend":!1,g=this.normalize(x,this.proxyOf.nodes[w],b).reverse();w=this.index(p);for(let _ of g)this.proxyOf.nodes.splice(w,0,_);let v;for(let _ in this.indexes)v=this.indexes[_],w<=v&&(this.indexes[_]=v+g.length);return this.markDirty(),this}normalize(p,x){if(typeof p=="string")p=f(u(p).nodes);else if(typeof p>"u")p=[];else if(Array.isArray(p)){p=p.slice(0);for(let b of p)b.parent&&b.parent.removeChild(b,"ignore")}else if(p.type==="root"&&this.type!=="document"){p=p.nodes.slice(0);for(let b of p)b.parent&&b.parent.removeChild(b,"ignore")}else if(p.type)p=[p];else if(p.prop){if(typeof p.value>"u")throw new Error("Value field is missed in node creation");typeof p.value!="string"&&(p.value=String(p.value)),p=[new a(p)]}else if(p.selector||p.selectors)p=[new d(p)];else if(p.name)p=[new n(p)];else if(p.text)p=[new e(p)];else throw new Error("Unknown node type in node creation");return p.map(b=>(b[r]||h.rebuild(b),b=b.proxyOf,b.parent&&b.parent.removeChild(b),b[s]&&o(b),b.raws||(b.raws={}),typeof b.raws.before>"u"&&x&&typeof x.raws.before<"u"&&(b.raws.before=x.raws.before.replace(/\S/g,"")),b.parent=this.proxyOf,b))}prepend(...p){p=p.reverse();for(let x of p){let w=this.normalize(x,this.first,"prepend").reverse();for(let b of w)this.proxyOf.nodes.unshift(b);for(let b in this.indexes)this.indexes[b]=this.indexes[b]+w.length}return this.markDirty(),this}push(p){return p.parent=this,this.proxyOf.nodes.push(p),this}removeAll(){for(let p of this.proxyOf.nodes)p.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(p){p=this.index(p),this.proxyOf.nodes[p].parent=void 0,this.proxyOf.nodes.splice(p,1);let x;for(let w in this.indexes)x=this.indexes[w],x>=p&&(this.indexes[w]=x-1);return this.markDirty(),this}replaceValues(p,x,w){return w||(w=x,x={}),this.walkDecls(b=>{x.props&&!x.props.includes(b.prop)||x.fast&&!b.value.includes(x.fast)||(b.value=b.value.replace(p,w))}),this.markDirty(),this}some(p){return this.nodes.some(p)}walk(p){return this.each((x,w)=>{let b;try{b=p(x,w)}catch(g){throw x.addToError(g)}return b!==!1&&x.walk&&(b=x.walk(p)),b})}walkAtRules(p,x){return x?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="atrule"&&p.test(w.name))return x(w,b)}):this.walk((w,b)=>{if(w.type==="atrule"&&w.name===p)return x(w,b)}):(x=p,this.walk((w,b)=>{if(w.type==="atrule")return x(w,b)}))}walkComments(p){return this.walk((x,w)=>{if(x.type==="comment")return p(x,w)})}walkDecls(p,x){return x?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="decl"&&p.test(w.prop))return x(w,b)}):this.walk((w,b)=>{if(w.type==="decl"&&w.prop===p)return x(w,b)}):(x=p,this.walk((w,b)=>{if(w.type==="decl")return x(w,b)}))}walkRules(p,x){return x?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="rule"&&p.test(w.selector))return x(w,b)}):this.walk((w,b)=>{if(w.type==="rule"&&w.selector===p)return x(w,b)}):(x=p,this.walk((w,b)=>{if(w.type==="rule")return x(w,b)}))}}return h.registerParse=l=>{u=l},h.registerRule=l=>{d=l},h.registerAtRule=l=>{n=l},h.registerRoot=l=>{c=l},ii=h,h.default=h,h.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,n.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,a.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,c.prototype),l[r]=!0,l.nodes&&l.nodes.forEach(p=>{h.rebuild(p)})},ii}var oi,ql;function Zi(){if(ql)return oi;ql=1;let e=Wr();class a extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return oi=a,a.default=a,e.registerAtRule(a),oi}var ui,Bl;function Xi(){if(Bl)return ui;Bl=1;let e=Wr(),a,i;class s extends e{constructor(n){super({type:"document",...n}),this.nodes||(this.nodes=[])}toResult(n={}){return new a(new i,this,n).stringify()}}return s.registerLazyResult=r=>{a=r},s.registerProcessor=r=>{i=r},ui=s,s.default=s,ui}var li,Vl;function Yh(){if(Vl)return li;Vl=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return li={nanoid:(s=21)=>{let r="",n=s|0;for(;n--;)r+=e[Math.random()*64|0];return r},customAlphabet:(s,r=21)=>(n=r)=>{let u="",c=n|0;for(;c--;)u+=s[Math.random()*s.length|0];return u}},li}var ci,Ul;function ld(){if(Ul)return ci;Ul=1;let{existsSync:e,readFileSync:a}=dt,{dirname:i,join:s}=dt,{SourceMapConsumer:r,SourceMapGenerator:n}=dt;function u(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class c{constructor(f,o){if(o.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let h=o.map?o.map.prev:void 0,l=this.loadMap(o.from,h);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=i(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}decodeInline(f){let o=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,p=/^data:application\/json,/,x=f.match(l)||f.match(p);if(x)return decodeURIComponent(f.substr(x[0].length));let w=f.match(o)||f.match(h);if(w)return u(f.substr(w[0].length));let b=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+b)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let o=f.match(/\/\*\s*# sourceMappingURL=/g);if(!o)return;let h=f.lastIndexOf(o.pop()),l=f.indexOf("*/",h);h>-1&&l>-1&&(this.annotation=this.getAnnotationURL(f.substring(h,l)))}loadFile(f){if(this.root=i(f),e(f))return this.mapFile=f,a(f,"utf-8").toString().trim()}loadMap(f,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let h=o(f);if(h){let l=this.loadFile(h);if(!l)throw new Error("Unable to load previous source map: "+h.toString());return l}}else{if(o instanceof r)return n.fromSourceMap(o).toString();if(o instanceof n)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return f&&(h=s(i(f),h)),this.loadFile(h)}}}startWith(f,o){return f?f.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ci=c,c.default=c,ci}var di,zl;function vs(){if(zl)return di;zl=1;let{nanoid:e}=Yh(),{isAbsolute:a,resolve:i}=dt,{SourceMapConsumer:s,SourceMapGenerator:r}=dt,{fileURLToPath:n,pathToFileURL:u}=dt,c=Ji(),d=ld(),f=dt,o=Symbol("lineToIndexCache"),h=!!(s&&r),l=!!(i&&a);function p(w){if(w[o])return w[o];let b=w.css.split(`
1074
- `),g=new Array(b.length),v=0;for(let _=0,k=b.length;_<k;_++)g[_]=v,v+=b[_].length+1;return w[o]=g,g}class x{get from(){return this.file||this.id}constructor(b,g={}){if(b===null||typeof b>"u"||typeof b=="object"&&!b.toString)throw new Error(`PostCSS received ${b} instead of CSS string`);if(this.css=b.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||a(g.from)?this.file=g.from:this.file=i(g.from)),l&&h){let v=new d(this.css,g);if(v.text){this.map=v;let _=v.consumer().file;!this.file&&_&&(this.file=this.mapResolve(_))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(b,g,v,_={}){let k,y,m,N,j;if(g&&typeof g=="object"){let D=g,C=v;if(typeof D.offset=="number"){N=D.offset;let T=this.fromOffset(N);g=T.line,v=T.col}else g=D.line,v=D.column,N=this.fromLineAndColumn(g,v);if(typeof C.offset=="number"){m=C.offset;let T=this.fromOffset(m);y=T.line,k=T.col}else y=C.line,k=C.column,m=this.fromLineAndColumn(C.line,C.column)}else if(v)N=this.fromLineAndColumn(g,v);else{N=g;let D=this.fromOffset(N);g=D.line,v=D.col}let A=this.origin(g,v,y,k);return A?j=new c(b,A.endLine===void 0?A.line:{column:A.column,line:A.line},A.endLine===void 0?A.column:{column:A.endColumn,line:A.endLine},A.source,A.file,_.plugin):j=new c(b,y===void 0?g:{column:v,line:g},y===void 0?v:{column:k,line:y},this.css,this.file,_.plugin),j.input={column:v,endColumn:k,endLine:y,endOffset:m,line:g,offset:N,source:this.css},this.file&&(u&&(j.input.url=u(this.file).toString()),j.input.file=this.file),j}fromLineAndColumn(b,g){return p(this)[b-1]+g-1}fromOffset(b){let g=p(this),v=g[g.length-1],_=0;if(b>=v)_=g.length-1;else{let k=g.length-2,y;for(;_<k;)if(y=_+(k-_>>1),b<g[y])k=y-1;else if(b>=g[y+1])_=y+1;else{_=y;break}}return{col:b-g[_]+1,line:_+1}}mapResolve(b){return/^\w+:\/\//.test(b)?b:i(this.map.consumer().sourceRoot||this.map.root||".",b)}origin(b,g,v,_){if(!this.map)return!1;let k=this.map.consumer(),y=k.originalPositionFor({column:g,line:b});if(!y.source)return!1;let m;typeof v=="number"&&(m=k.originalPositionFor({column:_,line:v}));let N;a(y.source)?N=u(y.source):N=new URL(y.source,this.map.consumer().sourceRoot||u(this.map.mapFile));let j={column:y.column,endColumn:m&&m.column,endLine:m&&m.line,line:y.line,url:N.toString()};if(N.protocol==="file:")if(n)j.file=n(N);else throw new Error("file: protocol is not available in this PostCSS build");let A=k.sourceContentFor(y.source);return A&&(j.source=A),j}toJSON(){let b={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(b[g]=this[g]);return this.map&&(b.map={...this.map},b.map.consumerCache&&(b.map.consumerCache=void 0)),b}}return di=x,x.default=x,f&&f.registerInput&&f.registerInput(x),di}var fi,Hl;function sn(){if(Hl)return fi;Hl=1;let e=Wr(),a,i;class s extends e{constructor(n){super(n),this.type="root",this.nodes||(this.nodes=[])}normalize(n,u,c){let d=super.normalize(n);if(u){if(c==="prepend")this.nodes.length>1?u.raws.before=this.nodes[1].raws.before:delete u.raws.before;else if(this.first!==u)for(let f of d)f.raws.before=u.raws.before}return d}removeChild(n,u){let c=this.index(n);return!u&&c===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[c].raws.before),super.removeChild(n)}toResult(n={}){return new a(new i,this,n).stringify()}}return s.registerLazyResult=r=>{a=r},s.registerProcessor=r=>{i=r},fi=s,s.default=s,e.registerRoot(s),fi}var hi,Wl;function cd(){if(Wl)return hi;Wl=1;let e={comma(a){return e.split(a,[","],!0)},space(a){let i=[" ",`
1073
+ `?(o=1,h+=1):o+=1;return{column:o,line:h,offset:x}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f={}){let o="document"in this.source.input?this.source.input.document:this.source.input.css,h={column:this.source.start.column,line:this.source.start.line,offset:u(o,this.source.start)},l=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:u(o,this.source.end)+1}:{column:h.column+1,line:h.line,offset:h.offset+1};if(f.word){let x=o.slice(u(o,this.source.start),u(o,this.source.end)).indexOf(f.word);x!==-1&&(h=this.positionInside(x),l=this.positionInside(x+f.word.length))}else f.start?h={column:f.start.column,line:f.start.line,offset:u(o,f.start)}:f.index&&(h=this.positionInside(f.index)),f.end?l={column:f.end.column,line:f.end.line,offset:u(o,f.end)}:typeof f.endIndex=="number"?l=this.positionInside(f.endIndex):f.index&&(l=this.positionInside(f.index+1));return(l.line<h.line||l.line===h.line&&l.column<=h.column)&&(l={column:h.column+1,line:h.line,offset:h.offset+1}),{end:l,start:h}}raw(f,o){return new a().raw(this,f,o)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let o=this,h=!1;for(let l of f)l===this?h=!0:h?(this.parent.insertAfter(o,l),o=l):this.parent.insertBefore(o,l);h||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,o){let h={},l=o==null;o=o||new Map;let p=0;for(let x in this){if(!Object.prototype.hasOwnProperty.call(this,x)||x==="parent"||x==="proxyCache")continue;let w=this[x];if(Array.isArray(w))h[x]=w.map(b=>typeof b=="object"&&b.toJSON?b.toJSON(null,o):b);else if(typeof w=="object"&&w.toJSON)h[x]=w.toJSON(null,o);else if(x==="source"){if(w==null)continue;let b=o.get(w.input);b==null&&(b=p,o.set(w.input,p),p++),h[x]={end:w.end,inputId:b,start:w.start}}else h[x]=w}return l&&(h.inputs=[...o.keys()].map(x=>x.toJSON())),h}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=i){f.stringify&&(f=f.stringify);let o="";return f(this,h=>{o+=h}),o}warn(f,o,h={}){let l={node:this};for(let p in h)l[p]=h[p];return f.warn(o,l)}}return ai=c,c.default=c,ai}var ni,Rl;function xs(){if(Rl)return ni;Rl=1;let e=bs();class a extends e{constructor(s){super(s),this.type="comment"}}return ni=a,a.default=a,ni}var si,Il;function ys(){if(Il)return si;Il=1;let e=bs();class a extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(s){s&&typeof s.value<"u"&&typeof s.value!="string"&&(s={...s,value:String(s.value)}),super(s),this.type="decl"}}return si=a,a.default=a,si}var ii,Fl;function Wr(){if(Fl)return ii;Fl=1;let e=xs(),a=ys(),i=bs(),{isClean:s,my:r}=Yi(),n,u,c,d;function f(l){return l.map(p=>(p.nodes&&(p.nodes=f(p.nodes)),delete p.source,p))}function o(l){if(l[s]=!1,l.proxyOf.nodes)for(let p of l.proxyOf.nodes)o(p)}class h extends i{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...p){for(let x of p){let w=this.normalize(x,this.last);for(let b of w)this.proxyOf.nodes.push(b)}return this.markDirty(),this}cleanRaws(p){if(super.cleanRaws(p),this.nodes)for(let x of this.nodes)x.cleanRaws(p)}each(p){if(!this.proxyOf.nodes)return;let x=this.getIterator(),w,b;for(;this.indexes[x]<this.proxyOf.nodes.length&&(w=this.indexes[x],b=p(this.proxyOf.nodes[w],w),b!==!1);)this.indexes[x]+=1;return delete this.indexes[x],b}every(p){return this.nodes.every(p)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let p=this.lastEach;return this.indexes[p]=0,p}getProxyProcessor(){return{get(p,x){return x==="proxyOf"?p:p[x]?x==="each"||typeof x=="string"&&x.startsWith("walk")?(...w)=>p[x](...w.map(b=>typeof b=="function"?(g,v)=>b(g.toProxy(),v):b)):x==="every"||x==="some"?w=>p[x]((b,...g)=>w(b.toProxy(),...g)):x==="root"?()=>p.root().toProxy():x==="nodes"?p.nodes.map(w=>w.toProxy()):x==="first"||x==="last"?p[x].toProxy():p[x]:p[x]},set(p,x,w){return p[x]===w||(p[x]=w,(x==="name"||x==="params"||x==="selector")&&p.markDirty()),!0}}}index(p){return typeof p=="number"?p:(p.proxyOf&&(p=p.proxyOf),this.proxyOf.nodes.indexOf(p))}insertAfter(p,x){let w=this.index(p),b=this.normalize(x,this.proxyOf.nodes[w]).reverse();w=this.index(p);for(let v of b)this.proxyOf.nodes.splice(w+1,0,v);let g;for(let v in this.indexes)g=this.indexes[v],w<g&&(this.indexes[v]=g+b.length);return this.markDirty(),this}insertBefore(p,x){let w=this.index(p),b=w===0?"prepend":!1,g=this.normalize(x,this.proxyOf.nodes[w],b).reverse();w=this.index(p);for(let k of g)this.proxyOf.nodes.splice(w,0,k);let v;for(let k in this.indexes)v=this.indexes[k],w<=v&&(this.indexes[k]=v+g.length);return this.markDirty(),this}normalize(p,x){if(typeof p=="string")p=f(u(p).nodes);else if(typeof p>"u")p=[];else if(Array.isArray(p)){p=p.slice(0);for(let b of p)b.parent&&b.parent.removeChild(b,"ignore")}else if(p.type==="root"&&this.type!=="document"){p=p.nodes.slice(0);for(let b of p)b.parent&&b.parent.removeChild(b,"ignore")}else if(p.type)p=[p];else if(p.prop){if(typeof p.value>"u")throw new Error("Value field is missed in node creation");typeof p.value!="string"&&(p.value=String(p.value)),p=[new a(p)]}else if(p.selector||p.selectors)p=[new d(p)];else if(p.name)p=[new n(p)];else if(p.text)p=[new e(p)];else throw new Error("Unknown node type in node creation");return p.map(b=>(b[r]||h.rebuild(b),b=b.proxyOf,b.parent&&b.parent.removeChild(b),b[s]&&o(b),b.raws||(b.raws={}),typeof b.raws.before>"u"&&x&&typeof x.raws.before<"u"&&(b.raws.before=x.raws.before.replace(/\S/g,"")),b.parent=this.proxyOf,b))}prepend(...p){p=p.reverse();for(let x of p){let w=this.normalize(x,this.first,"prepend").reverse();for(let b of w)this.proxyOf.nodes.unshift(b);for(let b in this.indexes)this.indexes[b]=this.indexes[b]+w.length}return this.markDirty(),this}push(p){return p.parent=this,this.proxyOf.nodes.push(p),this}removeAll(){for(let p of this.proxyOf.nodes)p.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(p){p=this.index(p),this.proxyOf.nodes[p].parent=void 0,this.proxyOf.nodes.splice(p,1);let x;for(let w in this.indexes)x=this.indexes[w],x>=p&&(this.indexes[w]=x-1);return this.markDirty(),this}replaceValues(p,x,w){return w||(w=x,x={}),this.walkDecls(b=>{x.props&&!x.props.includes(b.prop)||x.fast&&!b.value.includes(x.fast)||(b.value=b.value.replace(p,w))}),this.markDirty(),this}some(p){return this.nodes.some(p)}walk(p){return this.each((x,w)=>{let b;try{b=p(x,w)}catch(g){throw x.addToError(g)}return b!==!1&&x.walk&&(b=x.walk(p)),b})}walkAtRules(p,x){return x?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="atrule"&&p.test(w.name))return x(w,b)}):this.walk((w,b)=>{if(w.type==="atrule"&&w.name===p)return x(w,b)}):(x=p,this.walk((w,b)=>{if(w.type==="atrule")return x(w,b)}))}walkComments(p){return this.walk((x,w)=>{if(x.type==="comment")return p(x,w)})}walkDecls(p,x){return x?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="decl"&&p.test(w.prop))return x(w,b)}):this.walk((w,b)=>{if(w.type==="decl"&&w.prop===p)return x(w,b)}):(x=p,this.walk((w,b)=>{if(w.type==="decl")return x(w,b)}))}walkRules(p,x){return x?p instanceof RegExp?this.walk((w,b)=>{if(w.type==="rule"&&p.test(w.selector))return x(w,b)}):this.walk((w,b)=>{if(w.type==="rule"&&w.selector===p)return x(w,b)}):(x=p,this.walk((w,b)=>{if(w.type==="rule")return x(w,b)}))}}return h.registerParse=l=>{u=l},h.registerRule=l=>{d=l},h.registerAtRule=l=>{n=l},h.registerRoot=l=>{c=l},ii=h,h.default=h,h.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,n.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,a.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,c.prototype),l[r]=!0,l.nodes&&l.nodes.forEach(p=>{h.rebuild(p)})},ii}var oi,ql;function Zi(){if(ql)return oi;ql=1;let e=Wr();class a extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return oi=a,a.default=a,e.registerAtRule(a),oi}var ui,Bl;function Xi(){if(Bl)return ui;Bl=1;let e=Wr(),a,i;class s extends e{constructor(n){super({type:"document",...n}),this.nodes||(this.nodes=[])}toResult(n={}){return new a(new i,this,n).stringify()}}return s.registerLazyResult=r=>{a=r},s.registerProcessor=r=>{i=r},ui=s,s.default=s,ui}var li,Vl;function Yh(){if(Vl)return li;Vl=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return li={nanoid:(s=21)=>{let r="",n=s|0;for(;n--;)r+=e[Math.random()*64|0];return r},customAlphabet:(s,r=21)=>(n=r)=>{let u="",c=n|0;for(;c--;)u+=s[Math.random()*s.length|0];return u}},li}var ci,Ul;function ld(){if(Ul)return ci;Ul=1;let{existsSync:e,readFileSync:a}=dt,{dirname:i,join:s}=dt,{SourceMapConsumer:r,SourceMapGenerator:n}=dt;function u(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class c{constructor(f,o){if(o.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let h=o.map?o.map.prev:void 0,l=this.loadMap(o.from,h);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=i(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}decodeInline(f){let o=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,p=/^data:application\/json,/,x=f.match(l)||f.match(p);if(x)return decodeURIComponent(f.substr(x[0].length));let w=f.match(o)||f.match(h);if(w)return u(f.substr(w[0].length));let b=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+b)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let o=f.match(/\/\*\s*# sourceMappingURL=/g);if(!o)return;let h=f.lastIndexOf(o.pop()),l=f.indexOf("*/",h);h>-1&&l>-1&&(this.annotation=this.getAnnotationURL(f.substring(h,l)))}loadFile(f){if(this.root=i(f),e(f))return this.mapFile=f,a(f,"utf-8").toString().trim()}loadMap(f,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let h=o(f);if(h){let l=this.loadFile(h);if(!l)throw new Error("Unable to load previous source map: "+h.toString());return l}}else{if(o instanceof r)return n.fromSourceMap(o).toString();if(o instanceof n)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return f&&(h=s(i(f),h)),this.loadFile(h)}}}startWith(f,o){return f?f.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ci=c,c.default=c,ci}var di,zl;function vs(){if(zl)return di;zl=1;let{nanoid:e}=Yh(),{isAbsolute:a,resolve:i}=dt,{SourceMapConsumer:s,SourceMapGenerator:r}=dt,{fileURLToPath:n,pathToFileURL:u}=dt,c=Ji(),d=ld(),f=dt,o=Symbol("lineToIndexCache"),h=!!(s&&r),l=!!(i&&a);function p(w){if(w[o])return w[o];let b=w.css.split(`
1074
+ `),g=new Array(b.length),v=0;for(let k=0,_=b.length;k<_;k++)g[k]=v,v+=b[k].length+1;return w[o]=g,g}class x{get from(){return this.file||this.id}constructor(b,g={}){if(b===null||typeof b>"u"||typeof b=="object"&&!b.toString)throw new Error(`PostCSS received ${b} instead of CSS string`);if(this.css=b.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||a(g.from)?this.file=g.from:this.file=i(g.from)),l&&h){let v=new d(this.css,g);if(v.text){this.map=v;let k=v.consumer().file;!this.file&&k&&(this.file=this.mapResolve(k))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(b,g,v,k={}){let _,y,m,N,j;if(g&&typeof g=="object"){let D=g,C=v;if(typeof D.offset=="number"){N=D.offset;let O=this.fromOffset(N);g=O.line,v=O.col}else g=D.line,v=D.column,N=this.fromLineAndColumn(g,v);if(typeof C.offset=="number"){m=C.offset;let O=this.fromOffset(m);y=O.line,_=O.col}else y=C.line,_=C.column,m=this.fromLineAndColumn(C.line,C.column)}else if(v)N=this.fromLineAndColumn(g,v);else{N=g;let D=this.fromOffset(N);g=D.line,v=D.col}let A=this.origin(g,v,y,_);return A?j=new c(b,A.endLine===void 0?A.line:{column:A.column,line:A.line},A.endLine===void 0?A.column:{column:A.endColumn,line:A.endLine},A.source,A.file,k.plugin):j=new c(b,y===void 0?g:{column:v,line:g},y===void 0?v:{column:_,line:y},this.css,this.file,k.plugin),j.input={column:v,endColumn:_,endLine:y,endOffset:m,line:g,offset:N,source:this.css},this.file&&(u&&(j.input.url=u(this.file).toString()),j.input.file=this.file),j}fromLineAndColumn(b,g){return p(this)[b-1]+g-1}fromOffset(b){let g=p(this),v=g[g.length-1],k=0;if(b>=v)k=g.length-1;else{let _=g.length-2,y;for(;k<_;)if(y=k+(_-k>>1),b<g[y])_=y-1;else if(b>=g[y+1])k=y+1;else{k=y;break}}return{col:b-g[k]+1,line:k+1}}mapResolve(b){return/^\w+:\/\//.test(b)?b:i(this.map.consumer().sourceRoot||this.map.root||".",b)}origin(b,g,v,k){if(!this.map)return!1;let _=this.map.consumer(),y=_.originalPositionFor({column:g,line:b});if(!y.source)return!1;let m;typeof v=="number"&&(m=_.originalPositionFor({column:k,line:v}));let N;a(y.source)?N=u(y.source):N=new URL(y.source,this.map.consumer().sourceRoot||u(this.map.mapFile));let j={column:y.column,endColumn:m&&m.column,endLine:m&&m.line,line:y.line,url:N.toString()};if(N.protocol==="file:")if(n)j.file=n(N);else throw new Error("file: protocol is not available in this PostCSS build");let A=_.sourceContentFor(y.source);return A&&(j.source=A),j}toJSON(){let b={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(b[g]=this[g]);return this.map&&(b.map={...this.map},b.map.consumerCache&&(b.map.consumerCache=void 0)),b}}return di=x,x.default=x,f&&f.registerInput&&f.registerInput(x),di}var fi,Hl;function sn(){if(Hl)return fi;Hl=1;let e=Wr(),a,i;class s extends e{constructor(n){super(n),this.type="root",this.nodes||(this.nodes=[])}normalize(n,u,c){let d=super.normalize(n);if(u){if(c==="prepend")this.nodes.length>1?u.raws.before=this.nodes[1].raws.before:delete u.raws.before;else if(this.first!==u)for(let f of d)f.raws.before=u.raws.before}return d}removeChild(n,u){let c=this.index(n);return!u&&c===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[c].raws.before),super.removeChild(n)}toResult(n={}){return new a(new i,this,n).stringify()}}return s.registerLazyResult=r=>{a=r},s.registerProcessor=r=>{i=r},fi=s,s.default=s,e.registerRoot(s),fi}var hi,Wl;function cd(){if(Wl)return hi;Wl=1;let e={comma(a){return e.split(a,[","],!0)},space(a){let i=[" ",`
1075
1075
  `," "];return e.split(a,i)},split(a,i,s){let r=[],n="",u=!1,c=0,d=!1,f="",o=!1;for(let h of a)o?o=!1:h==="\\"?o=!0:d?h===f&&(d=!1):h==='"'||h==="'"?(d=!0,f=h):h==="("?c+=1:h===")"?c>0&&(c-=1):c===0&&i.includes(h)&&(u=!0),u?(n!==""&&r.push(n.trim()),n="",u=!1):n+=h;return(s||n!=="")&&r.push(n.trim()),r}};return hi=e,e.default=e,hi}var pi,Gl;function Ki(){if(Gl)return pi;Gl=1;let e=Wr(),a=cd();class i extends e{get selectors(){return a.comma(this.selector)}set selectors(r){let n=this.selector?this.selector.match(/,\s*/):null,u=n?n[0]:","+this.raw("between","beforeOpen");this.selector=r.join(u)}constructor(r){super(r),this.type="rule",this.nodes||(this.nodes=[])}}return pi=i,i.default=i,e.registerRule(i),pi}var mi,Jl;function Zh(){if(Jl)return mi;Jl=1;let e=Zi(),a=xs(),i=ys(),s=vs(),r=ld(),n=sn(),u=Ki();function c(d,f){if(Array.isArray(d))return d.map(l=>c(l));let{inputs:o,...h}=d;if(o){f=[];for(let l of o){let p={...l,__proto__:s.prototype};p.map&&(p.map={...p.map,__proto__:r.prototype}),f.push(p)}}if(h.nodes&&(h.nodes=d.nodes.map(l=>c(l,f))),h.source){let{inputId:l,...p}=h.source;h.source=p,l!=null&&(h.source.input=f[l])}if(h.type==="root")return new n(h);if(h.type==="decl")return new i(h);if(h.type==="rule")return new u(h);if(h.type==="comment")return new a(h);if(h.type==="atrule")return new e(h);throw new Error("Unknown node type: "+d.type)}return mi=c,c.default=c,mi}var gi,Yl;function dd(){if(Yl)return gi;Yl=1;let{dirname:e,relative:a,resolve:i,sep:s}=dt,{SourceMapConsumer:r,SourceMapGenerator:n}=dt,{pathToFileURL:u}=dt,c=vs(),d=!!(r&&n),f=!!(e&&i&&a&&s);class o{constructor(l,p,x,w){this.stringify=l,this.mapOpts=x.map||{},this.root=p,this.opts=x,this.css=w,this.originalCSS=w,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let p=`
1076
1076
  `;this.css.includes(`\r
1077
1077
  `)&&(p=`\r
1078
- `),this.css+=p+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let p=this.toUrl(this.path(l.file)),x=l.root||e(l.file),w;this.mapOpts.sourcesContent===!1?(w=new r(l.text),w.sourcesContent&&(w.sourcesContent=null)):w=l.consumer(),this.map.applySourceMap(w,p,this.toUrl(this.path(x)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let p=this.root.nodes.length-1;p>=0;p--)l=this.root.nodes[p],l.type==="comment"&&l.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(p)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&d&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,p=>{l+=p}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=n.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new n({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new n({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,p=1,x="<no source>",w={generated:{column:0,line:0},original:{column:0,line:0},source:""},b,g;this.stringify(this.root,(v,_,k)=>{if(this.css+=v,_&&k!=="end"&&(w.generated.line=l,w.generated.column=p-1,_.source&&_.source.start?(w.source=this.sourcePath(_),w.original.line=_.source.start.line,w.original.column=_.source.start.column-1,this.map.addMapping(w)):(w.source=x,w.original.line=1,w.original.column=0,this.map.addMapping(w))),g=v.match(/\n/g),g?(l+=g.length,b=v.lastIndexOf(`
1079
- `),p=v.length-b):p+=v.length,_&&k!=="start"){let y=_.parent||{raws:{}};(!(_.type==="decl"||_.type==="atrule"&&!_.nodes)||_!==y.last||y.raws.semicolon)&&(_.source&&_.source.end?(w.source=this.sourcePath(_),w.original.line=_.source.end.line,w.original.column=_.source.end.column-1,w.generated.line=l,w.generated.column=p-2,this.map.addMapping(w)):(w.source=x,w.original.line=1,w.original.column=0,w.generated.line=l,w.generated.column=p-1,this.map.addMapping(w)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(p=>p.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let p=this.memoizedPaths.get(l);if(p)return p;let x=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(x=e(i(x,this.mapOpts.annotation)));let w=a(x,l);return this.memoizedPaths.set(l,w),w}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let p=l.source.input.map;this.previousMaps.includes(p)||this.previousMaps.push(p)}});else{let l=new c(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(p=>{if(p.source){let x=p.source.input.from;if(x&&!l[x]){l[x]=!0;let w=this.usesFileUrls?this.toFileUrl(x):this.toUrl(this.path(x));this.map.setSourceContent(w,p.source.input.css)}}});else if(this.css){let p=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(p,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let p=this.memoizedFileURLs.get(l);if(p)return p;if(u){let x=u(l).toString();return this.memoizedFileURLs.set(l,x),x}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let p=this.memoizedURLs.get(l);if(p)return p;s==="\\"&&(l=l.replace(/\\/g,"/"));let x=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,x),x}}return gi=o,gi}var bi,Zl;function Xh(){if(Zl)return bi;Zl=1;const e=39,a=34,i=92,s=47,r=10,n=32,u=12,c=9,d=13,f=91,o=93,h=40,l=41,p=123,x=125,w=59,b=42,g=58,v=64,_=/[\t\n\f\r "#'()/;[\\\]{}]/g,k=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,m=/[\da-f]/i;return bi=function(j,A={}){let D=j.css.valueOf(),C=A.ignoreErrors,T,M,W,F,q,$,Y,X,ae,I,ie=D.length,R=0,V=[],J=[];function fe(){return R}function Q(Z){throw j.error("Unclosed "+Z,R)}function ne(){return J.length===0&&R>=ie}function xe(Z){if(J.length)return J.pop();if(R>=ie)return;let te=Z?Z.ignoreUnclosed:!1;switch(T=D.charCodeAt(R),T){case r:case n:case c:case d:case u:{F=R;do F+=1,T=D.charCodeAt(F);while(T===n||T===r||T===c||T===d||T===u);$=["space",D.slice(R,F)],R=F-1;break}case f:case o:case p:case x:case g:case w:case l:{let ee=String.fromCharCode(T);$=[ee,ee,R];break}case h:{if(I=V.length?V.pop()[1]:"",ae=D.charCodeAt(R+1),I==="url"&&ae!==e&&ae!==a&&ae!==n&&ae!==r&&ae!==c&&ae!==u&&ae!==d){F=R;do{if(Y=!1,F=D.indexOf(")",F+1),F===-1)if(C||te){F=R;break}else Q("bracket");for(X=F;D.charCodeAt(X-1)===i;)X-=1,Y=!Y}while(Y);$=["brackets",D.slice(R,F+1),R,F],R=F}else F=D.indexOf(")",R+1),M=D.slice(R,F+1),F===-1||y.test(M)?$=["(","(",R]:($=["brackets",M,R,F],R=F);break}case e:case a:{q=T===e?"'":'"',F=R;do{if(Y=!1,F=D.indexOf(q,F+1),F===-1)if(C||te){F=R+1;break}else Q("string");for(X=F;D.charCodeAt(X-1)===i;)X-=1,Y=!Y}while(Y);$=["string",D.slice(R,F+1),R,F],R=F;break}case v:{_.lastIndex=R+1,_.test(D),_.lastIndex===0?F=D.length-1:F=_.lastIndex-2,$=["at-word",D.slice(R,F+1),R,F],R=F;break}case i:{for(F=R,W=!0;D.charCodeAt(F+1)===i;)F+=1,W=!W;if(T=D.charCodeAt(F+1),W&&T!==s&&T!==n&&T!==r&&T!==c&&T!==d&&T!==u&&(F+=1,m.test(D.charAt(F)))){for(;m.test(D.charAt(F+1));)F+=1;D.charCodeAt(F+1)===n&&(F+=1)}$=["word",D.slice(R,F+1),R,F],R=F;break}default:{T===s&&D.charCodeAt(R+1)===b?(F=D.indexOf("*/",R+2)+1,F===0&&(C||te?F=D.length:Q("comment")),$=["comment",D.slice(R,F+1),R,F],R=F):(k.lastIndex=R+1,k.test(D),k.lastIndex===0?F=D.length-1:F=k.lastIndex-2,$=["word",D.slice(R,F+1),R,F],V.push($),R=F);break}}return R++,$}function Ce(Z){J.push(Z)}return{back:Ce,endOfFile:ne,nextToken:xe,position:fe}},bi}var xi,Xl;function Kh(){if(Xl)return xi;Xl=1;let e=Zi(),a=xs(),i=ys(),s=sn(),r=Ki(),n=Xh();const u={empty:!0,space:!0};function c(f){for(let o=f.length-1;o>=0;o--){let h=f[o],l=h[3]||h[2];if(l)return l}}class d{constructor(o){this.input=o,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let h=new e;h.name=o[1].slice(1),h.name===""&&this.unnamedAtrule(h,o),this.init(h,o[2]);let l,p,x,w=!1,b=!1,g=[],v=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),l=o[0],l==="("||l==="["?v.push(l==="("?")":"]"):l==="{"&&v.length>0?v.push("}"):l===v[v.length-1]&&v.pop(),v.length===0)if(l===";"){h.source.end=this.getPosition(o[2]),h.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){b=!0;break}else if(l==="}"){if(g.length>0){for(x=g.length-1,p=g[x];p&&p[0]==="space";)p=g[--x];p&&(h.source.end=this.getPosition(p[3]||p[2]),h.source.end.offset++)}this.end(o);break}else g.push(o);else g.push(o);if(this.tokenizer.endOfFile()){w=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(g),g.length?(h.raws.afterName=this.spacesAndCommentsFromStart(g),this.raw(h,"params",g),w&&(o=g[g.length-1],h.source.end=this.getPosition(o[3]||o[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),b&&(h.nodes=[],this.current=h)}checkMissedSemicolon(o){let h=this.colon(o);if(h===!1)return;let l=0,p;for(let x=h-1;x>=0&&(p=o[x],!(p[0]!=="space"&&(l+=1,l===2)));x--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(o){let h=0,l,p,x;for(let[w,b]of o.entries()){if(p=b,x=p[0],x==="("&&(h+=1),x===")"&&(h-=1),h===0&&x===":")if(!l)this.doubleColon(p);else{if(l[0]==="word"&&l[1]==="progid")continue;return w}l=p}return!1}comment(o){let h=new a;this.init(h,o[2]),h.source.end=this.getPosition(o[3]||o[2]),h.source.end.offset++;let l=o[1].slice(2,-2);if(/^\s*$/.test(l))h.text="",h.raws.left=l,h.raws.right="";else{let p=l.match(/^(\s*)([^]*\S)(\s*)$/);h.text=p[2],h.raws.left=p[1],h.raws.right=p[3]}}createTokenizer(){this.tokenizer=n(this.input)}decl(o,h){let l=new i;this.init(l,o[0][2]);let p=o[o.length-1];for(p[0]===";"&&(this.semicolon=!0,o.pop()),l.source.end=this.getPosition(p[3]||p[2]||c(o)),l.source.end.offset++;o[0][0]!=="word";)o.length===1&&this.unknownWord(o),l.raws.before+=o.shift()[1];for(l.source.start=this.getPosition(o[0][2]),l.prop="";o.length;){let v=o[0][0];if(v===":"||v==="space"||v==="comment")break;l.prop+=o.shift()[1]}l.raws.between="";let x;for(;o.length;)if(x=o.shift(),x[0]===":"){l.raws.between+=x[1];break}else x[0]==="word"&&/\w/.test(x[1])&&this.unknownWord([x]),l.raws.between+=x[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let w=[],b;for(;o.length&&(b=o[0][0],!(b!=="space"&&b!=="comment"));)w.push(o.shift());this.precheckMissedSemicolon(o);for(let v=o.length-1;v>=0;v--){if(x=o[v],x[1].toLowerCase()==="!important"){l.important=!0;let _=this.stringFrom(o,v);_=this.spacesFromEnd(o)+_,_!==" !important"&&(l.raws.important=_);break}else if(x[1].toLowerCase()==="important"){let _=o.slice(0),k="";for(let y=v;y>0;y--){let m=_[y][0];if(k.trim().startsWith("!")&&m!=="space")break;k=_.pop()[1]+k}k.trim().startsWith("!")&&(l.important=!0,l.raws.important=k,o=_)}if(x[0]!=="space"&&x[0]!=="comment")break}o.some(v=>v[0]!=="space"&&v[0]!=="comment")&&(l.raws.between+=w.map(v=>v[1]).join(""),w=[]),this.raw(l,"value",w.concat(o),h),l.value.includes(":")&&!h&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let h=new r;this.init(h,o[2]),h.selector="",h.raws.between="",this.current=h}end(o){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(o){if(this.spaces+=o[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="",h.source.end=this.getPosition(o[2]),h.source.end.offset+=h.raws.ownSemicolon.length)}}getPosition(o){let h=this.input.fromOffset(o);return{column:h.col,line:h.line,offset:o}}init(o,h){this.current.push(o),o.source={input:this.input,start:this.getPosition(h)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let h=!1,l=null,p=!1,x=null,w=[],b=o[1].startsWith("--"),g=[],v=o;for(;v;){if(l=v[0],g.push(v),l==="("||l==="[")x||(x=v),w.push(l==="("?")":"]");else if(b&&p&&l==="{")x||(x=v),w.push("}");else if(w.length===0)if(l===";")if(p){this.decl(g,b);return}else break;else if(l==="{"){this.rule(g);return}else if(l==="}"){this.tokenizer.back(g.pop()),h=!0;break}else l===":"&&(p=!0);else l===w[w.length-1]&&(w.pop(),w.length===0&&(x=null));v=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),w.length>0&&this.unclosedBracket(x),h&&p){if(!b)for(;g.length&&(v=g[g.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(g.pop());this.decl(g,b)}else this.unknownWord(g)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,h,l,p){let x,w,b=l.length,g="",v=!0,_,k;for(let y=0;y<b;y+=1)x=l[y],w=x[0],w==="space"&&y===b-1&&!p?v=!1:w==="comment"?(k=l[y-1]?l[y-1][0]:"empty",_=l[y+1]?l[y+1][0]:"empty",!u[k]&&!u[_]?g.slice(-1)===","?v=!1:g+=x[1]:v=!1):g+=x[1];if(!v){let y=l.reduce((m,N)=>m+N[1],"");o.raws[h]={raw:y,value:g}}o[h]=g}rule(o){o.pop();let h=new r;this.init(h,o[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(h,"selector",o),this.current=h}spacesAndCommentsFromEnd(o){let h,l="";for(;o.length&&(h=o[o.length-1][0],!(h!=="space"&&h!=="comment"));)l=o.pop()[1]+l;return l}spacesAndCommentsFromStart(o){let h,l="";for(;o.length&&(h=o[0][0],!(h!=="space"&&h!=="comment"));)l+=o.shift()[1];return l}spacesFromEnd(o){let h,l="";for(;o.length&&(h=o[o.length-1][0],h==="space");)l=o.pop()[1]+l;return l}stringFrom(o,h){let l="";for(let p=h;p<o.length;p++)l+=o[p][1];return o.splice(h,o.length-h),l}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return xi=d,xi}var yi,Kl;function Qi(){if(Kl)return yi;Kl=1;let e=Wr(),a=vs(),i=Kh();function s(r,n){let u=new a(r,n),c=new i(u);try{c.parse()}catch(d){throw process.env.NODE_ENV!=="production"&&d.name==="CssSyntaxError"&&n&&n.from&&(/\.scss$/i.test(n.from)?d.message+=`
1078
+ `),this.css+=p+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let p=this.toUrl(this.path(l.file)),x=l.root||e(l.file),w;this.mapOpts.sourcesContent===!1?(w=new r(l.text),w.sourcesContent&&(w.sourcesContent=null)):w=l.consumer(),this.map.applySourceMap(w,p,this.toUrl(this.path(x)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let p=this.root.nodes.length-1;p>=0;p--)l=this.root.nodes[p],l.type==="comment"&&l.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(p)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&d&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,p=>{l+=p}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=n.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new n({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new n({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,p=1,x="<no source>",w={generated:{column:0,line:0},original:{column:0,line:0},source:""},b,g;this.stringify(this.root,(v,k,_)=>{if(this.css+=v,k&&_!=="end"&&(w.generated.line=l,w.generated.column=p-1,k.source&&k.source.start?(w.source=this.sourcePath(k),w.original.line=k.source.start.line,w.original.column=k.source.start.column-1,this.map.addMapping(w)):(w.source=x,w.original.line=1,w.original.column=0,this.map.addMapping(w))),g=v.match(/\n/g),g?(l+=g.length,b=v.lastIndexOf(`
1079
+ `),p=v.length-b):p+=v.length,k&&_!=="start"){let y=k.parent||{raws:{}};(!(k.type==="decl"||k.type==="atrule"&&!k.nodes)||k!==y.last||y.raws.semicolon)&&(k.source&&k.source.end?(w.source=this.sourcePath(k),w.original.line=k.source.end.line,w.original.column=k.source.end.column-1,w.generated.line=l,w.generated.column=p-2,this.map.addMapping(w)):(w.source=x,w.original.line=1,w.original.column=0,w.generated.line=l,w.generated.column=p-1,this.map.addMapping(w)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(p=>p.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let p=this.memoizedPaths.get(l);if(p)return p;let x=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(x=e(i(x,this.mapOpts.annotation)));let w=a(x,l);return this.memoizedPaths.set(l,w),w}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let p=l.source.input.map;this.previousMaps.includes(p)||this.previousMaps.push(p)}});else{let l=new c(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(p=>{if(p.source){let x=p.source.input.from;if(x&&!l[x]){l[x]=!0;let w=this.usesFileUrls?this.toFileUrl(x):this.toUrl(this.path(x));this.map.setSourceContent(w,p.source.input.css)}}});else if(this.css){let p=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(p,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let p=this.memoizedFileURLs.get(l);if(p)return p;if(u){let x=u(l).toString();return this.memoizedFileURLs.set(l,x),x}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let p=this.memoizedURLs.get(l);if(p)return p;s==="\\"&&(l=l.replace(/\\/g,"/"));let x=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,x),x}}return gi=o,gi}var bi,Zl;function Xh(){if(Zl)return bi;Zl=1;const e=39,a=34,i=92,s=47,r=10,n=32,u=12,c=9,d=13,f=91,o=93,h=40,l=41,p=123,x=125,w=59,b=42,g=58,v=64,k=/[\t\n\f\r "#'()/;[\\\]{}]/g,_=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,m=/[\da-f]/i;return bi=function(j,A={}){let D=j.css.valueOf(),C=A.ignoreErrors,O,$,H,F,q,M,Y,X,ae,I,ie=D.length,R=0,V=[],J=[];function fe(){return R}function Q(Z){throw j.error("Unclosed "+Z,R)}function ne(){return J.length===0&&R>=ie}function xe(Z){if(J.length)return J.pop();if(R>=ie)return;let te=Z?Z.ignoreUnclosed:!1;switch(O=D.charCodeAt(R),O){case r:case n:case c:case d:case u:{F=R;do F+=1,O=D.charCodeAt(F);while(O===n||O===r||O===c||O===d||O===u);M=["space",D.slice(R,F)],R=F-1;break}case f:case o:case p:case x:case g:case w:case l:{let ee=String.fromCharCode(O);M=[ee,ee,R];break}case h:{if(I=V.length?V.pop()[1]:"",ae=D.charCodeAt(R+1),I==="url"&&ae!==e&&ae!==a&&ae!==n&&ae!==r&&ae!==c&&ae!==u&&ae!==d){F=R;do{if(Y=!1,F=D.indexOf(")",F+1),F===-1)if(C||te){F=R;break}else Q("bracket");for(X=F;D.charCodeAt(X-1)===i;)X-=1,Y=!Y}while(Y);M=["brackets",D.slice(R,F+1),R,F],R=F}else F=D.indexOf(")",R+1),$=D.slice(R,F+1),F===-1||y.test($)?M=["(","(",R]:(M=["brackets",$,R,F],R=F);break}case e:case a:{q=O===e?"'":'"',F=R;do{if(Y=!1,F=D.indexOf(q,F+1),F===-1)if(C||te){F=R+1;break}else Q("string");for(X=F;D.charCodeAt(X-1)===i;)X-=1,Y=!Y}while(Y);M=["string",D.slice(R,F+1),R,F],R=F;break}case v:{k.lastIndex=R+1,k.test(D),k.lastIndex===0?F=D.length-1:F=k.lastIndex-2,M=["at-word",D.slice(R,F+1),R,F],R=F;break}case i:{for(F=R,H=!0;D.charCodeAt(F+1)===i;)F+=1,H=!H;if(O=D.charCodeAt(F+1),H&&O!==s&&O!==n&&O!==r&&O!==c&&O!==d&&O!==u&&(F+=1,m.test(D.charAt(F)))){for(;m.test(D.charAt(F+1));)F+=1;D.charCodeAt(F+1)===n&&(F+=1)}M=["word",D.slice(R,F+1),R,F],R=F;break}default:{O===s&&D.charCodeAt(R+1)===b?(F=D.indexOf("*/",R+2)+1,F===0&&(C||te?F=D.length:Q("comment")),M=["comment",D.slice(R,F+1),R,F],R=F):(_.lastIndex=R+1,_.test(D),_.lastIndex===0?F=D.length-1:F=_.lastIndex-2,M=["word",D.slice(R,F+1),R,F],V.push(M),R=F);break}}return R++,M}function Ce(Z){J.push(Z)}return{back:Ce,endOfFile:ne,nextToken:xe,position:fe}},bi}var xi,Xl;function Kh(){if(Xl)return xi;Xl=1;let e=Zi(),a=xs(),i=ys(),s=sn(),r=Ki(),n=Xh();const u={empty:!0,space:!0};function c(f){for(let o=f.length-1;o>=0;o--){let h=f[o],l=h[3]||h[2];if(l)return l}}class d{constructor(o){this.input=o,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let h=new e;h.name=o[1].slice(1),h.name===""&&this.unnamedAtrule(h,o),this.init(h,o[2]);let l,p,x,w=!1,b=!1,g=[],v=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),l=o[0],l==="("||l==="["?v.push(l==="("?")":"]"):l==="{"&&v.length>0?v.push("}"):l===v[v.length-1]&&v.pop(),v.length===0)if(l===";"){h.source.end=this.getPosition(o[2]),h.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){b=!0;break}else if(l==="}"){if(g.length>0){for(x=g.length-1,p=g[x];p&&p[0]==="space";)p=g[--x];p&&(h.source.end=this.getPosition(p[3]||p[2]),h.source.end.offset++)}this.end(o);break}else g.push(o);else g.push(o);if(this.tokenizer.endOfFile()){w=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(g),g.length?(h.raws.afterName=this.spacesAndCommentsFromStart(g),this.raw(h,"params",g),w&&(o=g[g.length-1],h.source.end=this.getPosition(o[3]||o[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),b&&(h.nodes=[],this.current=h)}checkMissedSemicolon(o){let h=this.colon(o);if(h===!1)return;let l=0,p;for(let x=h-1;x>=0&&(p=o[x],!(p[0]!=="space"&&(l+=1,l===2)));x--);throw this.input.error("Missed semicolon",p[0]==="word"?p[3]+1:p[2])}colon(o){let h=0,l,p,x;for(let[w,b]of o.entries()){if(p=b,x=p[0],x==="("&&(h+=1),x===")"&&(h-=1),h===0&&x===":")if(!l)this.doubleColon(p);else{if(l[0]==="word"&&l[1]==="progid")continue;return w}l=p}return!1}comment(o){let h=new a;this.init(h,o[2]),h.source.end=this.getPosition(o[3]||o[2]),h.source.end.offset++;let l=o[1].slice(2,-2);if(/^\s*$/.test(l))h.text="",h.raws.left=l,h.raws.right="";else{let p=l.match(/^(\s*)([^]*\S)(\s*)$/);h.text=p[2],h.raws.left=p[1],h.raws.right=p[3]}}createTokenizer(){this.tokenizer=n(this.input)}decl(o,h){let l=new i;this.init(l,o[0][2]);let p=o[o.length-1];for(p[0]===";"&&(this.semicolon=!0,o.pop()),l.source.end=this.getPosition(p[3]||p[2]||c(o)),l.source.end.offset++;o[0][0]!=="word";)o.length===1&&this.unknownWord(o),l.raws.before+=o.shift()[1];for(l.source.start=this.getPosition(o[0][2]),l.prop="";o.length;){let v=o[0][0];if(v===":"||v==="space"||v==="comment")break;l.prop+=o.shift()[1]}l.raws.between="";let x;for(;o.length;)if(x=o.shift(),x[0]===":"){l.raws.between+=x[1];break}else x[0]==="word"&&/\w/.test(x[1])&&this.unknownWord([x]),l.raws.between+=x[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let w=[],b;for(;o.length&&(b=o[0][0],!(b!=="space"&&b!=="comment"));)w.push(o.shift());this.precheckMissedSemicolon(o);for(let v=o.length-1;v>=0;v--){if(x=o[v],x[1].toLowerCase()==="!important"){l.important=!0;let k=this.stringFrom(o,v);k=this.spacesFromEnd(o)+k,k!==" !important"&&(l.raws.important=k);break}else if(x[1].toLowerCase()==="important"){let k=o.slice(0),_="";for(let y=v;y>0;y--){let m=k[y][0];if(_.trim().startsWith("!")&&m!=="space")break;_=k.pop()[1]+_}_.trim().startsWith("!")&&(l.important=!0,l.raws.important=_,o=k)}if(x[0]!=="space"&&x[0]!=="comment")break}o.some(v=>v[0]!=="space"&&v[0]!=="comment")&&(l.raws.between+=w.map(v=>v[1]).join(""),w=[]),this.raw(l,"value",w.concat(o),h),l.value.includes(":")&&!h&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let h=new r;this.init(h,o[2]),h.selector="",h.raws.between="",this.current=h}end(o){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(o){if(this.spaces+=o[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="",h.source.end=this.getPosition(o[2]),h.source.end.offset+=h.raws.ownSemicolon.length)}}getPosition(o){let h=this.input.fromOffset(o);return{column:h.col,line:h.line,offset:o}}init(o,h){this.current.push(o),o.source={input:this.input,start:this.getPosition(h)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let h=!1,l=null,p=!1,x=null,w=[],b=o[1].startsWith("--"),g=[],v=o;for(;v;){if(l=v[0],g.push(v),l==="("||l==="[")x||(x=v),w.push(l==="("?")":"]");else if(b&&p&&l==="{")x||(x=v),w.push("}");else if(w.length===0)if(l===";")if(p){this.decl(g,b);return}else break;else if(l==="{"){this.rule(g);return}else if(l==="}"){this.tokenizer.back(g.pop()),h=!0;break}else l===":"&&(p=!0);else l===w[w.length-1]&&(w.pop(),w.length===0&&(x=null));v=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),w.length>0&&this.unclosedBracket(x),h&&p){if(!b)for(;g.length&&(v=g[g.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(g.pop());this.decl(g,b)}else this.unknownWord(g)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,h,l,p){let x,w,b=l.length,g="",v=!0,k,_;for(let y=0;y<b;y+=1)x=l[y],w=x[0],w==="space"&&y===b-1&&!p?v=!1:w==="comment"?(_=l[y-1]?l[y-1][0]:"empty",k=l[y+1]?l[y+1][0]:"empty",!u[_]&&!u[k]?g.slice(-1)===","?v=!1:g+=x[1]:v=!1):g+=x[1];if(!v){let y=l.reduce((m,N)=>m+N[1],"");o.raws[h]={raw:y,value:g}}o[h]=g}rule(o){o.pop();let h=new r;this.init(h,o[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(h,"selector",o),this.current=h}spacesAndCommentsFromEnd(o){let h,l="";for(;o.length&&(h=o[o.length-1][0],!(h!=="space"&&h!=="comment"));)l=o.pop()[1]+l;return l}spacesAndCommentsFromStart(o){let h,l="";for(;o.length&&(h=o[0][0],!(h!=="space"&&h!=="comment"));)l+=o.shift()[1];return l}spacesFromEnd(o){let h,l="";for(;o.length&&(h=o[o.length-1][0],h==="space");)l=o.pop()[1]+l;return l}stringFrom(o,h){let l="";for(let p=h;p<o.length;p++)l+=o[p][1];return o.splice(h,o.length-h),l}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return xi=d,xi}var yi,Kl;function Qi(){if(Kl)return yi;Kl=1;let e=Wr(),a=vs(),i=Kh();function s(r,n){let u=new a(r,n),c=new i(u);try{c.parse()}catch(d){throw process.env.NODE_ENV!=="production"&&d.name==="CssSyntaxError"&&n&&n.from&&(/\.scss$/i.test(n.from)?d.message+=`
1080
1080
  You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(n.from)?d.message+=`
1081
1081
  You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(n.from)&&(d.message+=`
1082
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),d}return c.root}return yi=s,s.default=s,e.registerParse(s),yi}var vi,Ql;function fd(){if(Ql)return vi;Ql=1;class e{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){let r=s.node.rangeBy(s);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in s)this[r]=s[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return vi=e,e.default=e,vi}var wi,ec;function eo(){if(ec)return wi;ec=1;let e=fd();class a{get content(){return this.css}constructor(s,r,n){this.processor=s,this.messages=[],this.root=r,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(s,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(s,r);return this.messages.push(n),n}warnings(){return this.messages.filter(s=>s.type==="warning")}}return wi=a,a.default=a,wi}var _i,tc;function hd(){if(tc)return _i;tc=1;let e={};return _i=function(i){e[i]||(e[i]=!0,typeof console<"u"&&console.warn&&console.warn(i))},_i}var ki,rc;function pd(){if(rc)return ki;rc=1;let e=Wr(),a=Xi(),i=dd(),s=Qi(),r=eo(),n=sn(),u=gs(),{isClean:c,my:d}=Yi(),f=hd();const o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},l={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function x(k){return typeof k=="object"&&typeof k.then=="function"}function w(k){let y=!1,m=o[k.type];return k.type==="decl"?y=k.prop.toLowerCase():k.type==="atrule"&&(y=k.name.toLowerCase()),y&&k.append?[m,m+"-"+y,p,m+"Exit",m+"Exit-"+y]:y?[m,m+"-"+y,m+"Exit",m+"Exit-"+y]:k.append?[m,p,m+"Exit"]:[m,m+"Exit"]}function b(k){let y;return k.type==="document"?y=["Document",p,"DocumentExit"]:k.type==="root"?y=["Root",p,"RootExit"]:y=w(k),{eventIndex:0,events:y,iterator:0,node:k,visitorIndex:0,visitors:[]}}function g(k){return k[c]=!1,k.nodes&&k.nodes.forEach(y=>g(y)),k}let v={};class _{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(y,m,N){this.stringified=!1,this.processed=!1;let j;if(typeof m=="object"&&m!==null&&(m.type==="root"||m.type==="document"))j=g(m);else if(m instanceof _||m instanceof r)j=g(m.root),m.map&&(typeof N.map>"u"&&(N.map={}),N.map.inline||(N.map.inline=!1),N.map.prev=m.map);else{let A=s;N.syntax&&(A=N.syntax.parse),N.parser&&(A=N.parser),A.parse&&(A=A.parse);try{j=A(m,N)}catch(D){this.processed=!0,this.error=D}j&&!j[d]&&e.rebuild(j)}this.result=new r(y,j,N),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?{...A,...A.prepare(this.result)}:A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,m){let N=this.result.lastPlugin;try{if(m&&m.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin)y.plugin=N.postcssPlugin,y.setMessage();else if(N.postcssVersion&&process.env.NODE_ENV!=="production"){let j=N.postcssPlugin,A=N.postcssVersion,D=this.result.processor.version,C=A.split("."),T=D.split(".");(C[0]!==T[0]||parseInt(C[1])>parseInt(T[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+D+", but "+j+" uses "+A+". Perhaps this is the source of the error below.")}}catch(j){console&&console.error&&console.error(j)}return y}prepareVisitors(){this.listeners={};let y=(m,N,j)=>{this.listeners[N]||(this.listeners[N]=[]),this.listeners[N].push([m,j])};for(let m of this.plugins)if(typeof m=="object")for(let N in m){if(!h[N]&&/^[A-Z]/.test(N))throw new Error(`Unknown event ${N} in ${m.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[N])if(typeof m[N]=="object")for(let j in m[N])j==="*"?y(m,N,m[N][j]):y(m,N+"-"+j.toLowerCase(),m[N][j]);else typeof m[N]=="function"&&y(m,N,m[N])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let m=this.plugins[y],N=this.runOnRoot(m);if(x(N))try{await N}catch(j){throw this.handleError(j)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[c];){y[c]=!0;let m=[b(y)];for(;m.length>0;){let N=this.visitTick(m);if(x(N))try{await N}catch(j){let A=m[m.length-1].node;throw this.handleError(j,A)}}}if(this.listeners.OnceExit)for(let[m,N]of this.listeners.OnceExit){this.result.lastPlugin=m;try{if(y.type==="document"){let j=y.nodes.map(A=>N(A,this.helpers));await Promise.all(j)}else await N(y,this.helpers)}catch(j){throw this.handleError(j)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let m=this.result.root.nodes.map(N=>y.Once(N,this.helpers));return x(m[0])?Promise.all(m):m}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(m){throw this.handleError(m)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,m=u;y.syntax&&(m=y.syntax.stringify),y.stringifier&&(m=y.stringifier),m.stringify&&(m=m.stringify);let j=new i(m,this.result.root,this.result.opts).generate();return this.result.css=j[0],this.result.map=j[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let m=this.runOnRoot(y);if(x(m))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[c];)y[c]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let m of y.nodes)this.visitSync(this.listeners.OnceExit,m);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,m){return process.env.NODE_ENV!=="production"&&("from"in this.opts||f("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(y,m)}toString(){return this.css}visitSync(y,m){for(let[N,j]of y){this.result.lastPlugin=N;let A;try{A=j(m,this.helpers)}catch(D){throw this.handleError(D,m.proxyOf)}if(m.type!=="root"&&m.type!=="document"&&!m.parent)return!0;if(x(A))throw this.getAsyncError()}}visitTick(y){let m=y[y.length-1],{node:N,visitors:j}=m;if(N.type!=="root"&&N.type!=="document"&&!N.parent){y.pop();return}if(j.length>0&&m.visitorIndex<j.length){let[D,C]=j[m.visitorIndex];m.visitorIndex+=1,m.visitorIndex===j.length&&(m.visitors=[],m.visitorIndex=0),this.result.lastPlugin=D;try{return C(N.toProxy(),this.helpers)}catch(T){throw this.handleError(T,N)}}if(m.iterator!==0){let D=m.iterator,C;for(;C=N.nodes[N.indexes[D]];)if(N.indexes[D]+=1,!C[c]){C[c]=!0,y.push(b(C));return}m.iterator=0,delete N.indexes[D]}let A=m.events;for(;m.eventIndex<A.length;){let D=A[m.eventIndex];if(m.eventIndex+=1,D===p){N.nodes&&N.nodes.length&&(N[c]=!0,m.iterator=N.getIterator());return}else if(this.listeners[D]){m.visitors=this.listeners[D];return}}y.pop()}walkSync(y){y[c]=!0;let m=w(y);for(let N of m)if(N===p)y.nodes&&y.each(j=>{j[c]||this.walkSync(j)});else{let j=this.listeners[N];if(j&&this.visitSync(j,y.toProxy()))return}}warnings(){return this.sync().warnings()}}return _.registerPostcss=k=>{v=k},ki=_,_.default=_,n.registerLazyResult(_),a.registerLazyResult(_),ki}var Ni,ac;function Qh(){if(ac)return Ni;ac=1;let e=dd(),a=Qi();const i=eo();let s=gs(),r=hd();class n{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let c,d=a;try{c=d(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=c,c}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(c,d,f){d=d.toString(),this.stringified=!1,this._processor=c,this._css=d,this._opts=f,this._map=void 0;let o,h=s;this.result=new i(this._processor,o,this._opts),this.result.css=d;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let p=new e(h,o,this._opts,d);if(p.isMap()){let[x,w]=p.generate();x&&(this.result.css=x),w&&(this.result.map=w)}else p.clearAnnotation(),this.result.css=p.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(c){return this.async().catch(c)}finally(c){return this.async().then(c,c)}sync(){if(this.error)throw this.error;return this.result}then(c,d){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(c,d)}toString(){return this._css}warnings(){return[]}}return Ni=n,n.default=n,Ni}var ji,nc;function ep(){if(nc)return ji;nc=1;let e=Xi(),a=pd(),i=Qh(),s=sn();class r{constructor(u=[]){this.version="8.5.6",this.plugins=this.normalize(u)}normalize(u){let c=[];for(let d of u)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))c=c.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)c.push(d);else if(typeof d=="function")c.push(d);else if(typeof d=="object"&&(d.parse||d.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(d+" is not a PostCSS plugin");return c}process(u,c={}){return!this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new i(this,u,c):new a(this,u,c)}use(u){return this.plugins=this.plugins.concat(this.normalize([u])),this}}return ji=r,r.default=r,s.registerProcessor(r),e.registerProcessor(r),ji}var Ei,sc;function tp(){if(sc)return Ei;sc=1;let e=Zi(),a=xs(),i=Wr(),s=Ji(),r=ys(),n=Xi(),u=Zh(),c=vs(),d=pd(),f=cd(),o=bs(),h=Qi(),l=ep(),p=eo(),x=sn(),w=Ki(),b=gs(),g=fd();function v(..._){return _.length===1&&Array.isArray(_[0])&&(_=_[0]),new l(_)}return v.plugin=function(k,y){let m=!1;function N(...A){console&&console.warn&&!m&&(m=!0,console.warn(k+`: postcss.plugin was deprecated. Migration guide:
1083
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(k+`: 里面 postcss.plugin 被弃用. 迁移指南:
1084
- https://www.w3ctech.com/topic/2226`));let D=y(...A);return D.postcssPlugin=k,D.postcssVersion=new l().version,D}let j;return Object.defineProperty(N,"postcss",{get(){return j||(j=N()),j}}),N.process=function(A,D,C){return v([N(C)]).process(A,D)},N},v.stringify=b,v.parse=h,v.fromJSON=u,v.list=f,v.comment=_=>new a(_),v.atRule=_=>new e(_),v.decl=_=>new r(_),v.rule=_=>new w(_),v.root=_=>new x(_),v.document=_=>new n(_),v.CssSyntaxError=s,v.Declaration=r,v.Container=i,v.Processor=l,v.Document=n,v.Comment=a,v.Warning=g,v.AtRule=e,v.Result=p,v.Input=c,v.Rule=w,v.Root=x,v.Node=o,d.registerPostcss(v),Ei=v,v.default=v,Ei}var Ai,ic;function rp(){if(ic)return Ai;ic=1;const e=Uh(),a=zh(),{isPlainObject:i}=Hh(),s=Rc(),r=Gh(),{parse:n}=tp(),u=["img","audio","video","picture","svg","object","map","iframe","embed"],c=["script","style"];function d(b,g){b&&Object.keys(b).forEach(function(v){g(b[v],v)})}function f(b,g){return{}.hasOwnProperty.call(b,g)}function o(b,g){const v=[];return d(b,function(_){g(_)&&v.push(_)}),v}function h(b){for(const g in b)if(f(b,g))return!1;return!0}function l(b){return b.map(function(g){if(!g.url)throw new Error("URL missing");return g.url+(g.w?` ${g.w}w`:"")+(g.h?` ${g.h}h`:"")+(g.d?` ${g.d}x`:"")}).join(", ")}Ai=x;const p=/^[^\0\t\n\f\r /<=>]+$/;function x(b,g,v){if(b==null)return"";typeof b=="number"&&(b=b.toString());let _="",k="";function y(Z,te){const ee=this;this.tag=Z,this.attribs=te||{},this.tagPosition=_.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(q.length){const le=q[q.length-1];le.text+=ee.text}},this.updateParentNodeMediaChildren=function(){q.length&&u.includes(this.tag)&&q[q.length-1].mediaChildren.push(this.tag)}}g=Object.assign({},x.defaults,g),g.parser=Object.assign({},w,g.parser);const m=function(Z){return g.allowedTags===!1||(g.allowedTags||[]).indexOf(Z)>-1};c.forEach(function(Z){m(Z)&&!g.allowVulnerableTags&&console.warn(`
1082
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),d}return c.root}return yi=s,s.default=s,e.registerParse(s),yi}var vi,Ql;function fd(){if(Ql)return vi;Ql=1;class e{constructor(i,s={}){if(this.type="warning",this.text=i,s.node&&s.node.source){let r=s.node.rangeBy(s);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in s)this[r]=s[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return vi=e,e.default=e,vi}var wi,ec;function eo(){if(ec)return wi;ec=1;let e=fd();class a{get content(){return this.css}constructor(s,r,n){this.processor=s,this.messages=[],this.root=r,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(s,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(s,r);return this.messages.push(n),n}warnings(){return this.messages.filter(s=>s.type==="warning")}}return wi=a,a.default=a,wi}var _i,tc;function hd(){if(tc)return _i;tc=1;let e={};return _i=function(i){e[i]||(e[i]=!0,typeof console<"u"&&console.warn&&console.warn(i))},_i}var ki,rc;function pd(){if(rc)return ki;rc=1;let e=Wr(),a=Xi(),i=dd(),s=Qi(),r=eo(),n=sn(),u=gs(),{isClean:c,my:d}=Yi(),f=hd();const o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},l={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function x(_){return typeof _=="object"&&typeof _.then=="function"}function w(_){let y=!1,m=o[_.type];return _.type==="decl"?y=_.prop.toLowerCase():_.type==="atrule"&&(y=_.name.toLowerCase()),y&&_.append?[m,m+"-"+y,p,m+"Exit",m+"Exit-"+y]:y?[m,m+"-"+y,m+"Exit",m+"Exit-"+y]:_.append?[m,p,m+"Exit"]:[m,m+"Exit"]}function b(_){let y;return _.type==="document"?y=["Document",p,"DocumentExit"]:_.type==="root"?y=["Root",p,"RootExit"]:y=w(_),{eventIndex:0,events:y,iterator:0,node:_,visitorIndex:0,visitors:[]}}function g(_){return _[c]=!1,_.nodes&&_.nodes.forEach(y=>g(y)),_}let v={};class k{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(y,m,N){this.stringified=!1,this.processed=!1;let j;if(typeof m=="object"&&m!==null&&(m.type==="root"||m.type==="document"))j=g(m);else if(m instanceof k||m instanceof r)j=g(m.root),m.map&&(typeof N.map>"u"&&(N.map={}),N.map.inline||(N.map.inline=!1),N.map.prev=m.map);else{let A=s;N.syntax&&(A=N.syntax.parse),N.parser&&(A=N.parser),A.parse&&(A=A.parse);try{j=A(m,N)}catch(D){this.processed=!0,this.error=D}j&&!j[d]&&e.rebuild(j)}this.result=new r(y,j,N),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?{...A,...A.prepare(this.result)}:A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,m){let N=this.result.lastPlugin;try{if(m&&m.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin)y.plugin=N.postcssPlugin,y.setMessage();else if(N.postcssVersion&&process.env.NODE_ENV!=="production"){let j=N.postcssPlugin,A=N.postcssVersion,D=this.result.processor.version,C=A.split("."),O=D.split(".");(C[0]!==O[0]||parseInt(C[1])>parseInt(O[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+D+", but "+j+" uses "+A+". Perhaps this is the source of the error below.")}}catch(j){console&&console.error&&console.error(j)}return y}prepareVisitors(){this.listeners={};let y=(m,N,j)=>{this.listeners[N]||(this.listeners[N]=[]),this.listeners[N].push([m,j])};for(let m of this.plugins)if(typeof m=="object")for(let N in m){if(!h[N]&&/^[A-Z]/.test(N))throw new Error(`Unknown event ${N} in ${m.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[N])if(typeof m[N]=="object")for(let j in m[N])j==="*"?y(m,N,m[N][j]):y(m,N+"-"+j.toLowerCase(),m[N][j]);else typeof m[N]=="function"&&y(m,N,m[N])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let m=this.plugins[y],N=this.runOnRoot(m);if(x(N))try{await N}catch(j){throw this.handleError(j)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[c];){y[c]=!0;let m=[b(y)];for(;m.length>0;){let N=this.visitTick(m);if(x(N))try{await N}catch(j){let A=m[m.length-1].node;throw this.handleError(j,A)}}}if(this.listeners.OnceExit)for(let[m,N]of this.listeners.OnceExit){this.result.lastPlugin=m;try{if(y.type==="document"){let j=y.nodes.map(A=>N(A,this.helpers));await Promise.all(j)}else await N(y,this.helpers)}catch(j){throw this.handleError(j)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let m=this.result.root.nodes.map(N=>y.Once(N,this.helpers));return x(m[0])?Promise.all(m):m}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(m){throw this.handleError(m)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,m=u;y.syntax&&(m=y.syntax.stringify),y.stringifier&&(m=y.stringifier),m.stringify&&(m=m.stringify);let j=new i(m,this.result.root,this.result.opts).generate();return this.result.css=j[0],this.result.map=j[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let m=this.runOnRoot(y);if(x(m))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[c];)y[c]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let m of y.nodes)this.visitSync(this.listeners.OnceExit,m);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,m){return process.env.NODE_ENV!=="production"&&("from"in this.opts||f("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(y,m)}toString(){return this.css}visitSync(y,m){for(let[N,j]of y){this.result.lastPlugin=N;let A;try{A=j(m,this.helpers)}catch(D){throw this.handleError(D,m.proxyOf)}if(m.type!=="root"&&m.type!=="document"&&!m.parent)return!0;if(x(A))throw this.getAsyncError()}}visitTick(y){let m=y[y.length-1],{node:N,visitors:j}=m;if(N.type!=="root"&&N.type!=="document"&&!N.parent){y.pop();return}if(j.length>0&&m.visitorIndex<j.length){let[D,C]=j[m.visitorIndex];m.visitorIndex+=1,m.visitorIndex===j.length&&(m.visitors=[],m.visitorIndex=0),this.result.lastPlugin=D;try{return C(N.toProxy(),this.helpers)}catch(O){throw this.handleError(O,N)}}if(m.iterator!==0){let D=m.iterator,C;for(;C=N.nodes[N.indexes[D]];)if(N.indexes[D]+=1,!C[c]){C[c]=!0,y.push(b(C));return}m.iterator=0,delete N.indexes[D]}let A=m.events;for(;m.eventIndex<A.length;){let D=A[m.eventIndex];if(m.eventIndex+=1,D===p){N.nodes&&N.nodes.length&&(N[c]=!0,m.iterator=N.getIterator());return}else if(this.listeners[D]){m.visitors=this.listeners[D];return}}y.pop()}walkSync(y){y[c]=!0;let m=w(y);for(let N of m)if(N===p)y.nodes&&y.each(j=>{j[c]||this.walkSync(j)});else{let j=this.listeners[N];if(j&&this.visitSync(j,y.toProxy()))return}}warnings(){return this.sync().warnings()}}return k.registerPostcss=_=>{v=_},ki=k,k.default=k,n.registerLazyResult(k),a.registerLazyResult(k),ki}var Ni,ac;function Qh(){if(ac)return Ni;ac=1;let e=dd(),a=Qi();const i=eo();let s=gs(),r=hd();class n{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let c,d=a;try{c=d(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=c,c}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(c,d,f){d=d.toString(),this.stringified=!1,this._processor=c,this._css=d,this._opts=f,this._map=void 0;let o,h=s;this.result=new i(this._processor,o,this._opts),this.result.css=d;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let p=new e(h,o,this._opts,d);if(p.isMap()){let[x,w]=p.generate();x&&(this.result.css=x),w&&(this.result.map=w)}else p.clearAnnotation(),this.result.css=p.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(c){return this.async().catch(c)}finally(c){return this.async().then(c,c)}sync(){if(this.error)throw this.error;return this.result}then(c,d){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(c,d)}toString(){return this._css}warnings(){return[]}}return Ni=n,n.default=n,Ni}var ji,nc;function ep(){if(nc)return ji;nc=1;let e=Xi(),a=pd(),i=Qh(),s=sn();class r{constructor(u=[]){this.version="8.5.6",this.plugins=this.normalize(u)}normalize(u){let c=[];for(let d of u)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))c=c.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)c.push(d);else if(typeof d=="function")c.push(d);else if(typeof d=="object"&&(d.parse||d.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(d+" is not a PostCSS plugin");return c}process(u,c={}){return!this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new i(this,u,c):new a(this,u,c)}use(u){return this.plugins=this.plugins.concat(this.normalize([u])),this}}return ji=r,r.default=r,s.registerProcessor(r),e.registerProcessor(r),ji}var Ei,sc;function tp(){if(sc)return Ei;sc=1;let e=Zi(),a=xs(),i=Wr(),s=Ji(),r=ys(),n=Xi(),u=Zh(),c=vs(),d=pd(),f=cd(),o=bs(),h=Qi(),l=ep(),p=eo(),x=sn(),w=Ki(),b=gs(),g=fd();function v(...k){return k.length===1&&Array.isArray(k[0])&&(k=k[0]),new l(k)}return v.plugin=function(_,y){let m=!1;function N(...A){console&&console.warn&&!m&&(m=!0,console.warn(_+`: postcss.plugin was deprecated. Migration guide:
1083
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(_+`: 里面 postcss.plugin 被弃用. 迁移指南:
1084
+ https://www.w3ctech.com/topic/2226`));let D=y(...A);return D.postcssPlugin=_,D.postcssVersion=new l().version,D}let j;return Object.defineProperty(N,"postcss",{get(){return j||(j=N()),j}}),N.process=function(A,D,C){return v([N(C)]).process(A,D)},N},v.stringify=b,v.parse=h,v.fromJSON=u,v.list=f,v.comment=k=>new a(k),v.atRule=k=>new e(k),v.decl=k=>new r(k),v.rule=k=>new w(k),v.root=k=>new x(k),v.document=k=>new n(k),v.CssSyntaxError=s,v.Declaration=r,v.Container=i,v.Processor=l,v.Document=n,v.Comment=a,v.Warning=g,v.AtRule=e,v.Result=p,v.Input=c,v.Rule=w,v.Root=x,v.Node=o,d.registerPostcss(v),Ei=v,v.default=v,Ei}var Ai,ic;function rp(){if(ic)return Ai;ic=1;const e=Uh(),a=zh(),{isPlainObject:i}=Hh(),s=Rc(),r=Gh(),{parse:n}=tp(),u=["img","audio","video","picture","svg","object","map","iframe","embed"],c=["script","style"];function d(b,g){b&&Object.keys(b).forEach(function(v){g(b[v],v)})}function f(b,g){return{}.hasOwnProperty.call(b,g)}function o(b,g){const v=[];return d(b,function(k){g(k)&&v.push(k)}),v}function h(b){for(const g in b)if(f(b,g))return!1;return!0}function l(b){return b.map(function(g){if(!g.url)throw new Error("URL missing");return g.url+(g.w?` ${g.w}w`:"")+(g.h?` ${g.h}h`:"")+(g.d?` ${g.d}x`:"")}).join(", ")}Ai=x;const p=/^[^\0\t\n\f\r /<=>]+$/;function x(b,g,v){if(b==null)return"";typeof b=="number"&&(b=b.toString());let k="",_="";function y(Z,te){const ee=this;this.tag=Z,this.attribs=te||{},this.tagPosition=k.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(q.length){const le=q[q.length-1];le.text+=ee.text}},this.updateParentNodeMediaChildren=function(){q.length&&u.includes(this.tag)&&q[q.length-1].mediaChildren.push(this.tag)}}g=Object.assign({},x.defaults,g),g.parser=Object.assign({},w,g.parser);const m=function(Z){return g.allowedTags===!1||(g.allowedTags||[]).indexOf(Z)>-1};c.forEach(function(Z){m(Z)&&!g.allowVulnerableTags&&console.warn(`
1085
1085
 
1086
1086
  ⚠️ Your \`allowedTags\` option includes, \`${Z}\`, which is inherently
1087
1087
  vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
1088
1088
  Or, to disable this warning, add the \`allowVulnerableTags\` option
1089
1089
  and ensure you are accounting for this risk.
1090
1090
 
1091
- `)});const N=g.nonTextTags||["script","style","textarea","option"];let j,A;g.allowedAttributes&&(j={},A={},d(g.allowedAttributes,function(Z,te){j[te]=[];const ee=[];Z.forEach(function(le){typeof le=="string"&&le.indexOf("*")>=0?ee.push(a(le).replace(/\\\*/g,".*")):j[te].push(le)}),ee.length&&(A[te]=new RegExp("^("+ee.join("|")+")$"))}));const D={},C={},T={};d(g.allowedClasses,function(Z,te){if(j&&(f(j,te)||(j[te]=[]),j[te].push("class")),D[te]=Z,Array.isArray(Z)){const ee=[];D[te]=[],T[te]=[],Z.forEach(function(le){typeof le=="string"&&le.indexOf("*")>=0?ee.push(a(le).replace(/\\\*/g,".*")):le instanceof RegExp?T[te].push(le):D[te].push(le)}),ee.length&&(C[te]=new RegExp("^("+ee.join("|")+")$"))}});const M={};let W;d(g.transformTags,function(Z,te){let ee;typeof Z=="function"?ee=Z:typeof Z=="string"&&(ee=x.simpleTransform(Z)),te==="*"?W=ee:M[te]=ee});let F,q,$,Y,X,ae,I=!1;R();const ie=new e.Parser({onopentag:function(Z,te){if(g.enforceHtmlBoundary&&Z==="html"&&R(),X){ae++;return}const ee=new y(Z,te);q.push(ee);let le=!1;const be=!!ee.text;let me;if(f(M,Z)&&(me=M[Z](Z,te),ee.attribs=te=me.attribs,me.text!==void 0&&(ee.innerText=me.text),Z!==me.tagName&&(ee.name=Z=me.tagName,Y[F]=me.tagName)),W&&(me=W(Z,te),ee.attribs=te=me.attribs,Z!==me.tagName&&(ee.name=Z=me.tagName,Y[F]=me.tagName)),(!m(Z)||g.disallowedTagsMode==="recursiveEscape"&&!h($)||g.nestingLimit!=null&&F>=g.nestingLimit)&&(le=!0,$[F]=!0,(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&N.indexOf(Z)!==-1&&(X=!0,ae=1),$[F]=!0),F++,le){if(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")return;k=_,_=""}_+="<"+Z,Z==="script"&&(g.allowedScriptHostnames||g.allowedScriptDomains)&&(ee.innerText=""),(!j||f(j,Z)||j["*"])&&d(te,function(ke,pe){if(!p.test(pe)){delete ee.attribs[pe];return}if(ke===""&&!g.allowedEmptyAttributes.includes(pe)&&(g.nonBooleanAttributes.includes(pe)||g.nonBooleanAttributes.includes("*"))){delete ee.attribs[pe];return}let Ye=!1;if(!j||f(j,Z)&&j[Z].indexOf(pe)!==-1||j["*"]&&j["*"].indexOf(pe)!==-1||f(A,Z)&&A[Z].test(pe)||A["*"]&&A["*"].test(pe))Ye=!0;else if(j&&j[Z]){for(const we of j[Z])if(i(we)&&we.name&&we.name===pe){Ye=!0;let de="";if(we.multiple===!0){const Ee=ke.split(" ");for(const Oe of Ee)we.values.indexOf(Oe)!==-1&&(de===""?de=Oe:de+=" "+Oe)}else we.values.indexOf(ke)>=0&&(de=ke);ke=de}}if(Ye){if(g.allowedSchemesAppliedToAttributes.indexOf(pe)!==-1&&J(Z,ke)){delete ee.attribs[pe];return}if(Z==="script"&&pe==="src"){let we=!0;try{const de=fe(ke);if(g.allowedScriptHostnames||g.allowedScriptDomains){const Ee=(g.allowedScriptHostnames||[]).find(function(Be){return Be===de.url.hostname}),Oe=(g.allowedScriptDomains||[]).find(function(Be){return de.url.hostname===Be||de.url.hostname.endsWith(`.${Be}`)});we=Ee||Oe}}catch{we=!1}if(!we){delete ee.attribs[pe];return}}if(Z==="iframe"&&pe==="src"){let we=!0;try{const de=fe(ke);if(de.isRelativeUrl)we=f(g,"allowIframeRelativeUrls")?g.allowIframeRelativeUrls:!g.allowedIframeHostnames&&!g.allowedIframeDomains;else if(g.allowedIframeHostnames||g.allowedIframeDomains){const Ee=(g.allowedIframeHostnames||[]).find(function(Be){return Be===de.url.hostname}),Oe=(g.allowedIframeDomains||[]).find(function(Be){return de.url.hostname===Be||de.url.hostname.endsWith(`.${Be}`)});we=Ee||Oe}}catch{we=!1}if(!we){delete ee.attribs[pe];return}}if(pe==="srcset")try{let we=r(ke);if(we.forEach(function(de){J("srcset",de.url)&&(de.evil=!0)}),we=o(we,function(de){return!de.evil}),we.length)ke=l(o(we,function(de){return!de.evil})),ee.attribs[pe]=ke;else{delete ee.attribs[pe];return}}catch{delete ee.attribs[pe];return}if(pe==="class"){const we=D[Z],de=D["*"],Ee=C[Z],Oe=T[Z],Be=C["*"],St=[Ee,Be].concat(Oe).filter(function(Jt){return Jt});if(we&&de?ke=Ce(ke,s(we,de),St):ke=Ce(ke,we||de,St),!ke.length){delete ee.attribs[pe];return}}if(pe==="style"){if(g.parseStyleAttributes)try{const we=n(Z+" {"+ke+"}",{map:!1}),de=Q(we,g.allowedStyles);if(ke=ne(de),ke.length===0){delete ee.attribs[pe];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+Z+" {"+ke+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete ee.attribs[pe];return}else if(g.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}_+=" "+pe,ke&&ke.length?_+='="'+V(ke,!0)+'"':g.allowedEmptyAttributes.includes(pe)&&(_+='=""')}else delete ee.attribs[pe]}),g.selfClosing.indexOf(Z)!==-1?_+=" />":(_+=">",ee.innerText&&!be&&!g.textFilter&&(_+=V(ee.innerText),I=!0)),le&&(_=k+V(_),k="")},ontext:function(Z){if(X)return;const te=q[q.length-1];let ee;if(te&&(ee=te.tag,Z=te.innerText!==void 0?te.innerText:Z),g.disallowedTagsMode==="completelyDiscard"&&!m(ee))Z="";else if((g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&(ee==="script"||ee==="style"))_+=Z;else{const le=V(Z,!1);g.textFilter&&!I?_+=g.textFilter(le,ee):I||(_+=le)}if(q.length){const le=q[q.length-1];le.text+=Z}},onclosetag:function(Z,te){if(X)if(ae--,!ae)X=!1;else return;const ee=q.pop();if(!ee)return;if(ee.tag!==Z){q.push(ee);return}X=g.enforceHtmlBoundary?Z==="html":!1,F--;const le=$[F];if(le){if(delete $[F],g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard"){ee.updateParentNodeText();return}k=_,_=""}if(Y[F]&&(Z=Y[F],delete Y[F]),g.exclusiveFilter&&g.exclusiveFilter(ee)){_=_.substr(0,ee.tagPosition);return}if(ee.updateParentNodeMediaChildren(),ee.updateParentNodeText(),g.selfClosing.indexOf(Z)!==-1||te&&!m(Z)&&["escape","recursiveEscape"].indexOf(g.disallowedTagsMode)>=0){le&&(_=k,k="");return}_+="</"+Z+">",le&&(_=k+V(_),k=""),I=!1}},g.parser);return ie.write(b),ie.end(),_;function R(){_="",F=0,q=[],$={},Y={},X=!1,ae=0}function V(Z,te){return typeof Z!="string"&&(Z=Z+""),g.parser.decodeEntities&&(Z=Z.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),te&&(Z=Z.replace(/"/g,"&quot;"))),Z=Z.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),te&&(Z=Z.replace(/"/g,"&quot;")),Z}function J(Z,te){for(te=te.replace(/[\x00-\x20]+/g,"");;){const be=te.indexOf("<!--");if(be===-1)break;const me=te.indexOf("-->",be+4);if(me===-1)break;te=te.substring(0,be)+te.substring(me+3)}const ee=te.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!ee)return te.match(/^[/\\]{2}/)?!g.allowProtocolRelative:!1;const le=ee[1].toLowerCase();return f(g.allowedSchemesByTag,Z)?g.allowedSchemesByTag[Z].indexOf(le)===-1:!g.allowedSchemes||g.allowedSchemes.indexOf(le)===-1}function fe(Z){if(Z=Z.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),Z.startsWith("relative:"))throw new Error("relative: exploit attempt");let te="relative://relative-site";for(let be=0;be<100;be++)te+=`/${be}`;const ee=new URL(Z,te);return{isRelativeUrl:ee&&ee.hostname==="relative-site"&&ee.protocol==="relative:",url:ee}}function Q(Z,te){if(!te)return Z;const ee=Z.nodes[0];let le;return te[ee.selector]&&te["*"]?le=s(te[ee.selector],te["*"]):le=te[ee.selector]||te["*"],le&&(Z.nodes[0].nodes=ee.nodes.reduce(xe(le),[])),Z}function ne(Z){return Z.nodes[0].nodes.reduce(function(te,ee){return te.push(`${ee.prop}:${ee.value}${ee.important?" !important":""}`),te},[]).join(";")}function xe(Z){return function(te,ee){return f(Z,ee.prop)&&Z[ee.prop].some(function(be){return be.test(ee.value)})&&te.push(ee),te}}function Ce(Z,te,ee){return te?(Z=Z.split(/\s+/),Z.filter(function(le){return te.indexOf(le)!==-1||ee.some(function(be){return be.test(le)})}).join(" ")):Z}}const w={decodeEntities:!0};return x.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},x.simpleTransform=function(b,g,v){return v=v===void 0?!0:v,g=g||{},function(_,k){let y;if(v)for(y in g)k[y]=g[y];else k=g;return{tagName:b,attribs:k}}},Ai}var oc;function ap(){if(oc)return Rr;oc=1;var e=Rr&&Rr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.TagTransformingSanitizer=void 0;const a=e(rn()),i=e(rp()),s=ir(),r=Gi(),n=Qc();let u=class{constructor(d,f){this.sanitizationErrors=[],this.validate(d),r.Localization.validate(f),this.localization=f,this.options=d}sanitize(d){return(0,i.default)(d,this.generateSanitizeConfig())}getErrors(){return this.sanitizationErrors}generateSanitizeConfig(){return{allowedTags:n.StaticConfig.sanitization.allowedTags,allowedAttributes:{iframe:["src","width","height","frameborder","allowfullscreen","webkitallowfullscreen","mozallowfullscreen"],div:["class","title"],td:["style"],img:["src","alt"],a:["href","rel","title","class","target","id"]},allowedSchemes:["http","https","hive"],transformTags:{iframe:(d,f)=>{const o=f.src;for(const l of n.StaticConfig.sanitization.iframeWhitelist)if(l.re.test(o)){const p=typeof l.fn=="function"?l.fn(o):o;if(!p)break;return{tagName:"iframe",attribs:{src:p,width:this.options.iframeWidth+"",height:this.options.iframeHeight+"",frameborder:"0",allowfullscreen:"allowfullscreen",webkitallowfullscreen:"webkitallowfullscreen",mozallowfullscreen:"mozallowfullscreen"}}}return s.Log.log().warn('Blocked, did not match iframe "src" white list urls:',d,f),this.sanitizationErrors.push("Invalid iframe URL: "+o),{tagName:"div",text:`(Unsupported ${o})`,attribs:{}}},img:(d,f)=>{if(this.options.noImage)return{tagName:"div",text:this.localization.noImage,attribs:{}};const{src:o,alt:h}=f;if(!/^(https?:)?\/\//i.test(o))return s.Log.log().warn("Blocked, image tag src does not appear to be a url",d,f),this.sanitizationErrors.push("An image in this post did not save properly."),{tagName:"img",attribs:{src:"brokenimg.jpg"}};const l={};return l.src=o.replace(/^http:\/\//i,"//"),h&&h!==""&&(l.alt=h),{tagName:d,attribs:l}},div:(d,f)=>{const o={},l=["pull-right","pull-left","text-justify","text-rtl","text-center","text-right","videoWrapper","phishy"].find(x=>f.class===x);return l&&(o.class=l),l==="phishy"&&f.title===this.localization.phishingWarning&&(o.title=f.title),{tagName:d,attribs:o}},td:(d,f)=>{const o={};return f.style==="text-align:right"&&(o.style="text-align:right"),{tagName:d,attribs:o}},a:(d,f)=>{const o=Object.assign({},f);let{href:h}=f;return h&&(h=h.trim(),o.href=h),h&&!this.options.isLinkSafeFn(h)&&(o.rel=this.options.addNofollowToLinks?"nofollow noopener":"noopener",o.title=this.localization.phishingWarning,o.target=this.options.addTargetBlankToLinks?"_blank":"_self"),h&&this.options.addExternalCssClassToMatchingLinksFn(h)?o.class=this.options.cssClassForExternalLinks?this.options.cssClassForExternalLinks:"":o.class=this.options.cssClassForInternalLinks?this.options.cssClassForInternalLinks:"",{tagName:d,attribs:o}}}}}validate(d){(0,a.default)(d,"TagsSanitizerOptions",a.default.object),(0,a.default)(d.iframeWidth,"TagsSanitizerOptions.iframeWidth",a.default.number.integer.positive),(0,a.default)(d.iframeHeight,"TagsSanitizerOptions.iframeHeight",a.default.number.integer.positive),(0,a.default)(d.addNofollowToLinks,"TagsSanitizerOptions.addNofollowToLinks",a.default.boolean),(0,a.default)(d.addTargetBlankToLinks,"TagsSanitizerOptions.addTargetBlankToLinks",a.default.optional.boolean),(0,a.default)(d.cssClassForInternalLinks,"TagsSanitizerOptions.cssClassForInternalLinks",a.default.optional.string),(0,a.default)(d.cssClassForExternalLinks,"TagsSanitizerOptions.cssClassForExternalLinks",a.default.optional.string),(0,a.default)(d.noImage,"TagsSanitizerOptions.noImage",a.default.boolean),(0,a.default)(d.isLinkSafeFn,"TagsSanitizerOptions.isLinkSafeFn",a.default.function),(0,a.default)(d.addExternalCssClassToMatchingLinksFn,"TagsSanitizerOptions.addExternalCssClassToMatchingLinksFn",a.default.function)}};return Rr.TagTransformingSanitizer=u,Rr}var uc;function lc(){if(uc)return Sr;uc=1;var e=Sr&&Sr.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.DefaultRenderer=void 0;const a=e(rn()),i=Kf,s=lh(),r=Th(),n=Gi(),u=Oh(),c=ap();let d=class{constructor(o,h=n.Localization.DEFAULT){this.validate(o),this.options=o,n.Localization.validate(h),this.tagTransformingSanitizer=new c.TagTransformingSanitizer({iframeWidth:this.options.assetsWidth,iframeHeight:this.options.assetsHeight,addNofollowToLinks:this.options.addNofollowToLinks,addTargetBlankToLinks:this.options.addTargetBlankToLinks,cssClassForInternalLinks:this.options.cssClassForInternalLinks,cssClassForExternalLinks:this.options.cssClassForExternalLinks,noImage:this.options.doNotShowImages,isLinkSafeFn:this.options.isLinkSafeFn,addExternalCssClassToMatchingLinksFn:this.options.addExternalCssClassToMatchingLinksFn},h),this.domParser=new r.HtmlDOMParser({width:this.options.assetsWidth,height:this.options.assetsHeight,ipfsPrefix:this.options.ipfsPrefix,baseUrl:this.options.baseUrl,imageProxyFn:this.options.imageProxyFn,hashtagUrlFn:this.options.hashtagUrlFn,usertagUrlFn:this.options.usertagUrlFn,hideImages:this.options.doNotShowImages},h)}render(o){return(0,a.default)(o,"input",a.default.string.nonEmpty),this.doRender(o)}doRender(o){return o=u.PreliminarySanitizer.preliminarySanitize(o),o=this.isHtml(o)?o:this.renderMarkdown(o),o=this.wrapRenderedTextWithHtmlIfNeeded(o),o=this.domParser.parse(o).getParsedDocumentAsString(),o=this.sanitize(o),s.SecurityChecker.checkSecurity(o,{allowScriptTag:this.options.allowInsecureScriptTags}),o=this.domParser.embedder.insertAssets(o),o}renderMarkdown(o){return new i.Remarkable({html:!0,breaks:this.options.breaks,typographer:!1,quotes:"“”‘’"}).render(o)}wrapRenderedTextWithHtmlIfNeeded(o){return o.indexOf("<html>")!==0&&(o="<html>"+o+"</html>"),o}isHtml(o){let h=!1;const l=o.match(/^<html>([\S\s]*)<\/html>$/);return l&&l.length===2?(h=!0,o=l[1]):h=/^<p>[\S\s]*<\/p>/.test(o),h}sanitize(o){return this.options.skipSanitization?o:this.tagTransformingSanitizer.sanitize(o)}validate(o){(0,a.default)(o,"RendererOptions",a.default.object),(0,a.default)(o.baseUrl,"RendererOptions.baseUrl",a.default.string.nonEmpty),(0,a.default)(o.breaks,"RendererOptions.breaks",a.default.boolean),(0,a.default)(o.skipSanitization,"RendererOptions.skipSanitization",a.default.boolean),(0,a.default)(o.addNofollowToLinks,"RendererOptions.addNofollowToLinks",a.default.boolean),(0,a.default)(o.addTargetBlankToLinks,"RendererOptions.addTargetBlankToLinks",a.default.optional.boolean),(0,a.default)(o.cssClassForInternalLinks,"RendererOptions.cssClassForInternalLinks",a.default.optional.string),(0,a.default)(o.cssClassForExternalLinks,"RendererOptions.cssClassForExternalLinks",a.default.optional.string),(0,a.default)(o.doNotShowImages,"RendererOptions.doNotShowImages",a.default.boolean),(0,a.default)(o.ipfsPrefix,"RendererOptions.ipfsPrefix",a.default.optional.string),(0,a.default)(o.assetsWidth,"RendererOptions.assetsWidth",a.default.number.integer.positive),(0,a.default)(o.assetsHeight,"RendererOptions.assetsHeight",a.default.number.integer.positive),(0,a.default)(o.imageProxyFn,"RendererOptions.imageProxyFn",a.default.function),(0,a.default)(o.hashtagUrlFn,"RendererOptions.hashtagUrlFn",a.default.function),(0,a.default)(o.usertagUrlFn,"RendererOptions.usertagUrlFn",a.default.function),(0,a.default)(o.isLinkSafeFn,"RendererOptions.isLinkSafeFn",a.default.function),(0,a.default)(o.addExternalCssClassToMatchingLinksFn,"RendererOptions.addExternalCssClassToMatchingLinksFn",a.default.function)}};return Sr.DefaultRenderer=d,Sr}var cc;function np(){return cc||(cc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HiveContentRenderer=e.DefaultRenderer=void 0;const a=lc();var i=lc();Object.defineProperty(e,"DefaultRenderer",{enumerable:!0,get:function(){return i.DefaultRenderer}}),e.HiveContentRenderer={DefaultRenderer:a.DefaultRenderer},e.default=e.HiveContentRenderer})(js)),js}var to=np();function md({author:e,permlink:a,defaultValue:i=100,onUpvote:s,onCancel:r}){const[n,u]=P.useState(i),[c,d]=P.useState(!1),f=[1,...Array.from({length:10},(h,l)=>(l+1)*10)],o=async()=>{if(!(n===0||c)){d(!0);try{await s(n)}finally{d(!1)}}};return t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4",children:t.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-2xl w-full max-w-md p-5 sm:p-6 shadow-xl flex flex-col",children:[t.jsxs("h2",{className:"text-center text-base sm:text-lg font-semibold text-gray-800 dark:text-white mb-6",children:["Vote for @",e]}),t.jsxs("div",{className:"relative w-full flex flex-col items-center mb-8",children:[t.jsxs("div",{className:"absolute -top-8 left-0",style:{left:`${n}%`,transform:"translateX(-50%)"},children:[t.jsxs("div",{className:"bg-blue-600 text-white text-xs sm:text-sm px-2 py-1 rounded-lg shadow",children:[n,"%"]}),t.jsx("div",{className:"mx-auto w-2 h-2 bg-blue-600 rotate-45 -mt-1"})]}),t.jsx("input",{type:"range",min:1,max:100,value:n,onChange:h=>u(Number(h.target.value)),className:"w-full h-2 rounded-lg appearance-none bg-gray-200 dark:bg-gray-700 accent-blue-600 cursor-pointer"}),t.jsx("div",{className:"flex justify-between w-full mt-3 ml-2 text-[10px] sm:text-xs text-gray-500 dark:text-gray-400",children:f.map(h=>t.jsx("button",{type:"button",onClick:()=>u(h),className:`focus:outline-none px-1 rounded transition
1091
+ `)});const N=g.nonTextTags||["script","style","textarea","option"];let j,A;g.allowedAttributes&&(j={},A={},d(g.allowedAttributes,function(Z,te){j[te]=[];const ee=[];Z.forEach(function(le){typeof le=="string"&&le.indexOf("*")>=0?ee.push(a(le).replace(/\\\*/g,".*")):j[te].push(le)}),ee.length&&(A[te]=new RegExp("^("+ee.join("|")+")$"))}));const D={},C={},O={};d(g.allowedClasses,function(Z,te){if(j&&(f(j,te)||(j[te]=[]),j[te].push("class")),D[te]=Z,Array.isArray(Z)){const ee=[];D[te]=[],O[te]=[],Z.forEach(function(le){typeof le=="string"&&le.indexOf("*")>=0?ee.push(a(le).replace(/\\\*/g,".*")):le instanceof RegExp?O[te].push(le):D[te].push(le)}),ee.length&&(C[te]=new RegExp("^("+ee.join("|")+")$"))}});const $={};let H;d(g.transformTags,function(Z,te){let ee;typeof Z=="function"?ee=Z:typeof Z=="string"&&(ee=x.simpleTransform(Z)),te==="*"?H=ee:$[te]=ee});let F,q,M,Y,X,ae,I=!1;R();const ie=new e.Parser({onopentag:function(Z,te){if(g.enforceHtmlBoundary&&Z==="html"&&R(),X){ae++;return}const ee=new y(Z,te);q.push(ee);let le=!1;const be=!!ee.text;let me;if(f($,Z)&&(me=$[Z](Z,te),ee.attribs=te=me.attribs,me.text!==void 0&&(ee.innerText=me.text),Z!==me.tagName&&(ee.name=Z=me.tagName,Y[F]=me.tagName)),H&&(me=H(Z,te),ee.attribs=te=me.attribs,Z!==me.tagName&&(ee.name=Z=me.tagName,Y[F]=me.tagName)),(!m(Z)||g.disallowedTagsMode==="recursiveEscape"&&!h(M)||g.nestingLimit!=null&&F>=g.nestingLimit)&&(le=!0,M[F]=!0,(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&N.indexOf(Z)!==-1&&(X=!0,ae=1),M[F]=!0),F++,le){if(g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")return;_=k,k=""}k+="<"+Z,Z==="script"&&(g.allowedScriptHostnames||g.allowedScriptDomains)&&(ee.innerText=""),(!j||f(j,Z)||j["*"])&&d(te,function(ke,pe){if(!p.test(pe)){delete ee.attribs[pe];return}if(ke===""&&!g.allowedEmptyAttributes.includes(pe)&&(g.nonBooleanAttributes.includes(pe)||g.nonBooleanAttributes.includes("*"))){delete ee.attribs[pe];return}let Ye=!1;if(!j||f(j,Z)&&j[Z].indexOf(pe)!==-1||j["*"]&&j["*"].indexOf(pe)!==-1||f(A,Z)&&A[Z].test(pe)||A["*"]&&A["*"].test(pe))Ye=!0;else if(j&&j[Z]){for(const we of j[Z])if(i(we)&&we.name&&we.name===pe){Ye=!0;let de="";if(we.multiple===!0){const Ee=ke.split(" ");for(const Oe of Ee)we.values.indexOf(Oe)!==-1&&(de===""?de=Oe:de+=" "+Oe)}else we.values.indexOf(ke)>=0&&(de=ke);ke=de}}if(Ye){if(g.allowedSchemesAppliedToAttributes.indexOf(pe)!==-1&&J(Z,ke)){delete ee.attribs[pe];return}if(Z==="script"&&pe==="src"){let we=!0;try{const de=fe(ke);if(g.allowedScriptHostnames||g.allowedScriptDomains){const Ee=(g.allowedScriptHostnames||[]).find(function(Be){return Be===de.url.hostname}),Oe=(g.allowedScriptDomains||[]).find(function(Be){return de.url.hostname===Be||de.url.hostname.endsWith(`.${Be}`)});we=Ee||Oe}}catch{we=!1}if(!we){delete ee.attribs[pe];return}}if(Z==="iframe"&&pe==="src"){let we=!0;try{const de=fe(ke);if(de.isRelativeUrl)we=f(g,"allowIframeRelativeUrls")?g.allowIframeRelativeUrls:!g.allowedIframeHostnames&&!g.allowedIframeDomains;else if(g.allowedIframeHostnames||g.allowedIframeDomains){const Ee=(g.allowedIframeHostnames||[]).find(function(Be){return Be===de.url.hostname}),Oe=(g.allowedIframeDomains||[]).find(function(Be){return de.url.hostname===Be||de.url.hostname.endsWith(`.${Be}`)});we=Ee||Oe}}catch{we=!1}if(!we){delete ee.attribs[pe];return}}if(pe==="srcset")try{let we=r(ke);if(we.forEach(function(de){J("srcset",de.url)&&(de.evil=!0)}),we=o(we,function(de){return!de.evil}),we.length)ke=l(o(we,function(de){return!de.evil})),ee.attribs[pe]=ke;else{delete ee.attribs[pe];return}}catch{delete ee.attribs[pe];return}if(pe==="class"){const we=D[Z],de=D["*"],Ee=C[Z],Oe=O[Z],Be=C["*"],St=[Ee,Be].concat(Oe).filter(function(Jt){return Jt});if(we&&de?ke=Ce(ke,s(we,de),St):ke=Ce(ke,we||de,St),!ke.length){delete ee.attribs[pe];return}}if(pe==="style"){if(g.parseStyleAttributes)try{const we=n(Z+" {"+ke+"}",{map:!1}),de=Q(we,g.allowedStyles);if(ke=ne(de),ke.length===0){delete ee.attribs[pe];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+Z+" {"+ke+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete ee.attribs[pe];return}else if(g.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}k+=" "+pe,ke&&ke.length?k+='="'+V(ke,!0)+'"':g.allowedEmptyAttributes.includes(pe)&&(k+='=""')}else delete ee.attribs[pe]}),g.selfClosing.indexOf(Z)!==-1?k+=" />":(k+=">",ee.innerText&&!be&&!g.textFilter&&(k+=V(ee.innerText),I=!0)),le&&(k=_+V(k),_="")},ontext:function(Z){if(X)return;const te=q[q.length-1];let ee;if(te&&(ee=te.tag,Z=te.innerText!==void 0?te.innerText:Z),g.disallowedTagsMode==="completelyDiscard"&&!m(ee))Z="";else if((g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard")&&(ee==="script"||ee==="style"))k+=Z;else{const le=V(Z,!1);g.textFilter&&!I?k+=g.textFilter(le,ee):I||(k+=le)}if(q.length){const le=q[q.length-1];le.text+=Z}},onclosetag:function(Z,te){if(X)if(ae--,!ae)X=!1;else return;const ee=q.pop();if(!ee)return;if(ee.tag!==Z){q.push(ee);return}X=g.enforceHtmlBoundary?Z==="html":!1,F--;const le=M[F];if(le){if(delete M[F],g.disallowedTagsMode==="discard"||g.disallowedTagsMode==="completelyDiscard"){ee.updateParentNodeText();return}_=k,k=""}if(Y[F]&&(Z=Y[F],delete Y[F]),g.exclusiveFilter&&g.exclusiveFilter(ee)){k=k.substr(0,ee.tagPosition);return}if(ee.updateParentNodeMediaChildren(),ee.updateParentNodeText(),g.selfClosing.indexOf(Z)!==-1||te&&!m(Z)&&["escape","recursiveEscape"].indexOf(g.disallowedTagsMode)>=0){le&&(k=_,_="");return}k+="</"+Z+">",le&&(k=_+V(k),_=""),I=!1}},g.parser);return ie.write(b),ie.end(),k;function R(){k="",F=0,q=[],M={},Y={},X=!1,ae=0}function V(Z,te){return typeof Z!="string"&&(Z=Z+""),g.parser.decodeEntities&&(Z=Z.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),te&&(Z=Z.replace(/"/g,"&quot;"))),Z=Z.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),te&&(Z=Z.replace(/"/g,"&quot;")),Z}function J(Z,te){for(te=te.replace(/[\x00-\x20]+/g,"");;){const be=te.indexOf("<!--");if(be===-1)break;const me=te.indexOf("-->",be+4);if(me===-1)break;te=te.substring(0,be)+te.substring(me+3)}const ee=te.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!ee)return te.match(/^[/\\]{2}/)?!g.allowProtocolRelative:!1;const le=ee[1].toLowerCase();return f(g.allowedSchemesByTag,Z)?g.allowedSchemesByTag[Z].indexOf(le)===-1:!g.allowedSchemes||g.allowedSchemes.indexOf(le)===-1}function fe(Z){if(Z=Z.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),Z.startsWith("relative:"))throw new Error("relative: exploit attempt");let te="relative://relative-site";for(let be=0;be<100;be++)te+=`/${be}`;const ee=new URL(Z,te);return{isRelativeUrl:ee&&ee.hostname==="relative-site"&&ee.protocol==="relative:",url:ee}}function Q(Z,te){if(!te)return Z;const ee=Z.nodes[0];let le;return te[ee.selector]&&te["*"]?le=s(te[ee.selector],te["*"]):le=te[ee.selector]||te["*"],le&&(Z.nodes[0].nodes=ee.nodes.reduce(xe(le),[])),Z}function ne(Z){return Z.nodes[0].nodes.reduce(function(te,ee){return te.push(`${ee.prop}:${ee.value}${ee.important?" !important":""}`),te},[]).join(";")}function xe(Z){return function(te,ee){return f(Z,ee.prop)&&Z[ee.prop].some(function(be){return be.test(ee.value)})&&te.push(ee),te}}function Ce(Z,te,ee){return te?(Z=Z.split(/\s+/),Z.filter(function(le){return te.indexOf(le)!==-1||ee.some(function(be){return be.test(le)})}).join(" ")):Z}}const w={decodeEntities:!0};return x.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},x.simpleTransform=function(b,g,v){return v=v===void 0?!0:v,g=g||{},function(k,_){let y;if(v)for(y in g)_[y]=g[y];else _=g;return{tagName:b,attribs:_}}},Ai}var oc;function ap(){if(oc)return Rr;oc=1;var e=Rr&&Rr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.TagTransformingSanitizer=void 0;const a=e(rn()),i=e(rp()),s=ir(),r=Gi(),n=Qc();let u=class{constructor(d,f){this.sanitizationErrors=[],this.validate(d),r.Localization.validate(f),this.localization=f,this.options=d}sanitize(d){return(0,i.default)(d,this.generateSanitizeConfig())}getErrors(){return this.sanitizationErrors}generateSanitizeConfig(){return{allowedTags:n.StaticConfig.sanitization.allowedTags,allowedAttributes:{iframe:["src","width","height","frameborder","allowfullscreen","webkitallowfullscreen","mozallowfullscreen"],div:["class","title"],td:["style"],img:["src","alt"],a:["href","rel","title","class","target","id"]},allowedSchemes:["http","https","hive"],transformTags:{iframe:(d,f)=>{const o=f.src;for(const l of n.StaticConfig.sanitization.iframeWhitelist)if(l.re.test(o)){const p=typeof l.fn=="function"?l.fn(o):o;if(!p)break;return{tagName:"iframe",attribs:{src:p,width:this.options.iframeWidth+"",height:this.options.iframeHeight+"",frameborder:"0",allowfullscreen:"allowfullscreen",webkitallowfullscreen:"webkitallowfullscreen",mozallowfullscreen:"mozallowfullscreen"}}}return s.Log.log().warn('Blocked, did not match iframe "src" white list urls:',d,f),this.sanitizationErrors.push("Invalid iframe URL: "+o),{tagName:"div",text:`(Unsupported ${o})`,attribs:{}}},img:(d,f)=>{if(this.options.noImage)return{tagName:"div",text:this.localization.noImage,attribs:{}};const{src:o,alt:h}=f;if(!/^(https?:)?\/\//i.test(o))return s.Log.log().warn("Blocked, image tag src does not appear to be a url",d,f),this.sanitizationErrors.push("An image in this post did not save properly."),{tagName:"img",attribs:{src:"brokenimg.jpg"}};const l={};return l.src=o.replace(/^http:\/\//i,"//"),h&&h!==""&&(l.alt=h),{tagName:d,attribs:l}},div:(d,f)=>{const o={},l=["pull-right","pull-left","text-justify","text-rtl","text-center","text-right","videoWrapper","phishy"].find(x=>f.class===x);return l&&(o.class=l),l==="phishy"&&f.title===this.localization.phishingWarning&&(o.title=f.title),{tagName:d,attribs:o}},td:(d,f)=>{const o={};return f.style==="text-align:right"&&(o.style="text-align:right"),{tagName:d,attribs:o}},a:(d,f)=>{const o=Object.assign({},f);let{href:h}=f;return h&&(h=h.trim(),o.href=h),h&&!this.options.isLinkSafeFn(h)&&(o.rel=this.options.addNofollowToLinks?"nofollow noopener":"noopener",o.title=this.localization.phishingWarning,o.target=this.options.addTargetBlankToLinks?"_blank":"_self"),h&&this.options.addExternalCssClassToMatchingLinksFn(h)?o.class=this.options.cssClassForExternalLinks?this.options.cssClassForExternalLinks:"":o.class=this.options.cssClassForInternalLinks?this.options.cssClassForInternalLinks:"",{tagName:d,attribs:o}}}}}validate(d){(0,a.default)(d,"TagsSanitizerOptions",a.default.object),(0,a.default)(d.iframeWidth,"TagsSanitizerOptions.iframeWidth",a.default.number.integer.positive),(0,a.default)(d.iframeHeight,"TagsSanitizerOptions.iframeHeight",a.default.number.integer.positive),(0,a.default)(d.addNofollowToLinks,"TagsSanitizerOptions.addNofollowToLinks",a.default.boolean),(0,a.default)(d.addTargetBlankToLinks,"TagsSanitizerOptions.addTargetBlankToLinks",a.default.optional.boolean),(0,a.default)(d.cssClassForInternalLinks,"TagsSanitizerOptions.cssClassForInternalLinks",a.default.optional.string),(0,a.default)(d.cssClassForExternalLinks,"TagsSanitizerOptions.cssClassForExternalLinks",a.default.optional.string),(0,a.default)(d.noImage,"TagsSanitizerOptions.noImage",a.default.boolean),(0,a.default)(d.isLinkSafeFn,"TagsSanitizerOptions.isLinkSafeFn",a.default.function),(0,a.default)(d.addExternalCssClassToMatchingLinksFn,"TagsSanitizerOptions.addExternalCssClassToMatchingLinksFn",a.default.function)}};return Rr.TagTransformingSanitizer=u,Rr}var uc;function lc(){if(uc)return Sr;uc=1;var e=Sr&&Sr.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.DefaultRenderer=void 0;const a=e(rn()),i=Kf,s=lh(),r=Th(),n=Gi(),u=Oh(),c=ap();let d=class{constructor(o,h=n.Localization.DEFAULT){this.validate(o),this.options=o,n.Localization.validate(h),this.tagTransformingSanitizer=new c.TagTransformingSanitizer({iframeWidth:this.options.assetsWidth,iframeHeight:this.options.assetsHeight,addNofollowToLinks:this.options.addNofollowToLinks,addTargetBlankToLinks:this.options.addTargetBlankToLinks,cssClassForInternalLinks:this.options.cssClassForInternalLinks,cssClassForExternalLinks:this.options.cssClassForExternalLinks,noImage:this.options.doNotShowImages,isLinkSafeFn:this.options.isLinkSafeFn,addExternalCssClassToMatchingLinksFn:this.options.addExternalCssClassToMatchingLinksFn},h),this.domParser=new r.HtmlDOMParser({width:this.options.assetsWidth,height:this.options.assetsHeight,ipfsPrefix:this.options.ipfsPrefix,baseUrl:this.options.baseUrl,imageProxyFn:this.options.imageProxyFn,hashtagUrlFn:this.options.hashtagUrlFn,usertagUrlFn:this.options.usertagUrlFn,hideImages:this.options.doNotShowImages},h)}render(o){return(0,a.default)(o,"input",a.default.string.nonEmpty),this.doRender(o)}doRender(o){return o=u.PreliminarySanitizer.preliminarySanitize(o),o=this.isHtml(o)?o:this.renderMarkdown(o),o=this.wrapRenderedTextWithHtmlIfNeeded(o),o=this.domParser.parse(o).getParsedDocumentAsString(),o=this.sanitize(o),s.SecurityChecker.checkSecurity(o,{allowScriptTag:this.options.allowInsecureScriptTags}),o=this.domParser.embedder.insertAssets(o),o}renderMarkdown(o){return new i.Remarkable({html:!0,breaks:this.options.breaks,typographer:!1,quotes:"“”‘’"}).render(o)}wrapRenderedTextWithHtmlIfNeeded(o){return o.indexOf("<html>")!==0&&(o="<html>"+o+"</html>"),o}isHtml(o){let h=!1;const l=o.match(/^<html>([\S\s]*)<\/html>$/);return l&&l.length===2?(h=!0,o=l[1]):h=/^<p>[\S\s]*<\/p>/.test(o),h}sanitize(o){return this.options.skipSanitization?o:this.tagTransformingSanitizer.sanitize(o)}validate(o){(0,a.default)(o,"RendererOptions",a.default.object),(0,a.default)(o.baseUrl,"RendererOptions.baseUrl",a.default.string.nonEmpty),(0,a.default)(o.breaks,"RendererOptions.breaks",a.default.boolean),(0,a.default)(o.skipSanitization,"RendererOptions.skipSanitization",a.default.boolean),(0,a.default)(o.addNofollowToLinks,"RendererOptions.addNofollowToLinks",a.default.boolean),(0,a.default)(o.addTargetBlankToLinks,"RendererOptions.addTargetBlankToLinks",a.default.optional.boolean),(0,a.default)(o.cssClassForInternalLinks,"RendererOptions.cssClassForInternalLinks",a.default.optional.string),(0,a.default)(o.cssClassForExternalLinks,"RendererOptions.cssClassForExternalLinks",a.default.optional.string),(0,a.default)(o.doNotShowImages,"RendererOptions.doNotShowImages",a.default.boolean),(0,a.default)(o.ipfsPrefix,"RendererOptions.ipfsPrefix",a.default.optional.string),(0,a.default)(o.assetsWidth,"RendererOptions.assetsWidth",a.default.number.integer.positive),(0,a.default)(o.assetsHeight,"RendererOptions.assetsHeight",a.default.number.integer.positive),(0,a.default)(o.imageProxyFn,"RendererOptions.imageProxyFn",a.default.function),(0,a.default)(o.hashtagUrlFn,"RendererOptions.hashtagUrlFn",a.default.function),(0,a.default)(o.usertagUrlFn,"RendererOptions.usertagUrlFn",a.default.function),(0,a.default)(o.isLinkSafeFn,"RendererOptions.isLinkSafeFn",a.default.function),(0,a.default)(o.addExternalCssClassToMatchingLinksFn,"RendererOptions.addExternalCssClassToMatchingLinksFn",a.default.function)}};return Sr.DefaultRenderer=d,Sr}var cc;function np(){return cc||(cc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HiveContentRenderer=e.DefaultRenderer=void 0;const a=lc();var i=lc();Object.defineProperty(e,"DefaultRenderer",{enumerable:!0,get:function(){return i.DefaultRenderer}}),e.HiveContentRenderer={DefaultRenderer:a.DefaultRenderer},e.default=e.HiveContentRenderer})(js)),js}var to=np();function md({author:e,permlink:a,defaultValue:i=100,onUpvote:s,onCancel:r}){const[n,u]=P.useState(i),[c,d]=P.useState(!1),f=[1,...Array.from({length:10},(h,l)=>(l+1)*10)],o=async()=>{if(!(n===0||c)){d(!0);try{await s(n)}finally{d(!1)}}};return t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4",children:t.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-2xl w-full max-w-md p-5 sm:p-6 shadow-xl flex flex-col",children:[t.jsxs("h2",{className:"text-center text-base sm:text-lg font-semibold text-gray-800 dark:text-white mb-6",children:["Vote for @",e]}),t.jsxs("div",{className:"relative w-full flex flex-col items-center mb-8",children:[t.jsxs("div",{className:"absolute -top-8 left-0",style:{left:`${n}%`,transform:"translateX(-50%)"},children:[t.jsxs("div",{className:"bg-blue-600 text-white text-xs sm:text-sm px-2 py-1 rounded-lg shadow",children:[n,"%"]}),t.jsx("div",{className:"mx-auto w-2 h-2 bg-blue-600 rotate-45 -mt-1"})]}),t.jsx("input",{type:"range",min:1,max:100,value:n,onChange:h=>u(Number(h.target.value)),className:"w-full h-2 rounded-lg appearance-none bg-gray-200 dark:bg-gray-700 accent-blue-600 cursor-pointer"}),t.jsx("div",{className:"flex justify-between w-full mt-3 ml-2 text-[10px] sm:text-xs text-gray-500 dark:text-gray-400",children:f.map(h=>t.jsx("button",{type:"button",onClick:()=>u(h),className:`focus:outline-none px-1 rounded transition
1092
1092
  ${n===h?"text-blue-600 font-bold":"hover:text-blue-700 hover:bg-blue-50 dark:hover:bg-gray-700"}`,style:{background:"none",border:"none",cursor:"pointer"},children:h},h))})]}),t.jsxs("div",{className:"flex gap-3",children:[t.jsx("button",{onClick:o,disabled:n===0||c,className:`flex-1 flex items-center justify-center rounded-full font-semibold transition
1093
1093
  text-sm sm:text-base px-3 py-2 sm:px-4 sm:py-3 shadow
1094
1094
  ${n===0||c?"bg-blue-300 text-white cursor-not-allowed":"bg-blue-600 hover:bg-blue-700 text-white"}`,children:c?t.jsxs(t.Fragment,{children:[t.jsx(z.Loader2,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1 animate-spin"}),"Voting..."]}):t.jsxs(t.Fragment,{children:[t.jsx(z.ThumbsUp,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1"}),"Vote"]})}),t.jsxs("button",{onClick:r,disabled:c,className:`flex-1 flex items-center justify-center rounded-full font-semibold text-sm sm:text-base px-3 py-2 sm:px-4 sm:py-3 shadow
1095
1095
  bg-gray-300 hover:bg-gray-400 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-800 dark:text-white
1096
- disabled:opacity-50 disabled:cursor-not-allowed`,children:[t.jsx(z.X,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1"}),"Cancel"]})]})]})})}const gd=({comment:e,allComments:a,onReply:i,currentUser:s,token:r,searchQuery:n,depth:u=0,onVotedRefresh:c,onClickCommentUpvote:d,onClickCommentReply:f,onClickUpvoteButton:o})=>{const[h,l]=P.useState(!1),[p,x]=P.useState(!0),[w,b]=P.useState(!1),g=P.useMemo(()=>{const Q=e.active_votes||[];return!!s&&Q.some(ne=>ne.voter===s)},[e.active_votes,s]),[v,_]=P.useState(!1),[k,y]=P.useState(""),[m,N]=P.useState(!1),j=Q=>{y(Q),_(!0),setTimeout(()=>_(!1),2500)},A=e.depth||0;let C=a.filter(Q=>Q.parent_author===e.author&&Q.parent_permlink===e.permlink&&(typeof Q.depth!="number"||Q.depth===A+1));if((!C||C.length===0)&&Array.isArray(e.replies)&&e.replies.length>0){const Q=new Set(e.replies);C=a.filter(ne=>Q.has(`${ne.author}/${ne.permlink}`))}const T=C.length>0,M=u>=4,W=(Q,ne)=>{if(!ne)return Q;const xe=new RegExp(`(${ne})`,"gi");return Q.replace(xe,'<mark class="bg-yellow-200 dark:bg-yellow-800">$1</mark>')},F=()=>{b(!0)},q=async Q=>{if(!r){c?.(),j("Vote submitted successfully ✅");return}try{const ne=Math.round(Q*100);await Ue.handleUpvote({author:e.author,permlink:e.permlink,weight:ne,authToken:r}),l(!0),b(!1),N(!0),setTimeout(()=>{c?.(),N(!1),j("Vote submitted successfully ✅")},3e3)}catch(ne){const xe=ne instanceof Error?ne.message:"Failed to upvote";alert(xe)}},$=()=>{s?i(e.author,e.permlink):j("Please login to upvote")},Y=e.json_metadata_parsed||(()=>{try{return e.json_metadata?JSON.parse(e.json_metadata):void 0}catch{return}})(),X=e.body||"",I=(Q=>{const ne=/^(\s*(?:#[\p{L}\p{N}_-]+\s*(?:,\s*)?)+\s*)$/gimu;return Q.replace(ne,"").trim()})(X),ie=n?W(I,n):I,R=/!\[[^\]]*\]\([^)]+\)/.test(I)||/<img\s/i.test(I),V=Array.isArray(Y?.image)?Y.image:[],J=new to.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:Q=>Q,usertagUrlFn:Q=>`/@${Q}`,hashtagUrlFn:Q=>`/trending/${Q}`,isLinkSafeFn:Q=>!0,addExternalCssClassToMatchingLinksFn:Q=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"}),fe=e.stats?.total_votes||e.net_votes||0;return t.jsxs("div",{className:`${u>0?"ml-4 md:ml-8 border-l-2 border-gray-200 dark:border-gray-700 pl-4 md:pl-6":""}`,children:[t.jsx("div",{className:"group hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors duration-200 p-4 md:p-6",children:t.jsxs("div",{className:"flex items-start space-x-3 md:space-x-4",children:[t.jsx("div",{className:"flex-shrink-0",children:t.jsx("img",{src:`https://images.hive.blog/u/${e.author}/avatar`,alt:e.author,className:"w-8 h-8 md:w-10 md:h-10 rounded-full object-cover ring-2 ring-gray-200 dark:ring-gray-700",onError:Q=>{Q.target.src=`https://ui-avatars.com/api/?name=${e.author}&background=random`}})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center flex-wrap gap-2 mb-2",children:[t.jsxs("button",{className:"font-semibold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200 text-sm md:text-base",onClick:()=>{},children:["@",e.author]}),t.jsxs("div",{className:"flex items-center text-xs md:text-sm text-gray-500 dark:text-gray-400 space-x-1",children:[t.jsx(z.Clock,{className:"w-3 h-3 md:w-4 md:h-4"}),t.jsx("span",{children:ns.formatDistanceToNow(new Date(e.created+"Z"),{addSuffix:!0})})]}),e.author===s&&t.jsx("span",{className:"px-2 py-1 text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:"You"})]}),t.jsx("div",{className:"prose prose-sm md:prose-base dark:prose-invert max-w-none mb-3 comment-content text-gray-900 dark:text-gray-100 prose-a:text-blue-600 dark:prose-a:text-blue-400",children:n?t.jsx("div",{dangerouslySetInnerHTML:{__html:ie}}):t.jsx("div",{dangerouslySetInnerHTML:{__html:J.render(I)}})}),!R&&V.length>0&&t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3",children:V.map((Q,ne)=>t.jsx("img",{src:Q,alt:`image-${ne}`,className:"max-w-full h-auto rounded-lg shadow-sm cursor-pointer hover:shadow-md transition-shadow duration-200",onClick:()=>window.open(Q,"_blank")},Q+ne))}),t.jsxs("div",{className:"flex items-center space-x-4 md:space-x-6",children:[t.jsxs("button",{onClick:()=>{if(d)d(e);else if(o)o(s,r);else{if(!s){j("Please login to upvote");return}r?g?j("You have already upvoted this comment"):F():(c?.(),j("Vote submitted successfully ✅"))}},className:`flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium transition-colors duration-200 ${h?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400"}`,children:[t.jsx(z.ThumbsUp,{className:`w-4 h-4 ${g||h?"fill-current text-blue-600 dark:text-blue-400":""}`}),t.jsx("span",{children:fe})]}),t.jsxs("button",{onClick:()=>{f?f(e):$()},className:"flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200",children:[t.jsx(z.MessageSquare,{className:"w-4 h-4"}),t.jsx("span",{children:"Reply"})]}),T&&t.jsx("button",{onClick:()=>x(!p),className:"flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200",children:t.jsxs("span",{children:[p?"Hide":"Show"," ",C.length," ",C.length===1?"reply":"replies"]})}),t.jsx("button",{onClick:()=>f?.(e),className:"opacity-0 group-hover:opacity-100 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-all duration-200",children:t.jsx(z.MoreHorizontal,{className:"w-4 h-4 text-gray-400"})})]}),w&&!g&&t.jsx("div",{className:"mt-3",children:t.jsx(md,{author:e.author,permlink:e.permlink,onUpvote:q,onCancel:()=>b(!1)})}),m&&t.jsxs("div",{className:"mt-3 inline-flex items-center text-xs text-gray-500 dark:text-gray-400",children:[t.jsx("span",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin mr-2"}),"Updating votes..."]}),v&&t.jsx("div",{className:"fixed bottom-4 right-4 w-[280px] z-50",children:t.jsx("div",{className:"bg-gray-800 text-white rounded px-3 py-2 shadow-lg text-sm",children:k})})]})]})}),T&&p&&!M&&t.jsx("div",{className:"space-y-0",children:C.map(Q=>t.jsx(gd,{comment:Q,allComments:a,onReply:i,currentUser:s,searchQuery:n,depth:u+1,onVotedRefresh:c},Q.permlink))}),T&&M&&t.jsx("div",{className:"ml-4 md:ml-8 p-3 text-sm text-gray-500 dark:text-gray-400 border-l-2 border-gray-200 dark:border-gray-700 pl-4",children:t.jsxs("button",{onClick:()=>{console.log("Show more replies for:",e.author,e.permlink)},className:"text-blue-600 dark:text-blue-400 hover:underline",children:["View ",C.length," more ",C.length===1?"reply":"replies"]})})]})},bd=({onSubmit:e,onCancel:a,currentUser:i,placeholder:s="Write your comment...",parentAuthor:r,parentPermlink:n})=>{const[u,c]=P.useState(""),[d,f]=P.useState(!1),o=P.useRef(null);P.useEffect(()=>{o.current&&o.current.focus()},[]);const h=async()=>{if(!(!u.trim()||d)){f(!0);try{await e(u.trim()),c("")}catch(p){console.error("Failed to submit comment:",p)}finally{f(!1)}}},l=p=>{p.key==="Enter"&&(p.metaKey||p.ctrlKey)&&(p.preventDefault(),h()),p.key==="Escape"&&a()};return t.jsxs("div",{className:"p-4 md:p-6 space-y-4 bg-white dark:bg-gray-800",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"flex-shrink-0",children:i?t.jsx("img",{src:`https://images.hive.blog/u/${i}/avatar`,alt:i,className:"w-10 h-10 rounded-full object-cover border-2 border-gray-200 dark:border-gray-600",onError:p=>{p.target.src=`https://ui-avatars.com/api/?name=${i}&background=random`}}):t.jsx("div",{className:"w-10 h-10 rounded-full bg-gray-200 dark:bg-gray-600 flex items-center justify-center",children:t.jsx(z.User,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"text-sm text-gray-900 dark:text-white font-medium",children:i?`@${i}`:"Anonymous"}),r&&t.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Replying to @",r]})]})]}),t.jsx("div",{className:"relative",children:t.jsx("textarea",{ref:o,value:u,onChange:p=>c(p.target.value),onKeyDown:l,placeholder:s,disabled:d,className:"w-full min-h-[100px] max-h-[300px] p-4 border border-gray-200 dark:border-gray-600 rounded-lg resize-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 transition-colors duration-200 disabled:opacity-50",style:{height:"auto"},onInput:p=>{const x=p.target;x.style.height="auto",x.style.height=x.scrollHeight+"px"}})}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Press Cmd+Enter to post"}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("button",{onClick:a,disabled:d,className:"px-4 py-2 text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 transition-colors duration-200 disabled:opacity-50",children:"Cancel"}),t.jsx("button",{onClick:h,disabled:d||!u.trim(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 dark:disabled:bg-gray-600 text-white rounded-lg font-medium transition-all duration-200 transform hover:scale-[1.02] disabled:transform-none disabled:opacity-50 flex items-center space-x-2",children:d?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),t.jsx("span",{children:"Posting..."})]}):t.jsxs(t.Fragment,{children:[t.jsx(z.Send,{className:"w-4 h-4"}),t.jsx("span",{children:"Post"})]})})]})]})]})},sp=({parentAuthor:e,parentPermlink:a,onClose:i,onCommentSubmitted:s,currentUser:r})=>{const[n,u]=P.useState(!1),c=async d=>{if(!(!d.trim()||n)){u(!0);try{await s(e,a,d),i()}catch(f){console.error("Failed to submit reply:",f)}finally{u(!1)}}};return P.useEffect(()=>{const d=f=>{f.key==="Escape"&&i()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[i]),t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-blue-100 dark:bg-blue-900 rounded-lg",children:t.jsx(z.Send,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"Reply to Comment"}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["@",e]})]})]}),t.jsx("button",{onClick:i,disabled:n,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",children:t.jsx(z.X,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:t.jsx(bd,{onSubmit:c,onCancel:i,currentUser:r,parentAuthor:e,parentPermlink:a,placeholder:`Reply to @${e}...`})}),t.jsx("div",{className:"p-4 md:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:t.jsxs("div",{className:"flex items-center justify-between text-xs md:text-sm text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsx("span",{children:"• Markdown supported"}),t.jsx("span",{children:"• Be respectful"})]}),t.jsx("div",{className:"hidden md:block",children:"Press Esc to close"})]})})]})})},ip=({isVisible:e,searchQuery:a,onSearchChange:i,onClose:s})=>{const r=P.useRef(null);P.useEffect(()=>{e&&r.current&&r.current.focus()},[e]);const n=()=>{i(""),s()};return t.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-in-out ${e?"max-h-20 opacity-100":"max-h-0 opacity-0"}`,children:t.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/30",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),t.jsx("input",{ref:r,type:"text",value:a,onChange:u=>i(u.target.value),placeholder:"Search comments and authors...",className:"w-full pl-10 pr-10 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 transition-colors duration-200"}),a&&t.jsx("button",{onClick:()=>i(""),className:"absolute right-8 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-4 h-4 text-gray-400"})}),t.jsx("button",{onClick:n,className:"absolute right-3 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-4 h-4 text-gray-400"})})]})})})},op=({author:e,permlink:a,onClose:i,currentUser:s,token:r,onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:c})=>{const[d,f]=P.useState([]),[o,h]=P.useState([]),[l,p]=P.useState(!0),[x,w]=P.useState(null),[b,g]=P.useState(null),[v,_]=P.useState(!1),[k,y]=P.useState(""),[m,N]=P.useState(!1),[j,A]=P.useState(!1),D=P.useCallback(async(F=!1)=>{F?A(!0):p(!0),w(null);try{const q=await Ue.getCommentsList(e,a);f(q),h(q)}catch(q){w(q instanceof Error?q.message:"Failed to load comments")}finally{p(!1),A(!1)}},[e,a]);P.useEffect(()=>{D()},[D]),P.useEffect(()=>{if(!k.trim())h(d);else{const F=d.filter(q=>q.body?.toLowerCase().includes(k.toLowerCase())||q.author.toLowerCase().includes(k.toLowerCase()));h(F)}},[k,d]);const C=(F,q)=>{g({author:F,permlink:q})},T=F=>{F.target===F.currentTarget&&i()},M=async(F,q,$)=>{if(!r){alert("Please login to comment");return}try{await Ue.handleComment({author:F,permlink:q,body:$,authToken:r}),N(!1),A(!0),setTimeout(async()=>{await D(!0),A(!1)},3e3)}catch(Y){const X=Y instanceof Error?Y.message:"Failed to post comment";alert(X)}},W=o.filter(F=>F.author===e&&F.permlink===a);return l?t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4 h-screen",children:t.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl h-[90vh] flex flex-col",children:t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center",children:[t.jsx(z.Loader2,{className:"w-12 h-12 animate-spin text-blue-500 mx-auto mb-4"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Loading comments..."})]})})})}):x?t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-40 p-4 h-screen",onClick:T,children:t.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl h-[90vh] flex flex-col overflow-hidden",children:t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center p-6",children:[t.jsx(z.AlertCircle,{className:"w-16 h-16 text-red-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load comments"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:x}),t.jsx("button",{onClick:()=>D(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition-colors duration-200",children:"Try Again"})]})})})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-40 p-4 h-screen",onClick:T,children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl h-[90vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex justify-between items-center p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("h2",{className:"text-lg md:text-xl font-bold text-gray-900 dark:text-white",children:["Comments (",d.length-1,")"]}),j&&t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin text-blue-500"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>D(!0),disabled:j,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",title:"Refresh comments",children:t.jsx(z.RefreshCw,{className:`w-5 h-5 text-gray-500 dark:text-gray-400 ${j?"animate-spin":""}`})}),t.jsx("button",{onClick:()=>_(!v),className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",title:"Search comments",children:t.jsx(z.Search,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})}),t.jsx("button",{onClick:i,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})]})]}),t.jsx(ip,{isVisible:v,searchQuery:k,onSearchChange:y,onClose:()=>_(!1)}),t.jsxs("div",{className:"flex-1 overflow-y-auto",children:[m&&t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:t.jsx(bd,{onSubmit:F=>M(e,a,F),onCancel:()=>N(!1),currentUser:s,placeholder:"Add a comment..."})}),W.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center",children:[t.jsx(z.MessageCirclePlus,{className:"w-16 h-16 text-gray-300 dark:text-gray-600 mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:k?"No comments found":"No comments yet"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-6",children:k?"Try adjusting your search terms":"Be the first to share your thoughts!"}),!k&&s&&t.jsx("button",{onClick:()=>N(!0),className:"px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-colors duration-200",children:"Add Comment"})]}):t.jsx("div",{className:"divide-y divide-gray-100 dark:divide-gray-700",children:W.map(F=>t.jsx(gd,{comment:F,allComments:o,onReply:C,currentUser:s,token:r,searchQuery:k,depth:0,onVotedRefresh:()=>D(!0),onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:c},F.permlink))})]}),!m&&s&&W.length>0&&t.jsx("div",{className:"p-4 md:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:t.jsxs("button",{onClick:()=>N(!0),className:"w-full md:w-auto px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-all duration-200 transform hover:scale-[1.02] flex items-center justify-center space-x-2",children:[t.jsx(z.MessageCirclePlus,{className:"w-5 h-5"}),t.jsx("span",{children:"Add Comment"})]})})]})}),b&&t.jsx(sp,{parentAuthor:b.author,parentPermlink:b.permlink,onClose:()=>g(null),onCommentSubmitted:M,currentUser:s})]})};function up(e){const a=typeof e=="string"?new Date(e):e,i=Math.floor((Date.now()-a.getTime())/1e3),s={year:31536e3,month:2628e3,day:86400,hour:3600,minute:60};for(const[r,n]of Object.entries(s)){const u=Math.floor(i/n);if(u>1)return`${u} ${r}s ago`;if(u===1)return`${u} ${r} ago`}return"just now"}const lp=({author:e,permlink:a,onClose:i,currentUser:s,token:r,onClickUpvoteButton:n})=>{const[u,c]=P.useState([]),[d,f]=P.useState(!0),[o,h]=P.useState(!1),l=!!s&&u.some(N=>N.voter===s),[p,x]=P.useState(!1),[w,b]=P.useState(""),[g,v]=P.useState(!1),_=N=>{b(N),x(!0),setTimeout(()=>x(!1),2500)},k=async()=>{f(!0);const N=await Ue.getActiveVotes(e,a);N.sort((j,A)=>!j.time||!A.time?0:new Date(A.time).getTime()-new Date(j.time).getTime()),c(N),f(!1)};P.useEffect(()=>{k()},[e,a]);const y=N=>{N.target===N.currentTarget&&i()},m=async N=>{if(!r||!s){alert("Please login to upvote");return}try{const j=Math.round(N*100);await Ue.handleUpvote({author:e,permlink:a,weight:j,authToken:r}),h(!1),v(!0),setTimeout(async()=>{await k(),v(!1),_("Vote submitted successfully ✅"),i()},3e3)}catch(j){const A=j instanceof Error?j.message:"Failed to upvote";alert(A)}};return t.jsxs("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 px-4 h-screen",onClick:y,children:[t.jsxs("div",{className:"relative bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50 flex items-center justify-between",children:[t.jsxs("h2",{className:"text-lg font-bold text-gray-900 dark:text-white flex items-center space-x-2",children:[t.jsxs("span",{children:["Voters (",u.length,")"]}),g&&t.jsx("span",{className:"inline-flex items-center ml-2",children:t.jsx("span",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})})]}),!o&&t.jsx("button",{onClick:()=>{if(n){n(s,r);return}if(!s||!r){_("Please login to upvote");return}l?_("You have already upvoted this post"):h(!0)},"aria-label":"Open Vote Slider",className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded",type:"button",children:t.jsx(z.ThumbsUp,{className:`w-5 h-5 ${l?"text-blue-600 dark:text-blue-400 fill-current":"text-gray-600 dark:text-gray-300"}`})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:d?t.jsx("div",{className:"flex justify-center items-center h-full p-8",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500"})}):o&&!l?t.jsx(md,{author:e,permlink:a,onUpvote:m,onCancel:()=>h(!1)}):t.jsx("ul",{children:u.map(N=>t.jsxs("li",{className:"flex items-center p-4 border-b dark:border-gray-700",children:[t.jsx("img",{src:`https://images.hive.blog/u/${N.voter}/avatar`,alt:N.voter,className:"w-10 h-10 rounded-full mr-4",onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${N.voter}&background=random`}}),t.jsxs("div",{children:[t.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:N.voter}),t.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:[((N.percent||0)/100).toFixed(0),"%",N.time&&` · ${up(N.time+"Z")}`]})]})]},N.voter))})})]}),p&&t.jsx("div",{className:"fixed bottom-4 right-4 w-[280px] z-50",children:t.jsx("div",{className:"bg-gray-800 text-white rounded px-3 py-2 shadow-lg text-sm",children:w})})]})},xd=({isOpen:e,onClose:a,title:i,children:s,maxWidth:r="max-w-2xl"})=>e?t.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[t.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:a}),t.jsxs("div",{className:`relative bg-card border border-border rounded-xl shadow-xl w-full mx-4 ${r} max-h-[90vh] overflow-hidden animate-scale-in`,children:[t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[t.jsx("h2",{className:"text-xl font-bold text-card-foreground",children:i}),t.jsx("button",{onClick:a,className:"p-2 rounded-lg hover:bg-muted transition-colors",children:t.jsx(z.X,{className:"w-5 h-5 text-muted-foreground"})})]}),t.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-80px)] custom-scrollbar",children:s})]})]}):null,cp=({author:e,permlink:a,content:i,onClose:s})=>t.jsx(xd,{isOpen:!0,onClose:s,title:"Video Description",maxWidth:"max-w-2xl",children:t.jsxs("div",{className:"p-6",children:[i?t.jsx("div",{className:"prose prose-sm max-w-none",children:t.jsx("div",{className:"bg-muted/30 rounded-lg p-4",children:t.jsx("pre",{className:"whitespace-pre-wrap text-sm text-card-foreground font-sans leading-relaxed",children:i})})}):t.jsxs("div",{className:"text-center py-8",children:[t.jsx(z.FileText,{className:"w-12 h-12 text-muted-foreground mx-auto mb-2"}),t.jsx("p",{className:"text-muted-foreground",children:"No description available"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"This video doesn't have a description yet."})]}),t.jsx("div",{className:"mt-6 pt-4 border-t border-border",children:t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsxs("span",{children:["By @",e]}),t.jsx("span",{children:"•"}),t.jsxs("span",{children:["/",a]})]})})]})}),dp=({username:e,permlink:a,onAuthorClick:i,onVideoClick:s,onTagClick:r,onBack:n,onCommentsModal:u,onUpvotesModal:c,onDescriptionModal:d,onVideoInfo:f,onShare:o,onBookmark:h}={})=>{const l=e,p=a,[x,w]=P.useState(null),[b,g]=P.useState(!0),[v,_]=P.useState(null),[k,y]=P.useState(!1),[m,N]=P.useState(null),[j,A]=P.useState(!1),[D,C]=P.useState(!1),[T,M]=P.useState(!1),[W,F]=P.useState(!1),q=P.useRef(null),$=P.useRef(null),Y=P.useRef(null);P.useEffect(()=>{(async()=>{if(!(!l||!p))try{g(!0),_(null);const J=await Ue.getVideoDetails(l,p);w(J),y(!1),N(null)}catch(J){_(J instanceof Error?J.message:"Failed to load video")}finally{g(!1)}})()},[l,p]);const X=V=>V?V.startsWith("ipfs://")?`https://ipfs-3speak.b-cdn.net/ipfs/${V.replace("ipfs://","").split("/")[0]}/manifest.m3u8`:V:"";P.useEffect(()=>((async()=>{const J=x?.video_v2;if(!k||!J||!q.current)return;const fe=q.current,Q=X(J);$.current&&($.current.destroy(),$.current=null),fe.src="",fe.load();try{let ne=!1;const xe=()=>{ne||(ne=!0,fe.play().then(()=>N(null)).catch(be=>N(`Playback failed: ${be.message}`)))};if(Qr.isSupported()){const be=new Qr({debug:!1,enableWorker:!1,lowLatencyMode:!1,backBufferLength:90,maxLoadingDelay:4,maxBufferLength:30,maxMaxBufferLength:600,startLevel:-1});$.current=be,be.on(Qr.Events.MANIFEST_PARSED,()=>{}),be.on(Qr.Events.ERROR,(me,ke)=>{if(ke.fatal)switch(ke.type){case Qr.ErrorTypes.NETWORK_ERROR:N("Network error, retrying..."),setTimeout(()=>be.startLoad(),1e3);break;case Qr.ErrorTypes.MEDIA_ERROR:N("Media error, retrying..."),setTimeout(()=>be.recoverMediaError(),1e3);break;default:N(`Fatal error: ${ke.details}`),be.destroy(),$.current=null;break}}),be.attachMedia(fe),be.loadSource(Q)}else if(fe.canPlayType("application/vnd.apple.mpegurl"))fe.src=Q;else{const be=Q.replace("/manifest.m3u8","/480p/index.m3u8");fe.src=be}const Ce=()=>A(!0),Z=()=>{A(!1),xe()},te=be=>{const me=be.target;N(`Video error: ${me.error?.message||"Unknown error"}`),A(!1)},ee=()=>A(!1);fe.addEventListener("loadstart",Ce),fe.addEventListener("canplay",Z),fe.addEventListener("error",te),fe.addEventListener("loadeddata",ee);const le=async()=>{const be=!!document.fullscreenElement;try{be?"orientation"in screen&&await(screen.orientation?.lock?.("landscape")??Promise.resolve()):"orientation"in screen&&screen.orientation?.unlock?.()}catch{}};return document.addEventListener("fullscreenchange",le),Y.current=()=>{document.removeEventListener("fullscreenchange",le)},()=>{fe.removeEventListener("loadstart",Ce),fe.removeEventListener("canplay",Z),fe.removeEventListener("error",te),fe.removeEventListener("loadeddata",ee),Y.current&&Y.current()}}catch(ne){N(`Setup error: ${ne instanceof Error?ne.message:"Unknown"}`)}})(),()=>{$.current&&($.current.destroy(),$.current=null)}),[k,x?.video_v2]);const ae=()=>{if(!x?.video_v2){N("No video source available");return}y(!0),N(null),A(!0)},I=V=>{s&&s(V)},ie=V=>{i&&i(V)},R=V=>{if(!V)return"00:00";const J=Math.floor(V),fe=Math.floor(J/3600),Q=Math.floor(J%3600/60),ne=J%60,xe=Ce=>Ce.toString().padStart(2,"0");return J<60?`00:${xe(ne)}`:fe===0?`${xe(Q)}:${xe(ne)}`:`${xe(fe)}:${xe(Q)}:${xe(ne)}`};return b?t.jsxs("div",{className:"min-h-screen bg-background",children:[t.jsx("div",{className:"sticky top-0 z-50 w-full bg-background border-b border-border",children:t.jsx("div",{className:"container mx-auto px-4 py-3",children:t.jsx("div",{className:"h-8 w-24 bg-muted rounded-full animate-pulse"})})}),t.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:t.jsxs("div",{className:"animate-pulse space-y-6",children:[t.jsx("div",{className:"aspect-video bg-muted rounded-xl"}),t.jsxs("div",{className:"space-y-3",children:[t.jsx("div",{className:"h-6 bg-muted rounded w-3/4"}),t.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})]})})]}):v||!x?t.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:t.jsxs("div",{className:"text-center max-w-md mx-auto px-4",children:[t.jsx("h2",{className:"text-xl font-semibold text-card-foreground mb-2",children:"Failed to Load Video"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:v||"Video not found"}),t.jsxs("button",{onClick:()=>{n&&n()},className:"inline-flex items-center gap-2 px-4 py-2 bg-card border border-border text-card-foreground rounded-lg hover:bg-card-hover transition-colors",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4"}),"Go Back"]})]})}):t.jsxs("div",{className:"min-h-screen bg-background",children:[t.jsx("div",{className:"sticky top-0 z-50 w-full bg-background/95 backdrop-blur-sm border-b border-border",children:t.jsx("div",{className:"container mx-auto px-4 py-3",children:t.jsxs("button",{onClick:()=>{n&&n()},className:"inline-flex items-center gap-2 text-muted-foreground hover:text-card-foreground transition-colors",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4"}),"Back"]})})}),t.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[t.jsx("div",{className:"w-full aspect-video bg-black rounded-xl overflow-hidden relative shadow-card",children:k?t.jsxs("div",{className:"relative w-full h-full",children:[t.jsx("video",{ref:q,controls:!0,poster:Br(x.thumbnail),className:"w-full h-full object-contain bg-black",onDoubleClick:async V=>{const J=V.currentTarget;try{document.fullscreenElement?await document.exitFullscreen():await J.requestFullscreen()}catch{}}}),j&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}),m&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/80",children:t.jsxs("div",{className:"text-center text-white",children:[t.jsx("p",{className:"mb-4",children:m}),t.jsx("button",{onClick:()=>{y(!1),N(null)},className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover transition-colors",children:"Try Again"})]})})]}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:Br(x.thumbnail)||`https://images.hive.blog/u/${x.owner}/avatar`,alt:x.title,className:"w-full h-full object-cover",onError:V=>{V.target.src=`https://images.hive.blog/u/${x.owner}/avatar`}}),t.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-30"}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx("button",{onClick:ae,className:"bg-primary hover:bg-primary-hover rounded-full p-6 transform hover:scale-110 transition-all duration-300 shadow-lg",children:t.jsx(z.Play,{className:"w-8 h-8 text-primary-foreground ml-1",fill:"currentColor"})})}),x.duration&&t.jsxs("div",{className:"absolute bottom-4 right-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[t.jsx(z.Clock,{className:"w-3 h-3"}),R(x.duration)]}),x.views&&t.jsxs("div",{className:"absolute bottom-4 left-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[t.jsx(z.Eye,{className:"w-3 h-3"}),x.views.toLocaleString()," views"]})]})}),t.jsx(Nc,{title:x.title||"",author:x.owner||"",permlink:x.permlink||"",createdAt:x.created,description:x.description||"",video:{title:x.title||"",author:x.owner||"",permlink:x.permlink||"",created:x.created||new Date,category:x.category||"",numOfUpvotes:void 0,numOfComments:void 0,hiveValue:void 0,duration:x.duration,thumbnail:x.thumbnail,views:x.views},onTapComment:()=>{u?u(l,p):C(!0)},onTapUpvote:()=>{c?c(l,p):M(!0)},onTapInfo:()=>{d?d(l,p,x.description||""):F(!0)},onTapAuthor:()=>{i&&i(x.owner)},onTapShare:()=>{o&&o(l,p)},onTapBookmark:()=>{h&&h(l,p)}}),x.tags&&t.jsx("div",{className:"flex flex-wrap gap-2",children:x.tags.split(",").map((V,J)=>t.jsxs("span",{className:"bg-primary/10 text-primary px-3 py-1 rounded-full text-sm font-medium hover:bg-primary/20 transition-colors cursor-pointer",onClick:()=>{r&&r(V.trim())},children:["#",V.trim()]},J))})]}),t.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 sticky top-24",children:[t.jsx("h3",{className:"font-semibold text-card-foreground mb-4 text-lg",children:"Related Videos"}),t.jsx("div",{className:"space-y-4",children:t.jsx(ss,{feedType:Ge.RELATED,username:x.owner,onVideoClick:I,onAuthorClick:ie})})]})]})}),D&&l&&p&&t.jsx(op,{author:l,permlink:p,onClose:()=>C(!1)}),T&&l&&p&&t.jsx(lp,{author:l,permlink:p,onClose:()=>M(!1)}),W&&l&&p&&t.jsx(cp,{author:l,permlink:p,content:x.description||"",onClose:()=>F(!1)})]})};var yd={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},dc=P.createContext&&P.createContext(yd),fp=["attr","size","title"];function hp(e,a){if(e==null)return{};var i=pp(e,a),s,r;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)s=n[r],!(a.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(i[s]=e[s])}return i}function pp(e,a){if(e==null)return{};var i={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(a.indexOf(s)>=0)continue;i[s]=e[s]}return i}function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},rs.apply(this,arguments)}function fc(e,a){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),i.push.apply(i,s)}return i}function as(e){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?fc(Object(i),!0).forEach(function(s){mp(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):fc(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function mp(e,a,i){return a=gp(a),a in e?Object.defineProperty(e,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[a]=i,e}function gp(e){var a=bp(e,"string");return typeof a=="symbol"?a:a+""}function bp(e,a){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,a);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function vd(e){return e&&e.map((a,i)=>P.createElement(a.tag,as({key:i},a.attr),vd(a.child)))}function la(e){return a=>P.createElement(xp,rs({attr:as({},e.attr)},a),vd(e.child))}function xp(e){var a=i=>{var{attr:s,size:r,title:n}=e,u=hp(e,fp),c=r||i.size||"1em",d;return i.className&&(d=i.className),e.className&&(d=(d?d+" ":"")+e.className),P.createElement("svg",rs({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},i.attr,s,u,{className:d,style:as(as({color:e.color||i.color},i.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),n&&P.createElement("title",null,n),e.children)};return dc!==void 0?P.createElement(dc.Consumer,null,i=>a(i)):a(yd)}function yp(e){return la({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z"},child:[]}]})(e)}function vp(e){return la({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 405.3V448c0 35.3 86 64 192 64s192-28.7 192-64v-42.7C342.7 434.4 267.2 448 192 448S41.3 434.4 0 405.3zM320 128c106 0 192-28.7 192-64S426 0 320 0 128 28.7 128 64s86 64 192 64zM0 300.4V352c0 35.3 86 64 192 64s192-28.7 192-64v-51.6c-41.3 34-116.9 51.6-192 51.6S41.3 334.4 0 300.4zm416 11c57.3-11.1 96-31.7 96-55.4v-42.7c-23.2 16.4-57.3 27.6-96 34.5v63.6zM192 160C86 160 0 195.8 0 240s86 80 192 80 192-35.8 192-80-86-80-192-80zm219.3 56.3c60-10.8 100.7-32 100.7-56.3v-42.7c-35.5 25.1-96.5 38.6-160.7 41.8 29.5 14.3 51.2 33.5 60 57.2z"},child:[]}]})(e)}function wp(e){return la({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(e)}function _p(e){return la({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM48 400v-64c35.35 0 64 28.65 64 64H48zm0-224v-64h64c0 35.35-28.65 64-64 64zm272 176c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 48h-64c0-35.35 28.65-64 64-64v64zm0-224c-35.35 0-64-28.65-64-64h64v64z"},child:[]}]})(e)}function kp(e){return la({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M560 224h-29.5c-8.8-20-21.6-37.7-37.4-52.5L512 96h-32c-29.4 0-55.4 13.5-73 34.3-7.6-1.1-15.1-2.3-23-2.3H256c-77.4 0-141.9 55-156.8 128H56c-14.8 0-26.5-13.5-23.5-28.8C34.7 215.8 45.4 208 57 208h1c3.3 0 6-2.7 6-6v-20c0-3.3-2.7-6-6-6-28.5 0-53.9 20.4-57.5 48.6C-3.9 258.8 22.7 288 56 288h40c0 52.2 25.4 98.1 64 127.3V496c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-48h128v48c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-80.7c11.8-8.9 22.3-19.4 31.3-31.3H560c8.8 0 16-7.2 16-16V240c0-8.8-7.2-16-16-16zm-128 64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM256 96h128c5.4 0 10.7.4 15.9.8 0-.3.1-.5.1-.8 0-53-43-96-96-96s-96 43-96 96c0 2.1.5 4.1.6 6.2 15.2-3.9 31-6.2 47.4-6.2z"},child:[]}]})(e)}function Np(e){return la({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(e)}const ro=new Md.Client(["https://api.hive.blog"]),jp=async e=>{try{const a=await ro.database.getAccounts([e]);if(!a||a.length===0)throw new Error("Account not found");return a[0]}catch(a){return console.error("Error in getWalletDataDetail:",a),{error:a instanceof Error?a.message:"Unknown error"}}},Ep=async e=>{try{const a=await ro.database.getDynamicGlobalProperties(),i=parseFloat(e.split(" ")[0]),s=parseFloat(String(a.total_vesting_shares).split(" ")[0]),r=parseFloat(String(a.total_vesting_fund_hive).split(" ")[0]);return(i*r/s).toFixed(3)}catch(a){return console.error("Error in convertVestingSharesToHiveData:",a),"0"}},Ap=async e=>{try{const i=(await ro.database.call("get_feed_history",[])).current_median_history,s=parseFloat(i.base.split(" ")[0]),r=typeof e=="string"?parseFloat(e):e;return(s*r).toFixed(2)}catch(a){return console.error("Error in convertHivetoUSDData:",a),"0"}},wd=vc.create(e=>({walletData:null,isLoading:!1,error:null,setWalletData:a=>e({walletData:a}),clearWalletData:()=>e({walletData:null,error:null}),fetchWalletData:async a=>{e({isLoading:!0,error:null});try{const i=await jp(a),s=w=>"error"in w;if(!i||s(i))throw new Error(s(i)?i.error:"Account not found");const r=typeof i.vesting_shares=="string"?i.vesting_shares:"0.000000 VESTS",n=typeof i.balance=="string"?i.balance:i.balance.toString(),u=typeof i.hbd_balance=="string"?i.hbd_balance:i.hbd_balance.toString(),c=typeof i.savings_balance=="string"?i.savings_balance:i.savings_balance.toString(),d=typeof i.savings_hbd_balance=="string"?i.savings_hbd_balance:i.savings_hbd_balance.toString(),f=await Ep(r),o=parseFloat(n.split(" ")[0]||"0"),h=parseFloat(f),l=(o+h).toFixed(3),p=await Ap(l),x={balance:n,hbd_balance:u,savings_balance:c,savings_hbd_balance:d,hive_power:`${f} HP`,estimated_value:`$${p}`};return e({walletData:x}),x}catch(i){const s=i instanceof Error?i.message:"Failed to fetch wallet data";console.error("Wallet fetch error:",s);const r={balance:"0.000 HIVE",hbd_balance:"0.000 HBD",savings_balance:"0.000 HIVE",savings_hbd_balance:"0.000 HBD",hive_power:"0 HP",estimated_value:"$0.00",error:s};return e({walletData:r,error:s}),r}finally{e({isLoading:!1})}}})),Sp=({username:e,className:a=""})=>{const{walletData:i,fetchWalletData:s,isLoading:r,error:n}=wd();P.useEffect(()=>{e&&s(e)},[e,s]);const u=({label:c,value:d,icon:f,colorClass:o="bg-primary/10"})=>t.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-card border border-border shadow-sm mb-3 transition-all duration-200 hover:shadow-md",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[f&&t.jsx("div",{className:`p-2 rounded-full flex items-center justify-center ${o} text-primary`,children:f}),t.jsx("span",{className:"font-semibold text-card-foreground",children:c})]}),t.jsx("span",{className:"font-medium text-muted-foreground",children:d??"-"})]});return t.jsx("div",{className:`min-h-screen bg-gradient-elegant p-4 transition-all duration-300 ${a}`,children:t.jsxs("div",{className:"max-w-md mx-auto",children:[t.jsxs("div",{className:"flex flex-col items-center p-6 mb-6 rounded-xl bg-card border border-border shadow-elegant",children:[e&&t.jsx("img",{src:`https://images.hive.blog/u/${e}/avatar`,alt:`${e} avatar`,className:"w-20 h-20 rounded-full border-4 border-primary/20 mb-3 transition-transform hover:scale-105",onError:c=>{c.target.src=`https://ui-avatars.com/api/?name=${e}&background=random`}}),t.jsx("div",{className:"text-lg font-bold text-card-foreground",children:e}),t.jsx("div",{className:"text-sm text-muted-foreground",children:"Hive Wallet Overview"})]}),t.jsxs("div",{className:"text-center rounded-xl bg-gradient-primary shadow-glow p-6 mb-6 transition-all duration-300 hover:shadow-elegant",children:[t.jsx("div",{className:"text-sm font-semibold text-primary-foreground/80",children:"Estimated Value"}),t.jsx("div",{className:"text-3xl font-bold mt-2 text-primary-foreground",children:r?t.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t.jsx("div",{className:"w-6 h-6 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin"}),"Loading..."]}):i?.estimated_value??"-"})]}),n&&t.jsxs("div",{className:"flex items-center p-3 rounded-lg bg-destructive/10 border border-destructive/20 text-destructive mb-4",children:[t.jsx(wp,{className:"mr-2"}),t.jsx("span",{children:n})]}),t.jsx(u,{label:"Balance",value:i?.balance,icon:t.jsx(Np,{}),colorClass:"bg-blue-500/10"}),t.jsx(u,{label:"HBD Balance",value:i?.hbd_balance,icon:t.jsx(_p,{}),colorClass:"bg-green-500/10"}),t.jsx(u,{label:"Savings Balance",value:i?.savings_balance,icon:t.jsx(kp,{}),colorClass:"bg-yellow-500/10"}),t.jsx(u,{label:"Savings HBD Balance",value:i?.savings_hbd_balance,icon:t.jsx(vp,{}),colorClass:"bg-purple-500/10"}),t.jsx(u,{label:"Hive Power",value:i?.hive_power,icon:t.jsx(yp,{}),colorClass:"bg-orange-500/10"})]})})};function _d({sort:e="trending",tag:a="",observer:i="hive.blog",limit:s=20,showSortDropdown:r=!0,theme:n="dark",onAuthorClick:u,onPostClick:c,onCommunityClick:d,onPayoutClick:f,onUpvoteClick:o,onCommentClick:h,onReblogClick:l}){const[p,x]=P.useState([]),[w,b]=P.useState(!0),[g,v]=P.useState(null),[_,k]=P.useState(e),[y,m]=P.useState(!0),[N,j]=P.useState(!1),A=P.useRef(null);new to.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:q=>q,usertagUrlFn:q=>`/@${q}`,hashtagUrlFn:q=>`/trending/${q}`,isLinkSafeFn:q=>!0,addExternalCssClassToMatchingLinksFn:q=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"});const D=P.useCallback(async(q,$=!1)=>{$?j(!0):(b(!0),m(!0)),v(null);try{const Y=$&&p.length>0?p[p.length-1]:null,X=await Ue.getRankedPosts(q,a,i,s,Y?.author,Y?.permlink);$?(x(ae=>{const I=new Set(ae.map(R=>R.post_id)),ie=X.filter(R=>!I.has(R.post_id));return[...ae,...ie]}),m(X.length===s)):(x(X),m(X.length===s))}catch(Y){v(Y instanceof Error?Y.message:"Failed to load posts"),m(!1)}finally{b(!1),j(!1)}},[a,i,s,p]),C=P.useCallback(()=>{!N&&y&&!w&&D(_,!0)},[N,y,w,_,D]);P.useEffect(()=>{D(_)},[_,a,i,s]),P.useEffect(()=>{const q=new IntersectionObserver($=>{$[0].isIntersecting&&C()},{threshold:1});return A.current&&q.observe(A.current),()=>{A.current&&q.unobserve(A.current)}},[C]);const T=q=>{k(q),x([]),m(!0)},M=q=>q>=1e6?`${(q/1e6).toFixed(1)}M`:q>=1e3?`${(q/1e3).toFixed(1)}K`:q.toString(),W=q=>{const $=q.payout*.5,Y=q.payout*.5,ae=(q.beneficiaries.find(I=>I.account==="commentrewarder")?.weight||0)/1e4*100;return{pending:`$${q.payout.toFixed(2)}`,breakdown:`${$.toFixed(2)} HBD, ${Y.toFixed(2)} HP`,commentRewarder:`${ae.toFixed(2)}%`,payoutInDays:Math.ceil((new Date(q.payout_at).getTime()-Date.now())/(1e3*60*60*24))}},F=q=>{const Y=(q.body||"").replace(/!\[[^\]]*\]\([^)]+\)/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/^#+\s*/gm,"").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/\*([^*]+)\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/<[^>]*>/g,"").replace(/\n+/g," ").trim();return Y.length>200?Y.substring(0,200)+"...":Y};return w?t.jsx("div",{className:"flex justify-center items-center min-h-[400px]",children:t.jsx(z.Loader2,{className:"w-8 h-8 animate-spin"})}):g?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground",children:"Failed to load posts"}),t.jsx("p",{className:"text-muted-foreground",children:g}),t.jsx("button",{onClick:()=>D(_),className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90",children:"Retry"})]}):t.jsx("div",{className:n==="dark"?"dark":"",children:t.jsxs("div",{className:`space-y-6 p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[r&&t.jsx("div",{className:"flex justify-center",children:t.jsxs("select",{value:_,onChange:q=>T(q.target.value),className:`px-4 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary ${n==="dark"?"bg-slate-950 text-white":"bg-card text-card-foreground"}`,children:[t.jsx("option",{value:"trending",children:"Trending"}),t.jsx("option",{value:"hot",children:"Hot"}),t.jsx("option",{value:"created",children:"New"})]})}),t.jsxs("div",{className:"space-y-4",children:[p.map(q=>{const $=q.json_metadata?.image?.[0],Y=W(q);return t.jsxs("div",{className:`border border-border rounded-xl p-4 shadow-card hover:shadow-card-hover transition-shadow ${n==="dark"?"bg-slate-900 text-white":"bg-slate-50 text-black"}`,children:[t.jsxs("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[t.jsx("img",{src:`https://images.hive.blog/u/${q.author}/avatar`,alt:q.author,className:"w-8 h-8 rounded-full cursor-pointer flex-shrink-0",onClick:()=>u?.(q.author,`https://images.hive.blog/u/${q.author}/avatar`),onError:X=>{X.target.src=`https://ui-avatars.com/api/?name=${q.author}&background=random`}}),t.jsx("span",{className:"font-medium cursor-pointer hover:text-primary",onClick:()=>u?.(q.author,`https://images.hive.blog/u/${q.author}/avatar`),children:q.author}),t.jsxs("span",{className:n==="dark"?"text-gray-400":"text-muted-foreground",children:["(",q.author_reputation.toFixed(2),")"]}),t.jsx("span",{className:`cursor-pointer hover:text-primary ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,onClick:()=>d?.(q.community_title),children:q.community_title}),t.jsx("span",{className:`hidden sm:inline ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:"•"}),t.jsx("span",{className:`text-sm ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:ns.formatDistanceToNow(new Date(q.created+"Z"),{addSuffix:!0})})]}),t.jsxs("div",{className:"flex gap-3 sm:gap-4",children:[t.jsx("div",{className:"flex-shrink-0",children:$?t.jsxs("div",{className:"relative",children:[t.jsx("img",{src:$.startsWith("http")?$:`https://images.hive.blog/u/320x0/${$}`,alt:q.title,className:"w-20 h-20 sm:w-32 sm:h-32 object-cover rounded-lg cursor-pointer",onClick:()=>c?.(q),onError:X=>{X.target.src!==`https://images.hive.blog/u/${q.author}/avatar`?X.target.src=`https://images.hive.blog/u/${q.author}/avatar`:X.target.src="https://images.hive.blog/u/null/avatar"}}),(()=>{const X=q.body?.match(/!\[[^\]]*\]\(([^)]+)\)/g)?.map(ae=>{const I=ae.match(/\(([^)]+)\)/);return I?I[1]:null}).filter(Boolean)||[];return X.length>0?t.jsx("div",{className:"absolute -bottom-1 -right-1 sm:-bottom-2 sm:-right-2 flex space-x-1",children:X.slice(0,3).map((ae,I)=>t.jsx("img",{src:ae,alt:`body-image-${I}`,className:"w-6 h-6 sm:w-8 sm:h-8 object-cover rounded border-2 border-white shadow-sm cursor-pointer",onClick:ie=>{ie.stopPropagation();const R=ie.currentTarget.parentElement?.parentElement?.querySelector("img:not(.w-6):not(.w-8)");R&&(R.src=ae)}},I))}):null})()]}):t.jsx("img",{src:`https://images.hive.blog/u/${q.author}/avatar`,alt:q.author,className:"w-20 h-20 sm:w-32 sm:h-32 rounded-lg cursor-pointer",onClick:()=>c?.(q)})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"font-semibold text-base sm:text-lg mb-1 sm:mb-2 cursor-pointer hover:text-primary line-clamp-2",onClick:()=>c?.(q),children:q.title}),t.jsx("p",{className:`mb-2 sm:mb-3 line-clamp-2 sm:line-clamp-3 cursor-pointer hover:text-primary text-sm sm:text-base ${n==="dark"?"text-gray-300":"text-gray-600"}`,onClick:()=>c?.(q),children:q.json_metadata?.description||F(q)||"No description available"}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"relative group",children:[t.jsxs("span",{className:"font-semibold text-green-600 cursor-pointer hover:text-green-700 text-sm sm:text-base",onClick:()=>f?.(q.payout),children:["$",q.payout.toFixed(2)]}),t.jsxs("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block bg-black text-white text-xs p-2 rounded shadow-lg whitespace-nowrap z-10",children:[t.jsxs("div",{children:["Pending payout amount: ",Y.pending]}),t.jsxs("div",{children:["Breakdown: ",Y.breakdown]}),t.jsxs("div",{children:["commentrewarder: ",Y.commentRewarder]}),t.jsxs("div",{children:["Payout in ",Y.payoutInDays," days"]})]})]}),t.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[t.jsxs("div",{className:`flex items-center gap-1 hover:text-primary transition-colors cursor-pointer ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,onClick:()=>o?.(q),children:[t.jsx(z.ThumbsUp,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:M(q.stats.total_votes)})]}),t.jsxs("div",{className:`flex items-center gap-1 hover:text-blue-400 transition-colors cursor-pointer ${n==="dark"?"text-blue-400":"text-blue-600"}`,onClick:()=>h?.(q),children:[t.jsx(z.MessageCircle,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:M(q.children)})]}),t.jsxs("div",{className:`flex items-center gap-1 hover:text-gray-400 transition-colors cursor-pointer ${n==="dark"?"text-gray-400":"text-gray-600"}`,onClick:()=>l?.(q),children:[t.jsx(z.Repeat2,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:M(q.reblogs)})]})]})]})]})]})]},q.post_id)}),N&&t.jsxs("div",{className:"flex justify-center items-center py-4",children:[t.jsx(z.Loader2,{className:"w-6 h-6 animate-spin"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:"Loading more posts..."})]}),y&&!N&&t.jsx("div",{ref:A,className:"h-10"})]})]})})}class sa{static instance;static getInstance(){return sa.instance||(sa.instance=new sa),sa.instance}async getProposals(a){return a==="expired"?this.getExpiredProposals():this.getActiveProposals()}async getActiveProposals(){try{const s=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:72,jsonrpc:"2.0",method:"database_api.list_proposals",params:{start:[-1],limit:500,order:"by_total_votes",order_direction:"descending",status:"votable"}})})).json()).result.proposals,n=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),u={};n.forEach(h=>{u[h.proposal_id]=h});const f=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:73,jsonrpc:"2.0",method:"database_api.list_proposal_votes",params:{start:["shaktimaaan"],limit:1e3,order:"by_voter_proposal",order_direction:"ascending",status:"votable"}})})).json()).result.proposal_votes||[],o={};return f.forEach(h=>{o[h.proposal.proposal_id]||(o[h.proposal.proposal_id]=[]),o[h.proposal.proposal_id].push(h)}),s.map(h=>{const l=h.id,p=u[l],x=o[l]||[],w=x.reduce((b,g)=>b+parseFloat(g.total_hbd||"0"),0);return{proposal_id:l,subject:h.subject,permlink:h.permlink,creator:h.creator,receiver:h.receiver,start_date:h.start_date,end_date:h.end_date,total_hbd_received:p?p.total_hbd_received:"0",max_hbd_remaining:p?p.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:p?p.all_votes_hp:w.toString(),votes:p?p.votes:x,status:h.status,daily_pay:h.daily_pay,total_votes:h.total_votes,daily_pay_hbd:h.daily_pay?Number(h.daily_pay.amount)/Math.pow(10,h.daily_pay.precision):0,remaining_days:Math.max(0,Math.ceil((new Date(h.end_date).getTime()-new Date().getTime())/(1e3*60*60*24))),vote_value_total:p?parseFloat(p.all_votes_hp):w}})}catch(a){return console.error("Error fetching active proposals:",a),[]}}async getExpiredProposals(){try{const s=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:65,jsonrpc:"2.0",method:"database_api.list_proposals",params:{start:[-1],limit:500,order:"by_total_votes",order_direction:"descending",status:"expired"}})})).json()).result.proposals,n=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),u={};n.forEach(h=>{u[h.proposal_id]=h});const f=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:76,jsonrpc:"2.0",method:"database_api.list_proposal_votes",params:{start:["shaktimaaan"],limit:1e3,order:"by_voter_proposal",order_direction:"ascending",status:"expired"}})})).json()).result.proposal_votes||[],o={};return f.forEach(h=>{o[h.proposal_id]||(o[h.proposal_id]=[]),o[h.proposal_id].push(h)}),s.map(h=>{const l=h.id,p=u[l],x=o[l]||[],w=x.reduce((b,g)=>b+parseFloat(g.total_hbd||"0"),0);return{proposal_id:l,subject:h.subject,permlink:h.permlink,creator:h.creator,receiver:h.receiver,start_date:h.start_date,end_date:h.end_date,total_hbd_received:p?p.total_hbd_received:"0",max_hbd_remaining:p?p.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:p?p.all_votes_hp:w.toString(),votes:p?p.votes:x,status:h.status,daily_pay:h.daily_pay,total_votes:h.total_votes,daily_pay_hbd:h.daily_pay?Number(h.daily_pay.amount)/Math.pow(10,h.daily_pay.precision):0,remaining_days:0,vote_value_total:p?parseFloat(p.all_votes_hp):w}})}catch(a){return console.error("Error fetching expired proposals:",a),[]}}}const hc=sa.getInstance(),Cp=["All","Active","Upcoming","Expired","By Peak Projects"],kd=["Votes","Start Date","End Date","Creator"],pc=e=>e==="By Peak Projects"?["Creator"]:kd,it=e=>{const a=typeof e=="string"?parseFloat(e):e;return isNaN(a)?e.toString():a.toLocaleString()},Si=e=>{const a=new Date(e.start_date),i=new Date(e.end_date);return`(${Math.ceil((i.getTime()-a.getTime())/(1e3*60*60*24))} days)`},Dp=({onClickSupport:e,onClickVoteValue:a,onClickSelect:i,onClickUser:s,onClickAvatar:r,theme:n="dark"})=>{const[u,c]=P.useState([]),[d,f]=P.useState("All"),[o,h]=P.useState("Votes");P.useEffect(()=>{d==="By Peak Projects"&&!pc(d).includes(o)?h("Creator"):d!=="By Peak Projects"&&o==="Creator"&&!kd.includes(o)&&h("Votes")},[d,o]);const[l,p]=P.useState(!0);P.useEffect(()=>{(async()=>{p(!0);try{const[g,v]=await Promise.all([hc.getProposals("active"),hc.getProposals("expired")]);c([...g,...v])}catch(g){console.error("Error fetching proposals:",g),c([])}p(!1)})()},[]);const x=u.filter(b=>d==="All"?b.status==="active"||new Date(b.start_date+"Z")>new Date:d==="Active"?b.status==="active":d==="Upcoming"?new Date(b.start_date+"Z")>new Date:d==="Expired"?new Date(b.end_date+"Z")<new Date:d==="By Peak Projects"?b.creator==="peakd":!0).sort((b,g)=>d==="By Peak Projects"?g.creator.localeCompare(b.creator):0),w=d==="All"?(()=>{const b=x.filter(_=>_.status==="active"),g=x.filter(_=>new Date(_.start_date+"Z")>new Date),v=(_,k)=>o==="Votes"?Number(k.all_votes_num)-Number(_.all_votes_num):o==="Start Date"?new Date(k.start_date+"Z").getTime()-new Date(_.start_date+"Z").getTime():o==="End Date"?new Date(_.end_date+"Z").getTime()-new Date(k.end_date+"Z").getTime():o==="Creator"?_.creator.localeCompare(k.creator):0;return[...b.sort(v),...g.sort(v)]})():x.sort((b,g)=>o==="Votes"?Number(g.all_votes_num)-Number(b.all_votes_num):o==="Start Date"?new Date(g.start_date+"Z").getTime()-new Date(b.start_date+"Z").getTime():o==="End Date"?new Date(b.end_date+"Z").getTime()-new Date(g.end_date+"Z").getTime():o==="Creator"?b.creator.localeCompare(g.creator):0);return l?t.jsx("div",{className:"flex justify-center items-center py-8",children:t.jsx("div",{className:"text-gray-600 dark:text-gray-400",children:"Loading proposals..."})}):t.jsx("div",{className:n==="dark"?"dark":"",children:t.jsxs("div",{className:`space-y-6 p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:"flex gap-2 mb-4 flex-wrap",children:Cp.map(b=>t.jsx("button",{className:`px-3 py-1 rounded text-sm ${d===b?"bg-blue-500 text-white":`${n==="dark"?"bg-slate-900 text-gray-300":"bg-gray-200 text-gray-700"}`}`,onClick:()=>f(b),children:b},b))}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:`${n==="dark"?"text-gray-300":"text-gray-700"} mr-2`,children:"Sort by:"}),t.jsx("select",{value:o,onChange:b=>h(b.target.value),className:`px-3 py-1 border rounded ${n==="dark"?"border-gray-600 bg-slate-900 text-gray-100":"border-gray-300 bg-white text-gray-900"}`,children:pc(d).map(b=>t.jsx("option",{value:b,children:b},b))})]}),t.jsxs("div",{children:[d==="All"&&(()=>{const b=w.filter(v=>v.status==="active"),g=w.filter(v=>new Date(v.start_date+"Z")>new Date);return t.jsxs(t.Fragment,{children:[b.map(v=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-900":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(v),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${v.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${v.creator} avatar`})}),t.jsxs("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(v),children:["by ",v.creator]}),v.receiver&&t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:v.receiver})]})]}),t.jsxs("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(v),children:[v.subject," ",t.jsxs("span",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-500":"text-gray-600"}`,children:["#",v.proposal_id]})]}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(v.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(v.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":v.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(v.start_date+"Z")>new Date?"upcoming":new Date(v.end_date+"Z")<new Date?"expired":v.status})," - "+new Date(v.start_date+"Z").toLocaleDateString()+" - "+new Date(v.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:Si(v)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/${v.creator}/${v.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${v.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(v),children:["Vote value: ",v.vote_value_total?it(v.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Daily Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[v.daily_pay_hbd?it(v.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Remaining:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.remaining_days||0)," Days"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Paid:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"To Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>e(v),children:"Support"})})]})]})},v.proposal_id)),g.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"my-6 text-center",children:[t.jsx("h3",{className:`text-xl font-bold mb-2 ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:"Upcoming proposals"}),t.jsx("p",{className:`${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"The proposals listed below will start in the future. You can already support them."})]}),g.map(v=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-950":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(v),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${v.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${v.creator} avatar`})}),t.jsx("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(v),children:v.creator}),t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:v.receiver})]})]}),t.jsx("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(v),children:v.subject}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(v.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(v.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":v.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(v.start_date+"Z")>new Date?"upcoming":new Date(v.end_date+"Z")<new Date?"expired":v.status})," - "+new Date(v.start_date+"Z").toLocaleDateString()+" - "+new Date(v.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:Si(v)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/${v.creator}/${v.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${v.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(v),children:["Vote value: ",v.vote_value_total?it(v.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Daily Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[v.daily_pay_hbd?it(v.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Remaining:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.remaining_days||0)," Days"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Paid:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"To Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>e(v),children:"Support"})})]})]})},v.proposal_id))]})]})})(),d!=="All"&&w.map(b=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-950":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(b),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${b.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${b.creator} avatar`})}),t.jsx("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(b),children:b.creator}),t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:b.receiver})]})]}),t.jsxs("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(b),children:[b.subject," #",b.proposal_id]}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(b.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(b.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":b.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(b.start_date+"Z")>new Date?"upcoming":new Date(b.end_date+"Z")<new Date?"expired":b.status})," - "+new Date(b.start_date+"Z").toLocaleDateString()+" - "+new Date(b.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:Si(b)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${b.creator}/${b.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${b.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(b),children:["Vote value: ",b.vote_value_total?it(b.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Daily Pay:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[b.daily_pay_hbd?it(b.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Remaining:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[it(b.remaining_days||0)," Days"]})]}),d!=="Expired"&&t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Paid:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[it(b.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"To Pay:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[it(b.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>e(b),children:"Support"})})]})]})},b.proposal_id))]})]})})};class Tp{HIVE_API_URL="https://api.hive.blog";async getProfile(a){const i={jsonrpc:"2.0",method:"bridge.get_profile",params:{account:a},id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return await s.json()}async getFollowers(a){const i={jsonrpc:"2.0",method:"condenser_api.get_followers",params:[a,null,"blog"],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getFollowing(a){const i={jsonrpc:"2.0",method:"condenser_api.get_following",params:[a,null,"blog"],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getAccounts(a){const i={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[a],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getDynamicGlobalProperties(){const a={jsonrpc:"2.0",method:"condenser_api.get_dynamic_global_properties",params:[],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async convertVestingSharesToHive(a){try{const i=await this.getDynamicGlobalProperties(),s=parseFloat(a.split(" ")[0]),r=parseFloat(i.total_vesting_shares.split(" ")[0]),n=parseFloat(i.total_vesting_fund_hive.split(" ")[0]);return(s*n/r).toFixed(3)}catch(i){return console.error("Error converting vesting shares:",i),"0"}}async getFeedHistory(){const a={jsonrpc:"2.0",method:"condenser_api.get_feed_history",params:[],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async getVoteValue(a,i=1e4){try{const s=await this.getAccounts([a]);if(s.length===0)throw new Error("Account not found!");const r=s[0],n=await this.getDynamicGlobalProperties(),u=await this.getFeedHistory(),c=parseFloat(r.vesting_shares)+parseFloat(r.received_vesting_shares)-parseFloat(r.delegated_vesting_shares)-parseFloat(r.vesting_withdraw_rate),d=Math.floor(Date.now()/1e3)-r.voting_manabar.last_update_time,f=c*1e6/4;let o=parseFloat(r.voting_manabar.current_mana.toString())+d*f/(300*60*24);o>f&&(o=f);const h=o*100/f,l=r.vesting_shares||"0 VESTS",p=parseFloat(l.toString().split(" ")[0]),x=n.total_vesting_shares||"0 VESTS",w=parseFloat(x.toString().split(" ")[0]),b=i/1e4,g=h*b/100,v=n.vote_power_reserve_rate*(300*60*24)/(3600*24),_=g*f/100,k=parseFloat(n.recent_claims||"0"),y=n.reward_balance||"0 HIVE",m=parseFloat(y.toString().split(" ")[0]),N=n.current_supply||"0 HIVE",j=parseFloat(N.toString().split(" ")[0]),A=n.current_sbd_supply||"0 HBD",D=parseFloat(A.toString().split(" ")[0]),C=m/k*(p/w)*(_/f)*j,T=u?.current_median_history;if(!T||!T.base)return"0.00";const M=parseFloat(T.base.toString().split(" ")[0]);return(C*M).toFixed(2)}catch(s){return console.error("Error calculating vote value:",s),"0.00"}}userAvatar(a){return`https://images.hive.blog/u/${a}/avatar`}}const ge=new Tp,mc=({vestingShares:e})=>{const[a,i]=P.useState("...");return P.useEffect(()=>{(async()=>{try{const r=await ge.convertVestingSharesToHive(e);i(r)}catch(r){console.error("Error calculating HP:",r);const n=parseFloat(e.split(" ")[0]);i((n/1e6).toFixed(3))}})()},[e]),t.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[a," HP"]})},Op=({username:e,onClickAuthor:a,onClickAddRemoveFromLists:i,onClickFollow:s})=>{const[r,n]=P.useState([]),[u,c]=P.useState([]),[d,f]=P.useState({}),[o,h]=P.useState(!0),[l,p]=P.useState(null),[x,w]=P.useState(null),b=P.useRef(null),g=async()=>{try{h(!0),p(null);const k=await ge.getFollowers(e);if(n(k),k.length>0){const y=k.map(A=>A.follower),m=await ge.getAccounts(y);c(m);const N={},j={};for(const A of k)try{const D=await ge.getVoteValue(A.follower);j[A.follower]=D}catch(D){console.warn(`Failed to get voting data for ${A.follower}:`,D),N[A.follower]={upvotepower:"0",downvote:"0"},j[A.follower]="0.00"}f(j)}}catch(k){p(k instanceof Error?k.message:"Failed to load followers data")}finally{h(!1)}};P.useEffect(()=>{g()},[e]),P.useEffect(()=>{const k=y=>{b.current&&!b.current.contains(y.target)&&w(null)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[]);const v=k=>{const y=u.find(m=>m.name===k);if(!y)return null;try{return JSON.parse(y.posting_json_metadata)?.profile||{}}catch{return{}}},_=k=>{const y=new Date,m=new Date(k),N=y.getTime()-m.getTime(),j=Math.floor(N/(1e3*60*60*24));if(Math.floor(j/30)>=1)return m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const D=Math.floor(N/1e3),C=Math.floor(D/60),T=Math.floor(C/60),M=Math.floor(j/7),W=Math.floor(j/365);return W>0?`${W} year${W>1?"s":""} ago`:M>0?`${M} week${M>1?"s":""} ago`:j>0?`${j} day${j>1?"s":""} ago`:T>0?`${T} hour${T>1?"s":""} ago`:C>0?`${C} minute${C>1?"s":""} ago`:"Just now"};return o?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):l?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:g,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"hidden md:block overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),t.jsx("tbody",{children:r.map((k,y)=>{const m=u.find(j=>j.name===k.follower),N=v(k.follower);return t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.jsx("td",{className:"py-4 px-4",children:t.jsx("img",{src:N?.profile_image||ge.userAvatar(k.follower),alt:k.follower,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>a&&a(k.follower),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${k.follower}&background=random`}})}),t.jsxs("td",{className:"py-4 px-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>a&&a(k.follower),children:["@",k.follower]}),N?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:N.location})]})]}),N?.about&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:N.about})]}),t.jsx("td",{className:"py-4 px-4",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:_(m.last_root_post)}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),t.jsx("td",{className:"py-4 px-4",children:m?t.jsx(mc,{vestingShares:m.vesting_shares}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:d[k.follower]?t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",d[k.follower]]}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:t.jsxs("div",{className:"relative",ref:x===k.follower?b:null,children:[t.jsx("button",{onClick:()=>w(x===k.follower?null:k.follower),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),x===k.follower&&t.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(k.follower),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(k.follower),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-4 h-4"}),"Follow"]})]})]})})]},`${k.follower}-${y}`)})})]})}),t.jsx("div",{className:"md:hidden space-y-4",children:r.map((k,y)=>{const m=u.find(j=>j.name===k.follower),N=v(k.follower);return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("img",{src:N?.profile_image||ge.userAvatar(k.follower),alt:k.follower,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>a&&a(k.follower),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${k.follower}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 text-sm",onClick:()=>a&&a(k.follower),children:["@",k.follower]}),N?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:N.location})]})]}),t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?_(m.last_root_post):t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),t.jsxs("div",{className:"flex items-center justify-between mt-2",children:[t.jsx("div",{className:"flex items-center gap-4",children:m&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:t.jsx(mc,{vestingShares:m.vesting_shares})})}),t.jsxs("div",{className:"relative",ref:x===k.follower?b:null,children:[t.jsx("button",{onClick:()=>w(x===k.follower?null:k.follower),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),x===k.follower&&t.jsxs("div",{className:"absolute right-0 mt-1 w-40 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(k.follower),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(k.follower),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-3 h-3"}),"Follow"]})]})]})]})]})]})},`${k.follower}-${y}`)})})]})},gc=({vestingShares:e})=>{const[a,i]=P.useState("...");return P.useEffect(()=>{(async()=>{try{const r=await ge.convertVestingSharesToHive(e);i(r)}catch(r){console.error("Error calculating HP:",r);const n=parseFloat(e.split(" ")[0]);i((n/1e6).toFixed(3))}})()},[e]),t.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[a," HP"]})},Pp=({username:e,onClickAuthor:a,onClickAddRemoveFromLists:i,onClickUnfollow:s})=>{const[r,n]=P.useState([]),[u,c]=P.useState([]),[d,f]=P.useState({}),[o,h]=P.useState(!0),[l,p]=P.useState(null),[x,w]=P.useState(null),b=P.useRef(null),g=async()=>{try{h(!0),p(null);const k=await ge.getFollowing(e);if(n(k),k.length>0){const y=k.map(j=>j.following),m=await ge.getAccounts(y);c(m);const N={};for(const j of k)try{const A=await ge.getVoteValue(j.following);N[j.following]=A}catch(A){console.warn(`Failed to get voting data for ${j.following}:`,A),N[j.following]="0.00"}f(N)}}catch(k){p(k instanceof Error?k.message:"Failed to load following data")}finally{h(!1)}};P.useEffect(()=>{g()},[e]),P.useEffect(()=>{const k=y=>{b.current&&!b.current.contains(y.target)&&w(null)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[]);const v=k=>{const y=u.find(m=>m.name===k);if(!y)return null;try{return JSON.parse(y.posting_json_metadata)?.profile||{}}catch{return{}}},_=k=>{const y=new Date,m=new Date(k),N=y.getTime()-m.getTime(),j=Math.floor(N/(1e3*60*60*24));if(Math.floor(j/30)>=1)return m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const D=Math.floor(N/1e3),C=Math.floor(D/60),T=Math.floor(C/60),M=Math.floor(j/7),W=Math.floor(j/365);return W>0?`${W} year${W>1?"s":""} ago`:M>0?`${M} week${M>1?"s":""} ago`:j>0?`${j} day${j>1?"s":""} ago`:T>0?`${T} hour${T>1?"s":""} ago`:C>0?`${C} minute${C>1?"s":""} ago`:"Just now"};return o?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading following..."]})}):l?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load following"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:g,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user is not following anyone."})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"hidden md:block overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),t.jsx("tbody",{children:r.map((k,y)=>{const m=u.find(j=>j.name===k.following),N=v(k.following);return t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.jsx("td",{className:"py-4 px-4",children:t.jsx("img",{src:N?.profile_image||ge.userAvatar(k.following),alt:k.following,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>a&&a(k.following),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${k.following}&background=random`}})}),t.jsxs("td",{className:"py-4 px-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>a&&a(k.following),children:["@",k.following]}),N?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:N.location})]})]}),N?.about&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:N.about})]}),t.jsx("td",{className:"py-4 px-4",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:_(m.last_root_post)}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),t.jsx("td",{className:"py-4 px-4",children:m?t.jsx(gc,{vestingShares:m.vesting_shares}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:d[k.following]?t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",d[k.following]]}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:t.jsxs("div",{className:"relative",ref:x===k.following?b:null,children:[t.jsx("button",{onClick:()=>w(x===k.following?null:k.following),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),x===k.following&&t.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(k.following),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(k.following),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-4 h-4"}),"Unfollow"]})]})]})})]},`${k.following}-${y}`)})})]})}),t.jsx("div",{className:"md:hidden space-y-4",children:r.map((k,y)=>{const m=u.find(j=>j.name===k.following),N=v(k.following);return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("img",{src:N?.profile_image||ge.userAvatar(k.following),alt:k.following,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>a&&a(k.following),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${k.following}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 text-sm",onClick:()=>a&&a(k.following),children:["@",k.following]}),N?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:N.location})]})]}),t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?_(m.last_root_post):t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),t.jsxs("div",{className:"flex items-center justify-between mt-2",children:[t.jsx("div",{className:"flex items-center gap-4",children:m&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:t.jsx(gc,{vestingShares:m.vesting_shares})})}),t.jsxs("div",{className:"relative",ref:x===k.following?b:null,children:[t.jsx("button",{onClick:()=>w(x===k.following?null:k.following),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),x===k.following&&t.jsxs("div",{className:"absolute right-0 mt-1 w-40 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(k.following),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(k.following),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-3 h-3"}),"Unfollow"]})]})]})]})]})]})},`${k.following}-${y}`)})})]})},bc=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class Lp{async getAccountHistory(a,i=-1,s=1e3,r,n){try{const u=[a,i,s];return r!==void 0&&n!==void 0&&u.push(r,n),(await bc.call("condenser_api","get_account_history",u)).map(([d,f])=>({index:d,block:f.block,op:{type:f.op[0],value:f.op[1]},op_in_trx:f.op_in_trx,timestamp:f.timestamp,trx_id:f.trx_id,trx_in_block:f.trx_in_block,virtual_op:f.virtual_op}))}catch(u){return console.error("Error fetching account history:",u),[]}}async getNextAccountHistoryPage(a,i,s=1e3){try{const r=i-1;return(await bc.call("condenser_api","get_account_history",[a,r,s])).map(([c,d])=>({index:c,block:d.block,op:{type:d.op[0],value:d.op[1]},op_in_trx:d.op_in_trx,timestamp:d.timestamp,trx_id:d.trx_id,trx_in_block:d.trx_in_block,virtual_op:d.virtual_op})).filter(c=>c.index<i)}catch(r){return console.error("Error fetching next page of account history:",r),[]}}convertToActivityListItems(a,i){return a.filter(s=>{const r=s.op.type;return r!=="effective_comment_vote"&&r!=="witness_set_properties"&&r!=="producer_reward"&&r!=="comment_reward"&&r!=="comment_payout_update"&&r!=="claim_reward_balance"&&r!=="transfer"&&r!=="claim_account"&&r!=="transfer_to_vesting"&&r!=="transfer_to_vesting_completed"}).map(s=>{const r=this.parseOperation(s,i);return{id:`${s.index}-${s.trx_id}`,type:r.type,direction:r.direction,timestamp:s.timestamp,block:s.block,description:r.description,details:s.op.value,index:s.index,...r.extraFields}}).filter(s=>s!==null)}parseOperation(a,i){const{op:s}=a,r=s.type,n=s.value;switch(r){case"vote":return this.parseVoteOperation(n,i);case"comment":return this.parseCommentOperation(n,i);case"custom_json":return this.parseCustomJsonOperation(n,i);case"comment_options":return this.parseCommentOptionsOperation(n,i);case"effective_comment_vote":return this.parseEffectiveCommentVoteOperation(n,i);case"curation_reward":return this.parseCurationRewardOperation(n,i);case"author_reward":return this.parseAuthorRewardOperation(n,i);case"comment_benefactor_reward":return this.parseCommentBenefactorRewardOperation(n,i);default:return{type:"other",direction:"out",description:`${r} operation`,extraFields:{}}}}parseVoteOperation(a,i){const{voter:s,author:r,permlink:n,weight:u}=a,c=r===i,d=c?"in":"out",f=(u/100).toFixed(0);let o="";return c?o=`${s} voted ${r}/${n} with ${f}%`:o=`Voted ${r}/${n} with ${f}%`,{type:"vote",direction:d,description:o,extraFields:{voter:s,author:r,permlink:n,weight:parseInt(f)}}}parseCommentOperation(a,i){const{author:s,parent_author:r,parent_permlink:n,permlink:u}=a,d=r===i?"in":"out",o=`Commented on ${n} by ${r||s}.`;return{type:"comment",direction:d,description:o,extraFields:{author:s,permlink:u,parent_author:r,parent_permlink:n}}}parseCustomJsonOperation(a,i){const{id:s,json:r,required_auths:n,required_posting_auths:u}=a;let c={};try{c=JSON.parse(r)}catch{}let d="Custom Json";if(s==="follow"){const[f,o]=c;f==="follow"&&(d="Custom Json")}return{type:"custom_json",direction:"out",description:d,extraFields:{}}}parseCommentOptionsOperation(a,i){const{author:s,permlink:r,max_accepted_payout:n}=a;return{type:"comment_options",direction:"out",description:"Comment Payout Update",extraFields:{author:s,permlink:r,payout:n}}}parseEffectiveCommentVoteOperation(a,i){const{voter:s,author:r,permlink:n,pending_payout:u}=a,c=r===i,d=c?"in":"out",f=c?`${s} voted on ${r}/${n} (effective vote)`:`Effective vote on ${r}/${n}`;return{type:"effective_comment_vote",direction:d,description:f,extraFields:{voter:s,author:r,permlink:n,payout:u}}}parseCurationRewardOperation(a,i){const{author:s,curator:r,permlink:n,reward:u}=a,d=r===i?"in":"out",h=`${(parseFloat(u.split(" ")[0])*1e-6).toFixed(3)} HP`,l=`Curation reward for ${r}/${n} by ${s}`;return{type:"curation_reward",direction:d,description:l,extraFields:{author:s,curator:r,permlink:n,reward:h}}}parseAuthorRewardOperation(a,i){const{author:s,permlink:r,hbd_payout:n,hive_payout:u,vesting_payout:c}=a,f=s===i?"in":"out",h=(parseFloat(c.split(" ")[0])*1e-6).toFixed(3),l=n.split(" ")[0],p=u.split(" ")[0],x=`Author reward: ${l} HBD, ${p} HIVE, ${h} HP for ${r}`;return{type:"author_reward",direction:f,description:x,extraFields:{author:s,permlink:r,hbd_payout:n,hive_payout:u,vesting_payout:c}}}parseCommentBenefactorRewardOperation(a,i){const{author:s,benefactor:r,permlink:n,hbd_payout:u,hive_payout:c,vesting_payout:d}=a,o=r===i?"in":"out",l=(parseFloat(d.split(" ")[0])*1e-6).toFixed(3),p=u.split(" ")[0],x=c.split(" ")[0],w=`Benefactor reward on ${n} by ${s}: ${p} HBD, ${x} HIVE, ${l} HP`;return{type:"comment_benefactor_reward",direction:o,description:w,extraFields:{author:s,benefactor:r,permlink:n,hbd_payout:u,hive_payout:c,vesting_payout:d}}}filterByDirection(a,i){return i==="all"?a:a.filter(s=>s.direction===i)}filterByGeneralType(a,i){if(i==="all")return a;switch(i){case"votes":return a.filter(s=>s.type==="vote"||s.type==="effective_comment_vote");case"comments":return a.filter(s=>s.type==="comment");case"replies":return a.filter(s=>s.type==="comment"&&s.direction==="in");case"others":return a.filter(s=>s.type==="custom_json"||s.type==="comment_options"||s.type==="other");default:return a}}filterByRewardType(a,i){if(i==="all")return a;switch(i){case"author":return a.filter(s=>s.type==="effective_comment_vote"&&s.direction==="in");case"curation":return a.filter(s=>s.type==="effective_comment_vote"&&s.direction==="out");case"benefactor":return a.filter(s=>s.type==="comment_options"&&s.details?.beneficiaries);default:return a}}searchActivities(a,i){if(!i.trim())return a;const s=i.toLowerCase();return a.filter(r=>r.description.toLowerCase().includes(s)||r.author?.toLowerCase().includes(s)||r.permlink?.toLowerCase().includes(s)||r.voter?.toLowerCase().includes(s))}getRelativeTime(a){try{const i=new Date(a),r=new Date().getTime()-i.getTime(),n=Math.floor(r/1e3),u=Math.floor(n/60),c=Math.floor(u/60),d=Math.floor(c/24);return n<60?`${n} seconds ago`:u<60?`${u} minutes ago`:c<24?`${c} hours ago`:d<7?`${d} days ago`:i.toLocaleDateString()}catch(i){return console.error("Error calculating relative time:",i),a}}}const ra=new Lp,$p=({username:e,directionFilter:a="all",generalFilter:i="all",rewardFilter:s="all",searchTerm:r="",limit:n=1e3,className:u,onClickPermlink:c,onSelectActivity:d})=>{const[f,o]=P.useState(r),[h,l]=P.useState(a),[p,x]=P.useState(i),[w,b]=P.useState(s),[g,v]=P.useState([]),[_,k]=P.useState([]),[y,m]=P.useState(!1),[N,j]=P.useState(null),[A,D]=P.useState(new Set),[C,T]=P.useState(null),[M,W]=P.useState(!0),[F,q]=P.useState(!1),[$,Y]=P.useState(-1),X=P.useRef(null),ae=async(V=!1)=>{if(e){V?q(!0):(m(!0),W(!0),Y(-1)),j(null);try{let J;V?J=await ra.getNextAccountHistoryPage(e,$,n):J=await ra.getAccountHistory(e,-1,n);const fe=ra.convertToActivityListItems(J,e);if(fe.sort((Q,ne)=>new Date(ne.timestamp).getTime()-new Date(Q.timestamp).getTime()),v(V?Q=>[...Q,...fe]:fe),J.length>0){const Q=Math.min(...J.map(ne=>ne.index));Y(Q)}fe.length===0&&W(!1)}catch(J){j("Failed to load activity history"),console.error("Error loading activities:",J),W(!1)}finally{m(!1),q(!1)}}};P.useEffect(()=>{ae()},[e,n]);const I=P.useCallback(()=>{M&&!y&&!F&&ae(!0)},[M,y,F]);P.useEffect(()=>{let V=g;h!=="all"?V=V.filter(J=>J.direction===h):V=V.filter(J=>J.type!=="custom_json"&&J.type!=="comment_options"),p!=="all"&&(p==="votes"?V=V.filter(J=>J.type==="vote"||J.type==="effective_comment_vote"):p==="comments"?V=V.filter(J=>J.type==="comment"):p==="replies"?V=V.filter(J=>J.type==="comment"&&J.direction==="in"):p==="curation"?V=V.filter(J=>J.type==="curation_reward"):p==="others"&&(V=g.filter(J=>J.type==="custom_json"||J.type==="comment_options"))),w!=="all"&&(w==="author"?V=V.filter(J=>J.type==="effective_comment_vote"&&J.direction==="in"):w==="curation"?V=V.filter(J=>J.type==="effective_comment_vote"&&J.direction==="out"):w==="benefactor"&&(V=V.filter(J=>J.type==="comment_options"))),f&&(V=V.filter(J=>J.description.toLowerCase().includes(f.toLowerCase())||J.author?.toLowerCase().includes(f.toLowerCase())||J.permlink?.toLowerCase().includes(f.toLowerCase()))),k(V)},[g,h,p,w,f]),P.useEffect(()=>{const V=J=>{X.current&&!X.current.contains(J.target)&&T(null)};return document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[]);const ie=V=>{switch(V.type){case"vote":case"effective_comment_vote":return t.jsx(z.Wallet,{className:"h-4 w-4"});case"comment":return t.jsx(z.MessageCircle,{className:"h-4 w-4"});case"custom_json":return t.jsx(z.FileText,{className:"h-4 w-4"});case"curation_reward":return t.jsx(z.Wallet,{className:"h-4 w-4"});case"author_reward":return t.jsx(z.DollarSign,{className:"h-4 w-4"});case"comment_benefactor_reward":return t.jsx(z.User,{className:"h-4 w-4"});default:return t.jsx(z.Eye,{className:"h-4 w-4"})}},R=(V,J)=>V.split(/(\s+)/).map((Q,ne)=>{if(Q.includes("/")){const[xe,Ce]=Q.split("/");if(xe&&Ce)return t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:Z=>{Z.stopPropagation(),console.log("Clicked permlink:",xe,Ce),c?.(xe,Ce)},children:Q},ne)}return t.jsx("span",{children:Q},ne)});return y?t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[t.jsx("div",{className:"flex-1 max-w-md",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"}),t.jsx("div",{className:"w-full h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"})]})}),t.jsx("div",{className:"flex flex-wrap gap-2",children:Array.from({length:5}).map((V,J)=>t.jsx("div",{className:"w-24 h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"},J))})]}),t.jsx("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:Array.from({length:4}).map((V,J)=>t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-20"},J))})]}),t.jsx("div",{className:"space-y-4",children:Array.from({length:5}).map((V,J)=>t.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg",children:[t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx("div",{className:"w-8 h-8 bg-gray-200 dark:bg-gray-700 rounded-full animate-pulse flex-shrink-0"}),t.jsx("div",{className:"flex-1 min-w-0 space-y-2",children:t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"})})]}),t.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ml-4",children:[t.jsx("div",{className:"w-3 h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-16"})]})]},J))})]}):N?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load activities"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:N}),t.jsxs("button",{onClick:()=>ae(),className:"inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[t.jsx("div",{className:"flex-1 max-w-md",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search activities...",value:f,onChange:V=>o(V.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsxs("select",{value:h,onChange:V=>l(V.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[t.jsx("option",{value:"all",children:"All Directions"}),t.jsx("option",{value:"in",children:"Incoming"}),t.jsx("option",{value:"out",children:"Outgoing"})]}),t.jsxs("select",{value:p,onChange:V=>x(V.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[t.jsx("option",{value:"all",children:"All Types"}),t.jsx("option",{value:"votes",children:"Votes"}),t.jsx("option",{value:"comments",children:"Comments"}),t.jsx("option",{value:"replies",children:"Replies"}),t.jsx("option",{value:"curation",children:"Curation"}),t.jsx("option",{value:"others",children:"Others"})]}),t.jsxs("select",{value:w,onChange:V=>b(V.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[t.jsx("option",{value:"all",children:"All Rewards"}),t.jsx("option",{value:"author",children:"Author"}),t.jsx("option",{value:"curation",children:"Curation"}),t.jsx("option",{value:"benefactor",children:"Benefactor"})]}),t.jsx("button",{onClick:()=>ae(),disabled:y||F,className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]})]}),t.jsxs("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Total: ",t.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:g.length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Filtered: ",t.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:_.length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Incoming: ",t.jsx("span",{className:"font-semibold text-green-600 dark:text-green-400",children:g.filter(V=>V.direction==="in").length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Outgoing: ",t.jsx("span",{className:"font-semibold text-blue-600 dark:text-blue-400",children:g.filter(V=>V.direction==="out").length})]})]})]}),t.jsx("div",{className:"space-y-4",children:_.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:g.length===0?"No activities found for this user.":"No activities match the current filters."})}):t.jsxs(t.Fragment,{children:[_.map((V,J)=>t.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors cursor-pointer",onClick:fe=>{d?.(V)},children:[t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[V.type==="vote"&&V.voter?t.jsx("img",{src:`https://images.hive.blog/u/${V.voter}/avatar`,alt:V.voter,className:"w-8 h-8 rounded-full flex-shrink-0",onError:fe=>{const Q=fe.target;Q.style.display="none";const ne=Q.nextElementSibling;ne&&(ne.style.display="flex")}}):V.type==="comment_benefactor_reward"&&V.author?t.jsx("img",{src:`https://images.hive.blog/u/${V.author}/avatar`,alt:V.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:fe=>{const Q=fe.target;Q.style.display="none";const ne=Q.nextElementSibling;ne&&(ne.style.display="flex")}}):V.type==="comment"&&V.author?t.jsx("img",{src:`https://images.hive.blog/u/${V.author}/avatar`,alt:V.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:fe=>{const Q=fe.target;Q.style.display="none";const ne=Q.nextElementSibling;ne&&(ne.style.display="flex")}}):null,t.jsx("div",{className:`w-8 h-8 bg-purple-100 dark:bg-purple-900/20 rounded-full flex items-center justify-center flex-shrink-0 ${V.type==="vote"&&V.voter||V.type==="comment_benefactor_reward"&&V.author||V.type==="comment"&&V.author?"hidden":""}`,children:ie(V)}),t.jsx("div",{className:"flex-1 min-w-0",children:V.type==="custom_json"||V.type==="comment_options"?t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words font-medium",children:R(V.description)}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:ra.getRelativeTime(V.timestamp+"Z")}),t.jsx("div",{className:"border border-gray-200 dark:border-gray-600 rounded p-2 bg-gray-50 dark:bg-gray-700/50 mt-1",children:t.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400 space-y-1 font-mono break-words",children:[V.type==="custom_json"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"id:"})," ",V.details.id]}),t.jsxs("div",{className:"break-all",children:[t.jsx("span",{className:"font-medium",children:"json:"})," ",JSON.stringify(V.details.json).replace(/\\\"/g,'"').replace(/^"|"$/g,"")]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"required_auths:"})," ",JSON.stringify(V.details.required_auths)]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"required_posting_auths:"})," ",JSON.stringify(V.details.required_posting_auths)]})]}),V.type==="comment_options"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"author:"}),t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",children:V.details.author})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"permlink:"}),t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:fe=>{fe.stopPropagation(),console.log("Clicked permlink:",V.details.author,V.details.permlink),c?.(V.details.author,V.details.permlink)},children:V.details.permlink})]})]})]})})]}):t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words",children:R(V.description)}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 sm:hidden",children:ra.getRelativeTime(V.timestamp+"Z")})]})})]}),t.jsx("div",{className:"flex items-center gap-1 text-sm text-gray-600 dark:text-gray-400 flex-shrink-0 ml-4 hidden sm:flex",children:V.type!=="custom_json"&&V.type!=="comment_options"&&t.jsxs(t.Fragment,{children:[t.jsx(z.Clock,{className:"h-3 w-3 flex-shrink-0"}),t.jsx("span",{className:"truncate",children:ra.getRelativeTime(V.timestamp+"Z")})]})})]},`${V.id}-${J}`)),M&&g.length>0&&t.jsx("div",{className:"flex justify-center py-6",children:t.jsx("button",{onClick:I,disabled:y||F,className:"px-6 py-2 bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 text-white rounded-lg font-medium transition-colors disabled:cursor-not-allowed flex items-center gap-2",children:F?t.jsxs(t.Fragment,{children:[t.jsx(z.RefreshCw,{className:"h-4 w-4 animate-spin"}),"Loading..."]}):"Load More Activities"})}),!M&&g.length>0&&t.jsx("div",{className:"text-center text-sm text-gray-400 py-4",children:"No more activities to load"})]})})]})},Gn=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class Mp{async getWitnessesByVote(a="",i=60){try{return await Gn.call("condenser_api","get_witnesses_by_vote",[a,i])}catch(s){throw console.error("Error fetching witnesses by vote:",s),s}}async getAccount(a){try{const i=await Gn.call("condenser_api","get_accounts",[[a]]);return i&&i.length>0?i[0]:null}catch(i){return console.error("Error fetching account:",i),null}}async getAccounts(a){try{return await Gn.call("condenser_api","get_accounts",[a])}catch(i){return console.error("Error fetching accounts:",i),[]}}async getWitnessVotes(a,i="",s=250){try{return await Gn.call("database_api","list_witness_votes",{start:[a,i],limit:s,order:"by_witness_account"})}catch(r){throw console.error("Error fetching witness votes:",r),r}}async getAllWitnessVotes(a){const i=[];let s="";try{for(;;){const n=await this.getWitnessVotes(a,s,250);if(i.push(...n.votes),n.votes.length<250)break;s=n.votes[n.votes.length-1].account}return i}catch(n){return console.error("Error fetching all witness votes:",n),[]}}async hasUserVotedForWitness(a,i){try{const s=await this.getAccount(a);return!s||!s.witness_votes?!1:s.witness_votes.includes(i)}catch(s){return console.error("Error checking witness vote:",s),!1}}async getUserWitnessVotes(a){try{return(await this.getAccount(a))?.witness_votes||[]}catch(i){return console.error("Error fetching user witness votes:",i),[]}}formatVotesToMHP(a){return`${(parseFloat(a)/1e6).toFixed(1)}m`}calculateAPR(a){return a/100}getVersionStatus(a,i){const s=this.parseVersion(a),r=this.parseVersion(i);return this.compareVersions(s,r)>=0?"green":this.compareVersions(s,r)<0?"red":"grey"}parseVersion(a){return a.split(".").map(i=>parseInt(i,10))}compareVersions(a,i){const s=Math.max(a.length,i.length);for(let r=0;r<s;r++){const n=a[r]||0,u=i[r]||0;if(n>u)return 1;if(n<u)return-1}return 0}getWitnessDescription(a){try{let i;if(a.json_metadata&&a.json_metadata!=="{}"){i=JSON.parse(a.json_metadata);const s=i.profile?.witness_description;if(s)return s}return a.posting_json_metadata&&a.posting_json_metadata!=="{}"?(i=JSON.parse(a.posting_json_metadata),i.profile?.about||""):""}catch(i){return console.error("Error parsing witness description:",i),""}}formatTimeAgo(a){const i=new Date(a),r=Math.floor((new Date().getTime()-i.getTime())/1e3);if(r<60)return`${r} second${r>1?"s":""} ago`;if(r<3600){const n=Math.floor(r/60);return`${n} minute${n>1?"s":""} ago`}else if(r<86400){const n=Math.floor(r/3600);return`${n} hour${n>1?"s":""} ago`}else if(r<604800){const n=Math.floor(r/86400);return`${n} day${n>1?"s":""} ago`}else if(r<2592e3){const n=Math.floor(r/604800);return`${n} week${n>1?"s":""} ago`}else if(r<31536e3){const n=Math.floor(r/2592e3);return`${n} month${n>1?"s":""} ago`}else{const n=Math.floor(r/31536e3);return`${n} year${n>1?"s":""} ago`}}}const ct=new Mp,Ve=vc.create((e,a)=>({witnesses:[],witnessVotes:[],userWitnessVotes:[],witnessDetails:new Map,witnessAccounts:new Map,loadingWitnesses:!1,loadingMoreWitnesses:!1,loadingVotes:!1,loadingMoreVotes:!1,loadingUserVotes:!1,error:null,nextWitnessStart:"",nextVotesStart:"",hasMoreWitnesses:!0,hasMoreVotes:!1,selectedWitness:null,filters:{status:"all",name:"",version:""},loadWitnesses:async(i="",s=50)=>{const{witnesses:r}=a();if(r.length>=500){e({hasMoreWitnesses:!1});return}e(i!==""?{loadingMoreWitnesses:!0}:{loadingWitnesses:!0,error:null});try{const u=await ct.getWitnessesByVote(i,s);e(d=>{const f=new Set(d.witnesses.map(h=>h.owner)),o=u.filter(h=>!f.has(h.owner));return{witnesses:[...d.witnesses,...o],nextWitnessStart:u.length>0?u[u.length-1].owner:"",hasMoreWitnesses:u.length===s}});const c=u.filter(d=>!a().witnessDetails.has(d.owner)).map(d=>d.owner);c.length>0&&a().loadWitnessDetails(c)}catch(u){console.error("Error loading witnesses:",u),e({error:"Failed to load witnesses data"})}finally{e({loadingWitnesses:!1,loadingMoreWitnesses:!1})}},loadMoreWitnesses:async()=>{const{nextWitnessStart:i,hasMoreWitnesses:s,loadingMoreWitnesses:r}=a();!s||r||!i||await a().loadWitnesses(i,50)},loadWitnessVotes:async i=>{e({loadingVotes:!0,witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:i});try{const s=await ct.getWitnessVotes(i,"",250);e({witnessVotes:s.votes,nextVotesStart:s.votes.length>0?s.votes[s.votes.length-1].account:"",hasMoreVotes:s.votes.length===250,loadingVotes:!1})}catch(s){console.error("Error loading witness votes:",s),e({error:"Failed to load witness votes",loadingVotes:!1})}},loadMoreVotes:async()=>{const{hasMoreVotes:i,loadingMoreVotes:s,nextVotesStart:r,selectedWitness:n,witnessVotes:u}=a();if(!i||s||!r||u.length>=1e3){u.length>=1e3&&e({hasMoreVotes:!1});return}e({loadingMoreVotes:!0});try{const c=await ct.getWitnessVotes(n||"",r,250);e(d=>{const o=[...d.witnessVotes,...c.votes].filter((l,p,x)=>x.findIndex(w=>w.account===l.account)===p),h=c.votes.filter((l,p,x)=>x.findIndex(w=>w.account===l.account)===p);return{witnessVotes:o,nextVotesStart:h.length>0?h[h.length-1].account:"",hasMoreVotes:c.votes.length===250}})}catch(c){console.error("Error loading more witness votes:",c)}finally{e({loadingMoreVotes:!1})}},loadUserWitnessVotes:async i=>{if(i){e({loadingUserVotes:!0});try{const s=await ct.getUserWitnessVotes(i);e({userWitnessVotes:s})}catch(s){console.error("Error loading user witness votes:",s)}finally{e({loadingUserVotes:!1})}}},loadWitnessDetails:async i=>{try{const s=await ct.getAccounts(i);e(r=>{const n=new Map(r.witnessDetails),u=new Map(r.witnessAccounts);return s.forEach(c=>{const d=ct.getWitnessDescription(c);d&&n.set(c.name,d),u.set(c.name,c)}),{witnessDetails:n,witnessAccounts:u}})}catch(s){console.error("Error loading witness details:",s)}},setFilters:i=>e({filters:i}),setSelectedWitness:i=>e({selectedWitness:i}),clearVotes:()=>e({witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:null})})),xc=({filters:e,onFiltersChange:a,theme:i="dark"})=>{const s=i==="dark"?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-800",r=c=>{const d=e.status===c?"all":c;a({...e,status:d})},n=c=>{a({...e,name:c})},u=c=>{a({...e,version:c})};return t.jsxs("div",{className:`rounded-lg p-4 mb-6 border ${i==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsx("h3",{className:`text-lg font-semibold mb-4 ${i==="dark"?"text-white":"text-gray-900"}`,children:"FILTERS"}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${i==="dark"?"text-gray-300":"text-gray-700"}`,children:"WITNESS"}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="active",onChange:()=>r("active"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${i==="dark"?"text-white":"text-gray-900"}`,children:"Active"})]}),t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="disabled",onChange:()=>r("disabled"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${i==="dark"?"text-white":"text-gray-900"}`,children:"Disabled/Stale"})]}),t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="approved",onChange:()=>r("approved"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${i==="dark"?"text-white":"text-gray-900"}`,children:"Approved"})]}),e.status!=="all"&&t.jsx("button",{onClick:()=>a({...e,status:"all"}),className:`text-sm underline ${s}`,children:"Clear Status Filter"})]})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${i==="dark"?"text-gray-300":"text-gray-700"}`,children:"NAME"}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx("svg",{className:`w-4 h-4 ${i==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("input",{type:"text",placeholder:"Search",value:e.name,onChange:c=>n(c.target.value),className:`w-full pl-10 pr-4 py-2 border-b focus:outline-none focus:border-blue-500 ${i==="dark"?"bg-slate-900 border-gray-700 text-white placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"}`})]})]}),t.jsxs("div",{children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${i==="dark"?"text-gray-300":"text-gray-700"}`,children:"VERSION"}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx("svg",{className:`w-4 h-4 ${i==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("input",{type:"text",placeholder:"Version",value:e.version,onChange:c=>u(c.target.value),className:`w-full pl-10 pr-4 py-2 border-b focus:outline-none focus:border-blue-500 ${i==="dark"?"bg-slate-900 border-gray-700 text-white placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"}`})]})]})]})},Ci=768;function Nd(){const[e,a]=Qn.useState(void 0);return Qn.useEffect(()=>{const i=window.matchMedia(`(max-width: ${Ci-1}px)`),s=()=>{a(window.innerWidth<Ci)};return i.addEventListener("change",s),a(window.innerWidth<Ci),()=>i.removeEventListener("change",s)},[]),!!e}const Rp=({isOpen:e,onClose:a,witness:i,votes:s,loadingMore:r,hasMore:n,loadingInitial:u,scrollContainerRef:c,sentinelRef:d,loadMoreVotes:f,theme:o="dark"})=>{const h=P.useCallback(l=>{l[0].isIntersecting&&n&&!r&&f()},[n,r,f]);return P.useEffect(()=>{const l=new IntersectionObserver(h,{threshold:.1,root:c.current});return d.current&&l.observe(d.current),()=>{d.current&&l.unobserve(d.current)}},[h,c,d]),e?t.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:`rounded-lg max-w-2xl w-full max-h-[80vh] overflow-hidden border ${o==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${o==="dark"?"border-gray-800":"border-gray-200"}`,children:[t.jsxs("h3",{className:`text-lg font-semibold ${o==="dark"?"text-white":"text-gray-900"}`,children:["Votes for @",i," (showing ",s.length,")"]}),t.jsx("button",{onClick:a,className:`text-xl font-bold ${o==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:"×"})]}),t.jsxs("div",{ref:c,className:"p-4 overflow-y-auto max-h-[60vh]",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:s.map((l,p)=>t.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border ${o==="dark"?"bg-gray-800 border-gray-800":"bg-gray-50 border-gray-200"}`,children:[t.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${o==="dark"?"bg-gray-600 text-white":"bg-gray-200 text-gray-900"}`,children:t.jsx("img",{className:"w-8 h-8 rounded-full",src:`https://images.hive.blog/u/${l.account}/avatar`,alt:l.account,onError:x=>{x.target.src="https://images.hive.blog/u/null/avatar"}})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:`font-medium ${o==="dark"?"text-white":"text-gray-900"}`,children:l.account}),t.jsxs("div",{className:`text-sm ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:["Vote #",p+1]})]}),t.jsx("div",{className:`text-sm ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"25"})]},l.account))}),s.length===0&&!u&&t.jsx("div",{className:`text-center py-8 ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"No votes found for this witness."}),r&&t.jsx("div",{className:`text-center py-4 ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more votes..."}),n&&!r&&t.jsx("div",{className:"text-center py-4",children:t.jsx("button",{onClick:f,className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",children:"Load More Votes"})}),n&&t.jsx("div",{ref:d,className:"h-4"})]})]})}):null},Ip=({username:e,filters:a={status:"all",name:"",version:""},onWitnessVoteClick:i,onWitnessStatsClick:s,onWitnessUrlClick:r,theme:n="dark"})=>{const u=Nd(),c=Ve(R=>R.witnesses),d=Ve(R=>R.userWitnessVotes),f=Ve(R=>R.loadingWitnesses),o=Ve(R=>R.error),h=Ve(R=>R.selectedWitness),l=Ve(R=>R.witnessVotes),p=Ve(R=>R.hasMoreVotes),x=Ve(R=>R.loadingMoreVotes),w=Ve(R=>R.loadingVotes),b=Ve(R=>R.filters),g=Ve(R=>R.hasMoreWitnesses),v=Ve(R=>R.loadingWitnesses),_=Ve(R=>R.witnessDetails);Ve(R=>R.witnessAccounts);const k=Ve(R=>R.loadWitnesses),y=Ve(R=>R.loadMoreWitnesses),m=Ve(R=>R.loadWitnessVotes),N=Ve(R=>R.loadMoreVotes),j=Ve(R=>R.loadUserWitnessVotes),A=Ve(R=>R.setFilters),[D,C]=P.useState(!1),[T,M]=P.useState(!1),W=P.useRef(null),F=P.useRef(null),q=P.useRef(null),$=P.useCallback(R=>{R[0].isIntersecting&&g&&!v&&y()},[g,v,y]);P.useEffect(()=>{const R=new IntersectionObserver($,{threshold:.1});return q.current&&R.observe(q.current),()=>{q.current&&R.unobserve(q.current)}},[$]),P.useEffect(()=>{k()},[k]),P.useEffect(()=>{e&&j(e)},[e,j]),P.useEffect(()=>{A(a)},[]);const Y=P.useMemo(()=>c.filter(R=>{if(b.status!=="all"){if(b.status==="active"){const V=new Date;if(V.setFullYear(V.getFullYear()-1),new Date(R.last_hbd_exchange_update+"Z")<=V)return!1}else if(b.status==="disabled"){const V=new Date;if(V.setFullYear(V.getFullYear()-1),new Date(R.last_hbd_exchange_update+"Z")>V)return!1}else if(b.status==="approved"&&!d.includes(R.owner))return!1}return!(b.name&&!R.owner.toLowerCase().includes(b.name.toLowerCase())||b.version&&!R.running_version.includes(b.version))}),[c,b,d]),X=async R=>{i?i(R):(await m(R),C(!0))},ae=R=>{s?s(R):window.open(`https://hivehub.dev/witnesses/@${R}`,"_blank")},I=R=>{r?r(R):window.open(R,"_blank")},ie=R=>e?d.includes(R):!1;return f?t.jsx("div",{className:"flex items-center justify-center p-8",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})}):o?t.jsx("div",{className:"text-center p-8 text-red-400",children:o}):t.jsxs("div",{className:"w-full",children:[t.jsx(Rp,{isOpen:D,onClose:()=>C(!1),witness:h||"",votes:l,loadingMore:x,hasMore:p,loadingInitial:w,scrollContainerRef:F,sentinelRef:W,loadMoreVotes:N,theme:n}),u?t.jsxs("div",{className:`w-full p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:`text-lg font-semibold ${n==="dark"?"text-white":"text-gray-900"}`,children:"Witnesses"}),t.jsxs("button",{onClick:()=>M(!T),className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded flex items-center space-x-2",children:[t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),t.jsx("span",{children:T?"Hide Filters":"Show Filters"})]})]}),T&&t.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:`rounded-lg w-full max-w-md max-h-[80vh] overflow-hidden border ${n==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${n==="dark"?"border-gray-800":"border-gray-200"}`,children:[t.jsx("h3",{className:`text-lg font-semibold ${n==="dark"?"text-white":"text-gray-900"}`,children:"Filters"}),t.jsx("button",{onClick:()=>M(!1),className:`text-xl font-bold ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:"×"})]}),t.jsx("div",{className:"p-4 overflow-y-auto max-h-[60vh]",children:t.jsx(xc,{filters:b,onFiltersChange:A,theme:n})})]})}),t.jsxs("div",{className:"space-y-4 max-h-[70vh] overflow-y-auto",children:[Y.map((R,V)=>{const J=ct.getVersionStatus(R.running_version,R.hardfork_version_vote),fe=ie(R.owner),Q=c.findIndex(ne=>ne.owner===R.owner)+1;return t.jsxs("div",{className:`rounded-lg border p-4 shadow-sm ${n==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsxs("span",{className:`text-lg font-bold ${n==="dark"?"text-white":"text-gray-900"}`,children:["#",Q]}),t.jsx("img",{className:"w-10 h-10 rounded-full",src:`https://images.hive.blog/u/${R.owner}/avatar`,alt:R.owner,onError:ne=>{ne.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("div",{children:[t.jsx("div",{className:`font-medium ${n==="dark"?"text-white":"text-gray-900"}`,children:R.owner}),t.jsxs("div",{className:`text-xs ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["Since ",new Date(R.created).getFullYear()]})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("svg",{className:`w-6 h-6 ${fe?"text-green-600":n==="dark"?"text-gray-500":"text-gray-400"}`,fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),t.jsxs("div",{className:"flex space-x-1",children:[t.jsx("button",{onClick:()=>I(R.url),className:`${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"Visit witness URL",children:"🔗"}),t.jsx("button",{onClick:()=>ae(R.owner),className:`${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"View witness stats",children:"📊"})]})]})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-3",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Version"}),t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium mt-1 block ${J==="green"?"bg-green-100 text-green-800":J==="red"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:R.running_version})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Votes (MHP)"}),t.jsx("button",{onClick:()=>X(R.owner),className:"text-blue-600 hover:text-blue-800 cursor-pointer text-sm font-medium mt-1",disabled:w,children:w&&h===R.owner?"Loading...":ct.formatVotesToMHP(R.votes)})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"APR"}),t.jsxs("div",{className:`font-medium mt-1 ${n==="dark"?"text-white":"text-gray-900"}`,children:[ct.calculateAPR(R.props.hbd_interest_rate),"%"]})]})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-4 text-xs",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Last Block"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:R.last_confirmed_block_num.toLocaleString()})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Miss"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:R.total_missed.toLocaleString()})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Price Feed"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:R.hbd_exchange_rate.base}),t.jsx("div",{className:`${n==="dark"?"text-gray-400":"text-gray-500"}`,children:ct.formatTimeAgo(R.last_hbd_exchange_update+"Z")})]})]}),_.get(R.owner)&&t.jsx("div",{className:`mt-3 pt-3 border-t ${n==="dark"?"border-gray-800":"border-gray-200"}`,children:t.jsx("div",{className:`text-xs line-clamp-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:_.get(R.owner)})})]},R.owner)}),v&&t.jsxs("div",{className:"flex items-center justify-center py-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more witnesses..."})]}),g&&t.jsx("div",{ref:q,className:"h-1"})]})]}):t.jsx("div",{className:`max-w-7xl mx-auto p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:t.jsxs("div",{className:"grid grid-cols-5 gap-4",children:[t.jsx("div",{className:"col-span-1 sticky top-0 h-screen overflow-y-auto",children:t.jsx(xc,{filters:b,onFiltersChange:A,theme:n})}),t.jsxs("div",{className:"col-span-4 overflow-auto max-h-screen",children:[t.jsxs("table",{className:`w-full text-xs text-left ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("thead",{className:`text-xs uppercase ${n==="dark"?"text-gray-400 bg-slate-900":"text-gray-700 bg-gray-50"}`,children:t.jsxs("tr",{children:[t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Rank"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Witness"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Version"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Votes"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Last Block"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Miss"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Feed"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"APR"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Vote"})]})}),t.jsx("tbody",{children:Y.map((R,V)=>{const J=ct.getVersionStatus(R.running_version,R.hardfork_version_vote),fe=ie(R.owner);return t.jsxs("tr",{className:`border-b hover:bg-gray-50 ${n==="dark"?"border-gray-800 hover:bg-gray-800":"border-gray-200"}`,children:[t.jsx("td",{className:`px-2 py-2 font-medium text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:c.findIndex(Q=>Q.owner===R.owner)+1}),t.jsx("td",{className:"px-2 py-2",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("img",{className:"w-6 h-6 rounded-full",src:`https://images.hive.blog/u/${R.owner}/avatar`,alt:R.owner,onError:Q=>{Q.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:`font-medium text-xs truncate ${n==="dark"?"text-white":"text-gray-900"}`,children:R.owner}),t.jsxs("div",{className:`text-xs ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["Since ",new Date(R.created).getFullYear()]})]}),t.jsxs("div",{className:"flex space-x-1 flex-shrink-0",children:[t.jsx("button",{onClick:()=>I(R.url),className:`text-xs ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"Visit witness URL",children:"🔗"}),t.jsx("button",{onClick:()=>ae(R.owner),className:`text-xs ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"View witness stats",children:"📊"})]})]})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("span",{className:`px-1 py-0.5 rounded text-xs font-medium ${J==="green"?"bg-green-100 text-green-800":J==="red"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:R.running_version})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("button",{onClick:()=>X(R.owner),className:"text-blue-600 hover:text-blue-800 cursor-pointer text-xs",disabled:w,children:w&&h===R.owner?"...":ct.formatVotesToMHP(R.votes)})}),t.jsx("td",{className:"px-2 py-2 text-right",children:t.jsx("div",{className:`text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:R.last_confirmed_block_num.toLocaleString()})}),t.jsx("td",{className:"px-2 py-2 text-right text-xs",children:t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:R.total_missed.toLocaleString()})}),t.jsx("td",{className:"px-2 py-2 text-right",children:t.jsx("div",{className:`text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:R.hbd_exchange_rate.base})}),t.jsx("td",{className:"px-2 py-2 text-right text-xs",children:t.jsxs("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:[ct.calculateAPR(R.props.hbd_interest_rate),"%"]})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("svg",{className:`w-4 h-4 ${fe?"text-green-600":n==="dark"?"text-gray-500":"text-gray-400"}`,fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})})]},R.owner)})})]}),v&&t.jsxs("div",{className:"flex items-center justify-center py-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more witnesses..."})]}),g&&t.jsx("div",{ref:q,className:"h-1"})]})]})})]})},Fp=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class qp{async getTransactionHistory(a,i=-1,s=1e3,r=null,n=null){try{const u=[a,i,s];r!==null&&n!==null&&u.push(r,n);const c=await Fp.call("condenser_api","get_account_history",u);return Array.isArray(c)?c.map(d=>Array.isArray(d)&&d.length>=2?d[1]:d):[]}catch(u){return console.error("Error in getTransactionHistory:",u),[]}}async getFilteredTransactionHistory(a,i=[],s=100){try{const r=await this.getTransactionHistory(a,-1,1e3);let n=r;return i.length>0&&(n=r.filter(u=>{const c=u.op?.[0];return i.includes(c)})),n.slice(0,s)}catch(r){return console.error("Error in getFilteredTransactionHistory:",r),[]}}async getRecentTransfers(a,i=50){return this.getFilteredTransactionHistory(a,["transfer"],i)}async getRecentVotes(a,i=50){return this.getFilteredTransactionHistory(a,["vote"],i)}async getRecentComments(a,i=50){return this.getFilteredTransactionHistory(a,["comment"],i)}parseOperation(a){try{if(!a.op||!Array.isArray(a.op)||a.op.length<2)return null;const[i,s]=a.op;switch(i){case"transfer":return{type:"transfer",value:{from:s.from||"",to:s.to||"",amount:s.amount||"",memo:s.memo||""}};case"vote":return{type:"vote",value:{voter:s.voter||"",author:s.author||"",permlink:s.permlink||"",weight:s.weight||0}};case"comment":return{type:"comment",value:{parent_author:s.parent_author||"",parent_permlink:s.parent_permlink||"",author:s.author||"",permlink:s.permlink||"",title:s.title||"",body:s.body||"",json_metadata:s.json_metadata||""}};case"custom_json":return{type:"custom_json",value:{required_auths:s.required_auths||[],required_posting_auths:s.required_posting_auths||[],id:s.id||"",json:s.json||""}};case"comment_payout_update":return{type:"comment_payout_update",value:{author:s.author||"",permlink:s.permlink||""}};case"comment_options":return{type:"comment_options",value:{author:s.author||"",permlink:s.permlink||"",max_accepted_payout:s.max_accepted_payout||"",percent_hbd:s.percent_hbd||0,allow_votes:s.allow_votes||!1,allow_curation_rewards:s.allow_curation_rewards||!1,extensions:s.extensions||[]}};case"effective_comment_vote":return{type:"effective_comment_vote",value:{voter:s.voter||"",author:s.author||"",permlink:s.permlink||"",pending_payout:s.pending_payout||"",weight:s.weight||0,rshares:s.rshares||0,total_vote_weight:s.total_vote_weight||0}};default:return console.warn("Unknown operation type:",i,a.op),null}}catch(i){return console.error("Error parsing operation:",i,a.op),null}}formatTimestamp(a){try{return new Date(a).toLocaleString()}catch(i){return console.error("Error formatting timestamp:",i),a}}getTransactionSummary(a){const i={};let s="",r="";return a.forEach(n=>{const u=n.op?.[0]||"unknown";i[u]=(i[u]||0)+1,(!s||n.timestamp<s)&&(s=n.timestamp),(!r||n.timestamp>r)&&(r=n.timestamp)}),{totalTransactions:a.length,operationCounts:i,dateRange:{earliest:s,latest:r}}}}const aa=new qp;function Bp({account:e,className:a}){const[i,s]=P.useState([]),[r,n]=P.useState([]),[u,c]=P.useState(!1),[d,f]=P.useState(null),[o,h]=P.useState(""),[l,p]=P.useState("all"),[x,w]=P.useState(50),b=[{value:"all",label:"All Operations",icon:z.Activity},{value:"transfer",label:"Transfers",icon:z.Send},{value:"vote",label:"Votes",icon:z.TrendingUp},{value:"comment",label:"Comments",icon:z.MessageCircle},{value:"custom_json",label:"Custom JSON",icon:z.ArrowUpDown},{value:"comment_payout_update",label:"Payout Updates",icon:z.RefreshCw},{value:"comment_options",label:"Comment Options",icon:z.Filter},{value:"effective_comment_vote",label:"Effective Votes",icon:z.Users}],g=async()=>{if(e){c(!0),f(null);try{const y=await aa.getTransactionHistory(e,-1,x);s(y),n(y)}catch(y){f("Failed to load transaction history"),console.error("Error loading transactions:",y)}finally{c(!1)}}};P.useEffect(()=>{g()},[e,x]),P.useEffect(()=>{let y=i;if(l!=="all"&&(y=y.filter(m=>m.op?.[0]===l)),o){const m=o.toLowerCase();y=y.filter(N=>{const j=aa.parseOperation(N);if(!j)return!1;switch(j.type){case"transfer":return j.value.from.toLowerCase().includes(m)||j.value.to.toLowerCase().includes(m)||j.value.memo.toLowerCase().includes(m);case"vote":return j.value.voter.toLowerCase().includes(m)||j.value.author.toLowerCase().includes(m)||j.value.permlink.toLowerCase().includes(m);case"comment":return j.value.author.toLowerCase().includes(m)||j.value.title.toLowerCase().includes(m)||j.value.permlink.toLowerCase().includes(m);default:return!1}})}n(y)},[i,l,o]);const v=y=>{if(!y)return t.jsx(z.Activity,{className:"h-4 w-4"});const m=b.find(N=>N.value===y.type)?.icon||z.Activity;return t.jsx(m,{className:"h-4 w-4"})},_=y=>{const m=aa.parseOperation(y);if(!m)return t.jsx("span",{className:"text-gray-400",children:"Unknown operation"});switch(m.type){case"transfer":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Transfer"}),t.jsx("span",{className:"text-sm font-medium text-white",children:m.value.amount})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"From:"}),t.jsx("img",{src:ge.userAvatar(m.value.from),alt:`${m.value.from} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.from)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.from})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"To:"}),t.jsx("img",{src:ge.userAvatar(m.value.to),alt:`${m.value.to} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.to)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.to})]}),m.value.memo&&t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Memo:"})," ",m.value.memo]})]});case"vote":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Vote"}),t.jsxs("span",{className:"text-sm font-medium text-white",children:[m.value.weight,"%"]})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Voter:"}),t.jsx("img",{src:ge.userAvatar(m.value.voter),alt:`${m.value.voter} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.voter)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.voter})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:ge.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"comment":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Comment"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:ge.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Title:"})," ",m.value.title]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"custom_json":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Custom JSON"})}),t.jsxs("div",{className:"text-sm text-gray-400",children:["ID: ",m.value.id]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["JSON: ",m.value.json.substring(0,100),"..."]})]});case"comment_payout_update":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Payout Update"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:ge.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"comment_options":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Comment Options"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:ge.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Max Payout:"})," ",m.value.max_accepted_payout]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"HBD Percent:"})," ",m.value.percent_hbd,"%"]})]});case"effective_comment_vote":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Effective Vote"}),t.jsx("span",{className:"text-sm font-medium text-white",children:m.value.weight})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Voter:"," ",t.jsx("span",{className:"font-mono text-gray-300",children:m.value.voter})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Post: @",m.value.author,"/",m.value.permlink]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Pending Payout: ",m.value.pending_payout]})]});default:return t.jsx("span",{className:"text-gray-400",children:"Unknown operation"})}},k=aa.getTransactionSummary(i);return u?t.jsxs("div",{className:`bg-gray-800 border border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsxs("div",{className:"p-2 md:p-6",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx(z.Activity,{className:"h-5 w-5 text-gray-300"}),t.jsx("h3",{className:"text-lg font-semibold text-white",children:"Transaction History"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-400",children:"Loading transaction history for"}),t.jsx("img",{src:ge.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:y=>{y.target.src=ge.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-400",children:["@",e]})]})]}),t.jsx("div",{className:"p-2 md:p-6 space-y-2 md:space-y-4",children:Array.from({length:5}).map((y,m)=>t.jsxs("div",{className:"space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-700 rounded animate-pulse w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-700 rounded animate-pulse w-1/2"})]},m))})]}):t.jsxs("div",{className:`bg-gray-800 border border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsxs("div",{className:"p-4 md:p-6",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx(z.Activity,{className:"h-5 w-5 text-gray-300"}),t.jsx("h3",{className:"text-lg font-semibold text-white",children:"Transaction History"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-400",children:"Transaction history for"}),t.jsx("img",{src:ge.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:y=>{y.target.src=ge.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-400",children:["@",e]})]}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-4",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:k.totalTransactions}),t.jsx("div",{className:"text-sm text-gray-400",children:"Total"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:k.operationCounts.transfer||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Transfers"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:k.operationCounts.vote||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Votes"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:k.operationCounts.comment||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Comments"})]})]})]}),t.jsxs("div",{className:"p-4 md:p-6 space-y-4",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search transactions...",value:o,onChange:y=>h(y.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsx("select",{value:l,onChange:y=>p(y.target.value),className:"w-full sm:w-48 px-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:b.map(y=>t.jsx("option",{value:y.value,children:y.label},y.value))}),t.jsxs("select",{value:x.toString(),onChange:y=>w(parseInt(y.target.value)),className:"w-full sm:w-32 px-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"25",children:"25"}),t.jsx("option",{value:"50",children:"50"}),t.jsx("option",{value:"100",children:"100"}),t.jsx("option",{value:"200",children:"200"})]}),t.jsx("button",{onClick:g,className:"px-3 py-2 bg-gray-700 border border-gray-600 rounded-md hover:bg-gray-600 text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]}),d&&t.jsx("div",{className:"p-4 border border-red-700 bg-red-900 rounded-md",children:t.jsx("p",{className:"text-red-300",children:d})}),t.jsx("div",{className:"space-y-4",children:r.length===0?t.jsx("div",{className:"text-center py-8 text-gray-400",children:"No transactions found"}):r.map(y=>{const m=aa.parseOperation(y);return t.jsxs("div",{className:"border border-gray-600 rounded-lg p-3 md:p-4 space-y-3 hover:bg-gray-700 transition-colors",children:[t.jsx("div",{className:"flex items-center justify-between",children:t.jsxs("div",{className:"flex items-center gap-3",children:[v(m),t.jsxs("div",{children:[t.jsx("div",{className:"font-medium text-white",children:m?.type?m.type.charAt(0).toUpperCase()+m.type.slice(1):"Unknown"}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-1",children:[t.jsx(z.Clock,{className:"h-3 w-3"}),aa.formatTimestamp(y.timestamp)]})]})]})}),t.jsx("div",{className:"ml-6 md:ml-7",children:_(y)})]},`${y.trx_id}-${y.op_in_trx}`)})}),r.length>0&&t.jsxs("div",{className:"text-center text-sm text-gray-400",children:["Showing ",r.length," of ",i.length," ","transactions"]})]})]})}const Vp=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class Up{async getUserChannel(a,i="posts",s=20,r=null,n=null,u=null){const c={account:a,sort:i,limit:s};r&&(c.start_author=r),n&&(c.start_permlink=n),u&&(c.observer=u);try{const d=await Vp.call("bridge","get_account_posts",c);return Array.isArray(d)?d:[]}catch(d){return console.error("Error in getUserChannel:",d),[]}}async getUserPosts(a,i=20){return this.getUserChannel(a,"posts",i)}async getUserComments(a,i=20){return this.getUserChannel(a,"comments",i)}async getUserReplies(a,i=20){return this.getUserChannel(a,"replies",i)}async getAllUserActivity(a,i=10){try{const[s,r,n]=await Promise.all([this.getUserPosts(a,i),this.getUserComments(a,i),this.getUserReplies(a,i)]);return[...s,...r,...n].sort((c,d)=>new Date(d.created).getTime()-new Date(c.created).getTime())}catch(s){return console.error("Error in getAllUserActivity:",s),[]}}convertToDisplayItem(a){return{id:a.id,author:a.author,permlink:a.permlink,title:a.title,body:a.body,created:a.created,category:a.category,net_votes:a.net_votes,children:a.children,total_payout_value:a.total_payout_value,pending_payout_value:a.pending_payout_value,url:a.url,type:a.parent_author===""?"post":"comment"}}formatTimestamp(a){try{return new Date(a).toLocaleString()}catch(i){return console.error("Error formatting timestamp:",i),a}}getRelativeTime(a){try{const i=new Date(a),r=new Date().getTime()-i.getTime(),n=Math.floor(r/1e3),u=Math.floor(n/60),c=Math.floor(u/60),d=Math.floor(c/24);return n<60?`${n} seconds ago`:u<60?`${u} minutes ago`:c<24?`${c} hours ago`:d<7?`${d} days ago`:i.toLocaleDateString()}catch(i){return console.error("Error calculating relative time:",i),a}}truncateText(a,i=150){return a.length<=i?a:a.substring(0,i)+"..."}getActivitySummary(a){let i=0,s=0,r=0,n=0;return a.forEach(u=>{u.parent_author===""?i++:s++,r+=u.net_votes||0;const c=u.total_payout_value?.match(/(\d+\.?\d*)/);c&&(n+=parseFloat(c[1]))}),{totalActivities:a.length,postsCount:i,commentsCount:s,totalVotes:r,totalPayout:`${n.toFixed(3)} HIVE`,averageVotes:a.length>0?Math.round(r/a.length):0}}filterByCategory(a,i){return a.filter(s=>s.category===i)}filterByDateRange(a,i,s){return a.filter(r=>{const n=new Date(r.created);return n>=i&&n<=s})}searchActivities(a,i){const s=i.toLowerCase();return a.filter(r=>r.title.toLowerCase().includes(s)||r.body.toLowerCase().includes(s)||r.category.toLowerCase().includes(s))}}const na=new Up,zp=({username:e,className:a})=>{const[i,s]=P.useState([]),[r,n]=P.useState([]),[u,c]=P.useState([]),[d,f]=P.useState([]),[o,h]=P.useState([]),[l,p]=P.useState(!1),[x,w]=P.useState(null),[b,g]=P.useState(""),[v,_]=P.useState(20),[k,y]=P.useState("all"),[m,N]=P.useState(new Set),[j,A]=P.useState(!1),D=async()=>{if(!(!e||j)){p(!0),w(null);try{const[$,Y,X]=await Promise.all([na.getUserPosts(e,v),na.getUserComments(e,v),na.getUserReplies(e,v)]);s($),n(Y),c(X),A(!0)}catch($){w("Failed to load activity history"),console.error("Error loading activities:",$)}finally{p(!1)}}};P.useEffect(()=>{D()},[e]),P.useEffect(()=>{if(!j)return;let $=[];switch(k){case"posts":$=i;break;case"comments":$=r;break;case"replies":$=u;break;default:$=[...i,...r,...u].sort((Y,X)=>new Date(X.created).getTime()-new Date(Y.created).getTime());break}f($),h($)},[k,i,r,u,j]),P.useEffect(()=>{let $=d;b&&($=na.searchActivities(d,b)),h($)},[d,b]);const C=$=>!$||$==="0.000 HIVE"?"0 HIVE":$,T=$=>$.parent_author===""?"Post":$.depth===1?"Comment":"Reply",M=new to.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:$=>$,usertagUrlFn:$=>`/@${$}`,hashtagUrlFn:$=>`/trending/${$}`,isLinkSafeFn:$=>!0,addExternalCssClassToMatchingLinksFn:$=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"}),W=$=>{const Y=new Set(m);Y.has($)?Y.delete($):Y.add($),N(Y)},F=$=>{const Y=`${$.author}-${$.permlink}`,X=m.has(Y),ae=$.body.length>100;return t.jsxs("div",{className:"border border-gray-200 dark:border-gray-600 rounded-lg p-3 sm:p-4 space-y-3 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors relative",children:[t.jsx("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3",children:t.jsx("div",{className:"flex items-start gap-3 flex-1",children:t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[t.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${$.parent_author===""?"bg-blue-900 text-blue-300":"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300"}`,children:T($)}),t.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["in #",$.category]})]}),t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx("img",{src:ge.userAvatar($.author),alt:`${$.author} avatar`,className:"w-5 h-5 sm:w-6 sm:h-6 rounded-full flex-shrink-0",onError:I=>{I.target.src=ge.userAvatar($.author)}}),t.jsx("h3",{className:"font-medium text-base sm:text-lg leading-tight text-gray-900 dark:text-white break-words",children:$.title||"Untitled"})]}),t.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none mb-3 text-gray-500 dark:text-gray-400 comment-content overflow-hidden",children:[t.jsx("div",{className:"break-words overflow-wrap-anywhere",dangerouslySetInnerHTML:{__html:M.render(ae&&!X?$.body.substring(0,50)+".....":$.body)}}),ae&&t.jsxs("button",{onClick:()=>W(Y),className:"mt-2 text-blue-400 hover:text-blue-300 text-sm font-medium flex items-center gap-1",children:[t.jsx(z.ChevronDown,{className:`h-3 w-3 transition-transform ${X?"rotate-180":""}`}),X?"Show less":"Show more"]})]}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:gap-4 text-sm text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Clock,{className:"h-3 w-3 flex-shrink-0"}),t.jsx("span",{className:"truncate",children:na.getRelativeTime($.created)})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.ThumbsUp,{className:"h-3 w-3 flex-shrink-0"}),t.jsxs("span",{children:[$.net_votes," votes"]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Reply,{className:"h-3 w-3 flex-shrink-0"}),t.jsxs("span",{children:[$.children," replies"]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{children:"💰"}),t.jsx("span",{children:C($.total_payout_value)})]})]})]})})}),t.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${$.author}/${$.permlink}`,"_blank"),className:"absolute top-3 right-3 flex-shrink-0 p-2 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-md transition-colors text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white",children:t.jsx(z.ExternalLink,{className:"h-4 w-4"})})]},Y)},q=na.getActivitySummary(d);return l?t.jsxs("div",{className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsx("div",{className:"p-6",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Loading activity history for"}),t.jsx("img",{src:ge.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:$=>{$.target.src=ge.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["@",e]})]})}),t.jsx("div",{className:"p-6 space-y-4",children:Array.from({length:5}).map(($,Y)=>t.jsxs("div",{className:"space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-1/2"}),t.jsx("div",{className:"h-20 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-full"})]},Y))})]}):t.jsxs("div",{className:`space-y-6 ${a}`,children:[t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:ge.userAvatar(e),alt:`${e} avatar`,className:"w-16 h-16 rounded-full object-cover",onError:$=>{$.target.src=ge.userAvatar(e)}}),t.jsxs("div",{className:"flex-1",children:[t.jsxs("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:["@",e]}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"Activity History"}),t.jsx("div",{className:"flex flex-wrap gap-6 text-sm",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.FileText,{className:"w-4 h-4"}),t.jsxs("span",{children:[q.totalActivities," Total Activities"]})]})})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex md:grid md:grid-cols-4 overflow-x-auto md:overflow-visible w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg",children:[t.jsx("button",{onClick:()=>y("all"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${k==="all"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"All"}),t.jsx("button",{onClick:()=>y("posts"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${k==="posts"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Posts"}),t.jsx("button",{onClick:()=>y("comments"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${k==="comments"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Comments"}),t.jsx("button",{onClick:()=>y("replies"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${k==="replies"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Replies"})]}),t.jsxs("div",{className:"mt-6",children:[t.jsxs("div",{className:"flex flex-row gap-4 mb-6",children:[t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-500 dark:text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search activities...",value:b,onChange:$=>g($.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsx("button",{onClick:()=>{A(!1),D()},className:"px-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]}),x&&t.jsx("div",{className:"p-4 border border-red-200 dark:border-red-700 bg-red-50 dark:bg-red-900 rounded-md",children:t.jsx("p",{className:"text-red-600 dark:text-red-300",children:x})}),t.jsx("div",{className:"space-y-4",children:o.length===0?t.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No activities found"}):o.map(F)}),o.length>0&&t.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400",children:["Showing ",o.length," of ",d.length," ","activities"]})]})]})]})},Di="_communityLocalKey",Zn={getBookmarkedCommunities:()=>{const e=localStorage.getItem(Di);return e?JSON.parse(e):[]},isUserPresentLocally:e=>{const a=localStorage.getItem(Di);return a?JSON.parse(a).includes(e):!1},storeLikedCommunityLocally:(e,a=!1)=>{let i=Zn.getBookmarkedCommunities();return i.includes(e)?i=i.filter(s=>s!==e):a||i.push(e),localStorage.setItem(Di,JSON.stringify(i)),i}},ao=({id:e,toastType:a,isLiked:i,onAdd:s,onRemove:r,onFavourite:n})=>{const[u,c]=P.useState(i??Zn.isUserPresentLocally(e));P.useEffect(()=>{i!==void 0&&c(i)},[i]);const d=()=>{n&&n(),u?(r?r(e,"remove_bookmark"):Zn.storeLikedCommunityLocally(e,!0),f(!1)):(s?s(e,"add_bookmark"):Zn.storeLikedCommunityLocally(e),f(!0)),c(!u)},f=o=>{alert(`The ${a} is ${o?"added to":"removed from"} your bookmarks`)};return t.jsx("button",{onClick:d,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:u?t.jsx(z.BookmarkCheck,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"}):t.jsx(z.Bookmark,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})})};class Hp{HIVE_API_URL="https://api.hive.blog";async getListOfCommunities(a,i=20,s){const r={limit:i};s&&s.trim()!==""&&(r.last=s),a&&a.trim()!==""&&(r.query=a);const n={jsonrpc:"2.0",method:"bridge.list_communities",params:r,id:1};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching communities:",u),u}}async getCommunityDetails(a){const i={jsonrpc:"2.0",method:"bridge.get_community",params:{name:a},id:1};try{const s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return await s.json()}catch(s){throw console.error("Error fetching community details:",s),s}}async getCommunitySubscribers(a,i=100,s){const r={community:a,limit:i};s&&s.trim()!==""&&(r.last=s);const n={jsonrpc:"2.0",method:"bridge.list_community_roles",params:r,id:1};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return((await u.json()).result||[]).map(d=>({username:d[0],role:d[1],extra:d[2],subscribedAt:d[3]}))}catch(u){throw console.error("Error fetching community subscribers:",u),u}}async getCommunitySubscribersList(a,i=100,s){const r={community:a,limit:i};s&&s.trim()!==""&&(r.last=s);const n={jsonrpc:"2.0",method:"bridge.list_subscribers",params:r,id:2};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return((await u.json()).result||[]).map(d=>({username:d[0],role:d[1],extra:d[2],subscribedAt:d[3]}))}catch(u){throw console.error("Error fetching community subscribers list:",u),u}}async getCommunityAccounts(a){const i={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[[a]],id:2};try{const s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result||[]}catch(s){throw console.error("Error fetching community accounts:",s),s}}async getRankedPosts(a,i="created",s=20,r,n){const u={tag:a,sort:i,limit:s};r&&n&&(u.start_author=r,u.start_permlink=n);const c={jsonrpc:"2.0",method:"bridge.get_ranked_posts",params:u,id:3};try{const d=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);return(await d.json()).result||[]}catch(d){throw console.error("Error fetching ranked posts:",d),d}}communityIcon(a){return`https://images.hive.blog/u/${a}/avatar?size=icon`}userOwnerThumb(a){return`https://images.hive.blog/u/${a}/avatar`}async getCommunityActivities(a,i=100,s){const r={account:a,limit:i};s&&(r.last_id=s);const n={jsonrpc:"2.0",method:"bridge.account_notifications",params:r,id:19};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching community activities:",u),u}}}const ot=new Hp,Wp=({onSelectCommunity:e})=>{const[a,i]=P.useState([]),[s,r]=P.useState(""),[n,u]=P.useState(!0),[c,d]=P.useState(!1),[f,o]=P.useState(!0),[h,l]=P.useState(null),[p,x]=P.useState(null),w=20,b=P.useRef(null),g=P.useCallback(async(k=!1)=>{if(!(!k&&(c||!f)))try{k?(u(!0),x(null),i([]),l(null),o(!0)):d(!0);const y=s.trim(),m=await ot.getListOfCommunities(y.length>=3?y:void 0,w,k?void 0:h||void 0);i(N=>k?m:[...N,...m]),m.length<w||m.length>0&&m[m.length-1].name===h?o(!1):m.length>0&&l(m[m.length-1].name||null)}catch(y){x(y instanceof Error?y.message:"Failed to load communities"),o(!1)}finally{u(!1),d(!1)}},[s,c,f,h]);P.useEffect(()=>{const k=setTimeout(()=>{g(!0)},s.length>=3||s.length===0?0:500);return()=>clearTimeout(k)},[s]),P.useEffect(()=>{b.current?.focus()},[s,n,p]),P.useEffect(()=>{const k=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!c&&!n&&f&&g()};return window.addEventListener("scroll",k),()=>window.removeEventListener("scroll",k)},[g,c,n,f]);const v=()=>{g(!0)},_=()=>t.jsx("div",{className:"space-y-4",children:Array.from({length:6}).map((k,y)=>t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4 animate-pulse",children:t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:"w-12 h-12 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded w-1/2"})]}),t.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded w-16"})]})},y))});return n&&a.length===0?t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5"}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:s,onChange:k=>r(k.target.value),ref:b,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1096
+ disabled:opacity-50 disabled:cursor-not-allowed`,children:[t.jsx(z.X,{className:"w-4 h-4 sm:w-5 sm:h-5 mr-1"}),"Cancel"]})]})]})})}const gd=({comment:e,allComments:a,onReply:i,currentUser:s,token:r,searchQuery:n,depth:u=0,onVotedRefresh:c,onClickCommentUpvote:d,onClickCommentReply:f,onClickUpvoteButton:o})=>{const[h,l]=P.useState(!1),[p,x]=P.useState(!0),[w,b]=P.useState(!1),g=P.useMemo(()=>{const Q=e.active_votes||[];return!!s&&Q.some(ne=>ne.voter===s)},[e.active_votes,s]),[v,k]=P.useState(!1),[_,y]=P.useState(""),[m,N]=P.useState(!1),j=Q=>{y(Q),k(!0),setTimeout(()=>k(!1),2500)},A=e.depth||0;let C=a.filter(Q=>Q.parent_author===e.author&&Q.parent_permlink===e.permlink&&(typeof Q.depth!="number"||Q.depth===A+1));if((!C||C.length===0)&&Array.isArray(e.replies)&&e.replies.length>0){const Q=new Set(e.replies);C=a.filter(ne=>Q.has(`${ne.author}/${ne.permlink}`))}const O=C.length>0,$=u>=4,H=(Q,ne)=>{if(!ne)return Q;const xe=new RegExp(`(${ne})`,"gi");return Q.replace(xe,'<mark class="bg-yellow-200 dark:bg-yellow-800">$1</mark>')},F=()=>{b(!0)},q=async Q=>{if(!r){c?.(),j("Vote submitted successfully ✅");return}try{const ne=Math.round(Q*100);await Ue.handleUpvote({author:e.author,permlink:e.permlink,weight:ne,authToken:r}),l(!0),b(!1),N(!0),setTimeout(()=>{c?.(),N(!1),j("Vote submitted successfully ✅")},3e3)}catch(ne){const xe=ne instanceof Error?ne.message:"Failed to upvote";alert(xe)}},M=()=>{s?i(e.author,e.permlink):j("Please login to upvote")},Y=e.json_metadata_parsed||(()=>{try{return e.json_metadata?JSON.parse(e.json_metadata):void 0}catch{return}})(),X=e.body||"",I=(Q=>{const ne=/^(\s*(?:#[\p{L}\p{N}_-]+\s*(?:,\s*)?)+\s*)$/gimu;return Q.replace(ne,"").trim()})(X),ie=n?H(I,n):I,R=/!\[[^\]]*\]\([^)]+\)/.test(I)||/<img\s/i.test(I),V=Array.isArray(Y?.image)?Y.image:[],J=new to.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:Q=>Q,usertagUrlFn:Q=>`/@${Q}`,hashtagUrlFn:Q=>`/trending/${Q}`,isLinkSafeFn:Q=>!0,addExternalCssClassToMatchingLinksFn:Q=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"}),fe=e.stats?.total_votes||e.net_votes||0;return t.jsxs("div",{className:`${u>0?"ml-4 md:ml-8 border-l-2 border-gray-200 dark:border-gray-700 pl-4 md:pl-6":""}`,children:[t.jsx("div",{className:"group hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors duration-200 p-4 md:p-6",children:t.jsxs("div",{className:"flex items-start space-x-3 md:space-x-4",children:[t.jsx("div",{className:"flex-shrink-0",children:t.jsx("img",{src:`https://images.hive.blog/u/${e.author}/avatar`,alt:e.author,className:"w-8 h-8 md:w-10 md:h-10 rounded-full object-cover ring-2 ring-gray-200 dark:ring-gray-700",onError:Q=>{Q.target.src=`https://ui-avatars.com/api/?name=${e.author}&background=random`}})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center flex-wrap gap-2 mb-2",children:[t.jsxs("button",{className:"font-semibold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200 text-sm md:text-base",onClick:()=>{},children:["@",e.author]}),t.jsxs("div",{className:"flex items-center text-xs md:text-sm text-gray-500 dark:text-gray-400 space-x-1",children:[t.jsx(z.Clock,{className:"w-3 h-3 md:w-4 md:h-4"}),t.jsx("span",{children:ns.formatDistanceToNow(new Date(e.created+"Z"),{addSuffix:!0})})]}),e.author===s&&t.jsx("span",{className:"px-2 py-1 text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:"You"})]}),t.jsx("div",{className:"prose prose-sm md:prose-base dark:prose-invert max-w-none mb-3 comment-content text-gray-900 dark:text-gray-100 prose-a:text-blue-600 dark:prose-a:text-blue-400",children:n?t.jsx("div",{dangerouslySetInnerHTML:{__html:ie}}):t.jsx("div",{dangerouslySetInnerHTML:{__html:J.render(I)}})}),!R&&V.length>0&&t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3",children:V.map((Q,ne)=>t.jsx("img",{src:Q,alt:`image-${ne}`,className:"max-w-full h-auto rounded-lg shadow-sm cursor-pointer hover:shadow-md transition-shadow duration-200",onClick:()=>window.open(Q,"_blank")},Q+ne))}),t.jsxs("div",{className:"flex items-center space-x-4 md:space-x-6",children:[t.jsxs("button",{onClick:()=>{if(d)d(e);else if(o)o(s,r);else{if(!s){j("Please login to upvote");return}r?g?j("You have already upvoted this comment"):F():(c?.(),j("Vote submitted successfully ✅"))}},className:`flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium transition-colors duration-200 ${h?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400"}`,children:[t.jsx(z.ThumbsUp,{className:`w-4 h-4 ${g||h?"fill-current text-blue-600 dark:text-blue-400":""}`}),t.jsx("span",{children:fe})]}),t.jsxs("button",{onClick:()=>{f?f(e):M()},className:"flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200",children:[t.jsx(z.MessageSquare,{className:"w-4 h-4"}),t.jsx("span",{children:"Reply"})]}),O&&t.jsx("button",{onClick:()=>x(!p),className:"flex items-center space-x-1 md:space-x-2 text-xs md:text-sm font-medium text-gray-500 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-200",children:t.jsxs("span",{children:[p?"Hide":"Show"," ",C.length," ",C.length===1?"reply":"replies"]})}),t.jsx("button",{onClick:()=>f?.(e),className:"opacity-0 group-hover:opacity-100 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-all duration-200",children:t.jsx(z.MoreHorizontal,{className:"w-4 h-4 text-gray-400"})})]}),w&&!g&&t.jsx("div",{className:"mt-3",children:t.jsx(md,{author:e.author,permlink:e.permlink,onUpvote:q,onCancel:()=>b(!1)})}),m&&t.jsxs("div",{className:"mt-3 inline-flex items-center text-xs text-gray-500 dark:text-gray-400",children:[t.jsx("span",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin mr-2"}),"Updating votes..."]}),v&&t.jsx("div",{className:"fixed bottom-4 right-4 w-[280px] z-50",children:t.jsx("div",{className:"bg-gray-800 text-white rounded px-3 py-2 shadow-lg text-sm",children:_})})]})]})}),O&&p&&!$&&t.jsx("div",{className:"space-y-0",children:C.map(Q=>t.jsx(gd,{comment:Q,allComments:a,onReply:i,currentUser:s,searchQuery:n,depth:u+1,onVotedRefresh:c},Q.permlink))}),O&&$&&t.jsx("div",{className:"ml-4 md:ml-8 p-3 text-sm text-gray-500 dark:text-gray-400 border-l-2 border-gray-200 dark:border-gray-700 pl-4",children:t.jsxs("button",{onClick:()=>{console.log("Show more replies for:",e.author,e.permlink)},className:"text-blue-600 dark:text-blue-400 hover:underline",children:["View ",C.length," more ",C.length===1?"reply":"replies"]})})]})},bd=({onSubmit:e,onCancel:a,currentUser:i,placeholder:s="Write your comment...",parentAuthor:r,parentPermlink:n})=>{const[u,c]=P.useState(""),[d,f]=P.useState(!1),o=P.useRef(null);P.useEffect(()=>{o.current&&o.current.focus()},[]);const h=async()=>{if(!(!u.trim()||d)){f(!0);try{await e(u.trim()),c("")}catch(p){console.error("Failed to submit comment:",p)}finally{f(!1)}}},l=p=>{p.key==="Enter"&&(p.metaKey||p.ctrlKey)&&(p.preventDefault(),h()),p.key==="Escape"&&a()};return t.jsxs("div",{className:"p-4 md:p-6 space-y-4 bg-white dark:bg-gray-800",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"flex-shrink-0",children:i?t.jsx("img",{src:`https://images.hive.blog/u/${i}/avatar`,alt:i,className:"w-10 h-10 rounded-full object-cover border-2 border-gray-200 dark:border-gray-600",onError:p=>{p.target.src=`https://ui-avatars.com/api/?name=${i}&background=random`}}):t.jsx("div",{className:"w-10 h-10 rounded-full bg-gray-200 dark:bg-gray-600 flex items-center justify-center",children:t.jsx(z.User,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"text-sm text-gray-900 dark:text-white font-medium",children:i?`@${i}`:"Anonymous"}),r&&t.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:["Replying to @",r]})]})]}),t.jsx("div",{className:"relative",children:t.jsx("textarea",{ref:o,value:u,onChange:p=>c(p.target.value),onKeyDown:l,placeholder:s,disabled:d,className:"w-full min-h-[100px] max-h-[300px] p-4 border border-gray-200 dark:border-gray-600 rounded-lg resize-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 transition-colors duration-200 disabled:opacity-50",style:{height:"auto"},onInput:p=>{const x=p.target;x.style.height="auto",x.style.height=x.scrollHeight+"px"}})}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Press Cmd+Enter to post"}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("button",{onClick:a,disabled:d,className:"px-4 py-2 text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 transition-colors duration-200 disabled:opacity-50",children:"Cancel"}),t.jsx("button",{onClick:h,disabled:d||!u.trim(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 dark:disabled:bg-gray-600 text-white rounded-lg font-medium transition-all duration-200 transform hover:scale-[1.02] disabled:transform-none disabled:opacity-50 flex items-center space-x-2",children:d?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),t.jsx("span",{children:"Posting..."})]}):t.jsxs(t.Fragment,{children:[t.jsx(z.Send,{className:"w-4 h-4"}),t.jsx("span",{children:"Post"})]})})]})]})]})},sp=({parentAuthor:e,parentPermlink:a,onClose:i,onCommentSubmitted:s,currentUser:r})=>{const[n,u]=P.useState(!1),c=async d=>{if(!(!d.trim()||n)){u(!0);try{await s(e,a,d),i()}catch(f){console.error("Failed to submit reply:",f)}finally{u(!1)}}};return P.useEffect(()=>{const d=f=>{f.key==="Escape"&&i()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[i]),t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-blue-100 dark:bg-blue-900 rounded-lg",children:t.jsx(z.Send,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"Reply to Comment"}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["@",e]})]})]}),t.jsx("button",{onClick:i,disabled:n,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",children:t.jsx(z.X,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:t.jsx(bd,{onSubmit:c,onCancel:i,currentUser:r,parentAuthor:e,parentPermlink:a,placeholder:`Reply to @${e}...`})}),t.jsx("div",{className:"p-4 md:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:t.jsxs("div",{className:"flex items-center justify-between text-xs md:text-sm text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsx("span",{children:"• Markdown supported"}),t.jsx("span",{children:"• Be respectful"})]}),t.jsx("div",{className:"hidden md:block",children:"Press Esc to close"})]})})]})})},ip=({isVisible:e,searchQuery:a,onSearchChange:i,onClose:s})=>{const r=P.useRef(null);P.useEffect(()=>{e&&r.current&&r.current.focus()},[e]);const n=()=>{i(""),s()};return t.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-in-out ${e?"max-h-20 opacity-100":"max-h-0 opacity-0"}`,children:t.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/30",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),t.jsx("input",{ref:r,type:"text",value:a,onChange:u=>i(u.target.value),placeholder:"Search comments and authors...",className:"w-full pl-10 pr-10 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 transition-colors duration-200"}),a&&t.jsx("button",{onClick:()=>i(""),className:"absolute right-8 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-4 h-4 text-gray-400"})}),t.jsx("button",{onClick:n,className:"absolute right-3 top-1/2 transform -translate-y-1/2 p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-4 h-4 text-gray-400"})})]})})})},op=({author:e,permlink:a,onClose:i,currentUser:s,token:r,onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:c})=>{const[d,f]=P.useState([]),[o,h]=P.useState([]),[l,p]=P.useState(!0),[x,w]=P.useState(null),[b,g]=P.useState(null),[v,k]=P.useState(!1),[_,y]=P.useState(""),[m,N]=P.useState(!1),[j,A]=P.useState(!1),D=P.useCallback(async(F=!1)=>{F?A(!0):p(!0),w(null);try{const q=await Ue.getCommentsList(e,a);f(q),h(q)}catch(q){w(q instanceof Error?q.message:"Failed to load comments")}finally{p(!1),A(!1)}},[e,a]);P.useEffect(()=>{D()},[D]),P.useEffect(()=>{if(!_.trim())h(d);else{const F=d.filter(q=>q.body?.toLowerCase().includes(_.toLowerCase())||q.author.toLowerCase().includes(_.toLowerCase()));h(F)}},[_,d]);const C=(F,q)=>{g({author:F,permlink:q})},O=F=>{F.target===F.currentTarget&&i()},$=async(F,q,M)=>{if(!r){alert("Please login to comment");return}try{await Ue.handleComment({author:F,permlink:q,body:M,authToken:r}),N(!1),A(!0),setTimeout(async()=>{await D(!0),A(!1)},3e3)}catch(Y){const X=Y instanceof Error?Y.message:"Failed to post comment";alert(X)}},H=o.filter(F=>F.author===e&&F.permlink===a);return l?t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4 h-screen",children:t.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl h-[90vh] flex flex-col",children:t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center",children:[t.jsx(z.Loader2,{className:"w-12 h-12 animate-spin text-blue-500 mx-auto mb-4"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Loading comments..."})]})})})}):x?t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-40 p-4 h-screen",onClick:O,children:t.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl h-[90vh] flex flex-col overflow-hidden",children:t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center p-6",children:[t.jsx(z.AlertCircle,{className:"w-16 h-16 text-red-500 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load comments"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:x}),t.jsx("button",{onClick:()=>D(),className:"px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition-colors duration-200",children:"Try Again"})]})})})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-40 p-4 h-screen",onClick:O,children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-4xl h-[90vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"flex justify-between items-center p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("h2",{className:"text-lg md:text-xl font-bold text-gray-900 dark:text-white",children:["Comments (",d.length-1,")"]}),j&&t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin text-blue-500"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>D(!0),disabled:j,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200 disabled:opacity-50",title:"Refresh comments",children:t.jsx(z.RefreshCw,{className:`w-5 h-5 text-gray-500 dark:text-gray-400 ${j?"animate-spin":""}`})}),t.jsx("button",{onClick:()=>k(!v),className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",title:"Search comments",children:t.jsx(z.Search,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})}),t.jsx("button",{onClick:i,className:"p-2 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors duration-200",children:t.jsx(z.X,{className:"w-6 h-6 text-gray-500 dark:text-gray-400"})})]})]}),t.jsx(ip,{isVisible:v,searchQuery:_,onSearchChange:y,onClose:()=>k(!1)}),t.jsxs("div",{className:"flex-1 overflow-y-auto",children:[m&&t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:t.jsx(bd,{onSubmit:F=>$(e,a,F),onCancel:()=>N(!1),currentUser:s,placeholder:"Add a comment..."})}),H.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center",children:[t.jsx(z.MessageCirclePlus,{className:"w-16 h-16 text-gray-300 dark:text-gray-600 mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:_?"No comments found":"No comments yet"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-6",children:_?"Try adjusting your search terms":"Be the first to share your thoughts!"}),!_&&s&&t.jsx("button",{onClick:()=>N(!0),className:"px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-colors duration-200",children:"Add Comment"})]}):t.jsx("div",{className:"divide-y divide-gray-100 dark:divide-gray-700",children:H.map(F=>t.jsx(gd,{comment:F,allComments:o,onReply:C,currentUser:s,token:r,searchQuery:_,depth:0,onVotedRefresh:()=>D(!0),onClickCommentUpvote:n,onClickCommentReply:u,onClickUpvoteButton:c},F.permlink))})]}),!m&&s&&H.length>0&&t.jsx("div",{className:"p-4 md:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",children:t.jsxs("button",{onClick:()=>N(!0),className:"w-full md:w-auto px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg font-medium transition-all duration-200 transform hover:scale-[1.02] flex items-center justify-center space-x-2",children:[t.jsx(z.MessageCirclePlus,{className:"w-5 h-5"}),t.jsx("span",{children:"Add Comment"})]})})]})}),b&&t.jsx(sp,{parentAuthor:b.author,parentPermlink:b.permlink,onClose:()=>g(null),onCommentSubmitted:$,currentUser:s})]})};function up(e){const a=typeof e=="string"?new Date(e):e,i=Math.floor((Date.now()-a.getTime())/1e3),s={year:31536e3,month:2628e3,day:86400,hour:3600,minute:60};for(const[r,n]of Object.entries(s)){const u=Math.floor(i/n);if(u>1)return`${u} ${r}s ago`;if(u===1)return`${u} ${r} ago`}return"just now"}const lp=({author:e,permlink:a,onClose:i,currentUser:s,token:r,onClickUpvoteButton:n})=>{const[u,c]=P.useState([]),[d,f]=P.useState(!0),[o,h]=P.useState(!1),l=!!s&&u.some(N=>N.voter===s),[p,x]=P.useState(!1),[w,b]=P.useState(""),[g,v]=P.useState(!1),k=N=>{b(N),x(!0),setTimeout(()=>x(!1),2500)},_=async()=>{f(!0);const N=await Ue.getActiveVotes(e,a);N.sort((j,A)=>!j.time||!A.time?0:new Date(A.time).getTime()-new Date(j.time).getTime()),c(N),f(!1)};P.useEffect(()=>{_()},[e,a]);const y=N=>{N.target===N.currentTarget&&i()},m=async N=>{if(!r||!s){alert("Please login to upvote");return}try{const j=Math.round(N*100);await Ue.handleUpvote({author:e,permlink:a,weight:j,authToken:r}),h(!1),v(!0),setTimeout(async()=>{await _(),v(!1),k("Vote submitted successfully ✅"),i()},3e3)}catch(j){const A=j instanceof Error?j.message:"Failed to upvote";alert(A)}};return t.jsxs("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 px-4 h-screen",onClick:y,children:[t.jsxs("div",{className:"relative bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-md max-h-[80vh] flex flex-col overflow-hidden",children:[t.jsxs("div",{className:"p-4 md:p-6 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50 flex items-center justify-between",children:[t.jsxs("h2",{className:"text-lg font-bold text-gray-900 dark:text-white flex items-center space-x-2",children:[t.jsxs("span",{children:["Voters (",u.length,")"]}),g&&t.jsx("span",{className:"inline-flex items-center ml-2",children:t.jsx("span",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})})]}),!o&&t.jsx("button",{onClick:()=>{if(n){n(s,r);return}if(!s||!r){k("Please login to upvote");return}l?k("You have already upvoted this post"):h(!0)},"aria-label":"Open Vote Slider",className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded",type:"button",children:t.jsx(z.ThumbsUp,{className:`w-5 h-5 ${l?"text-blue-600 dark:text-blue-400 fill-current":"text-gray-600 dark:text-gray-300"}`})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:d?t.jsx("div",{className:"flex justify-center items-center h-full p-8",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500"})}):o&&!l?t.jsx(md,{author:e,permlink:a,onUpvote:m,onCancel:()=>h(!1)}):t.jsx("ul",{children:u.map(N=>t.jsxs("li",{className:"flex items-center p-4 border-b dark:border-gray-700",children:[t.jsx("img",{src:`https://images.hive.blog/u/${N.voter}/avatar`,alt:N.voter,className:"w-10 h-10 rounded-full mr-4",onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${N.voter}&background=random`}}),t.jsxs("div",{children:[t.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:N.voter}),t.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:[((N.percent||0)/100).toFixed(0),"%",N.time&&` · ${up(N.time+"Z")}`]})]})]},N.voter))})})]}),p&&t.jsx("div",{className:"fixed bottom-4 right-4 w-[280px] z-50",children:t.jsx("div",{className:"bg-gray-800 text-white rounded px-3 py-2 shadow-lg text-sm",children:w})})]})},xd=({isOpen:e,onClose:a,title:i,children:s,maxWidth:r="max-w-2xl"})=>e?t.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[t.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:a}),t.jsxs("div",{className:`relative bg-card border border-border rounded-xl shadow-xl w-full mx-4 ${r} max-h-[90vh] overflow-hidden animate-scale-in`,children:[t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[t.jsx("h2",{className:"text-xl font-bold text-card-foreground",children:i}),t.jsx("button",{onClick:a,className:"p-2 rounded-lg hover:bg-muted transition-colors",children:t.jsx(z.X,{className:"w-5 h-5 text-muted-foreground"})})]}),t.jsx("div",{className:"overflow-y-auto max-h-[calc(90vh-80px)] custom-scrollbar",children:s})]})]}):null,cp=({author:e,permlink:a,content:i,onClose:s})=>t.jsx(xd,{isOpen:!0,onClose:s,title:"Video Description",maxWidth:"max-w-2xl",children:t.jsxs("div",{className:"p-6",children:[i?t.jsx("div",{className:"prose prose-sm max-w-none",children:t.jsx("div",{className:"bg-muted/30 rounded-lg p-4",children:t.jsx("pre",{className:"whitespace-pre-wrap text-sm text-card-foreground font-sans leading-relaxed",children:i})})}):t.jsxs("div",{className:"text-center py-8",children:[t.jsx(z.FileText,{className:"w-12 h-12 text-muted-foreground mx-auto mb-2"}),t.jsx("p",{className:"text-muted-foreground",children:"No description available"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"This video doesn't have a description yet."})]}),t.jsx("div",{className:"mt-6 pt-4 border-t border-border",children:t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsxs("span",{children:["By @",e]}),t.jsx("span",{children:"•"}),t.jsxs("span",{children:["/",a]})]})})]})}),dp=({username:e,permlink:a,onAuthorClick:i,onVideoClick:s,onTagClick:r,onBack:n,onCommentsModal:u,onUpvotesModal:c,onDescriptionModal:d,onVideoInfo:f,onShare:o,onBookmark:h}={})=>{const l=e,p=a,[x,w]=P.useState(null),[b,g]=P.useState(!0),[v,k]=P.useState(null),[_,y]=P.useState(!1),[m,N]=P.useState(null),[j,A]=P.useState(!1),[D,C]=P.useState(!1),[O,$]=P.useState(!1),[H,F]=P.useState(!1),q=P.useRef(null),M=P.useRef(null),Y=P.useRef(null);P.useEffect(()=>{(async()=>{if(!(!l||!p))try{g(!0),k(null);const J=await Ue.getVideoDetails(l,p);w(J),y(!1),N(null)}catch(J){k(J instanceof Error?J.message:"Failed to load video")}finally{g(!1)}})()},[l,p]);const X=V=>V?V.startsWith("ipfs://")?`https://ipfs-3speak.b-cdn.net/ipfs/${V.replace("ipfs://","").split("/")[0]}/manifest.m3u8`:V:"";P.useEffect(()=>((async()=>{const J=x?.video_v2;if(!_||!J||!q.current)return;const fe=q.current,Q=X(J);M.current&&(M.current.destroy(),M.current=null),fe.src="",fe.load();try{let ne=!1;const xe=()=>{ne||(ne=!0,fe.play().then(()=>N(null)).catch(be=>N(`Playback failed: ${be.message}`)))};if(Qr.isSupported()){const be=new Qr({debug:!1,enableWorker:!1,lowLatencyMode:!1,backBufferLength:90,maxLoadingDelay:4,maxBufferLength:30,maxMaxBufferLength:600,startLevel:-1});M.current=be,be.on(Qr.Events.MANIFEST_PARSED,()=>{}),be.on(Qr.Events.ERROR,(me,ke)=>{if(ke.fatal)switch(ke.type){case Qr.ErrorTypes.NETWORK_ERROR:N("Network error, retrying..."),setTimeout(()=>be.startLoad(),1e3);break;case Qr.ErrorTypes.MEDIA_ERROR:N("Media error, retrying..."),setTimeout(()=>be.recoverMediaError(),1e3);break;default:N(`Fatal error: ${ke.details}`),be.destroy(),M.current=null;break}}),be.attachMedia(fe),be.loadSource(Q)}else if(fe.canPlayType("application/vnd.apple.mpegurl"))fe.src=Q;else{const be=Q.replace("/manifest.m3u8","/480p/index.m3u8");fe.src=be}const Ce=()=>A(!0),Z=()=>{A(!1),xe()},te=be=>{const me=be.target;N(`Video error: ${me.error?.message||"Unknown error"}`),A(!1)},ee=()=>A(!1);fe.addEventListener("loadstart",Ce),fe.addEventListener("canplay",Z),fe.addEventListener("error",te),fe.addEventListener("loadeddata",ee);const le=async()=>{const be=!!document.fullscreenElement;try{be?"orientation"in screen&&await(screen.orientation?.lock?.("landscape")??Promise.resolve()):"orientation"in screen&&screen.orientation?.unlock?.()}catch{}};return document.addEventListener("fullscreenchange",le),Y.current=()=>{document.removeEventListener("fullscreenchange",le)},()=>{fe.removeEventListener("loadstart",Ce),fe.removeEventListener("canplay",Z),fe.removeEventListener("error",te),fe.removeEventListener("loadeddata",ee),Y.current&&Y.current()}}catch(ne){N(`Setup error: ${ne instanceof Error?ne.message:"Unknown"}`)}})(),()=>{M.current&&(M.current.destroy(),M.current=null)}),[_,x?.video_v2]);const ae=()=>{if(!x?.video_v2){N("No video source available");return}y(!0),N(null),A(!0)},I=V=>{s&&s(V)},ie=V=>{i&&i(V)},R=V=>{if(!V)return"00:00";const J=Math.floor(V),fe=Math.floor(J/3600),Q=Math.floor(J%3600/60),ne=J%60,xe=Ce=>Ce.toString().padStart(2,"0");return J<60?`00:${xe(ne)}`:fe===0?`${xe(Q)}:${xe(ne)}`:`${xe(fe)}:${xe(Q)}:${xe(ne)}`};return b?t.jsxs("div",{className:"min-h-screen bg-background",children:[t.jsx("div",{className:"sticky top-0 z-50 w-full bg-background border-b border-border",children:t.jsx("div",{className:"container mx-auto px-4 py-3",children:t.jsx("div",{className:"h-8 w-24 bg-muted rounded-full animate-pulse"})})}),t.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:t.jsxs("div",{className:"animate-pulse space-y-6",children:[t.jsx("div",{className:"aspect-video bg-muted rounded-xl"}),t.jsxs("div",{className:"space-y-3",children:[t.jsx("div",{className:"h-6 bg-muted rounded w-3/4"}),t.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})]})})]}):v||!x?t.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:t.jsxs("div",{className:"text-center max-w-md mx-auto px-4",children:[t.jsx("h2",{className:"text-xl font-semibold text-card-foreground mb-2",children:"Failed to Load Video"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:v||"Video not found"}),t.jsxs("button",{onClick:()=>{n&&n()},className:"inline-flex items-center gap-2 px-4 py-2 bg-card border border-border text-card-foreground rounded-lg hover:bg-card-hover transition-colors",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4"}),"Go Back"]})]})}):t.jsxs("div",{className:"min-h-screen bg-background",children:[t.jsx("div",{className:"sticky top-0 z-50 w-full bg-background/95 backdrop-blur-sm border-b border-border",children:t.jsx("div",{className:"container mx-auto px-4 py-3",children:t.jsxs("button",{onClick:()=>{n&&n()},className:"inline-flex items-center gap-2 text-muted-foreground hover:text-card-foreground transition-colors",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4"}),"Back"]})})}),t.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[t.jsx("div",{className:"w-full aspect-video bg-black rounded-xl overflow-hidden relative shadow-card",children:_?t.jsxs("div",{className:"relative w-full h-full",children:[t.jsx("video",{ref:q,controls:!0,poster:Br(x.thumbnail),className:"w-full h-full object-contain bg-black",onDoubleClick:async V=>{const J=V.currentTarget;try{document.fullscreenElement?await document.exitFullscreen():await J.requestFullscreen()}catch{}}}),j&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}),m&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/80",children:t.jsxs("div",{className:"text-center text-white",children:[t.jsx("p",{className:"mb-4",children:m}),t.jsx("button",{onClick:()=>{y(!1),N(null)},className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover transition-colors",children:"Try Again"})]})})]}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:Br(x.thumbnail)||`https://images.hive.blog/u/${x.owner}/avatar`,alt:x.title,className:"w-full h-full object-cover",onError:V=>{V.target.src=`https://images.hive.blog/u/${x.owner}/avatar`}}),t.jsx("div",{className:"absolute inset-0 bg-gradient-overlay opacity-30"}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx("button",{onClick:ae,className:"bg-primary hover:bg-primary-hover rounded-full p-6 transform hover:scale-110 transition-all duration-300 shadow-lg",children:t.jsx(z.Play,{className:"w-8 h-8 text-primary-foreground ml-1",fill:"currentColor"})})}),x.duration&&t.jsxs("div",{className:"absolute bottom-4 right-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[t.jsx(z.Clock,{className:"w-3 h-3"}),R(x.duration)]}),x.views&&t.jsxs("div",{className:"absolute bottom-4 left-4 bg-black/80 text-white text-sm px-3 py-1 rounded-md flex items-center gap-1 backdrop-blur-sm",children:[t.jsx(z.Eye,{className:"w-3 h-3"}),x.views.toLocaleString()," views"]})]})}),t.jsx(Nc,{title:x.title||"",author:x.owner||"",permlink:x.permlink||"",createdAt:x.created,description:x.description||"",video:{title:x.title||"",author:x.owner||"",permlink:x.permlink||"",created:x.created||new Date,category:x.category||"",numOfUpvotes:void 0,numOfComments:void 0,hiveValue:void 0,duration:x.duration,thumbnail:x.thumbnail,views:x.views},onTapComment:()=>{u?u(l,p):C(!0)},onTapUpvote:()=>{c?c(l,p):$(!0)},onTapInfo:()=>{d?d(l,p,x.description||""):F(!0)},onTapAuthor:()=>{i&&i(x.owner)},onTapShare:()=>{o&&o(l,p)},onTapBookmark:()=>{h&&h(l,p)}}),x.tags&&t.jsx("div",{className:"flex flex-wrap gap-2",children:x.tags.split(",").map((V,J)=>t.jsxs("span",{className:"bg-primary/10 text-primary px-3 py-1 rounded-full text-sm font-medium hover:bg-primary/20 transition-colors cursor-pointer",onClick:()=>{r&&r(V.trim())},children:["#",V.trim()]},J))})]}),t.jsxs("div",{className:"bg-card border border-border rounded-xl p-6 sticky top-24",children:[t.jsx("h3",{className:"font-semibold text-card-foreground mb-4 text-lg",children:"Related Videos"}),t.jsx("div",{className:"space-y-4",children:t.jsx(ss,{feedType:Ge.RELATED,username:x.owner,onVideoClick:I,onAuthorClick:ie})})]})]})}),D&&l&&p&&t.jsx(op,{author:l,permlink:p,onClose:()=>C(!1)}),O&&l&&p&&t.jsx(lp,{author:l,permlink:p,onClose:()=>$(!1)}),H&&l&&p&&t.jsx(cp,{author:l,permlink:p,content:x.description||"",onClose:()=>F(!1)})]})};var yd={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},dc=P.createContext&&P.createContext(yd),fp=["attr","size","title"];function hp(e,a){if(e==null)return{};var i=pp(e,a),s,r;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)s=n[r],!(a.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(i[s]=e[s])}return i}function pp(e,a){if(e==null)return{};var i={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(a.indexOf(s)>=0)continue;i[s]=e[s]}return i}function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},rs.apply(this,arguments)}function fc(e,a){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),i.push.apply(i,s)}return i}function as(e){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?fc(Object(i),!0).forEach(function(s){mp(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):fc(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function mp(e,a,i){return a=gp(a),a in e?Object.defineProperty(e,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[a]=i,e}function gp(e){var a=bp(e,"string");return typeof a=="symbol"?a:a+""}function bp(e,a){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,a);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function vd(e){return e&&e.map((a,i)=>P.createElement(a.tag,as({key:i},a.attr),vd(a.child)))}function la(e){return a=>P.createElement(xp,rs({attr:as({},e.attr)},a),vd(e.child))}function xp(e){var a=i=>{var{attr:s,size:r,title:n}=e,u=hp(e,fp),c=r||i.size||"1em",d;return i.className&&(d=i.className),e.className&&(d=(d?d+" ":"")+e.className),P.createElement("svg",rs({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},i.attr,s,u,{className:d,style:as(as({color:e.color||i.color},i.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),n&&P.createElement("title",null,n),e.children)};return dc!==void 0?P.createElement(dc.Consumer,null,i=>a(i)):a(yd)}function yp(e){return la({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z"},child:[]}]})(e)}function vp(e){return la({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 405.3V448c0 35.3 86 64 192 64s192-28.7 192-64v-42.7C342.7 434.4 267.2 448 192 448S41.3 434.4 0 405.3zM320 128c106 0 192-28.7 192-64S426 0 320 0 128 28.7 128 64s86 64 192 64zM0 300.4V352c0 35.3 86 64 192 64s192-28.7 192-64v-51.6c-41.3 34-116.9 51.6-192 51.6S41.3 334.4 0 300.4zm416 11c57.3-11.1 96-31.7 96-55.4v-42.7c-23.2 16.4-57.3 27.6-96 34.5v63.6zM192 160C86 160 0 195.8 0 240s86 80 192 80 192-35.8 192-80-86-80-192-80zm219.3 56.3c60-10.8 100.7-32 100.7-56.3v-42.7c-35.5 25.1-96.5 38.6-160.7 41.8 29.5 14.3 51.2 33.5 60 57.2z"},child:[]}]})(e)}function wp(e){return la({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(e)}function _p(e){return la({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM48 400v-64c35.35 0 64 28.65 64 64H48zm0-224v-64h64c0 35.35-28.65 64-64 64zm272 176c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 48h-64c0-35.35 28.65-64 64-64v64zm0-224c-35.35 0-64-28.65-64-64h64v64z"},child:[]}]})(e)}function kp(e){return la({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M560 224h-29.5c-8.8-20-21.6-37.7-37.4-52.5L512 96h-32c-29.4 0-55.4 13.5-73 34.3-7.6-1.1-15.1-2.3-23-2.3H256c-77.4 0-141.9 55-156.8 128H56c-14.8 0-26.5-13.5-23.5-28.8C34.7 215.8 45.4 208 57 208h1c3.3 0 6-2.7 6-6v-20c0-3.3-2.7-6-6-6-28.5 0-53.9 20.4-57.5 48.6C-3.9 258.8 22.7 288 56 288h40c0 52.2 25.4 98.1 64 127.3V496c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-48h128v48c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16v-80.7c11.8-8.9 22.3-19.4 31.3-31.3H560c8.8 0 16-7.2 16-16V240c0-8.8-7.2-16-16-16zm-128 64c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zM256 96h128c5.4 0 10.7.4 15.9.8 0-.3.1-.5.1-.8 0-53-43-96-96-96s-96 43-96 96c0 2.1.5 4.1.6 6.2 15.2-3.9 31-6.2 47.4-6.2z"},child:[]}]})(e)}function Np(e){return la({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(e)}const ro=new Md.Client(["https://api.hive.blog"]),jp=async e=>{try{const a=await ro.database.getAccounts([e]);if(!a||a.length===0)throw new Error("Account not found");return a[0]}catch(a){return console.error("Error in getWalletDataDetail:",a),{error:a instanceof Error?a.message:"Unknown error"}}},Ep=async e=>{try{const a=await ro.database.getDynamicGlobalProperties(),i=parseFloat(e.split(" ")[0]),s=parseFloat(String(a.total_vesting_shares).split(" ")[0]),r=parseFloat(String(a.total_vesting_fund_hive).split(" ")[0]);return(i*r/s).toFixed(3)}catch(a){return console.error("Error in convertVestingSharesToHiveData:",a),"0"}},Ap=async e=>{try{const i=(await ro.database.call("get_feed_history",[])).current_median_history,s=parseFloat(i.base.split(" ")[0]),r=typeof e=="string"?parseFloat(e):e;return(s*r).toFixed(2)}catch(a){return console.error("Error in convertHivetoUSDData:",a),"0"}},wd=vc.create(e=>({walletData:null,isLoading:!1,error:null,setWalletData:a=>e({walletData:a}),clearWalletData:()=>e({walletData:null,error:null}),fetchWalletData:async a=>{e({isLoading:!0,error:null});try{const i=await jp(a),s=w=>"error"in w;if(!i||s(i))throw new Error(s(i)?i.error:"Account not found");const r=typeof i.vesting_shares=="string"?i.vesting_shares:"0.000000 VESTS",n=typeof i.balance=="string"?i.balance:i.balance.toString(),u=typeof i.hbd_balance=="string"?i.hbd_balance:i.hbd_balance.toString(),c=typeof i.savings_balance=="string"?i.savings_balance:i.savings_balance.toString(),d=typeof i.savings_hbd_balance=="string"?i.savings_hbd_balance:i.savings_hbd_balance.toString(),f=await Ep(r),o=parseFloat(n.split(" ")[0]||"0"),h=parseFloat(f),l=(o+h).toFixed(3),p=await Ap(l),x={balance:n,hbd_balance:u,savings_balance:c,savings_hbd_balance:d,hive_power:`${f} HP`,estimated_value:`$${p}`};return e({walletData:x}),x}catch(i){const s=i instanceof Error?i.message:"Failed to fetch wallet data";console.error("Wallet fetch error:",s);const r={balance:"0.000 HIVE",hbd_balance:"0.000 HBD",savings_balance:"0.000 HIVE",savings_hbd_balance:"0.000 HBD",hive_power:"0 HP",estimated_value:"$0.00",error:s};return e({walletData:r,error:s}),r}finally{e({isLoading:!1})}}})),Sp=({username:e,className:a=""})=>{const{walletData:i,fetchWalletData:s,isLoading:r,error:n}=wd();P.useEffect(()=>{e&&s(e)},[e,s]);const u=({label:c,value:d,icon:f,colorClass:o="bg-primary/10"})=>t.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-card border border-border shadow-sm mb-3 transition-all duration-200 hover:shadow-md",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[f&&t.jsx("div",{className:`p-2 rounded-full flex items-center justify-center ${o} text-primary`,children:f}),t.jsx("span",{className:"font-semibold text-card-foreground",children:c})]}),t.jsx("span",{className:"font-medium text-muted-foreground",children:d??"-"})]});return t.jsx("div",{className:`min-h-screen bg-gradient-elegant p-4 transition-all duration-300 ${a}`,children:t.jsxs("div",{className:"max-w-md mx-auto",children:[t.jsxs("div",{className:"flex flex-col items-center p-6 mb-6 rounded-xl bg-card border border-border shadow-elegant",children:[e&&t.jsx("img",{src:`https://images.hive.blog/u/${e}/avatar`,alt:`${e} avatar`,className:"w-20 h-20 rounded-full border-4 border-primary/20 mb-3 transition-transform hover:scale-105",onError:c=>{c.target.src=`https://ui-avatars.com/api/?name=${e}&background=random`}}),t.jsx("div",{className:"text-lg font-bold text-card-foreground",children:e}),t.jsx("div",{className:"text-sm text-muted-foreground",children:"Hive Wallet Overview"})]}),t.jsxs("div",{className:"text-center rounded-xl bg-gradient-primary shadow-glow p-6 mb-6 transition-all duration-300 hover:shadow-elegant",children:[t.jsx("div",{className:"text-sm font-semibold text-primary-foreground/80",children:"Estimated Value"}),t.jsx("div",{className:"text-3xl font-bold mt-2 text-primary-foreground",children:r?t.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t.jsx("div",{className:"w-6 h-6 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin"}),"Loading..."]}):i?.estimated_value??"-"})]}),n&&t.jsxs("div",{className:"flex items-center p-3 rounded-lg bg-destructive/10 border border-destructive/20 text-destructive mb-4",children:[t.jsx(wp,{className:"mr-2"}),t.jsx("span",{children:n})]}),t.jsx(u,{label:"Balance",value:i?.balance,icon:t.jsx(Np,{}),colorClass:"bg-blue-500/10"}),t.jsx(u,{label:"HBD Balance",value:i?.hbd_balance,icon:t.jsx(_p,{}),colorClass:"bg-green-500/10"}),t.jsx(u,{label:"Savings Balance",value:i?.savings_balance,icon:t.jsx(kp,{}),colorClass:"bg-yellow-500/10"}),t.jsx(u,{label:"Savings HBD Balance",value:i?.savings_hbd_balance,icon:t.jsx(vp,{}),colorClass:"bg-purple-500/10"}),t.jsx(u,{label:"Hive Power",value:i?.hive_power,icon:t.jsx(yp,{}),colorClass:"bg-orange-500/10"})]})})};function _d({sort:e="trending",tag:a="",observer:i="hive.blog",limit:s=20,showSortDropdown:r=!0,theme:n="dark",onAuthorClick:u,onPostClick:c,onCommunityClick:d,onPayoutClick:f,onUpvoteClick:o,onCommentClick:h,onReblogClick:l}){const[p,x]=P.useState([]),[w,b]=P.useState(!0),[g,v]=P.useState(null),[k,_]=P.useState(e),[y,m]=P.useState(!0),[N,j]=P.useState(!1),A=P.useRef(null);new to.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:q=>q,usertagUrlFn:q=>`/@${q}`,hashtagUrlFn:q=>`/trending/${q}`,isLinkSafeFn:q=>!0,addExternalCssClassToMatchingLinksFn:q=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"});const D=P.useCallback(async(q,M=!1)=>{M?j(!0):(b(!0),m(!0)),v(null);try{const Y=M&&p.length>0?p[p.length-1]:null,X=await Ue.getRankedPosts(q,a,i,s,Y?.author,Y?.permlink);M?(x(ae=>{const I=new Set(ae.map(R=>R.post_id)),ie=X.filter(R=>!I.has(R.post_id));return[...ae,...ie]}),m(X.length===s)):(x(X),m(X.length===s))}catch(Y){v(Y instanceof Error?Y.message:"Failed to load posts"),m(!1)}finally{b(!1),j(!1)}},[a,i,s,p]),C=P.useCallback(()=>{!N&&y&&!w&&D(k,!0)},[N,y,w,k,D]);P.useEffect(()=>{D(k)},[k,a,i,s]),P.useEffect(()=>{const q=new IntersectionObserver(M=>{M[0].isIntersecting&&C()},{threshold:1});return A.current&&q.observe(A.current),()=>{A.current&&q.unobserve(A.current)}},[C]);const O=q=>{_(q),x([]),m(!0)},$=q=>q>=1e6?`${(q/1e6).toFixed(1)}M`:q>=1e3?`${(q/1e3).toFixed(1)}K`:q.toString(),H=q=>{const M=q.payout*.5,Y=q.payout*.5,ae=(q.beneficiaries.find(I=>I.account==="commentrewarder")?.weight||0)/1e4*100;return{pending:`$${q.payout.toFixed(2)}`,breakdown:`${M.toFixed(2)} HBD, ${Y.toFixed(2)} HP`,commentRewarder:`${ae.toFixed(2)}%`,payoutInDays:Math.ceil((new Date(q.payout_at).getTime()-Date.now())/(1e3*60*60*24))}},F=q=>{const Y=(q.body||"").replace(/!\[[^\]]*\]\([^)]+\)/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/^#+\s*/gm,"").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/\*([^*]+)\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/<[^>]*>/g,"").replace(/\n+/g," ").trim();return Y.length>200?Y.substring(0,200)+"...":Y};return w?t.jsx("div",{className:"flex justify-center items-center min-h-[400px]",children:t.jsx(z.Loader2,{className:"w-8 h-8 animate-spin"})}):g?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-card-foreground",children:"Failed to load posts"}),t.jsx("p",{className:"text-muted-foreground",children:g}),t.jsx("button",{onClick:()=>D(k),className:"px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90",children:"Retry"})]}):t.jsx("div",{className:n==="dark"?"dark":"",children:t.jsxs("div",{className:`space-y-6 p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[r&&t.jsx("div",{className:"flex justify-center",children:t.jsxs("select",{value:k,onChange:q=>O(q.target.value),className:`px-4 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary ${n==="dark"?"bg-slate-950 text-white":"bg-card text-card-foreground"}`,children:[t.jsx("option",{value:"trending",children:"Trending"}),t.jsx("option",{value:"hot",children:"Hot"}),t.jsx("option",{value:"created",children:"New"})]})}),t.jsxs("div",{className:"space-y-4",children:[p.map(q=>{const M=q.json_metadata?.image?.[0],Y=H(q);return t.jsxs("div",{className:`border border-border rounded-xl p-4 shadow-card hover:shadow-card-hover transition-shadow ${n==="dark"?"bg-slate-900 text-white":"bg-slate-50 text-black"}`,children:[t.jsxs("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[t.jsx("img",{src:`https://images.hive.blog/u/${q.author}/avatar`,alt:q.author,className:"w-8 h-8 rounded-full cursor-pointer flex-shrink-0",onClick:()=>u?.(q.author,`https://images.hive.blog/u/${q.author}/avatar`),onError:X=>{X.target.src=`https://ui-avatars.com/api/?name=${q.author}&background=random`}}),t.jsx("span",{className:"font-medium cursor-pointer hover:text-primary",onClick:()=>u?.(q.author,`https://images.hive.blog/u/${q.author}/avatar`),children:q.author}),t.jsxs("span",{className:n==="dark"?"text-gray-400":"text-muted-foreground",children:["(",q.author_reputation.toFixed(2),")"]}),t.jsx("span",{className:`cursor-pointer hover:text-primary ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,onClick:()=>d?.(q.community_title),children:q.community_title}),t.jsx("span",{className:`hidden sm:inline ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:"•"}),t.jsx("span",{className:`text-sm ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:ns.formatDistanceToNow(new Date(q.created+"Z"),{addSuffix:!0})})]}),t.jsxs("div",{className:"flex gap-3 sm:gap-4",children:[t.jsx("div",{className:"flex-shrink-0",children:M?t.jsxs("div",{className:"relative",children:[t.jsx("img",{src:M.startsWith("http")?M:`https://images.hive.blog/u/320x0/${M}`,alt:q.title,className:"w-20 h-20 sm:w-32 sm:h-32 object-cover rounded-lg cursor-pointer",onClick:()=>c?.(q),onError:X=>{X.target.src!==`https://images.hive.blog/u/${q.author}/avatar`?X.target.src=`https://images.hive.blog/u/${q.author}/avatar`:X.target.src="https://images.hive.blog/u/null/avatar"}}),(()=>{const X=q.body?.match(/!\[[^\]]*\]\(([^)]+)\)/g)?.map(ae=>{const I=ae.match(/\(([^)]+)\)/);return I?I[1]:null}).filter(Boolean)||[];return X.length>0?t.jsx("div",{className:"absolute -bottom-1 -right-1 sm:-bottom-2 sm:-right-2 flex space-x-1",children:X.slice(0,3).map((ae,I)=>t.jsx("img",{src:ae,alt:`body-image-${I}`,className:"w-6 h-6 sm:w-8 sm:h-8 object-cover rounded border-2 border-white shadow-sm cursor-pointer",onClick:ie=>{ie.stopPropagation();const R=ie.currentTarget.parentElement?.parentElement?.querySelector("img:not(.w-6):not(.w-8)");R&&(R.src=ae)}},I))}):null})()]}):t.jsx("img",{src:`https://images.hive.blog/u/${q.author}/avatar`,alt:q.author,className:"w-20 h-20 sm:w-32 sm:h-32 rounded-lg cursor-pointer",onClick:()=>c?.(q)})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"font-semibold text-base sm:text-lg mb-1 sm:mb-2 cursor-pointer hover:text-primary line-clamp-2",onClick:()=>c?.(q),children:q.title}),t.jsx("p",{className:`mb-2 sm:mb-3 line-clamp-2 sm:line-clamp-3 cursor-pointer hover:text-primary text-sm sm:text-base ${n==="dark"?"text-gray-300":"text-gray-600"}`,onClick:()=>c?.(q),children:q.json_metadata?.description||F(q)||"No description available"}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"relative group",children:[t.jsxs("span",{className:"font-semibold text-green-600 cursor-pointer hover:text-green-700 text-sm sm:text-base",onClick:()=>f?.(q.payout),children:["$",q.payout.toFixed(2)]}),t.jsxs("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block bg-black text-white text-xs p-2 rounded shadow-lg whitespace-nowrap z-10",children:[t.jsxs("div",{children:["Pending payout amount: ",Y.pending]}),t.jsxs("div",{children:["Breakdown: ",Y.breakdown]}),t.jsxs("div",{children:["commentrewarder: ",Y.commentRewarder]}),t.jsxs("div",{children:["Payout in ",Y.payoutInDays," days"]})]})]}),t.jsxs("div",{className:"flex items-center gap-3 sm:gap-4",children:[t.jsxs("div",{className:`flex items-center gap-1 hover:text-primary transition-colors cursor-pointer ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,onClick:()=>o?.(q),children:[t.jsx(z.ThumbsUp,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:$(q.stats.total_votes)})]}),t.jsxs("div",{className:`flex items-center gap-1 hover:text-blue-400 transition-colors cursor-pointer ${n==="dark"?"text-blue-400":"text-blue-600"}`,onClick:()=>h?.(q),children:[t.jsx(z.MessageCircle,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:$(q.children)})]}),t.jsxs("div",{className:`flex items-center gap-1 hover:text-gray-400 transition-colors cursor-pointer ${n==="dark"?"text-gray-400":"text-gray-600"}`,onClick:()=>l?.(q),children:[t.jsx(z.Repeat2,{className:"w-3 h-3 sm:w-4 sm:h-4"}),t.jsx("span",{className:"text-xs sm:text-sm",children:$(q.reblogs)})]})]})]})]})]})]},q.post_id)}),N&&t.jsxs("div",{className:"flex justify-center items-center py-4",children:[t.jsx(z.Loader2,{className:"w-6 h-6 animate-spin"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-muted-foreground"}`,children:"Loading more posts..."})]}),y&&!N&&t.jsx("div",{ref:A,className:"h-10"})]})]})})}class sa{static instance;static getInstance(){return sa.instance||(sa.instance=new sa),sa.instance}async getProposals(a){return a==="expired"?this.getExpiredProposals():this.getActiveProposals()}async getActiveProposals(){try{const s=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:72,jsonrpc:"2.0",method:"database_api.list_proposals",params:{start:[-1],limit:500,order:"by_total_votes",order_direction:"descending",status:"votable"}})})).json()).result.proposals,n=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),u={};n.forEach(h=>{u[h.proposal_id]=h});const f=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:73,jsonrpc:"2.0",method:"database_api.list_proposal_votes",params:{start:["shaktimaaan"],limit:1e3,order:"by_voter_proposal",order_direction:"ascending",status:"votable"}})})).json()).result.proposal_votes||[],o={};return f.forEach(h=>{o[h.proposal.proposal_id]||(o[h.proposal.proposal_id]=[]),o[h.proposal.proposal_id].push(h)}),s.map(h=>{const l=h.id,p=u[l],x=o[l]||[],w=x.reduce((b,g)=>b+parseFloat(g.total_hbd||"0"),0);return{proposal_id:l,subject:h.subject,permlink:h.permlink,creator:h.creator,receiver:h.receiver,start_date:h.start_date,end_date:h.end_date,total_hbd_received:p?p.total_hbd_received:"0",max_hbd_remaining:p?p.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:p?p.all_votes_hp:w.toString(),votes:p?p.votes:x,status:h.status,daily_pay:h.daily_pay,total_votes:h.total_votes,daily_pay_hbd:h.daily_pay?Number(h.daily_pay.amount)/Math.pow(10,h.daily_pay.precision):0,remaining_days:Math.max(0,Math.ceil((new Date(h.end_date).getTime()-new Date().getTime())/(1e3*60*60*24))),vote_value_total:p?parseFloat(p.all_votes_hp):w}})}catch(a){return console.error("Error fetching active proposals:",a),[]}}async getExpiredProposals(){try{const s=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:65,jsonrpc:"2.0",method:"database_api.list_proposals",params:{start:[-1],limit:500,order:"by_total_votes",order_direction:"descending",status:"expired"}})})).json()).result.proposals,n=await(await fetch("https://stats.hivehub.dev/dhf_proposals")).json(),u={};n.forEach(h=>{u[h.proposal_id]=h});const f=(await(await fetch("https://api.hive.blog/",{method:"POST",headers:{accept:"application/json, text/plain, */*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8,hi;q=0.7","content-type":"application/json",origin:"https://peakd.com","sec-ch-ua":'"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"macOS"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"},body:JSON.stringify({id:76,jsonrpc:"2.0",method:"database_api.list_proposal_votes",params:{start:["shaktimaaan"],limit:1e3,order:"by_voter_proposal",order_direction:"ascending",status:"expired"}})})).json()).result.proposal_votes||[],o={};return f.forEach(h=>{o[h.proposal_id]||(o[h.proposal_id]=[]),o[h.proposal_id].push(h)}),s.map(h=>{const l=h.id,p=u[l],x=o[l]||[],w=x.reduce((b,g)=>b+parseFloat(g.total_hbd||"0"),0);return{proposal_id:l,subject:h.subject,permlink:h.permlink,creator:h.creator,receiver:h.receiver,start_date:h.start_date,end_date:h.end_date,total_hbd_received:p?p.total_hbd_received:"0",max_hbd_remaining:p?p.max_hbd_remaining:"0",all_votes_num:h.total_votes||"0",all_votes_hp:p?p.all_votes_hp:w.toString(),votes:p?p.votes:x,status:h.status,daily_pay:h.daily_pay,total_votes:h.total_votes,daily_pay_hbd:h.daily_pay?Number(h.daily_pay.amount)/Math.pow(10,h.daily_pay.precision):0,remaining_days:0,vote_value_total:p?parseFloat(p.all_votes_hp):w}})}catch(a){return console.error("Error fetching expired proposals:",a),[]}}}const hc=sa.getInstance(),Cp=["All","Active","Upcoming","Expired","By Peak Projects"],kd=["Votes","Start Date","End Date","Creator"],pc=e=>e==="By Peak Projects"?["Creator"]:kd,it=e=>{const a=typeof e=="string"?parseFloat(e):e;return isNaN(a)?e.toString():a.toLocaleString()},Si=e=>{const a=new Date(e.start_date),i=new Date(e.end_date);return`(${Math.ceil((i.getTime()-a.getTime())/(1e3*60*60*24))} days)`},Dp=({onClickSupport:e,onClickVoteValue:a,onClickSelect:i,onClickUser:s,onClickAvatar:r,theme:n="dark"})=>{const[u,c]=P.useState([]),[d,f]=P.useState("All"),[o,h]=P.useState("Votes");P.useEffect(()=>{d==="By Peak Projects"&&!pc(d).includes(o)?h("Creator"):d!=="By Peak Projects"&&o==="Creator"&&!kd.includes(o)&&h("Votes")},[d,o]);const[l,p]=P.useState(!0);P.useEffect(()=>{(async()=>{p(!0);try{const[g,v]=await Promise.all([hc.getProposals("active"),hc.getProposals("expired")]);c([...g,...v])}catch(g){console.error("Error fetching proposals:",g),c([])}p(!1)})()},[]);const x=u.filter(b=>d==="All"?b.status==="active"||new Date(b.start_date+"Z")>new Date:d==="Active"?b.status==="active":d==="Upcoming"?new Date(b.start_date+"Z")>new Date:d==="Expired"?new Date(b.end_date+"Z")<new Date:d==="By Peak Projects"?b.creator==="peakd":!0).sort((b,g)=>d==="By Peak Projects"?g.creator.localeCompare(b.creator):0),w=d==="All"?(()=>{const b=x.filter(k=>k.status==="active"),g=x.filter(k=>new Date(k.start_date+"Z")>new Date),v=(k,_)=>o==="Votes"?Number(_.all_votes_num)-Number(k.all_votes_num):o==="Start Date"?new Date(_.start_date+"Z").getTime()-new Date(k.start_date+"Z").getTime():o==="End Date"?new Date(k.end_date+"Z").getTime()-new Date(_.end_date+"Z").getTime():o==="Creator"?k.creator.localeCompare(_.creator):0;return[...b.sort(v),...g.sort(v)]})():x.sort((b,g)=>o==="Votes"?Number(g.all_votes_num)-Number(b.all_votes_num):o==="Start Date"?new Date(g.start_date+"Z").getTime()-new Date(b.start_date+"Z").getTime():o==="End Date"?new Date(b.end_date+"Z").getTime()-new Date(g.end_date+"Z").getTime():o==="Creator"?b.creator.localeCompare(g.creator):0);return l?t.jsx("div",{className:"flex justify-center items-center py-8",children:t.jsx("div",{className:"text-gray-600 dark:text-gray-400",children:"Loading proposals..."})}):t.jsx("div",{className:n==="dark"?"dark":"",children:t.jsxs("div",{className:`space-y-6 p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:"flex gap-2 mb-4 flex-wrap",children:Cp.map(b=>t.jsx("button",{className:`px-3 py-1 rounded text-sm ${d===b?"bg-blue-500 text-white":`${n==="dark"?"bg-slate-900 text-gray-300":"bg-gray-200 text-gray-700"}`}`,onClick:()=>f(b),children:b},b))}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:`${n==="dark"?"text-gray-300":"text-gray-700"} mr-2`,children:"Sort by:"}),t.jsx("select",{value:o,onChange:b=>h(b.target.value),className:`px-3 py-1 border rounded ${n==="dark"?"border-gray-600 bg-slate-900 text-gray-100":"border-gray-300 bg-white text-gray-900"}`,children:pc(d).map(b=>t.jsx("option",{value:b,children:b},b))})]}),t.jsxs("div",{children:[d==="All"&&(()=>{const b=w.filter(v=>v.status==="active"),g=w.filter(v=>new Date(v.start_date+"Z")>new Date);return t.jsxs(t.Fragment,{children:[b.map(v=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-900":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(v),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${v.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${v.creator} avatar`})}),t.jsxs("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(v),children:["by ",v.creator]}),v.receiver&&t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:v.receiver})]})]}),t.jsxs("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(v),children:[v.subject," ",t.jsxs("span",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-500":"text-gray-600"}`,children:["#",v.proposal_id]})]}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(v.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(v.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":v.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(v.start_date+"Z")>new Date?"upcoming":new Date(v.end_date+"Z")<new Date?"expired":v.status})," - "+new Date(v.start_date+"Z").toLocaleDateString()+" - "+new Date(v.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:Si(v)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/${v.creator}/${v.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${v.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(v),children:["Vote value: ",v.vote_value_total?it(v.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Daily Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[v.daily_pay_hbd?it(v.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Remaining:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.remaining_days||0)," Days"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Paid:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"To Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>e(v),children:"Support"})})]})]})},v.proposal_id)),g.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"my-6 text-center",children:[t.jsx("h3",{className:`text-xl font-bold mb-2 ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:"Upcoming proposals"}),t.jsx("p",{className:`${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"The proposals listed below will start in the future. You can already support them."})]}),g.map(v=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-950":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(v),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${v.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${v.creator} avatar`})}),t.jsx("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(v),children:v.creator}),t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:v.receiver})]})]}),t.jsx("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(v),children:v.subject}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(v.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(v.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":v.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(v.start_date+"Z")>new Date?"upcoming":new Date(v.end_date+"Z")<new Date?"expired":v.status})," - "+new Date(v.start_date+"Z").toLocaleDateString()+" - "+new Date(v.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:Si(v)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/${v.creator}/${v.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${v.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(v),children:["Vote value: ",v.vote_value_total?it(v.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Daily Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[v.daily_pay_hbd?it(v.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Remaining:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.remaining_days||0)," Days"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"Paid:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:`font-mono text-xs sm:text-sm ${n==="dark"?"text-gray-400":"text-gray-600"}`,children:"To Pay:"}),t.jsxs("strong",{className:`text-xs sm:text-sm ${n==="dark"?"text-gray-100":"text-gray-900"}`,children:[it(v.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>e(v),children:"Support"})})]})]})},v.proposal_id))]})]})})(),d!=="All"&&w.map(b=>t.jsx("div",{className:`border rounded-lg mb-4 p-2 sm:p-4 shadow ${n==="dark"?"border-gray-800 bg-slate-950":"border-gray-200 bg-white"}`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center mb-2",children:[t.jsx("span",{onClick:()=>r(b),className:"inline-block mr-2 cursor-pointer",children:t.jsx("img",{src:`https://images.hive.blog/u/${b.creator}/avatar`,className:"w-8 h-8 rounded-full inline",alt:`${b.creator} avatar`})}),t.jsx("span",{className:`font-bold cursor-pointer ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>s(b),children:b.creator}),t.jsxs("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["with receiver ",t.jsx("strong",{className:`${n==="dark"?"text-gray-100":"text-gray-900"}`,children:b.receiver})]})]}),t.jsxs("div",{className:`cursor-pointer text-lg font-semibold mb-1 ${n==="dark"?"text-gray-100":"text-gray-900"}`,onClick:()=>i(b),children:[b.subject," #",b.proposal_id]}),t.jsxs("div",{className:`text-sm mb-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${new Date(b.start_date+"Z")>new Date?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":new Date(b.end_date+"Z")<new Date?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200":b.status==="active"?"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200":"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}`,children:new Date(b.start_date+"Z")>new Date?"upcoming":new Date(b.end_date+"Z")<new Date?"expired":b.status})," - "+new Date(b.start_date+"Z").toLocaleDateString()+" - "+new Date(b.end_date+"Z").toLocaleDateString()," ",t.jsx("span",{className:`text-xs ${n==="dark"?"text-gray-500":"text-gray-400"}`,children:Si(b)})]}),t.jsxs("div",{className:"flex gap-2 mb-2",children:[t.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${b.creator}/${b.permlink}`,"_blank"),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",title:"View on Peakd",children:t.jsx(z.ExternalLink,{size:16})}),t.jsxs("button",{onClick:()=>window.open(`https://hivehub.dev/proposals/${b.proposal_id}`,"_blank"),className:"flex text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300",title:"View Stats",children:[t.jsx(z.PieChart,{size:16})," Stats"]})]}),t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:`inline-block cursor-pointer px-2 py-1 rounded ${n==="dark"?"bg-gray-800 text-gray-300":"bg-gray-100 text-gray-700"}`,onClick:()=>a(b),children:["Vote value: ",b.vote_value_total?it(b.vote_value_total):0," HP"]})})]}),t.jsxs("div",{className:"mt-4 sm:mt-0 sm:ml-4 w-full sm:w-48 flex flex-col space-y-1",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Daily Pay:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[b.daily_pay_hbd?it(b.daily_pay_hbd):0," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Remaining:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[it(b.remaining_days||0)," Days"]})]}),d!=="Expired"&&t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"Paid:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[it(b.total_hbd_received||0)," HBD"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"font-mono text-gray-600 dark:text-gray-400 text-xs sm:text-sm",children:"To Pay:"}),t.jsxs("strong",{className:"text-gray-900 dark:text-gray-100 text-xs sm:text-sm",children:[it(b.max_hbd_remaining||0)," HBD"]})]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"px-3 sm:px-5 py-2 bg-green-600 hover:bg-green-700 text-white rounded cursor-pointer w-full text-xs sm:text-sm",onClick:()=>e(b),children:"Support"})})]})]})},b.proposal_id))]})]})})};class Tp{HIVE_API_URL="https://api.hive.blog";async getProfile(a){const i={jsonrpc:"2.0",method:"bridge.get_profile",params:{account:a},id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return await s.json()}async getFollowers(a){const i={jsonrpc:"2.0",method:"condenser_api.get_followers",params:[a,null,"blog"],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getFollowing(a){const i={jsonrpc:"2.0",method:"condenser_api.get_following",params:[a,null,"blog"],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getAccounts(a){const i={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[a],id:1},s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result}async getDynamicGlobalProperties(){const a={jsonrpc:"2.0",method:"condenser_api.get_dynamic_global_properties",params:[],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async convertVestingSharesToHive(a){try{const i=await this.getDynamicGlobalProperties(),s=parseFloat(a.split(" ")[0]),r=parseFloat(i.total_vesting_shares.split(" ")[0]),n=parseFloat(i.total_vesting_fund_hive.split(" ")[0]);return(s*n/r).toFixed(3)}catch(i){return console.error("Error converting vesting shares:",i),"0"}}async getFeedHistory(){const a={jsonrpc:"2.0",method:"condenser_api.get_feed_history",params:[],id:1},i=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return(await i.json()).result}async getVoteValue(a,i=1e4){try{const s=await this.getAccounts([a]);if(s.length===0)throw new Error("Account not found!");const r=s[0],n=await this.getDynamicGlobalProperties(),u=await this.getFeedHistory(),c=parseFloat(r.vesting_shares)+parseFloat(r.received_vesting_shares)-parseFloat(r.delegated_vesting_shares)-parseFloat(r.vesting_withdraw_rate),d=Math.floor(Date.now()/1e3)-r.voting_manabar.last_update_time,f=c*1e6/4;let o=parseFloat(r.voting_manabar.current_mana.toString())+d*f/(300*60*24);o>f&&(o=f);const h=o*100/f,l=r.vesting_shares||"0 VESTS",p=parseFloat(l.toString().split(" ")[0]),x=n.total_vesting_shares||"0 VESTS",w=parseFloat(x.toString().split(" ")[0]),b=i/1e4,g=h*b/100,v=n.vote_power_reserve_rate*(300*60*24)/(3600*24),k=g*f/100,_=parseFloat(n.recent_claims||"0"),y=n.reward_balance||"0 HIVE",m=parseFloat(y.toString().split(" ")[0]),N=n.current_supply||"0 HIVE",j=parseFloat(N.toString().split(" ")[0]),A=n.current_sbd_supply||"0 HBD",D=parseFloat(A.toString().split(" ")[0]),C=m/_*(p/w)*(k/f)*j,O=u?.current_median_history;if(!O||!O.base)return"0.00";const $=parseFloat(O.base.toString().split(" ")[0]);return(C*$).toFixed(2)}catch(s){return console.error("Error calculating vote value:",s),"0.00"}}userAvatar(a){return`https://images.hive.blog/u/${a}/avatar`}}const ge=new Tp,mc=({vestingShares:e})=>{const[a,i]=P.useState("...");return P.useEffect(()=>{(async()=>{try{const r=await ge.convertVestingSharesToHive(e);i(r)}catch(r){console.error("Error calculating HP:",r);const n=parseFloat(e.split(" ")[0]);i((n/1e6).toFixed(3))}})()},[e]),t.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[a," HP"]})},Op=({username:e,onClickAuthor:a,onClickAddRemoveFromLists:i,onClickFollow:s})=>{const[r,n]=P.useState([]),[u,c]=P.useState([]),[d,f]=P.useState({}),[o,h]=P.useState(!0),[l,p]=P.useState(null),[x,w]=P.useState(null),b=P.useRef(null),g=async()=>{try{h(!0),p(null);const _=await ge.getFollowers(e);if(n(_),_.length>0){const y=_.map(A=>A.follower),m=await ge.getAccounts(y);c(m);const N={},j={};for(const A of _)try{const D=await ge.getVoteValue(A.follower);j[A.follower]=D}catch(D){console.warn(`Failed to get voting data for ${A.follower}:`,D),N[A.follower]={upvotepower:"0",downvote:"0"},j[A.follower]="0.00"}f(j)}}catch(_){p(_ instanceof Error?_.message:"Failed to load followers data")}finally{h(!1)}};P.useEffect(()=>{g()},[e]),P.useEffect(()=>{const _=y=>{b.current&&!b.current.contains(y.target)&&w(null)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[]);const v=_=>{const y=u.find(m=>m.name===_);if(!y)return null;try{return JSON.parse(y.posting_json_metadata)?.profile||{}}catch{return{}}},k=_=>{const y=new Date,m=new Date(_),N=y.getTime()-m.getTime(),j=Math.floor(N/(1e3*60*60*24));if(Math.floor(j/30)>=1)return m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const D=Math.floor(N/1e3),C=Math.floor(D/60),O=Math.floor(C/60),$=Math.floor(j/7),H=Math.floor(j/365);return H>0?`${H} year${H>1?"s":""} ago`:$>0?`${$} week${$>1?"s":""} ago`:j>0?`${j} day${j>1?"s":""} ago`:O>0?`${O} hour${O>1?"s":""} ago`:C>0?`${C} minute${C>1?"s":""} ago`:"Just now"};return o?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):l?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:g,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"hidden md:block overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),t.jsx("tbody",{children:r.map((_,y)=>{const m=u.find(j=>j.name===_.follower),N=v(_.follower);return t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.jsx("td",{className:"py-4 px-4",children:t.jsx("img",{src:N?.profile_image||ge.userAvatar(_.follower),alt:_.follower,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>a&&a(_.follower),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${_.follower}&background=random`}})}),t.jsxs("td",{className:"py-4 px-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>a&&a(_.follower),children:["@",_.follower]}),N?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:N.location})]})]}),N?.about&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:N.about})]}),t.jsx("td",{className:"py-4 px-4",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:k(m.last_root_post)}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),t.jsx("td",{className:"py-4 px-4",children:m?t.jsx(mc,{vestingShares:m.vesting_shares}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:d[_.follower]?t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",d[_.follower]]}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:t.jsxs("div",{className:"relative",ref:x===_.follower?b:null,children:[t.jsx("button",{onClick:()=>w(x===_.follower?null:_.follower),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),x===_.follower&&t.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(_.follower),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(_.follower),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-4 h-4"}),"Follow"]})]})]})})]},`${_.follower}-${y}`)})})]})}),t.jsx("div",{className:"md:hidden space-y-4",children:r.map((_,y)=>{const m=u.find(j=>j.name===_.follower),N=v(_.follower);return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("img",{src:N?.profile_image||ge.userAvatar(_.follower),alt:_.follower,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>a&&a(_.follower),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${_.follower}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 text-sm",onClick:()=>a&&a(_.follower),children:["@",_.follower]}),N?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:N.location})]})]}),t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?k(m.last_root_post):t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),t.jsxs("div",{className:"flex items-center justify-between mt-2",children:[t.jsx("div",{className:"flex items-center gap-4",children:m&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:t.jsx(mc,{vestingShares:m.vesting_shares})})}),t.jsxs("div",{className:"relative",ref:x===_.follower?b:null,children:[t.jsx("button",{onClick:()=>w(x===_.follower?null:_.follower),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),x===_.follower&&t.jsxs("div",{className:"absolute right-0 mt-1 w-40 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(_.follower),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(_.follower),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-3 h-3"}),"Follow"]})]})]})]})]})]})},`${_.follower}-${y}`)})})]})},gc=({vestingShares:e})=>{const[a,i]=P.useState("...");return P.useEffect(()=>{(async()=>{try{const r=await ge.convertVestingSharesToHive(e);i(r)}catch(r){console.error("Error calculating HP:",r);const n=parseFloat(e.split(" ")[0]);i((n/1e6).toFixed(3))}})()},[e]),t.jsxs("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:[a," HP"]})},Pp=({username:e,onClickAuthor:a,onClickAddRemoveFromLists:i,onClickUnfollow:s})=>{const[r,n]=P.useState([]),[u,c]=P.useState([]),[d,f]=P.useState({}),[o,h]=P.useState(!0),[l,p]=P.useState(null),[x,w]=P.useState(null),b=P.useRef(null),g=async()=>{try{h(!0),p(null);const _=await ge.getFollowing(e);if(n(_),_.length>0){const y=_.map(j=>j.following),m=await ge.getAccounts(y);c(m);const N={};for(const j of _)try{const A=await ge.getVoteValue(j.following);N[j.following]=A}catch(A){console.warn(`Failed to get voting data for ${j.following}:`,A),N[j.following]="0.00"}f(N)}}catch(_){p(_ instanceof Error?_.message:"Failed to load following data")}finally{h(!1)}};P.useEffect(()=>{g()},[e]),P.useEffect(()=>{const _=y=>{b.current&&!b.current.contains(y.target)&&w(null)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[]);const v=_=>{const y=u.find(m=>m.name===_);if(!y)return null;try{return JSON.parse(y.posting_json_metadata)?.profile||{}}catch{return{}}},k=_=>{const y=new Date,m=new Date(_),N=y.getTime()-m.getTime(),j=Math.floor(N/(1e3*60*60*24));if(Math.floor(j/30)>=1)return m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});const D=Math.floor(N/1e3),C=Math.floor(D/60),O=Math.floor(C/60),$=Math.floor(j/7),H=Math.floor(j/365);return H>0?`${H} year${H>1?"s":""} ago`:$>0?`${$} week${$>1?"s":""} ago`:j>0?`${j} day${j>1?"s":""} ago`:O>0?`${O} hour${O>1?"s":""} ago`:C>0?`${C} minute${C>1?"s":""} ago`:"Just now"};return o?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading following..."]})}):l?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load following"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:g,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):r.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user is not following anyone."})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"hidden md:block overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Avatar"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Username"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Last Post"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"HP"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Vote Value"}),t.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-900 dark:text-white",children:"Manage"})]})}),t.jsx("tbody",{children:r.map((_,y)=>{const m=u.find(j=>j.name===_.following),N=v(_.following);return t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[t.jsx("td",{className:"py-4 px-4",children:t.jsx("img",{src:N?.profile_image||ge.userAvatar(_.following),alt:_.following,className:"w-12 h-12 rounded-full object-cover cursor-pointer",onClick:()=>a&&a(_.following),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${_.following}&background=random`}})}),t.jsxs("td",{className:"py-4 px-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>a&&a(_.following),children:["@",_.following]}),N?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-4 h-4 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:N.location})]})]}),N?.about&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 truncate max-w-xs",children:N.about})]}),t.jsx("td",{className:"py-4 px-4",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:k(m.last_root_post)}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"Never"})}),t.jsx("td",{className:"py-4 px-4",children:m?t.jsx(gc,{vestingShares:m.vesting_shares}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:d[_.following]?t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:["$",d[_.following]]}):t.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:"-"})}),t.jsx("td",{className:"py-4 px-4",children:t.jsxs("div",{className:"relative",ref:x===_.following?b:null,children:[t.jsx("button",{onClick:()=>w(x===_.following?null:_.following),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4 text-gray-600 dark:text-gray-400"})}),x===_.following&&t.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(_.following),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-4 h-4"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(_.following),w(null)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-4 h-4"}),"Unfollow"]})]})]})})]},`${_.following}-${y}`)})})]})}),t.jsx("div",{className:"md:hidden space-y-4",children:r.map((_,y)=>{const m=u.find(j=>j.name===_.following),N=v(_.following);return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("img",{src:N?.profile_image||ge.userAvatar(_.following),alt:_.following,className:"w-10 h-10 rounded-full object-cover cursor-pointer flex-shrink-0",onClick:()=>a&&a(_.following),onError:j=>{j.target.src=`https://ui-avatars.com/api/?name=${_.following}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("span",{className:"font-semibold text-gray-900 dark:text-white cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 text-sm",onClick:()=>a&&a(_.following),children:["@",_.following]}),N?.location&&t.jsxs("div",{className:"relative group",children:[t.jsx(z.MapPin,{className:"w-3 h-3 text-gray-500 dark:text-gray-400"}),t.jsx("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-10",children:N.location})]})]}),t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:m?.last_post&&m.last_post!=="1970-01-01T00:00:00"?k(m.last_root_post):t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"Never"})})]}),t.jsxs("div",{className:"flex items-center justify-between mt-2",children:[t.jsx("div",{className:"flex items-center gap-4",children:m&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:t.jsx(gc,{vestingShares:m.vesting_shares})})}),t.jsxs("div",{className:"relative",ref:x===_.following?b:null,children:[t.jsx("button",{onClick:()=>w(x===_.following?null:_.following),className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-3 h-3 text-gray-600 dark:text-gray-400"})}),x===_.following&&t.jsxs("div",{className:"absolute right-0 mt-1 w-40 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-10",children:[t.jsxs("button",{onClick:()=>{i&&i(_.following),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserPlus,{className:"w-3 h-3"}),"Add/remove from lists"]}),t.jsxs("button",{onClick:()=>{s&&s(_.following),w(null)},className:"w-full text-left px-3 py-2 text-xs text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(z.UserMinus,{className:"w-3 h-3"}),"Unfollow"]})]})]})]})]})]})},`${_.following}-${y}`)})})]})},bc=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class $p{async getAccountHistory(a,i=-1,s=1e3,r,n){try{const u=[a,i,s];return r!==void 0&&n!==void 0&&u.push(r,n),(await bc.call("condenser_api","get_account_history",u)).map(([d,f])=>({index:d,block:f.block,op:{type:f.op[0],value:f.op[1]},op_in_trx:f.op_in_trx,timestamp:f.timestamp,trx_id:f.trx_id,trx_in_block:f.trx_in_block,virtual_op:f.virtual_op}))}catch(u){return console.error("Error fetching account history:",u),[]}}async getNextAccountHistoryPage(a,i,s=1e3){try{const r=i-1;return(await bc.call("condenser_api","get_account_history",[a,r,s])).map(([c,d])=>({index:c,block:d.block,op:{type:d.op[0],value:d.op[1]},op_in_trx:d.op_in_trx,timestamp:d.timestamp,trx_id:d.trx_id,trx_in_block:d.trx_in_block,virtual_op:d.virtual_op})).filter(c=>c.index<i)}catch(r){return console.error("Error fetching next page of account history:",r),[]}}convertToActivityListItems(a,i){return a.filter(s=>{const r=s.op.type;return r!=="effective_comment_vote"&&r!=="witness_set_properties"&&r!=="producer_reward"&&r!=="comment_reward"&&r!=="comment_payout_update"&&r!=="claim_reward_balance"&&r!=="transfer"&&r!=="claim_account"&&r!=="transfer_to_vesting"&&r!=="transfer_to_vesting_completed"}).map(s=>{const r=this.parseOperation(s,i);return{id:`${s.index}-${s.trx_id}`,type:r.type,direction:r.direction,timestamp:s.timestamp,block:s.block,description:r.description,details:s.op.value,index:s.index,...r.extraFields}}).filter(s=>s!==null)}parseOperation(a,i){const{op:s}=a,r=s.type,n=s.value;switch(r){case"vote":return this.parseVoteOperation(n,i);case"comment":return this.parseCommentOperation(n,i);case"custom_json":return this.parseCustomJsonOperation(n,i);case"comment_options":return this.parseCommentOptionsOperation(n,i);case"effective_comment_vote":return this.parseEffectiveCommentVoteOperation(n,i);case"curation_reward":return this.parseCurationRewardOperation(n,i);case"author_reward":return this.parseAuthorRewardOperation(n,i);case"comment_benefactor_reward":return this.parseCommentBenefactorRewardOperation(n,i);default:return{type:"other",direction:"out",description:`${r} operation`,extraFields:{}}}}parseVoteOperation(a,i){const{voter:s,author:r,permlink:n,weight:u}=a,c=r===i,d=c?"in":"out",f=(u/100).toFixed(0);let o="";return c?o=`${s} voted ${r}/${n} with ${f}%`:o=`Voted ${r}/${n} with ${f}%`,{type:"vote",direction:d,description:o,extraFields:{voter:s,author:r,permlink:n,weight:parseInt(f)}}}parseCommentOperation(a,i){const{author:s,parent_author:r,parent_permlink:n,permlink:u}=a,d=r===i?"in":"out",o=`Commented on ${n} by ${r||s}.`;return{type:"comment",direction:d,description:o,extraFields:{author:s,permlink:u,parent_author:r,parent_permlink:n}}}parseCustomJsonOperation(a,i){const{id:s,json:r,required_auths:n,required_posting_auths:u}=a;let c={};try{c=JSON.parse(r)}catch{}let d="Custom Json";if(s==="follow"){const[f,o]=c;f==="follow"&&(d="Custom Json")}return{type:"custom_json",direction:"out",description:d,extraFields:{}}}parseCommentOptionsOperation(a,i){const{author:s,permlink:r,max_accepted_payout:n}=a;return{type:"comment_options",direction:"out",description:"Comment Payout Update",extraFields:{author:s,permlink:r,payout:n}}}parseEffectiveCommentVoteOperation(a,i){const{voter:s,author:r,permlink:n,pending_payout:u}=a,c=r===i,d=c?"in":"out",f=c?`${s} voted on ${r}/${n} (effective vote)`:`Effective vote on ${r}/${n}`;return{type:"effective_comment_vote",direction:d,description:f,extraFields:{voter:s,author:r,permlink:n,payout:u}}}parseCurationRewardOperation(a,i){const{author:s,curator:r,permlink:n,reward:u}=a,d=r===i?"in":"out",h=`${(parseFloat(u.split(" ")[0])*1e-6).toFixed(3)} HP`,l=`Curation reward for ${r}/${n} by ${s}`;return{type:"curation_reward",direction:d,description:l,extraFields:{author:s,curator:r,permlink:n,reward:h}}}parseAuthorRewardOperation(a,i){const{author:s,permlink:r,hbd_payout:n,hive_payout:u,vesting_payout:c}=a,f=s===i?"in":"out",h=(parseFloat(c.split(" ")[0])*1e-6).toFixed(3),l=n.split(" ")[0],p=u.split(" ")[0],x=`Author reward: ${l} HBD, ${p} HIVE, ${h} HP for ${r}`;return{type:"author_reward",direction:f,description:x,extraFields:{author:s,permlink:r,hbd_payout:n,hive_payout:u,vesting_payout:c}}}parseCommentBenefactorRewardOperation(a,i){const{author:s,benefactor:r,permlink:n,hbd_payout:u,hive_payout:c,vesting_payout:d}=a,o=r===i?"in":"out",l=(parseFloat(d.split(" ")[0])*1e-6).toFixed(3),p=u.split(" ")[0],x=c.split(" ")[0],w=`Benefactor reward on ${n} by ${s}: ${p} HBD, ${x} HIVE, ${l} HP`;return{type:"comment_benefactor_reward",direction:o,description:w,extraFields:{author:s,benefactor:r,permlink:n,hbd_payout:u,hive_payout:c,vesting_payout:d}}}filterByDirection(a,i){return i==="all"?a:a.filter(s=>s.direction===i)}filterByGeneralType(a,i){if(i==="all")return a;switch(i){case"votes":return a.filter(s=>s.type==="vote"||s.type==="effective_comment_vote");case"comments":return a.filter(s=>s.type==="comment");case"replies":return a.filter(s=>s.type==="comment"&&s.direction==="in");case"others":return a.filter(s=>s.type==="custom_json"||s.type==="comment_options"||s.type==="other");default:return a}}filterByRewardType(a,i){if(i==="all")return a;switch(i){case"author":return a.filter(s=>s.type==="effective_comment_vote"&&s.direction==="in");case"curation":return a.filter(s=>s.type==="effective_comment_vote"&&s.direction==="out");case"benefactor":return a.filter(s=>s.type==="comment_options"&&s.details?.beneficiaries);default:return a}}searchActivities(a,i){if(!i.trim())return a;const s=i.toLowerCase();return a.filter(r=>r.description.toLowerCase().includes(s)||r.author?.toLowerCase().includes(s)||r.permlink?.toLowerCase().includes(s)||r.voter?.toLowerCase().includes(s))}getRelativeTime(a){try{const i=new Date(a),r=new Date().getTime()-i.getTime(),n=Math.floor(r/1e3),u=Math.floor(n/60),c=Math.floor(u/60),d=Math.floor(c/24);return n<60?`${n} seconds ago`:u<60?`${u} minutes ago`:c<24?`${c} hours ago`:d<7?`${d} days ago`:i.toLocaleDateString()}catch(i){return console.error("Error calculating relative time:",i),a}}}const ra=new $p,Lp=({username:e,directionFilter:a="all",generalFilter:i="all",rewardFilter:s="all",searchTerm:r="",limit:n=1e3,className:u,onClickPermlink:c,onSelectActivity:d})=>{const[f,o]=P.useState(r),[h,l]=P.useState(a),[p,x]=P.useState(i),[w,b]=P.useState(s),[g,v]=P.useState([]),[k,_]=P.useState([]),[y,m]=P.useState(!1),[N,j]=P.useState(null),[A,D]=P.useState(new Set),[C,O]=P.useState(null),[$,H]=P.useState(!0),[F,q]=P.useState(!1),[M,Y]=P.useState(-1),X=P.useRef(null),ae=async(V=!1)=>{if(e){V?q(!0):(m(!0),H(!0),Y(-1)),j(null);try{let J;V?J=await ra.getNextAccountHistoryPage(e,M,n):J=await ra.getAccountHistory(e,-1,n);const fe=ra.convertToActivityListItems(J,e);if(fe.sort((Q,ne)=>new Date(ne.timestamp).getTime()-new Date(Q.timestamp).getTime()),v(V?Q=>[...Q,...fe]:fe),J.length>0){const Q=Math.min(...J.map(ne=>ne.index));Y(Q)}fe.length===0&&H(!1)}catch(J){j("Failed to load activity history"),console.error("Error loading activities:",J),H(!1)}finally{m(!1),q(!1)}}};P.useEffect(()=>{ae()},[e,n]);const I=P.useCallback(()=>{$&&!y&&!F&&ae(!0)},[$,y,F]);P.useEffect(()=>{let V=g;h!=="all"?V=V.filter(J=>J.direction===h):V=V.filter(J=>J.type!=="custom_json"&&J.type!=="comment_options"),p!=="all"&&(p==="votes"?V=V.filter(J=>J.type==="vote"||J.type==="effective_comment_vote"):p==="comments"?V=V.filter(J=>J.type==="comment"):p==="replies"?V=V.filter(J=>J.type==="comment"&&J.direction==="in"):p==="curation"?V=V.filter(J=>J.type==="curation_reward"):p==="others"&&(V=g.filter(J=>J.type==="custom_json"||J.type==="comment_options"))),w!=="all"&&(w==="author"?V=V.filter(J=>J.type==="effective_comment_vote"&&J.direction==="in"):w==="curation"?V=V.filter(J=>J.type==="effective_comment_vote"&&J.direction==="out"):w==="benefactor"&&(V=V.filter(J=>J.type==="comment_options"))),f&&(V=V.filter(J=>J.description.toLowerCase().includes(f.toLowerCase())||J.author?.toLowerCase().includes(f.toLowerCase())||J.permlink?.toLowerCase().includes(f.toLowerCase()))),_(V)},[g,h,p,w,f]),P.useEffect(()=>{const V=J=>{X.current&&!X.current.contains(J.target)&&O(null)};return document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[]);const ie=V=>{switch(V.type){case"vote":case"effective_comment_vote":return t.jsx(z.Wallet,{className:"h-4 w-4"});case"comment":return t.jsx(z.MessageCircle,{className:"h-4 w-4"});case"custom_json":return t.jsx(z.FileText,{className:"h-4 w-4"});case"curation_reward":return t.jsx(z.Wallet,{className:"h-4 w-4"});case"author_reward":return t.jsx(z.DollarSign,{className:"h-4 w-4"});case"comment_benefactor_reward":return t.jsx(z.User,{className:"h-4 w-4"});default:return t.jsx(z.Eye,{className:"h-4 w-4"})}},R=(V,J)=>V.split(/(\s+)/).map((Q,ne)=>{if(Q.includes("/")){const[xe,Ce]=Q.split("/");if(xe&&Ce)return t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:Z=>{Z.stopPropagation(),console.log("Clicked permlink:",xe,Ce),c?.(xe,Ce)},children:Q},ne)}return t.jsx("span",{children:Q},ne)});return y?t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[t.jsx("div",{className:"flex-1 max-w-md",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"}),t.jsx("div",{className:"w-full h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"})]})}),t.jsx("div",{className:"flex flex-wrap gap-2",children:Array.from({length:5}).map((V,J)=>t.jsx("div",{className:"w-24 h-10 bg-gray-200 dark:bg-gray-700 rounded-md animate-pulse"},J))})]}),t.jsx("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:Array.from({length:4}).map((V,J)=>t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-20"},J))})]}),t.jsx("div",{className:"space-y-4",children:Array.from({length:5}).map((V,J)=>t.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg",children:[t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx("div",{className:"w-8 h-8 bg-gray-200 dark:bg-gray-700 rounded-full animate-pulse flex-shrink-0"}),t.jsx("div",{className:"flex-1 min-w-0 space-y-2",children:t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"})})]}),t.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 ml-4",children:[t.jsx("div",{className:"w-3 h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-16"})]})]},J))})]}):N?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load activities"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:N}),t.jsxs("button",{onClick:()=>ae(),className:"inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[t.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-start lg:items-center justify-between",children:[t.jsx("div",{className:"flex-1 max-w-md",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search activities...",value:f,onChange:V=>o(V.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsxs("select",{value:h,onChange:V=>l(V.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[t.jsx("option",{value:"all",children:"All Directions"}),t.jsx("option",{value:"in",children:"Incoming"}),t.jsx("option",{value:"out",children:"Outgoing"})]}),t.jsxs("select",{value:p,onChange:V=>x(V.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[t.jsx("option",{value:"all",children:"All Types"}),t.jsx("option",{value:"votes",children:"Votes"}),t.jsx("option",{value:"comments",children:"Comments"}),t.jsx("option",{value:"replies",children:"Replies"}),t.jsx("option",{value:"curation",children:"Curation"}),t.jsx("option",{value:"others",children:"Others"})]}),t.jsxs("select",{value:w,onChange:V=>b(V.target.value),className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm",children:[t.jsx("option",{value:"all",children:"All Rewards"}),t.jsx("option",{value:"author",children:"Author"}),t.jsx("option",{value:"curation",children:"Curation"}),t.jsx("option",{value:"benefactor",children:"Benefactor"})]}),t.jsx("button",{onClick:()=>ae(),disabled:y||F,className:"px-3 py-2 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]})]}),t.jsxs("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Total: ",t.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:g.length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Filtered: ",t.jsx("span",{className:"font-semibold text-gray-900 dark:text-white",children:k.length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Incoming: ",t.jsx("span",{className:"font-semibold text-green-600 dark:text-green-400",children:g.filter(V=>V.direction==="in").length})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Outgoing: ",t.jsx("span",{className:"font-semibold text-blue-600 dark:text-blue-400",children:g.filter(V=>V.direction==="out").length})]})]})]}),t.jsx("div",{className:"space-y-4",children:k.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:g.length===0?"No activities found for this user.":"No activities match the current filters."})}):t.jsxs(t.Fragment,{children:[k.map((V,J)=>t.jsxs("div",{className:"flex items-center justify-between py-3 px-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors cursor-pointer",onClick:fe=>{d?.(V)},children:[t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[V.type==="vote"&&V.voter?t.jsx("img",{src:`https://images.hive.blog/u/${V.voter}/avatar`,alt:V.voter,className:"w-8 h-8 rounded-full flex-shrink-0",onError:fe=>{const Q=fe.target;Q.style.display="none";const ne=Q.nextElementSibling;ne&&(ne.style.display="flex")}}):V.type==="comment_benefactor_reward"&&V.author?t.jsx("img",{src:`https://images.hive.blog/u/${V.author}/avatar`,alt:V.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:fe=>{const Q=fe.target;Q.style.display="none";const ne=Q.nextElementSibling;ne&&(ne.style.display="flex")}}):V.type==="comment"&&V.author?t.jsx("img",{src:`https://images.hive.blog/u/${V.author}/avatar`,alt:V.author,className:"w-8 h-8 rounded-full flex-shrink-0",onError:fe=>{const Q=fe.target;Q.style.display="none";const ne=Q.nextElementSibling;ne&&(ne.style.display="flex")}}):null,t.jsx("div",{className:`w-8 h-8 bg-purple-100 dark:bg-purple-900/20 rounded-full flex items-center justify-center flex-shrink-0 ${V.type==="vote"&&V.voter||V.type==="comment_benefactor_reward"&&V.author||V.type==="comment"&&V.author?"hidden":""}`,children:ie(V)}),t.jsx("div",{className:"flex-1 min-w-0",children:V.type==="custom_json"||V.type==="comment_options"?t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words font-medium",children:R(V.description)}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:ra.getRelativeTime(V.timestamp+"Z")}),t.jsx("div",{className:"border border-gray-200 dark:border-gray-600 rounded p-2 bg-gray-50 dark:bg-gray-700/50 mt-1",children:t.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400 space-y-1 font-mono break-words",children:[V.type==="custom_json"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"id:"})," ",V.details.id]}),t.jsxs("div",{className:"break-all",children:[t.jsx("span",{className:"font-medium",children:"json:"})," ",JSON.stringify(V.details.json).replace(/\\\"/g,'"').replace(/^"|"$/g,"")]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"required_auths:"})," ",JSON.stringify(V.details.required_auths)]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"required_posting_auths:"})," ",JSON.stringify(V.details.required_posting_auths)]})]}),V.type==="comment_options"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"author:"}),t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",children:V.details.author})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium",children:"permlink:"}),t.jsx("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:fe=>{fe.stopPropagation(),console.log("Clicked permlink:",V.details.author,V.details.permlink),c?.(V.details.author,V.details.permlink)},children:V.details.permlink})]})]})]})})]}):t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-gray-900 dark:text-white break-words",children:R(V.description)}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 sm:hidden",children:ra.getRelativeTime(V.timestamp+"Z")})]})})]}),t.jsx("div",{className:"flex items-center gap-1 text-sm text-gray-600 dark:text-gray-400 flex-shrink-0 ml-4 hidden sm:flex",children:V.type!=="custom_json"&&V.type!=="comment_options"&&t.jsxs(t.Fragment,{children:[t.jsx(z.Clock,{className:"h-3 w-3 flex-shrink-0"}),t.jsx("span",{className:"truncate",children:ra.getRelativeTime(V.timestamp+"Z")})]})})]},`${V.id}-${J}`)),$&&g.length>0&&t.jsx("div",{className:"flex justify-center py-6",children:t.jsx("button",{onClick:I,disabled:y||F,className:"px-6 py-2 bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 text-white rounded-lg font-medium transition-colors disabled:cursor-not-allowed flex items-center gap-2",children:F?t.jsxs(t.Fragment,{children:[t.jsx(z.RefreshCw,{className:"h-4 w-4 animate-spin"}),"Loading..."]}):"Load More Activities"})}),!$&&g.length>0&&t.jsx("div",{className:"text-center text-sm text-gray-400 py-4",children:"No more activities to load"})]})})]})},Gn=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class Mp{async getWitnessesByVote(a="",i=60){try{return await Gn.call("condenser_api","get_witnesses_by_vote",[a,i])}catch(s){throw console.error("Error fetching witnesses by vote:",s),s}}async getAccount(a){try{const i=await Gn.call("condenser_api","get_accounts",[[a]]);return i&&i.length>0?i[0]:null}catch(i){return console.error("Error fetching account:",i),null}}async getAccounts(a){try{return await Gn.call("condenser_api","get_accounts",[a])}catch(i){return console.error("Error fetching accounts:",i),[]}}async getWitnessVotes(a,i="",s=250){try{return await Gn.call("database_api","list_witness_votes",{start:[a,i],limit:s,order:"by_witness_account"})}catch(r){throw console.error("Error fetching witness votes:",r),r}}async getAllWitnessVotes(a){const i=[];let s="";try{for(;;){const n=await this.getWitnessVotes(a,s,250);if(i.push(...n.votes),n.votes.length<250)break;s=n.votes[n.votes.length-1].account}return i}catch(n){return console.error("Error fetching all witness votes:",n),[]}}async hasUserVotedForWitness(a,i){try{const s=await this.getAccount(a);return!s||!s.witness_votes?!1:s.witness_votes.includes(i)}catch(s){return console.error("Error checking witness vote:",s),!1}}async getUserWitnessVotes(a){try{return(await this.getAccount(a))?.witness_votes||[]}catch(i){return console.error("Error fetching user witness votes:",i),[]}}formatVotesToMHP(a){return`${(parseFloat(a)/1e6).toFixed(1)}m`}calculateAPR(a){return a/100}getVersionStatus(a,i){const s=this.parseVersion(a),r=this.parseVersion(i);return this.compareVersions(s,r)>=0?"green":this.compareVersions(s,r)<0?"red":"grey"}parseVersion(a){return a.split(".").map(i=>parseInt(i,10))}compareVersions(a,i){const s=Math.max(a.length,i.length);for(let r=0;r<s;r++){const n=a[r]||0,u=i[r]||0;if(n>u)return 1;if(n<u)return-1}return 0}getWitnessDescription(a){try{let i;if(a.json_metadata&&a.json_metadata!=="{}"){i=JSON.parse(a.json_metadata);const s=i.profile?.witness_description;if(s)return s}return a.posting_json_metadata&&a.posting_json_metadata!=="{}"?(i=JSON.parse(a.posting_json_metadata),i.profile?.about||""):""}catch(i){return console.error("Error parsing witness description:",i),""}}formatTimeAgo(a){const i=new Date(a),r=Math.floor((new Date().getTime()-i.getTime())/1e3);if(r<60)return`${r} second${r>1?"s":""} ago`;if(r<3600){const n=Math.floor(r/60);return`${n} minute${n>1?"s":""} ago`}else if(r<86400){const n=Math.floor(r/3600);return`${n} hour${n>1?"s":""} ago`}else if(r<604800){const n=Math.floor(r/86400);return`${n} day${n>1?"s":""} ago`}else if(r<2592e3){const n=Math.floor(r/604800);return`${n} week${n>1?"s":""} ago`}else if(r<31536e3){const n=Math.floor(r/2592e3);return`${n} month${n>1?"s":""} ago`}else{const n=Math.floor(r/31536e3);return`${n} year${n>1?"s":""} ago`}}}const ct=new Mp,Ve=vc.create((e,a)=>({witnesses:[],witnessVotes:[],userWitnessVotes:[],witnessDetails:new Map,witnessAccounts:new Map,loadingWitnesses:!1,loadingMoreWitnesses:!1,loadingVotes:!1,loadingMoreVotes:!1,loadingUserVotes:!1,error:null,nextWitnessStart:"",nextVotesStart:"",hasMoreWitnesses:!0,hasMoreVotes:!1,selectedWitness:null,filters:{status:"all",name:"",version:""},loadWitnesses:async(i="",s=50)=>{const{witnesses:r}=a();if(r.length>=500){e({hasMoreWitnesses:!1});return}e(i!==""?{loadingMoreWitnesses:!0}:{loadingWitnesses:!0,error:null});try{const u=await ct.getWitnessesByVote(i,s);e(d=>{const f=new Set(d.witnesses.map(h=>h.owner)),o=u.filter(h=>!f.has(h.owner));return{witnesses:[...d.witnesses,...o],nextWitnessStart:u.length>0?u[u.length-1].owner:"",hasMoreWitnesses:u.length===s}});const c=u.filter(d=>!a().witnessDetails.has(d.owner)).map(d=>d.owner);c.length>0&&a().loadWitnessDetails(c)}catch(u){console.error("Error loading witnesses:",u),e({error:"Failed to load witnesses data"})}finally{e({loadingWitnesses:!1,loadingMoreWitnesses:!1})}},loadMoreWitnesses:async()=>{const{nextWitnessStart:i,hasMoreWitnesses:s,loadingMoreWitnesses:r}=a();!s||r||!i||await a().loadWitnesses(i,50)},loadWitnessVotes:async i=>{e({loadingVotes:!0,witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:i});try{const s=await ct.getWitnessVotes(i,"",250);e({witnessVotes:s.votes,nextVotesStart:s.votes.length>0?s.votes[s.votes.length-1].account:"",hasMoreVotes:s.votes.length===250,loadingVotes:!1})}catch(s){console.error("Error loading witness votes:",s),e({error:"Failed to load witness votes",loadingVotes:!1})}},loadMoreVotes:async()=>{const{hasMoreVotes:i,loadingMoreVotes:s,nextVotesStart:r,selectedWitness:n,witnessVotes:u}=a();if(!i||s||!r||u.length>=1e3){u.length>=1e3&&e({hasMoreVotes:!1});return}e({loadingMoreVotes:!0});try{const c=await ct.getWitnessVotes(n||"",r,250);e(d=>{const o=[...d.witnessVotes,...c.votes].filter((l,p,x)=>x.findIndex(w=>w.account===l.account)===p),h=c.votes.filter((l,p,x)=>x.findIndex(w=>w.account===l.account)===p);return{witnessVotes:o,nextVotesStart:h.length>0?h[h.length-1].account:"",hasMoreVotes:c.votes.length===250}})}catch(c){console.error("Error loading more witness votes:",c)}finally{e({loadingMoreVotes:!1})}},loadUserWitnessVotes:async i=>{if(i){e({loadingUserVotes:!0});try{const s=await ct.getUserWitnessVotes(i);e({userWitnessVotes:s})}catch(s){console.error("Error loading user witness votes:",s)}finally{e({loadingUserVotes:!1})}}},loadWitnessDetails:async i=>{try{const s=await ct.getAccounts(i);e(r=>{const n=new Map(r.witnessDetails),u=new Map(r.witnessAccounts);return s.forEach(c=>{const d=ct.getWitnessDescription(c);d&&n.set(c.name,d),u.set(c.name,c)}),{witnessDetails:n,witnessAccounts:u}})}catch(s){console.error("Error loading witness details:",s)}},setFilters:i=>e({filters:i}),setSelectedWitness:i=>e({selectedWitness:i}),clearVotes:()=>e({witnessVotes:[],nextVotesStart:"",hasMoreVotes:!1,selectedWitness:null})})),xc=({filters:e,onFiltersChange:a,theme:i="dark"})=>{const s=i==="dark"?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-800",r=c=>{const d=e.status===c?"all":c;a({...e,status:d})},n=c=>{a({...e,name:c})},u=c=>{a({...e,version:c})};return t.jsxs("div",{className:`rounded-lg p-4 mb-6 border ${i==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsx("h3",{className:`text-lg font-semibold mb-4 ${i==="dark"?"text-white":"text-gray-900"}`,children:"FILTERS"}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${i==="dark"?"text-gray-300":"text-gray-700"}`,children:"WITNESS"}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="active",onChange:()=>r("active"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${i==="dark"?"text-white":"text-gray-900"}`,children:"Active"})]}),t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="disabled",onChange:()=>r("disabled"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${i==="dark"?"text-white":"text-gray-900"}`,children:"Disabled/Stale"})]}),t.jsxs("label",{className:"flex items-center space-x-2 cursor-pointer",children:[t.jsx("input",{type:"checkbox",checked:e.status==="approved",onChange:()=>r("approved"),className:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500 focus:ring-2"}),t.jsx("span",{className:`${i==="dark"?"text-white":"text-gray-900"}`,children:"Approved"})]}),e.status!=="all"&&t.jsx("button",{onClick:()=>a({...e,status:"all"}),className:`text-sm underline ${s}`,children:"Clear Status Filter"})]})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${i==="dark"?"text-gray-300":"text-gray-700"}`,children:"NAME"}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx("svg",{className:`w-4 h-4 ${i==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("input",{type:"text",placeholder:"Search",value:e.name,onChange:c=>n(c.target.value),className:`w-full pl-10 pr-4 py-2 border-b focus:outline-none focus:border-blue-500 ${i==="dark"?"bg-slate-900 border-gray-700 text-white placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"}`})]})]}),t.jsxs("div",{children:[t.jsx("h4",{className:`text-sm font-medium mb-3 ${i==="dark"?"text-gray-300":"text-gray-700"}`,children:"VERSION"}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t.jsx("svg",{className:`w-4 h-4 ${i==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),t.jsx("input",{type:"text",placeholder:"Version",value:e.version,onChange:c=>u(c.target.value),className:`w-full pl-10 pr-4 py-2 border-b focus:outline-none focus:border-blue-500 ${i==="dark"?"bg-slate-900 border-gray-700 text-white placeholder-gray-400":"bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-500"}`})]})]})]})},Ci=768;function Nd(){const[e,a]=Qn.useState(void 0);return Qn.useEffect(()=>{const i=window.matchMedia(`(max-width: ${Ci-1}px)`),s=()=>{a(window.innerWidth<Ci)};return i.addEventListener("change",s),a(window.innerWidth<Ci),()=>i.removeEventListener("change",s)},[]),!!e}const Rp=({isOpen:e,onClose:a,witness:i,votes:s,loadingMore:r,hasMore:n,loadingInitial:u,scrollContainerRef:c,sentinelRef:d,loadMoreVotes:f,theme:o="dark"})=>{const h=P.useCallback(l=>{l[0].isIntersecting&&n&&!r&&f()},[n,r,f]);return P.useEffect(()=>{const l=new IntersectionObserver(h,{threshold:.1,root:c.current});return d.current&&l.observe(d.current),()=>{d.current&&l.unobserve(d.current)}},[h,c,d]),e?t.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:`rounded-lg max-w-2xl w-full max-h-[80vh] overflow-hidden border ${o==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${o==="dark"?"border-gray-800":"border-gray-200"}`,children:[t.jsxs("h3",{className:`text-lg font-semibold ${o==="dark"?"text-white":"text-gray-900"}`,children:["Votes for @",i," (showing ",s.length,")"]}),t.jsx("button",{onClick:a,className:`text-xl font-bold ${o==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:"×"})]}),t.jsxs("div",{ref:c,className:"p-4 overflow-y-auto max-h-[60vh]",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:s.map((l,p)=>t.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border ${o==="dark"?"bg-gray-800 border-gray-800":"bg-gray-50 border-gray-200"}`,children:[t.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${o==="dark"?"bg-gray-600 text-white":"bg-gray-200 text-gray-900"}`,children:t.jsx("img",{className:"w-8 h-8 rounded-full",src:`https://images.hive.blog/u/${l.account}/avatar`,alt:l.account,onError:x=>{x.target.src="https://images.hive.blog/u/null/avatar"}})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:`font-medium ${o==="dark"?"text-white":"text-gray-900"}`,children:l.account}),t.jsxs("div",{className:`text-sm ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:["Vote #",p+1]})]}),t.jsx("div",{className:`text-sm ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"25"})]},l.account))}),s.length===0&&!u&&t.jsx("div",{className:`text-center py-8 ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"No votes found for this witness."}),r&&t.jsx("div",{className:`text-center py-4 ${o==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more votes..."}),n&&!r&&t.jsx("div",{className:"text-center py-4",children:t.jsx("button",{onClick:f,className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",children:"Load More Votes"})}),n&&t.jsx("div",{ref:d,className:"h-4"})]})]})}):null},Ip=({username:e,filters:a={status:"all",name:"",version:""},onWitnessVoteClick:i,onWitnessStatsClick:s,onWitnessUrlClick:r,theme:n="dark"})=>{const u=Nd(),c=Ve(R=>R.witnesses),d=Ve(R=>R.userWitnessVotes),f=Ve(R=>R.loadingWitnesses),o=Ve(R=>R.error),h=Ve(R=>R.selectedWitness),l=Ve(R=>R.witnessVotes),p=Ve(R=>R.hasMoreVotes),x=Ve(R=>R.loadingMoreVotes),w=Ve(R=>R.loadingVotes),b=Ve(R=>R.filters),g=Ve(R=>R.hasMoreWitnesses),v=Ve(R=>R.loadingWitnesses),k=Ve(R=>R.witnessDetails);Ve(R=>R.witnessAccounts);const _=Ve(R=>R.loadWitnesses),y=Ve(R=>R.loadMoreWitnesses),m=Ve(R=>R.loadWitnessVotes),N=Ve(R=>R.loadMoreVotes),j=Ve(R=>R.loadUserWitnessVotes),A=Ve(R=>R.setFilters),[D,C]=P.useState(!1),[O,$]=P.useState(!1),H=P.useRef(null),F=P.useRef(null),q=P.useRef(null),M=P.useCallback(R=>{R[0].isIntersecting&&g&&!v&&y()},[g,v,y]);P.useEffect(()=>{const R=new IntersectionObserver(M,{threshold:.1});return q.current&&R.observe(q.current),()=>{q.current&&R.unobserve(q.current)}},[M]),P.useEffect(()=>{_()},[_]),P.useEffect(()=>{e&&j(e)},[e,j]),P.useEffect(()=>{A(a)},[]);const Y=P.useMemo(()=>c.filter(R=>{if(b.status!=="all"){if(b.status==="active"){const V=new Date;if(V.setFullYear(V.getFullYear()-1),new Date(R.last_hbd_exchange_update+"Z")<=V)return!1}else if(b.status==="disabled"){const V=new Date;if(V.setFullYear(V.getFullYear()-1),new Date(R.last_hbd_exchange_update+"Z")>V)return!1}else if(b.status==="approved"&&!d.includes(R.owner))return!1}return!(b.name&&!R.owner.toLowerCase().includes(b.name.toLowerCase())||b.version&&!R.running_version.includes(b.version))}),[c,b,d]),X=async R=>{i?i(R):(await m(R),C(!0))},ae=R=>{s?s(R):window.open(`https://hivehub.dev/witnesses/@${R}`,"_blank")},I=R=>{r?r(R):window.open(R,"_blank")},ie=R=>e?d.includes(R):!1;return f?t.jsx("div",{className:"flex items-center justify-center p-8",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})}):o?t.jsx("div",{className:"text-center p-8 text-red-400",children:o}):t.jsxs("div",{className:"w-full",children:[t.jsx(Rp,{isOpen:D,onClose:()=>C(!1),witness:h||"",votes:l,loadingMore:x,hasMore:p,loadingInitial:w,scrollContainerRef:F,sentinelRef:H,loadMoreVotes:N,theme:n}),u?t.jsxs("div",{className:`w-full p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:`text-lg font-semibold ${n==="dark"?"text-white":"text-gray-900"}`,children:"Witnesses"}),t.jsxs("button",{onClick:()=>$(!O),className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded flex items-center space-x-2",children:[t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),t.jsx("span",{children:O?"Hide Filters":"Show Filters"})]})]}),O&&t.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-50 flex items-center justify-center z-50 p-4",children:t.jsxs("div",{className:`rounded-lg w-full max-w-md max-h-[80vh] overflow-hidden border ${n==="dark"?"bg-slate-950 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${n==="dark"?"border-gray-800":"border-gray-200"}`,children:[t.jsx("h3",{className:`text-lg font-semibold ${n==="dark"?"text-white":"text-gray-900"}`,children:"Filters"}),t.jsx("button",{onClick:()=>$(!1),className:`text-xl font-bold ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,children:"×"})]}),t.jsx("div",{className:"p-4 overflow-y-auto max-h-[60vh]",children:t.jsx(xc,{filters:b,onFiltersChange:A,theme:n})})]})}),t.jsxs("div",{className:"space-y-4 max-h-[70vh] overflow-y-auto",children:[Y.map((R,V)=>{const J=ct.getVersionStatus(R.running_version,R.hardfork_version_vote),fe=ie(R.owner),Q=c.findIndex(ne=>ne.owner===R.owner)+1;return t.jsxs("div",{className:`rounded-lg border p-4 shadow-sm ${n==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"}`,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsxs("span",{className:`text-lg font-bold ${n==="dark"?"text-white":"text-gray-900"}`,children:["#",Q]}),t.jsx("img",{className:"w-10 h-10 rounded-full",src:`https://images.hive.blog/u/${R.owner}/avatar`,alt:R.owner,onError:ne=>{ne.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("div",{children:[t.jsx("div",{className:`font-medium ${n==="dark"?"text-white":"text-gray-900"}`,children:R.owner}),t.jsxs("div",{className:`text-xs ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["Since ",new Date(R.created).getFullYear()]})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("svg",{className:`w-6 h-6 ${fe?"text-green-600":n==="dark"?"text-gray-500":"text-gray-400"}`,fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),t.jsxs("div",{className:"flex space-x-1",children:[t.jsx("button",{onClick:()=>I(R.url),className:`${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"Visit witness URL",children:"🔗"}),t.jsx("button",{onClick:()=>ae(R.owner),className:`${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"View witness stats",children:"📊"})]})]})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-3",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Version"}),t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium mt-1 block ${J==="green"?"bg-green-100 text-green-800":J==="red"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:R.running_version})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Votes (MHP)"}),t.jsx("button",{onClick:()=>X(R.owner),className:"text-blue-600 hover:text-blue-800 cursor-pointer text-sm font-medium mt-1",disabled:w,children:w&&h===R.owner?"Loading...":ct.formatVotesToMHP(R.votes)})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`text-xs uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"APR"}),t.jsxs("div",{className:`font-medium mt-1 ${n==="dark"?"text-white":"text-gray-900"}`,children:[ct.calculateAPR(R.props.hbd_interest_rate),"%"]})]})]}),t.jsxs("div",{className:"grid grid-cols-3 gap-4 text-xs",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Last Block"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:R.last_confirmed_block_num.toLocaleString()})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Miss"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:R.total_missed.toLocaleString()})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:`uppercase ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Price Feed"}),t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:R.hbd_exchange_rate.base}),t.jsx("div",{className:`${n==="dark"?"text-gray-400":"text-gray-500"}`,children:ct.formatTimeAgo(R.last_hbd_exchange_update+"Z")})]})]}),k.get(R.owner)&&t.jsx("div",{className:`mt-3 pt-3 border-t ${n==="dark"?"border-gray-800":"border-gray-200"}`,children:t.jsx("div",{className:`text-xs line-clamp-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:k.get(R.owner)})})]},R.owner)}),v&&t.jsxs("div",{className:"flex items-center justify-center py-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more witnesses..."})]}),g&&t.jsx("div",{ref:q,className:"h-1"})]})]}):t.jsx("div",{className:`max-w-7xl mx-auto p-2 ${n==="dark"?"bg-slate-950":"bg-white"}`,children:t.jsxs("div",{className:"grid grid-cols-5 gap-4",children:[t.jsx("div",{className:"col-span-1 sticky top-0 h-screen overflow-y-auto",children:t.jsx(xc,{filters:b,onFiltersChange:A,theme:n})}),t.jsxs("div",{className:"col-span-4 overflow-auto max-h-screen",children:[t.jsxs("table",{className:`w-full text-xs text-left ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx("thead",{className:`text-xs uppercase ${n==="dark"?"text-gray-400 bg-slate-900":"text-gray-700 bg-gray-50"}`,children:t.jsxs("tr",{children:[t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Rank"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Witness"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Version"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Votes"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Last Block"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Miss"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Feed"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"APR"}),t.jsx("th",{scope:"col",className:"px-2 py-2",children:"Vote"})]})}),t.jsx("tbody",{children:Y.map((R,V)=>{const J=ct.getVersionStatus(R.running_version,R.hardfork_version_vote),fe=ie(R.owner);return t.jsxs("tr",{className:`border-b hover:bg-gray-50 ${n==="dark"?"border-gray-800 hover:bg-gray-800":"border-gray-200"}`,children:[t.jsx("td",{className:`px-2 py-2 font-medium text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:c.findIndex(Q=>Q.owner===R.owner)+1}),t.jsx("td",{className:"px-2 py-2",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("img",{className:"w-6 h-6 rounded-full",src:`https://images.hive.blog/u/${R.owner}/avatar`,alt:R.owner,onError:Q=>{Q.target.src="https://images.hive.blog/u/null/avatar"}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:`font-medium text-xs truncate ${n==="dark"?"text-white":"text-gray-900"}`,children:R.owner}),t.jsxs("div",{className:`text-xs ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:["Since ",new Date(R.created).getFullYear()]})]}),t.jsxs("div",{className:"flex space-x-1 flex-shrink-0",children:[t.jsx("button",{onClick:()=>I(R.url),className:`text-xs ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"Visit witness URL",children:"🔗"}),t.jsx("button",{onClick:()=>ae(R.owner),className:`text-xs ${n==="dark"?"text-gray-400 hover:text-white":"text-gray-500 hover:text-gray-900"}`,title:"View witness stats",children:"📊"})]})]})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("span",{className:`px-1 py-0.5 rounded text-xs font-medium ${J==="green"?"bg-green-100 text-green-800":J==="red"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:R.running_version})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("button",{onClick:()=>X(R.owner),className:"text-blue-600 hover:text-blue-800 cursor-pointer text-xs",disabled:w,children:w&&h===R.owner?"...":ct.formatVotesToMHP(R.votes)})}),t.jsx("td",{className:"px-2 py-2 text-right",children:t.jsx("div",{className:`text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:R.last_confirmed_block_num.toLocaleString()})}),t.jsx("td",{className:"px-2 py-2 text-right text-xs",children:t.jsx("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:R.total_missed.toLocaleString()})}),t.jsx("td",{className:"px-2 py-2 text-right",children:t.jsx("div",{className:`text-xs ${n==="dark"?"text-white":"text-gray-900"}`,children:R.hbd_exchange_rate.base})}),t.jsx("td",{className:"px-2 py-2 text-right text-xs",children:t.jsxs("div",{className:`${n==="dark"?"text-white":"text-gray-900"}`,children:[ct.calculateAPR(R.props.hbd_interest_rate),"%"]})}),t.jsx("td",{className:"px-2 py-2",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx("svg",{className:`w-4 h-4 ${fe?"text-green-600":n==="dark"?"text-gray-500":"text-gray-400"}`,fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})})]},R.owner)})})]}),v&&t.jsxs("div",{className:"flex items-center justify-center py-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:`ml-2 ${n==="dark"?"text-gray-400":"text-gray-500"}`,children:"Loading more witnesses..."})]}),g&&t.jsx("div",{ref:q,className:"h-1"})]})]})})]})},Fp=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class qp{async getTransactionHistory(a,i=-1,s=1e3,r=null,n=null){try{const u=[a,i,s];r!==null&&n!==null&&u.push(r,n);const c=await Fp.call("condenser_api","get_account_history",u);return Array.isArray(c)?c.map(d=>Array.isArray(d)&&d.length>=2?d[1]:d):[]}catch(u){return console.error("Error in getTransactionHistory:",u),[]}}async getFilteredTransactionHistory(a,i=[],s=100){try{const r=await this.getTransactionHistory(a,-1,1e3);let n=r;return i.length>0&&(n=r.filter(u=>{const c=u.op?.[0];return i.includes(c)})),n.slice(0,s)}catch(r){return console.error("Error in getFilteredTransactionHistory:",r),[]}}async getRecentTransfers(a,i=50){return this.getFilteredTransactionHistory(a,["transfer"],i)}async getRecentVotes(a,i=50){return this.getFilteredTransactionHistory(a,["vote"],i)}async getRecentComments(a,i=50){return this.getFilteredTransactionHistory(a,["comment"],i)}parseOperation(a){try{if(!a.op||!Array.isArray(a.op)||a.op.length<2)return null;const[i,s]=a.op;switch(i){case"transfer":return{type:"transfer",value:{from:s.from||"",to:s.to||"",amount:s.amount||"",memo:s.memo||""}};case"vote":return{type:"vote",value:{voter:s.voter||"",author:s.author||"",permlink:s.permlink||"",weight:s.weight||0}};case"comment":return{type:"comment",value:{parent_author:s.parent_author||"",parent_permlink:s.parent_permlink||"",author:s.author||"",permlink:s.permlink||"",title:s.title||"",body:s.body||"",json_metadata:s.json_metadata||""}};case"custom_json":return{type:"custom_json",value:{required_auths:s.required_auths||[],required_posting_auths:s.required_posting_auths||[],id:s.id||"",json:s.json||""}};case"comment_payout_update":return{type:"comment_payout_update",value:{author:s.author||"",permlink:s.permlink||""}};case"comment_options":return{type:"comment_options",value:{author:s.author||"",permlink:s.permlink||"",max_accepted_payout:s.max_accepted_payout||"",percent_hbd:s.percent_hbd||0,allow_votes:s.allow_votes||!1,allow_curation_rewards:s.allow_curation_rewards||!1,extensions:s.extensions||[]}};case"effective_comment_vote":return{type:"effective_comment_vote",value:{voter:s.voter||"",author:s.author||"",permlink:s.permlink||"",pending_payout:s.pending_payout||"",weight:s.weight||0,rshares:s.rshares||0,total_vote_weight:s.total_vote_weight||0}};default:return console.warn("Unknown operation type:",i,a.op),null}}catch(i){return console.error("Error parsing operation:",i,a.op),null}}formatTimestamp(a){try{return new Date(a).toLocaleString()}catch(i){return console.error("Error formatting timestamp:",i),a}}getTransactionSummary(a){const i={};let s="",r="";return a.forEach(n=>{const u=n.op?.[0]||"unknown";i[u]=(i[u]||0)+1,(!s||n.timestamp<s)&&(s=n.timestamp),(!r||n.timestamp>r)&&(r=n.timestamp)}),{totalTransactions:a.length,operationCounts:i,dateRange:{earliest:s,latest:r}}}}const aa=new qp;function Bp({account:e,className:a}){const[i,s]=P.useState([]),[r,n]=P.useState([]),[u,c]=P.useState(!1),[d,f]=P.useState(null),[o,h]=P.useState(""),[l,p]=P.useState("all"),[x,w]=P.useState(50),b=[{value:"all",label:"All Operations",icon:z.Activity},{value:"transfer",label:"Transfers",icon:z.Send},{value:"vote",label:"Votes",icon:z.TrendingUp},{value:"comment",label:"Comments",icon:z.MessageCircle},{value:"custom_json",label:"Custom JSON",icon:z.ArrowUpDown},{value:"comment_payout_update",label:"Payout Updates",icon:z.RefreshCw},{value:"comment_options",label:"Comment Options",icon:z.Filter},{value:"effective_comment_vote",label:"Effective Votes",icon:z.Users}],g=async()=>{if(e){c(!0),f(null);try{const y=await aa.getTransactionHistory(e,-1,x);s(y),n(y)}catch(y){f("Failed to load transaction history"),console.error("Error loading transactions:",y)}finally{c(!1)}}};P.useEffect(()=>{g()},[e,x]),P.useEffect(()=>{let y=i;if(l!=="all"&&(y=y.filter(m=>m.op?.[0]===l)),o){const m=o.toLowerCase();y=y.filter(N=>{const j=aa.parseOperation(N);if(!j)return!1;switch(j.type){case"transfer":return j.value.from.toLowerCase().includes(m)||j.value.to.toLowerCase().includes(m)||j.value.memo.toLowerCase().includes(m);case"vote":return j.value.voter.toLowerCase().includes(m)||j.value.author.toLowerCase().includes(m)||j.value.permlink.toLowerCase().includes(m);case"comment":return j.value.author.toLowerCase().includes(m)||j.value.title.toLowerCase().includes(m)||j.value.permlink.toLowerCase().includes(m);default:return!1}})}n(y)},[i,l,o]);const v=y=>{if(!y)return t.jsx(z.Activity,{className:"h-4 w-4"});const m=b.find(N=>N.value===y.type)?.icon||z.Activity;return t.jsx(m,{className:"h-4 w-4"})},k=y=>{const m=aa.parseOperation(y);if(!m)return t.jsx("span",{className:"text-gray-400",children:"Unknown operation"});switch(m.type){case"transfer":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Transfer"}),t.jsx("span",{className:"text-sm font-medium text-white",children:m.value.amount})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"From:"}),t.jsx("img",{src:ge.userAvatar(m.value.from),alt:`${m.value.from} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.from)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.from})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"To:"}),t.jsx("img",{src:ge.userAvatar(m.value.to),alt:`${m.value.to} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.to)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.to})]}),m.value.memo&&t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Memo:"})," ",m.value.memo]})]});case"vote":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Vote"}),t.jsxs("span",{className:"text-sm font-medium text-white",children:[m.value.weight,"%"]})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Voter:"}),t.jsx("img",{src:ge.userAvatar(m.value.voter),alt:`${m.value.voter} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.voter)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.voter})]}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:ge.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"comment":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Comment"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:ge.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Title:"})," ",m.value.title]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"custom_json":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Custom JSON"})}),t.jsxs("div",{className:"text-sm text-gray-400",children:["ID: ",m.value.id]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["JSON: ",m.value.json.substring(0,100),"..."]})]});case"comment_payout_update":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Payout Update"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:ge.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Permlink:"})," ",m.value.permlink]})]});case"comment_options":return t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Comment Options"})}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-2",children:[t.jsx("span",{className:"flex-shrink-0",children:"Author:"}),t.jsx("img",{src:ge.userAvatar(m.value.author),alt:`${m.value.author} avatar`,className:"w-4 h-4 rounded-full flex-shrink-0",onError:N=>{N.target.src=ge.userAvatar(m.value.author)}}),t.jsx("span",{className:"font-mono text-gray-300 truncate",children:m.value.author})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"Max Payout:"})," ",m.value.max_accepted_payout]}),t.jsxs("div",{className:"text-sm text-gray-400",children:[t.jsx("span",{className:"flex-shrink-0",children:"HBD Percent:"})," ",m.value.percent_hbd,"%"]})]});case"effective_comment_vote":return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"px-2 py-1 bg-gray-700 text-gray-300 rounded text-xs font-medium",children:"Effective Vote"}),t.jsx("span",{className:"text-sm font-medium text-white",children:m.value.weight})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Voter:"," ",t.jsx("span",{className:"font-mono text-gray-300",children:m.value.voter})]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Post: @",m.value.author,"/",m.value.permlink]}),t.jsxs("div",{className:"text-sm text-gray-400",children:["Pending Payout: ",m.value.pending_payout]})]});default:return t.jsx("span",{className:"text-gray-400",children:"Unknown operation"})}},_=aa.getTransactionSummary(i);return u?t.jsxs("div",{className:`bg-gray-800 border border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsxs("div",{className:"p-2 md:p-6",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx(z.Activity,{className:"h-5 w-5 text-gray-300"}),t.jsx("h3",{className:"text-lg font-semibold text-white",children:"Transaction History"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-400",children:"Loading transaction history for"}),t.jsx("img",{src:ge.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:y=>{y.target.src=ge.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-400",children:["@",e]})]})]}),t.jsx("div",{className:"p-2 md:p-6 space-y-2 md:space-y-4",children:Array.from({length:5}).map((y,m)=>t.jsxs("div",{className:"space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-700 rounded animate-pulse w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-700 rounded animate-pulse w-1/2"})]},m))})]}):t.jsxs("div",{className:`bg-gray-800 border border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsxs("div",{className:"p-4 md:p-6",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx(z.Activity,{className:"h-5 w-5 text-gray-300"}),t.jsx("h3",{className:"text-lg font-semibold text-white",children:"Transaction History"})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-400",children:"Transaction history for"}),t.jsx("img",{src:ge.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:y=>{y.target.src=ge.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-400",children:["@",e]})]}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-4",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:_.totalTransactions}),t.jsx("div",{className:"text-sm text-gray-400",children:"Total"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:_.operationCounts.transfer||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Transfers"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:_.operationCounts.vote||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Votes"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-2xl font-bold text-white",children:_.operationCounts.comment||0}),t.jsx("div",{className:"text-sm text-gray-400",children:"Comments"})]})]})]}),t.jsxs("div",{className:"p-4 md:p-6 space-y-4",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search transactions...",value:o,onChange:y=>h(y.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsx("select",{value:l,onChange:y=>p(y.target.value),className:"w-full sm:w-48 px-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:b.map(y=>t.jsx("option",{value:y.value,children:y.label},y.value))}),t.jsxs("select",{value:x.toString(),onChange:y=>w(parseInt(y.target.value)),className:"w-full sm:w-32 px-3 py-2 bg-gray-700 border border-gray-600 rounded-md text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"25",children:"25"}),t.jsx("option",{value:"50",children:"50"}),t.jsx("option",{value:"100",children:"100"}),t.jsx("option",{value:"200",children:"200"})]}),t.jsx("button",{onClick:g,className:"px-3 py-2 bg-gray-700 border border-gray-600 rounded-md hover:bg-gray-600 text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]}),d&&t.jsx("div",{className:"p-4 border border-red-700 bg-red-900 rounded-md",children:t.jsx("p",{className:"text-red-300",children:d})}),t.jsx("div",{className:"space-y-4",children:r.length===0?t.jsx("div",{className:"text-center py-8 text-gray-400",children:"No transactions found"}):r.map(y=>{const m=aa.parseOperation(y);return t.jsxs("div",{className:"border border-gray-600 rounded-lg p-3 md:p-4 space-y-3 hover:bg-gray-700 transition-colors",children:[t.jsx("div",{className:"flex items-center justify-between",children:t.jsxs("div",{className:"flex items-center gap-3",children:[v(m),t.jsxs("div",{children:[t.jsx("div",{className:"font-medium text-white",children:m?.type?m.type.charAt(0).toUpperCase()+m.type.slice(1):"Unknown"}),t.jsxs("div",{className:"text-sm text-gray-400 flex items-center gap-1",children:[t.jsx(z.Clock,{className:"h-3 w-3"}),aa.formatTimestamp(y.timestamp)]})]})]})}),t.jsx("div",{className:"ml-6 md:ml-7",children:k(y)})]},`${y.trx_id}-${y.op_in_trx}`)})}),r.length>0&&t.jsxs("div",{className:"text-center text-sm text-gray-400",children:["Showing ",r.length," of ",i.length," ","transactions"]})]})]})}const Vp=new oa.Client(["https://api.hive.blog","https://api.syncad.com","https://api.deathwing.me"]);class Up{async getUserChannel(a,i="posts",s=20,r=null,n=null,u=null){const c={account:a,sort:i,limit:s};r&&(c.start_author=r),n&&(c.start_permlink=n),u&&(c.observer=u);try{const d=await Vp.call("bridge","get_account_posts",c);return Array.isArray(d)?d:[]}catch(d){return console.error("Error in getUserChannel:",d),[]}}async getUserPosts(a,i=20){return this.getUserChannel(a,"posts",i)}async getUserComments(a,i=20){return this.getUserChannel(a,"comments",i)}async getUserReplies(a,i=20){return this.getUserChannel(a,"replies",i)}async getAllUserActivity(a,i=10){try{const[s,r,n]=await Promise.all([this.getUserPosts(a,i),this.getUserComments(a,i),this.getUserReplies(a,i)]);return[...s,...r,...n].sort((c,d)=>new Date(d.created).getTime()-new Date(c.created).getTime())}catch(s){return console.error("Error in getAllUserActivity:",s),[]}}convertToDisplayItem(a){return{id:a.id,author:a.author,permlink:a.permlink,title:a.title,body:a.body,created:a.created,category:a.category,net_votes:a.net_votes,children:a.children,total_payout_value:a.total_payout_value,pending_payout_value:a.pending_payout_value,url:a.url,type:a.parent_author===""?"post":"comment"}}formatTimestamp(a){try{return new Date(a).toLocaleString()}catch(i){return console.error("Error formatting timestamp:",i),a}}getRelativeTime(a){try{const i=new Date(a),r=new Date().getTime()-i.getTime(),n=Math.floor(r/1e3),u=Math.floor(n/60),c=Math.floor(u/60),d=Math.floor(c/24);return n<60?`${n} seconds ago`:u<60?`${u} minutes ago`:c<24?`${c} hours ago`:d<7?`${d} days ago`:i.toLocaleDateString()}catch(i){return console.error("Error calculating relative time:",i),a}}truncateText(a,i=150){return a.length<=i?a:a.substring(0,i)+"..."}getActivitySummary(a){let i=0,s=0,r=0,n=0;return a.forEach(u=>{u.parent_author===""?i++:s++,r+=u.net_votes||0;const c=u.total_payout_value?.match(/(\d+\.?\d*)/);c&&(n+=parseFloat(c[1]))}),{totalActivities:a.length,postsCount:i,commentsCount:s,totalVotes:r,totalPayout:`${n.toFixed(3)} HIVE`,averageVotes:a.length>0?Math.round(r/a.length):0}}filterByCategory(a,i){return a.filter(s=>s.category===i)}filterByDateRange(a,i,s){return a.filter(r=>{const n=new Date(r.created);return n>=i&&n<=s})}searchActivities(a,i){const s=i.toLowerCase();return a.filter(r=>r.title.toLowerCase().includes(s)||r.body.toLowerCase().includes(s)||r.category.toLowerCase().includes(s))}}const na=new Up,zp=({username:e,className:a})=>{const[i,s]=P.useState([]),[r,n]=P.useState([]),[u,c]=P.useState([]),[d,f]=P.useState([]),[o,h]=P.useState([]),[l,p]=P.useState(!1),[x,w]=P.useState(null),[b,g]=P.useState(""),[v,k]=P.useState(20),[_,y]=P.useState("all"),[m,N]=P.useState(new Set),[j,A]=P.useState(!1),D=async()=>{if(!(!e||j)){p(!0),w(null);try{const[M,Y,X]=await Promise.all([na.getUserPosts(e,v),na.getUserComments(e,v),na.getUserReplies(e,v)]);s(M),n(Y),c(X),A(!0)}catch(M){w("Failed to load activity history"),console.error("Error loading activities:",M)}finally{p(!1)}}};P.useEffect(()=>{D()},[e]),P.useEffect(()=>{if(!j)return;let M=[];switch(_){case"posts":M=i;break;case"comments":M=r;break;case"replies":M=u;break;default:M=[...i,...r,...u].sort((Y,X)=>new Date(X.created).getTime()-new Date(Y.created).getTime());break}f(M),h(M)},[_,i,r,u,j]),P.useEffect(()=>{let M=d;b&&(M=na.searchActivities(d,b)),h(M)},[d,b]);const C=M=>!M||M==="0.000 HIVE"?"0 HIVE":M,O=M=>M.parent_author===""?"Post":M.depth===1?"Comment":"Reply",$=new to.DefaultRenderer({baseUrl:"https://hive.blog/",breaks:!0,skipSanitization:!1,allowInsecureScriptTags:!1,addNofollowToLinks:!0,doNotShowImages:!1,assetsWidth:640,assetsHeight:480,imageProxyFn:M=>M,usertagUrlFn:M=>`/@${M}`,hashtagUrlFn:M=>`/trending/${M}`,isLinkSafeFn:M=>!0,addExternalCssClassToMatchingLinksFn:M=>!0,ipfsPrefix:"https://ipfs.io/ipfs/"}),H=M=>{const Y=new Set(m);Y.has(M)?Y.delete(M):Y.add(M),N(Y)},F=M=>{const Y=`${M.author}-${M.permlink}`,X=m.has(Y),ae=M.body.length>100;return t.jsxs("div",{className:"border border-gray-200 dark:border-gray-600 rounded-lg p-3 sm:p-4 space-y-3 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors relative",children:[t.jsx("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3",children:t.jsx("div",{className:"flex items-start gap-3 flex-1",children:t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[t.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${M.parent_author===""?"bg-blue-900 text-blue-300":"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300"}`,children:O(M)}),t.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["in #",M.category]})]}),t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx("img",{src:ge.userAvatar(M.author),alt:`${M.author} avatar`,className:"w-5 h-5 sm:w-6 sm:h-6 rounded-full flex-shrink-0",onError:I=>{I.target.src=ge.userAvatar(M.author)}}),t.jsx("h3",{className:"font-medium text-base sm:text-lg leading-tight text-gray-900 dark:text-white break-words",children:M.title||"Untitled"})]}),t.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none mb-3 text-gray-500 dark:text-gray-400 comment-content overflow-hidden",children:[t.jsx("div",{className:"break-words overflow-wrap-anywhere",dangerouslySetInnerHTML:{__html:$.render(ae&&!X?M.body.substring(0,50)+".....":M.body)}}),ae&&t.jsxs("button",{onClick:()=>H(Y),className:"mt-2 text-blue-400 hover:text-blue-300 text-sm font-medium flex items-center gap-1",children:[t.jsx(z.ChevronDown,{className:`h-3 w-3 transition-transform ${X?"rotate-180":""}`}),X?"Show less":"Show more"]})]}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2 sm:gap-4 text-sm text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Clock,{className:"h-3 w-3 flex-shrink-0"}),t.jsx("span",{className:"truncate",children:na.getRelativeTime(M.created)})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.ThumbsUp,{className:"h-3 w-3 flex-shrink-0"}),t.jsxs("span",{children:[M.net_votes," votes"]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(z.Reply,{className:"h-3 w-3 flex-shrink-0"}),t.jsxs("span",{children:[M.children," replies"]})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{children:"💰"}),t.jsx("span",{children:C(M.total_payout_value)})]})]})]})})}),t.jsx("button",{onClick:()=>window.open(`https://peakd.com/@${M.author}/${M.permlink}`,"_blank"),className:"absolute top-3 right-3 flex-shrink-0 p-2 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-md transition-colors text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white",children:t.jsx(z.ExternalLink,{className:"h-4 w-4"})})]},Y)},q=na.getActivitySummary(d);return l?t.jsxs("div",{className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm ${a}`,children:[t.jsx("div",{className:"p-6",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Loading activity history for"}),t.jsx("img",{src:ge.userAvatar(e),alt:`${e} avatar`,className:"w-6 h-6 rounded-full",onError:M=>{M.target.src=ge.userAvatar(e)}}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["@",e]})]})}),t.jsx("div",{className:"p-6 space-y-4",children:Array.from({length:5}).map((M,Y)=>t.jsxs("div",{className:"space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-1/2"}),t.jsx("div",{className:"h-20 bg-gray-200 dark:bg-gray-700 rounded animate-pulse w-full"})]},Y))})]}):t.jsxs("div",{className:`space-y-6 ${a}`,children:[t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:ge.userAvatar(e),alt:`${e} avatar`,className:"w-16 h-16 rounded-full object-cover",onError:M=>{M.target.src=ge.userAvatar(e)}}),t.jsxs("div",{className:"flex-1",children:[t.jsxs("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:["@",e]}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"Activity History"}),t.jsx("div",{className:"flex flex-wrap gap-6 text-sm",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.FileText,{className:"w-4 h-4"}),t.jsxs("span",{children:[q.totalActivities," Total Activities"]})]})})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex md:grid md:grid-cols-4 overflow-x-auto md:overflow-visible w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg",children:[t.jsx("button",{onClick:()=>y("all"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${_==="all"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"All"}),t.jsx("button",{onClick:()=>y("posts"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${_==="posts"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Posts"}),t.jsx("button",{onClick:()=>y("comments"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${_==="comments"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Comments"}),t.jsx("button",{onClick:()=>y("replies"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${_==="replies"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Replies"})]}),t.jsxs("div",{className:"mt-6",children:[t.jsxs("div",{className:"flex flex-row gap-4 mb-6",children:[t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-500 dark:text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search activities...",value:b,onChange:M=>g(M.target.value),className:"w-full pl-10 pr-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),t.jsx("button",{onClick:()=>{A(!1),D()},className:"px-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx(z.RefreshCw,{className:"h-4 w-4"})})]}),x&&t.jsx("div",{className:"p-4 border border-red-200 dark:border-red-700 bg-red-50 dark:bg-red-900 rounded-md",children:t.jsx("p",{className:"text-red-600 dark:text-red-300",children:x})}),t.jsx("div",{className:"space-y-4",children:o.length===0?t.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No activities found"}):o.map(F)}),o.length>0&&t.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400",children:["Showing ",o.length," of ",d.length," ","activities"]})]})]})]})},Di="_communityLocalKey",Zn={getBookmarkedCommunities:()=>{const e=localStorage.getItem(Di);return e?JSON.parse(e):[]},isUserPresentLocally:e=>{const a=localStorage.getItem(Di);return a?JSON.parse(a).includes(e):!1},storeLikedCommunityLocally:(e,a=!1)=>{let i=Zn.getBookmarkedCommunities();return i.includes(e)?i=i.filter(s=>s!==e):a||i.push(e),localStorage.setItem(Di,JSON.stringify(i)),i}},ao=({id:e,toastType:a,isLiked:i,onAdd:s,onRemove:r,onFavourite:n})=>{const[u,c]=P.useState(i??Zn.isUserPresentLocally(e));P.useEffect(()=>{i!==void 0&&c(i)},[i]);const d=()=>{n&&n(),u?(r?r(e,"remove_bookmark"):Zn.storeLikedCommunityLocally(e,!0),f(!1)):(s?s(e,"add_bookmark"):Zn.storeLikedCommunityLocally(e),f(!0)),c(!u)},f=o=>{alert(`The ${a} is ${o?"added to":"removed from"} your bookmarks`)};return t.jsx("button",{onClick:d,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:u?t.jsx(z.BookmarkCheck,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"}):t.jsx(z.Bookmark,{className:"w-5 h-5 text-gray-500 dark:text-gray-400"})})};class Hp{HIVE_API_URL="https://api.hive.blog";async getListOfCommunities(a,i=20,s){const r={limit:i};s&&s.trim()!==""&&(r.last=s),a&&a.trim()!==""&&(r.query=a);const n={jsonrpc:"2.0",method:"bridge.list_communities",params:r,id:1};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching communities:",u),u}}async getCommunityDetails(a){const i={jsonrpc:"2.0",method:"bridge.get_community",params:{name:a},id:1};try{const s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return await s.json()}catch(s){throw console.error("Error fetching community details:",s),s}}async getCommunitySubscribers(a,i=100,s){const r={community:a,limit:i};s&&s.trim()!==""&&(r.last=s);const n={jsonrpc:"2.0",method:"bridge.list_community_roles",params:r,id:1};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return((await u.json()).result||[]).map(d=>({username:d[0],role:d[1],extra:d[2],subscribedAt:d[3]}))}catch(u){throw console.error("Error fetching community subscribers:",u),u}}async getCommunitySubscribersList(a,i=100,s){const r={community:a,limit:i};s&&s.trim()!==""&&(r.last=s);const n={jsonrpc:"2.0",method:"bridge.list_subscribers",params:r,id:2};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return((await u.json()).result||[]).map(d=>({username:d[0],role:d[1],extra:d[2],subscribedAt:d[3]}))}catch(u){throw console.error("Error fetching community subscribers list:",u),u}}async getCommunityAccounts(a){const i={jsonrpc:"2.0",method:"condenser_api.get_accounts",params:[[a]],id:2};try{const s=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return(await s.json()).result||[]}catch(s){throw console.error("Error fetching community accounts:",s),s}}async getRankedPosts(a,i="created",s=20,r,n){const u={tag:a,sort:i,limit:s};r&&n&&(u.start_author=r,u.start_permlink=n);const c={jsonrpc:"2.0",method:"bridge.get_ranked_posts",params:u,id:3};try{const d=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);return(await d.json()).result||[]}catch(d){throw console.error("Error fetching ranked posts:",d),d}}communityIcon(a){return`https://images.hive.blog/u/${a}/avatar?size=icon`}userOwnerThumb(a){return`https://images.hive.blog/u/${a}/avatar`}async getCommunityActivities(a,i=100,s){const r={account:a,limit:i};s&&(r.last_id=s);const n={jsonrpc:"2.0",method:"bridge.account_notifications",params:r,id:19};try{const u=await fetch(this.HIVE_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return(await u.json()).result||[]}catch(u){throw console.error("Error fetching community activities:",u),u}}}const ot=new Hp,Wp=({onSelectCommunity:e})=>{const[a,i]=P.useState([]),[s,r]=P.useState(""),[n,u]=P.useState(!0),[c,d]=P.useState(!1),[f,o]=P.useState(!0),[h,l]=P.useState(null),[p,x]=P.useState(null),w=20,b=P.useRef(null),g=P.useCallback(async(_=!1)=>{if(!(!_&&(c||!f)))try{_?(u(!0),x(null),i([]),l(null),o(!0)):d(!0);const y=s.trim(),m=await ot.getListOfCommunities(y.length>=3?y:void 0,w,_?void 0:h||void 0);i(N=>_?m:[...N,...m]),m.length<w||m.length>0&&m[m.length-1].name===h?o(!1):m.length>0&&l(m[m.length-1].name||null)}catch(y){x(y instanceof Error?y.message:"Failed to load communities"),o(!1)}finally{u(!1),d(!1)}},[s,c,f,h]);P.useEffect(()=>{const _=setTimeout(()=>{g(!0)},s.length>=3||s.length===0?0:500);return()=>clearTimeout(_)},[s]),P.useEffect(()=>{b.current?.focus()},[s,n,p]),P.useEffect(()=>{const _=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!c&&!n&&f&&g()};return window.addEventListener("scroll",_),()=>window.removeEventListener("scroll",_)},[g,c,n,f]);const v=()=>{g(!0)},k=()=>t.jsx("div",{className:"space-y-4",children:Array.from({length:6}).map((_,y)=>t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4 animate-pulse",children:t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:"w-12 h-12 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-3/4"}),t.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded w-1/2"})]}),t.jsx("div",{className:"h-3 bg-gray-200 dark:bg-gray-700 rounded w-16"})]})},y))});return n&&a.length===0?t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5"}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:s,onChange:_=>r(_.target.value),ref:b,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1097
1097
  rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400
1098
- focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),t.jsx(_,{})]}):p&&a.length===0?t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5"}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:s,onChange:k=>r(k.target.value),ref:b,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1098
+ focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),t.jsx(k,{})]}):p&&a.length===0?t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"relative",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5"}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:s,onChange:_=>r(_.target.value),ref:b,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1099
1099
  rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400
1100
- focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load communities"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:p}),t.jsxs("button",{onClick:v,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})})]}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"",children:t.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Communities"})}),t.jsxs("div",{className:"relative flex justify-between items-center",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5"}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:s,onChange:k=>r(k.target.value),ref:b,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1100
+ focus:outline-none focus:ring-2 focus:ring-blue-500`})]}),t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load communities"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:p}),t.jsxs("button",{onClick:v,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})})]}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"",children:t.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Communities"})}),t.jsxs("div",{className:"relative flex justify-between items-center",children:[t.jsx(z.Search,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500 dark:text-gray-400 w-5 h-5"}),t.jsx("input",{type:"text",placeholder:"Search communities...",value:s,onChange:_=>r(_.target.value),ref:b,autoFocus:!0,className:`w-full pl-10 pr-4 py-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1101
1101
  rounded-xl text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400
1102
- focus:outline-none focus:ring-2 focus:ring-blue-500`}),t.jsx("button",{onClick:v,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:t.jsx(z.RefreshCw,{className:"w-4 h-4"})})]}),a.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"No communities found"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:s?"Try adjusting your search terms":"Check back later for new communities"})]})}):t.jsxs("div",{className:"space-y-4",children:[a.map(k=>t.jsx("div",{className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1102
+ focus:outline-none focus:ring-2 focus:ring-blue-500`}),t.jsx("button",{onClick:v,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:t.jsx(z.RefreshCw,{className:"w-4 h-4"})})]}),a.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"No communities found"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:s?"Try adjusting your search terms":"Check back later for new communities"})]})}):t.jsxs("div",{className:"space-y-4",children:[a.map(_=>t.jsx("div",{className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1103
1103
  rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
1104
- transition-colors cursor-pointer`,onClick:()=>e(k.name||""),children:t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("img",{src:ot.communityIcon(k.name||""),alt:k.title,className:"w-12 h-12 rounded-full object-cover",onError:y=>{y.target.src=`https://ui-avatars.com/api/?name=${k.title}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:k.title}),t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 line-clamp-2",children:k.about})]}),t.jsx("div",{className:"text-right",children:t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[(k.subscribers||0).toLocaleString()," members"]})})]})},k.id)),f&&t.jsx("div",{className:"flex justify-center pt-4",children:c?t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more communities..."]}):t.jsx("button",{onClick:()=>g(),className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:"Load More Communities"})})]})]})},jd=({communityId:e})=>{const[a,i]=P.useState(null),[s,r]=P.useState(!0),[n,u]=P.useState(null),c=async()=>{try{r(!0),u(null);const h=await ot.getCommunityDetails(e);i(h)}catch(h){u(h instanceof Error?h.message:"Failed to load community details")}finally{r(!1)}};P.useEffect(()=>{c()},[e]);const d=h=>{try{return new Date(h).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return h}},f=h=>h.replace(/<[^>]*>/g,"");if(s)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading community details..."]})});if(n)return t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load community details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:n}),t.jsxs("button",{onClick:c,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!a?.result)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community details available"})});const o=a.result;return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[o.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:f(o.about)})]}),o.description&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"Information"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(o.description)})]}),o.flag_text&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"Community Rules"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(o.flag_text)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Total Authors"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.num_authors?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Subscribers"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.subscribers?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Created"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.created_at?d(o.created_at):"Unknown"})]}),o.lang&&t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Language"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.lang.toUpperCase()})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Pending Posts"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.num_pending?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Type"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.is_nsfw?"NSFW":"Safe"})]})]})]})})},Ed=({communityId:e,onSelectTeamMember:a})=>{const[i,s]=P.useState(null),[r,n]=P.useState(!0),[u,c]=P.useState(null),d=async()=>{try{n(!0),c(null);const o=await ot.getCommunityDetails(e);s(o)}catch(o){c(o instanceof Error?o.message:"Failed to load team details")}finally{n(!1)}};P.useEffect(()=>{d()},[e]);const f=i?.result?.team||[];return r?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading team members..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load team details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):f.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No team members found"})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:f.map((o,h)=>{const l=o[0],p=o.length>1?o[1]:"";return t.jsx("div",{onClick:()=>a&&a(l),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1104
+ transition-colors cursor-pointer`,onClick:()=>e(_.name||""),children:t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("img",{src:ot.communityIcon(_.name||""),alt:_.title,className:"w-12 h-12 rounded-full object-cover",onError:y=>{y.target.src=`https://ui-avatars.com/api/?name=${_.title}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:_.title}),t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 line-clamp-2",children:_.about})]}),t.jsx("div",{className:"text-right",children:t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[(_.subscribers||0).toLocaleString()," members"]})})]})},_.id)),f&&t.jsx("div",{className:"flex justify-center pt-4",children:c?t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more communities..."]}):t.jsx("button",{onClick:()=>g(),className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:"Load More Communities"})})]})]})},jd=({communityId:e})=>{const[a,i]=P.useState(null),[s,r]=P.useState(!0),[n,u]=P.useState(null),c=async()=>{try{r(!0),u(null);const h=await ot.getCommunityDetails(e);i(h)}catch(h){u(h instanceof Error?h.message:"Failed to load community details")}finally{r(!1)}};P.useEffect(()=>{c()},[e]);const d=h=>{try{return new Date(h).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return h}},f=h=>h.replace(/<[^>]*>/g,"");if(s)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading community details..."]})});if(n)return t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load community details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:n}),t.jsxs("button",{onClick:c,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!a?.result)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community details available"})});const o=a.result;return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[o.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:f(o.about)})]}),o.description&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"Information"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(o.description)})]}),o.flag_text&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"Community Rules"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(o.flag_text)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Total Authors"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.num_authors?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Subscribers"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.subscribers?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Created"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.created_at?d(o.created_at):"Unknown"})]}),o.lang&&t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Language"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.lang.toUpperCase()})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Pending Posts"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.num_pending?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Type"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.is_nsfw?"NSFW":"Safe"})]})]})]})})},Ed=({communityId:e,onSelectTeamMember:a})=>{const[i,s]=P.useState(null),[r,n]=P.useState(!0),[u,c]=P.useState(null),d=async()=>{try{n(!0),c(null);const o=await ot.getCommunityDetails(e);s(o)}catch(o){c(o instanceof Error?o.message:"Failed to load team details")}finally{n(!1)}};P.useEffect(()=>{d()},[e]);const f=i?.result?.team||[];return r?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading team members..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load team details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):f.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No team members found"})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:f.map((o,h)=>{const l=o[0],p=o.length>1?o[1]:"";return t.jsx("div",{onClick:()=>a&&a(l),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1105
1105
  rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
1106
- transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:ot.userOwnerThumb(l),alt:l,className:"w-12 h-12 rounded-full object-cover",onError:x=>{x.target.src=`https://ui-avatars.com/api/?name=${l}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",l]}),p&&t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:p})]})]})},`${l}-${h}`)})})})},Ad=({communityId:e,onSelectCommunityMember:a})=>{const[i,s]=P.useState([]),[r,n]=P.useState(!0),[u,c]=P.useState(!1),[d,f]=P.useState(!0),[o,h]=P.useState(null),[l,p]=P.useState(null),x=100,w=P.useCallback(async(b=!1)=>{if(!(u&&!b))try{b?(n(!0),p(null),s([]),h(null),f(!0)):c(!0);const g=await ot.getCommunitySubscribers(e,x,b?void 0:o||void 0);g.length===0?f(!1):(s(v=>{if(b)return g;const _=new Set(v.map(y=>y.username)),k=g.filter(y=>!_.has(y.username));return[...v,...k]}),g.length>0&&h(g[g.length-1].username),f(g.length===x))}catch(g){p(g instanceof Error?g.message:"Failed to load members")}finally{n(!1),c(!1)}},[e,u,o]);return P.useEffect(()=>{w(!0)},[e]),P.useEffect(()=>{const b=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!u&&!r&&d&&w()};return window.addEventListener("scroll",b),()=>window.removeEventListener("scroll",b)},[w,u,r,d]),r&&i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading members..."]})}):l&&i.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load members"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:()=>w(!0),className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community members found"})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:i.map((b,g)=>t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors cursor-pointer",onClick:()=>a?.(b.username),children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:ot.userOwnerThumb(b.username),alt:b.username,className:"w-12 h-12 rounded-full object-cover",onError:v=>{v.target.src=`https://ui-avatars.com/api/?name=${b.username}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",b.username]}),b.role&&t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:b.role})]})]})},`${b.username}-${g}`))}),d&&t.jsx("div",{className:"flex justify-center pt-4",children:u?t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more members..."]}):t.jsx("button",{onClick:()=>w(),className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:"Load More Members"})})]})},Gp=({communityId:e,onVideoClick:a,onAuthorClick:i,onBack:s,onclickAboutTab:r,onclickTeamTab:n,onclickMemberTab:u,onShare:c,onFavourite:d,onRss:f,onMoreVertical:o,showMoreVertical:h=!0})=>{const l=wc.useNavigate(),[p,x]=P.useState("videos"),[w,b]=P.useState(null),[g,v]=P.useState(!1),[_,k]=P.useState(!0);P.useEffect(()=>{(async()=>{try{k(!0);const D=await ot.getCommunityDetails(e);b(D)}catch(D){console.error("Failed to fetch community details:",D)}finally{k(!1)}})()},[e]);const y=()=>{const A=`https://3speak.tv/user/${e}`;navigator.share?navigator.share({title:w?.result?.title||e,url:A}):navigator.clipboard.writeText(A)},m=()=>{window.open(`https://3speak.tv/rss/${e}.xml`,"_blank")},N=A=>{l(`/user/${A}`)};if(_)return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[t.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),t.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((A,D)=>t.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},D))})]})]})});const j=w?.result;return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("button",{onClick:s,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:ot.userOwnerThumb(e),alt:j?.title||e,className:"w-16 h-16 rounded-full object-cover",onError:A=>{A.target.src=`https://images.hive.blog/u/${j?.title||e}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:j?.title||e}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:j?.about||"Community description"}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(j?.subscribers||0).toLocaleString()," members"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Created"," ",j?.created_at?new Date(j.created_at).getFullYear():"Unknown"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(ao,{id:e,toastType:"community",onAdd:(A,D)=>console.log("Added:",A,D),onRemove:(A,D)=>console.log("Removed:",A,D),onFavourite:d}),t.jsx("button",{onClick:f||m,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Rss,{className:"w-4 h-4"})}),t.jsx("button",{onClick:c||y,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Share2,{className:"w-4 h-4"})}),h&&t.jsx("button",{onClick:o||(()=>{}),className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:"grid grid-cols-4 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[t.jsx("button",{onClick:()=>x("videos"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="videos"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Videos"}),t.jsx("button",{onClick:()=>r?r():x("about"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="about"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"About"}),t.jsx("button",{onClick:()=>n?n():x("team"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="team"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Team"}),t.jsx("button",{onClick:()=>u?u():x("members"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="members"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Members"})]}),t.jsxs("div",{className:"mt-6",children:[p==="videos"&&t.jsx(ss,{feedType:Ge.COMMUNITY,communityId:e,onVideoClick:a,onAuthorClick:i}),p==="about"&&!r&&t.jsx(jd,{communityId:e}),p==="team"&&!n&&t.jsx(Ed,{communityId:e,onSelectTeamMember:N}),p==="members"&&!u&&t.jsx(Ad,{communityId:e,onSelectCommunityMember:N})]})]})]})},Jp=({communityId:e,onAuthorClick:a,onPostClick:i,onCommunityClick:s,onPayoutClick:r,onUpvoteClick:n,onCommentClick:u,onReblogClick:c})=>{const[d,f]=P.useState("posts"),[o,h]=P.useState(null),[l,p]=P.useState([]),[x,w]=P.useState([]),[b,g]=P.useState(!0),[v,_]=P.useState(!1),[k,y]=P.useState(!1),[m,N]=P.useState(null);P.useEffect(()=>{(async()=>{try{g(!0),N(null);const M=await ot.getCommunityDetails(e);h(M.result)}catch(M){N(M instanceof Error?M.message:"Failed to fetch community details")}finally{g(!1)}})()},[e]),P.useEffect(()=>{d==="subscribers"&&o?j():d==="activities"&&o&&A()},[d,o]);const j=async()=>{try{_(!0);const T=await ot.getCommunitySubscribersList(e,100);p(T)}catch(T){console.error("Failed to fetch subscribers:",T)}finally{_(!1)}},A=async()=>{try{y(!0);const T=await ot.getCommunityActivities(e,100);w(T)}catch(T){console.error("Failed to fetch activities:",T)}finally{y(!1)}},D=T=>{try{const M=new Date(T),F=new Date().getTime()-M.getTime(),q=Math.floor(F/1e3),$=Math.floor(q/60),Y=Math.floor($/60),X=Math.floor(Y/24),ae=Math.floor(X/30),I=Math.floor(X/365);return I>0?`${I} year${I>1?"s":""} ago`:ae>0?`${ae} month${ae>1?"s":""} ago`:X>0?`${X} day${X>1?"s":""} ago`:Y>0?`${Y} hour${Y>1?"s":""} ago`:$>0?`${$} minute${$>1?"s":""} ago`:"just now"}catch{return T}},C=T=>T.replace(/<[^>]*>/g,"");return b?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading community details..."]})}):m||!o?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Failed to load community details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:m})]}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:ot.userOwnerThumb(e),alt:o.title,className:"w-16 h-16 rounded-full object-cover",onError:T=>{T.target.src=`https://images.hive.blog/u/${o.title}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:o.title}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:o.about}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[o.subscribers.toLocaleString()," members"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Created ",D(o.created_at)]})]})]})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex md:grid md:grid-cols-4 overflow-x-auto md:overflow-visible w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg",children:[t.jsx("button",{onClick:()=>f("posts"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${d==="posts"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Posts"}),t.jsx("button",{onClick:()=>f("about"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${d==="about"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"About"}),t.jsx("button",{onClick:()=>f("subscribers"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${d==="subscribers"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Subscribers"}),t.jsx("button",{onClick:()=>f("activities"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${d==="activities"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Activities"})]}),t.jsxs("div",{className:"mt-6",children:[d==="posts"&&t.jsx(_d,{tag:e,sort:"created",limit:20,showSortDropdown:!1,onAuthorClick:a,onPostClick:i,onCommunityClick:s,onPayoutClick:r,onUpvoteClick:n,onCommentClick:u,onReblogClick:c}),d==="about"&&t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[o.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:C(o.about)})]}),o.description&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"Information"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:C(o.description)})]}),o.flag_text&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"Community Rules"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:C(o.flag_text)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Total Authors"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.num_authors.toLocaleString()})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Subscribers"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.subscribers.toLocaleString()})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Created"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:D(o.created_at)})]}),o.lang&&t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Language"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.lang.toUpperCase()})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Pending Posts"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.num_pending.toLocaleString()})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Type"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.is_nsfw?"NSFW":"Safe"})]})]})]}),d==="subscribers"&&t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:v?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"})}):l.length>0?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:["Subscribers (",l.length,")"]}),l.map(T=>t.jsxs("div",{className:"flex items-center gap-4 p-4 bg-gray-50 dark:bg-gray-900 rounded-lg",children:[t.jsx("img",{src:ot.userOwnerThumb(T.username),alt:T.username,className:"w-10 h-10 rounded-full object-cover",onError:M=>{M.target.src=`https://images.hive.blog/u/${T.username}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:["@",T.username]}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Role: ",T.role," • Subscribed"," ",D(T.subscribedAt)]})]})]},T.username))]}):t.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No subscribers found"})}),d==="activities"&&t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:k?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"})}):x.length>0?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:["Recent Activities (",x.length,")"]}),x.map(T=>{const M=T.msg.split(" ")[0].substring(1);return t.jsxs("div",{className:"flex items-center gap-4 p-4 bg-gray-50 dark:bg-gray-900 rounded-lg",children:[t.jsx("img",{src:ot.userOwnerThumb(M),alt:M,className:"w-10 h-10 rounded-full object-cover",onError:W=>{W.target.src=`https://images.hive.blog/u/${M}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:"text-gray-900 dark:text-white mb-1",children:T.msg}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[D(T.date),T.score&&` • Score: ${T.score}`]})]})]},T.id)})]}):t.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No activities found"})})]})]})]})},Yp=({currentUser:e,onTabChanged:a,onPublish:i,onViewMyVideo:s,onMoreOptions:r,onTapBackButton:n,shouldShowBackButton:u=!0,shouldShowPublishButton:c=!1,shouldShowMoreOptionsButton:d=!1})=>{const f=wc.useNavigate(),[o,h]=P.useState(0),[l,p]=P.useState([]),[x,w]=P.useState(!0),[b,g]=P.useState(null),v=l.filter(C=>["encoding","uploaded","encoding_queued","encoding_preparing","ipfs_pinning","ipfs_pinning_failed","encoding_failed","encoding_ipfs"].includes(C.status||"")),_=l.filter(C=>C.status==="publish_manual"),k=l.filter(C=>C.status==="published");P.useEffect(()=>{e?.token&&y()},[e]);const y=async()=>{if(!e?.token){g("No authentication token provided"),w(!1);return}w(!0),g(null);try{const C=await Ue.getMyVideos(e.token);p(C)}catch(C){console.error("Error fetching videos:",C),g(`Failed to load videos: ${C instanceof Error?C.message:"Unknown error"}`)}finally{w(!1)}},m=C=>{h(C),a?.(C)},N=C=>{C.owner&&C.permlink&&f(`/video/${C.owner}/${C.permlink}`)},j=C=>{switch(C.toLowerCase()){case"published":return"bg-green-500";case"encoding":case"encoding_queued":return"bg-orange-500";case"uploaded":return"bg-blue-500";case"publish_manual":return"bg-purple-500";default:return"bg-gray-500"}},A=["ipfs_pinning","ipfs_pinning_failed","encoding","encoding_failed","encoding_ipfs"],D=(C,T)=>{if(C.length===0){let M="";switch(T){case"publishNow":M="No videos ready to publish.";break;case"myVideos":M="No published videos found.";break;case"encoding":M="No videos currently encoding.";break}return t.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[t.jsx(z.Video,{className:"w-16 h-16 text-gray-400 mb-4"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-center",children:M})]})}return t.jsx("div",{className:"space-y-3 w-full",children:C.map((M,W)=>{const F=M.thumbnail||"",q=M.title||"No Title",$=M.permlink||"",Y=M.owner||e?.username||"",X=M.id||"",ae=A.includes(M.status||"");return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3 hover:shadow-md transition-shadow",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsxs("div",{className:"relative flex-shrink-0",children:[t.jsx("img",{src:Br(F)||`https://images.hive.blog/u/${e?.username}/avatar`,alt:q,className:"w-24 h-16 rounded-lg object-cover",onError:I=>{I.target.src=`https://images.hive.blog/u/${e?.username}/avatar`}}),A.includes(M.status||"")?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30 rounded-lg",children:t.jsx(z.Ban,{className:"w-6 h-6 text-red-500"})}):t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20 opacity-0 hover:opacity-100 transition-opacity cursor-pointer rounded-lg",onClick:()=>N(M),children:t.jsx(z.Play,{className:"w-6 h-6 text-white"})})]}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white text-sm cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>N(M),style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:q}),t.jsxs("p",{className:"text-gray-600 dark:text-gray-400 text-xs mt-1",children:["By ",Y]}),M.status&&t.jsx("div",{className:"mt-2",children:t.jsx("span",{className:`inline-block px-2 py-1 rounded-full text-xs font-semibold text-white ${j(M.status)}`,children:M.status.toUpperCase()})})]}),ae?t.jsx("div",{className:"flex-shrink-0 pl-2",children:t.jsx(z.Ban,{className:"w-5 h-5 text-red-500"})}):t.jsxs("div",{className:"flex flex-col items-end gap-2",children:[T==="publishNow"&&c&&t.jsx("button",{onClick:()=>i?.(Y,$),className:"bg-green-600 hover:bg-green-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"Publish"}),T==="myVideos"&&t.jsx("button",{onClick:()=>s?s(Y,$):N(M),className:"bg-blue-600 hover:bg-blue-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"View"}),d&&t.jsx("button",{onClick:()=>r?.(X),className:"p-1 h-6 w-6 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})},`${X}-${W}`)})})};return e?t.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[u&&t.jsxs("button",{onClick:n,className:"flex items-center justify-center mr-4 my-2 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"flex items-center justify-between p-4",children:[t.jsx("div",{className:"flex items-center gap-3",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:`https://images.hive.blog/u/${e.username}/avatar`,alt:e.username,className:"w-12 h-12 md:w-16 md:h-16 rounded-full object-cover border-2 border-gray-200 dark:border-gray-700",onError:C=>{C.target.src=`https://ui-avatars.com/api/?name=${e.username}&background=random&size=64`}}),t.jsx("div",{children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold text-gray-900 dark:text-white",children:e.username})})]})}),t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("button",{onClick:y,className:"p-2 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.RefreshCw,{className:"w-5 h-5"})})})]}),t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex overflow-x-auto scrollbar-hide",children:[t.jsxs("button",{onClick:()=>m(0),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${o===0?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[t.jsx(z.Upload,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Publish Now"}),t.jsx("span",{className:"sm:hidden",children:"Publish"}),_.length>0&&t.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:_.length})]}),t.jsxs("button",{onClick:()=>m(1),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${o===1?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[t.jsx(z.Video,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"My Videos"}),t.jsx("span",{className:"sm:hidden",children:"Videos"}),k.length>0&&t.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:k.length})]}),t.jsxs("button",{onClick:()=>m(2),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${o===2?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[t.jsx(z.Hourglass,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Encoding"}),t.jsx("span",{className:"sm:hidden",children:"Encoding"}),v.length>0&&t.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:v.length})]})]})})]}),t.jsx("div",{className:"py-4 md:py-6 w-full",children:x?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):b?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] text-center",children:[t.jsx("div",{className:"w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center mb-4",children:t.jsx(z.Info,{className:"w-8 h-8 text-red-600 dark:text-red-400"})}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load videos"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:b}),t.jsx("button",{onClick:y,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md transition-colors",children:"Retry"})]}):t.jsxs("div",{className:"space-y-6",children:[o===0&&D(_,"publishNow"),o===1&&D(k,"myVideos"),o===2&&D(v,"encoding")]})})]}):t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Please login to view your account"})})},Sd=({username:e,onSelectUser:a})=>{const[i,s]=P.useState([]),[r,n]=P.useState(!0),[u,c]=P.useState(null),d=async()=>{try{n(!0),c(null);const f=await ge.getFollowers(e);s(f)}catch(f){c(f instanceof Error?f.message:"Failed to load followers")}finally{n(!1)}};return P.useEffect(()=>{d()},[e]),r?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:i.map((f,o)=>t.jsx("div",{onClick:()=>a&&a(f.follower),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1106
+ transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:ot.userOwnerThumb(l),alt:l,className:"w-12 h-12 rounded-full object-cover",onError:x=>{x.target.src=`https://ui-avatars.com/api/?name=${l}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",l]}),p&&t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:p})]})]})},`${l}-${h}`)})})})},Ad=({communityId:e,onSelectCommunityMember:a})=>{const[i,s]=P.useState([]),[r,n]=P.useState(!0),[u,c]=P.useState(!1),[d,f]=P.useState(!0),[o,h]=P.useState(null),[l,p]=P.useState(null),x=100,w=P.useCallback(async(b=!1)=>{if(!(u&&!b))try{b?(n(!0),p(null),s([]),h(null),f(!0)):c(!0);const g=await ot.getCommunitySubscribers(e,x,b?void 0:o||void 0);g.length===0?f(!1):(s(v=>{if(b)return g;const k=new Set(v.map(y=>y.username)),_=g.filter(y=>!k.has(y.username));return[...v,..._]}),g.length>0&&h(g[g.length-1].username),f(g.length===x))}catch(g){p(g instanceof Error?g.message:"Failed to load members")}finally{n(!1),c(!1)}},[e,u,o]);return P.useEffect(()=>{w(!0)},[e]),P.useEffect(()=>{const b=()=>{window.innerHeight+document.documentElement.scrollTop>=document.documentElement.offsetHeight-200&&!u&&!r&&d&&w()};return window.addEventListener("scroll",b),()=>window.removeEventListener("scroll",b)},[w,u,r,d]),r&&i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading members..."]})}):l&&i.length===0?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load members"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:l}),t.jsxs("button",{onClick:()=>w(!0),className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No community members found"})}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:i.map((b,g)=>t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors cursor-pointer",onClick:()=>a?.(b.username),children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:ot.userOwnerThumb(b.username),alt:b.username,className:"w-12 h-12 rounded-full object-cover",onError:v=>{v.target.src=`https://ui-avatars.com/api/?name=${b.username}&background=random`}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",b.username]}),b.role&&t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 capitalize truncate",children:b.role})]})]})},`${b.username}-${g}`))}),d&&t.jsx("div",{className:"flex justify-center pt-4",children:u?t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading more members..."]}):t.jsx("button",{onClick:()=>w(),className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:"Load More Members"})})]})},Gp=({communityId:e,onVideoClick:a,onAuthorClick:i,onBack:s,onclickAboutTab:r,onclickTeamTab:n,onclickMemberTab:u,onShare:c,onFavourite:d,onRss:f,onMoreVertical:o,showMoreVertical:h=!0})=>{const l=wc.useNavigate(),[p,x]=P.useState("videos"),[w,b]=P.useState(null),[g,v]=P.useState(!1),[k,_]=P.useState(!0);P.useEffect(()=>{(async()=>{try{_(!0);const D=await ot.getCommunityDetails(e);b(D)}catch(D){console.error("Failed to fetch community details:",D)}finally{_(!1)}})()},[e]);const y=()=>{const A=`https://3speak.tv/user/${e}`;navigator.share?navigator.share({title:w?.result?.title||e,url:A}):navigator.clipboard.writeText(A)},m=()=>{window.open(`https://3speak.tv/rss/${e}.xml`,"_blank")},N=A=>{l(`/user/${A}`)};if(k)return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[t.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),t.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((A,D)=>t.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},D))})]})]})});const j=w?.result;return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("button",{onClick:s,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:ot.userOwnerThumb(e),alt:j?.title||e,className:"w-16 h-16 rounded-full object-cover",onError:A=>{A.target.src=`https://images.hive.blog/u/${j?.title||e}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:j?.title||e}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:j?.about||"Community description"}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(j?.subscribers||0).toLocaleString()," members"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Created"," ",j?.created_at?new Date(j.created_at).getFullYear():"Unknown"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(ao,{id:e,toastType:"community",onAdd:(A,D)=>console.log("Added:",A,D),onRemove:(A,D)=>console.log("Removed:",A,D),onFavourite:d}),t.jsx("button",{onClick:f||m,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Rss,{className:"w-4 h-4"})}),t.jsx("button",{onClick:c||y,className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Share2,{className:"w-4 h-4"})}),h&&t.jsx("button",{onClick:o||(()=>{}),className:"p-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:"grid grid-cols-4 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[t.jsx("button",{onClick:()=>x("videos"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="videos"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Videos"}),t.jsx("button",{onClick:()=>r?r():x("about"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="about"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"About"}),t.jsx("button",{onClick:()=>n?n():x("team"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="team"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Team"}),t.jsx("button",{onClick:()=>u?u():x("members"),className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${p==="members"?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:"Members"})]}),t.jsxs("div",{className:"mt-6",children:[p==="videos"&&t.jsx(ss,{feedType:Ge.COMMUNITY,communityId:e,onVideoClick:a,onAuthorClick:i}),p==="about"&&!r&&t.jsx(jd,{communityId:e}),p==="team"&&!n&&t.jsx(Ed,{communityId:e,onSelectTeamMember:N}),p==="members"&&!u&&t.jsx(Ad,{communityId:e,onSelectCommunityMember:N})]})]})]})},Jp=({communityId:e,onAuthorClick:a,onPostClick:i,onCommunityClick:s,onPayoutClick:r,onUpvoteClick:n,onCommentClick:u,onReblogClick:c,theme:d="dark"})=>{const[f,o]=P.useState("posts"),[h,l]=P.useState(null),[p,x]=P.useState([]),[w,b]=P.useState([]),[g,v]=P.useState(!0),[k,_]=P.useState(!1),[y,m]=P.useState(!1),[N,j]=P.useState(null);P.useEffect(()=>{(async()=>{try{v(!0),j(null);const H=await ot.getCommunityDetails(e);l(H.result)}catch(H){j(H instanceof Error?H.message:"Failed to fetch community details")}finally{v(!1)}})()},[e]),P.useEffect(()=>{f==="subscribers"&&h?A():f==="activities"&&h&&D()},[f,h]);const A=async()=>{try{_(!0);const $=await ot.getCommunitySubscribersList(e,100);x($)}catch($){console.error("Failed to fetch subscribers:",$)}finally{_(!1)}},D=async()=>{try{m(!0);const $=await ot.getCommunityActivities(e,100);b($)}catch($){console.error("Failed to fetch activities:",$)}finally{m(!1)}},C=$=>{try{const H=new Date($),q=new Date().getTime()-H.getTime(),M=Math.floor(q/1e3),Y=Math.floor(M/60),X=Math.floor(Y/60),ae=Math.floor(X/24),I=Math.floor(ae/30),ie=Math.floor(ae/365);return ie>0?`${ie} year${ie>1?"s":""} ago`:I>0?`${I} month${I>1?"s":""} ago`:ae>0?`${ae} day${ae>1?"s":""} ago`:X>0?`${X} hour${X>1?"s":""} ago`:Y>0?`${Y} minute${Y>1?"s":""} ago`:"just now"}catch{return $}},O=$=>$.replace(/<[^>]*>/g,"");return g?t.jsx("div",{className:`flex items-center justify-center min-h-[400px] ${d==="dark"?"bg-slate-950":"bg-white"}`,children:t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading community details..."]})}):N||!h?t.jsxs("div",{className:`flex flex-col items-center justify-center min-h-[400px] space-y-4 ${d==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("h3",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:"Failed to load community details"}),t.jsx("p",{className:`${d==="dark"?"text-gray-400":"text-gray-500"}`,children:N})]}):t.jsxs("div",{className:`space-y-6 ${d==="dark"?"bg-slate-950":"bg-white"}`,children:[t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:ot.userOwnerThumb(e),alt:h.title,className:"w-16 h-16 rounded-full object-cover",onError:$=>{$.target.src=`https://images.hive.blog/u/${h.title}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:`text-2xl font-bold mb-2 ${d==="dark"?"text-white":"text-gray-900"}`,children:h.title}),t.jsx("p",{className:`${d==="dark"?"text-gray-400":"text-gray-600"} mb-4`,children:h.about}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[h.subscribers.toLocaleString()," members"]})]}),t.jsxs("div",{className:`flex items-center gap-2 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Created ",C(h.created_at)]})]})]})]})]})}),t.jsxs("div",{children:[t.jsxs("div",{className:`flex md:grid md:grid-cols-4 overflow-x-auto md:overflow-visible w-full ${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-lg`,children:[t.jsx("button",{onClick:()=>o("posts"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="posts"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"Posts"}),t.jsx("button",{onClick:()=>o("about"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="about"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"About"}),t.jsx("button",{onClick:()=>o("subscribers"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="subscribers"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"Subscribers"}),t.jsx("button",{onClick:()=>o("activities"),className:`flex-shrink-0 md:flex-shrink px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${f==="activities"?`${d==="dark"?"bg-blue-500 text-white":"bg-blue-600 text-white"}`:`${d==="dark"?"text-gray-300 hover:bg-gray-700":"text-gray-700 hover:bg-gray-300"}`}`,children:"Activities"})]}),t.jsxs("div",{className:"mt-6",children:[f==="posts"&&t.jsx(_d,{tag:e,sort:"created",limit:20,showSortDropdown:!1,onAuthorClick:a,onPostClick:i,onCommunityClick:s,onPayoutClick:r,onUpvoteClick:n,onCommentClick:u,onReblogClick:c,theme:d}),f==="about"&&t.jsxs("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:[h.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"About"}),t.jsx("p",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed`,children:O(h.about)})]}),h.description&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"Information"}),t.jsx("div",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed whitespace-pre-wrap`,children:O(h.description)})]}),h.flag_text&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:`text-lg font-semibold mb-3 ${d==="dark"?"text-white":"text-gray-900"}`,children:"Community Rules"}),t.jsx("div",{className:`${d==="dark"?"text-gray-300":"text-gray-600"} leading-relaxed whitespace-pre-wrap`,children:O(h.flag_text)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Total Authors"}),t.jsx("p",{className:`text-2xl font-bold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.num_authors.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Subscribers"}),t.jsx("p",{className:`text-2xl font-bold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.subscribers.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Created"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:C(h.created_at)})]}),h.lang&&t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Language"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.lang.toUpperCase()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Pending Posts"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.num_pending.toLocaleString()})]}),t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} p-4 rounded-lg`,children:[t.jsx("h4",{className:`text-sm font-medium mb-1 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"Type"}),t.jsx("p",{className:`text-lg font-semibold ${d==="dark"?"text-white":"text-gray-900"}`,children:h.is_nsfw?"NSFW":"Safe"})]})]})]}),f==="subscribers"&&t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:k?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"})}):p.length>0?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("h3",{className:`text-lg font-semibold mb-4 ${d==="dark"?"text-white":"text-gray-900"}`,children:["Subscribers (",p.length,")"]}),p.map($=>t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} flex items-center gap-4 p-4 rounded-lg`,children:[t.jsx("img",{src:ot.userOwnerThumb($.username),alt:$.username,className:"w-10 h-10 rounded-full object-cover",onError:H=>{H.target.src=`https://images.hive.blog/u/${$.username}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsxs("p",{className:`font-medium ${d==="dark"?"text-white":"text-gray-900"}`,children:["@",$.username]}),t.jsxs("p",{className:`text-sm ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:["Role: ",$.role," • Subscribed"," ",C($.subscribedAt)]})]})]},$.username))]}):t.jsx("div",{className:`text-center py-8 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"No subscribers found"})}),f==="activities"&&t.jsx("div",{className:`${d==="dark"?"bg-slate-900 border-gray-800":"bg-white border-gray-200"} border rounded-xl p-6`,children:y?t.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"})}):w.length>0?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("h3",{className:`text-lg font-semibold mb-4 ${d==="dark"?"text-white":"text-gray-900"}`,children:["Recent Activities (",w.length,")"]}),w.map($=>{const H=$.msg.split(" ")[0].substring(1);return t.jsxs("div",{className:`${d==="dark"?"bg-slate-800":"bg-gray-50"} flex items-center gap-4 p-4 rounded-lg`,children:[t.jsx("img",{src:ot.userOwnerThumb(H),alt:H,className:"w-10 h-10 rounded-full object-cover",onError:F=>{F.target.src=`https://images.hive.blog/u/${H}/avatar`}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:`mb-1 ${d==="dark"?"text-white":"text-gray-900"}`,children:$.msg}),t.jsxs("p",{className:`text-sm ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:[C($.date),$.score&&` • Score: ${$.score}`]})]})]},$.id)})]}):t.jsx("div",{className:`text-center py-8 ${d==="dark"?"text-gray-400":"text-gray-500"}`,children:"No activities found"})})]})]})]})},Yp=({currentUser:e,onTabChanged:a,onPublish:i,onViewMyVideo:s,onMoreOptions:r,onTapBackButton:n,shouldShowBackButton:u=!0,shouldShowPublishButton:c=!1,shouldShowMoreOptionsButton:d=!1})=>{const f=wc.useNavigate(),[o,h]=P.useState(0),[l,p]=P.useState([]),[x,w]=P.useState(!0),[b,g]=P.useState(null),v=l.filter(C=>["encoding","uploaded","encoding_queued","encoding_preparing","ipfs_pinning","ipfs_pinning_failed","encoding_failed","encoding_ipfs"].includes(C.status||"")),k=l.filter(C=>C.status==="publish_manual"),_=l.filter(C=>C.status==="published");P.useEffect(()=>{e?.token&&y()},[e]);const y=async()=>{if(!e?.token){g("No authentication token provided"),w(!1);return}w(!0),g(null);try{const C=await Ue.getMyVideos(e.token);p(C)}catch(C){console.error("Error fetching videos:",C),g(`Failed to load videos: ${C instanceof Error?C.message:"Unknown error"}`)}finally{w(!1)}},m=C=>{h(C),a?.(C)},N=C=>{C.owner&&C.permlink&&f(`/video/${C.owner}/${C.permlink}`)},j=C=>{switch(C.toLowerCase()){case"published":return"bg-green-500";case"encoding":case"encoding_queued":return"bg-orange-500";case"uploaded":return"bg-blue-500";case"publish_manual":return"bg-purple-500";default:return"bg-gray-500"}},A=["ipfs_pinning","ipfs_pinning_failed","encoding","encoding_failed","encoding_ipfs"],D=(C,O)=>{if(C.length===0){let $="";switch(O){case"publishNow":$="No videos ready to publish.";break;case"myVideos":$="No published videos found.";break;case"encoding":$="No videos currently encoding.";break}return t.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[t.jsx(z.Video,{className:"w-16 h-16 text-gray-400 mb-4"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-center",children:$})]})}return t.jsx("div",{className:"space-y-3 w-full",children:C.map(($,H)=>{const F=$.thumbnail||"",q=$.title||"No Title",M=$.permlink||"",Y=$.owner||e?.username||"",X=$.id||"",ae=A.includes($.status||"");return t.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3 hover:shadow-md transition-shadow",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsxs("div",{className:"relative flex-shrink-0",children:[t.jsx("img",{src:Br(F)||`https://images.hive.blog/u/${e?.username}/avatar`,alt:q,className:"w-24 h-16 rounded-lg object-cover",onError:I=>{I.target.src=`https://images.hive.blog/u/${e?.username}/avatar`}}),A.includes($.status||"")?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30 rounded-lg",children:t.jsx(z.Ban,{className:"w-6 h-6 text-red-500"})}):t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20 opacity-0 hover:opacity-100 transition-opacity cursor-pointer rounded-lg",onClick:()=>N($),children:t.jsx(z.Play,{className:"w-6 h-6 text-white"})})]}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white text-sm cursor-pointer hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>N($),style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:q}),t.jsxs("p",{className:"text-gray-600 dark:text-gray-400 text-xs mt-1",children:["By ",Y]}),$.status&&t.jsx("div",{className:"mt-2",children:t.jsx("span",{className:`inline-block px-2 py-1 rounded-full text-xs font-semibold text-white ${j($.status)}`,children:$.status.toUpperCase()})})]}),ae?t.jsx("div",{className:"flex-shrink-0 pl-2",children:t.jsx(z.Ban,{className:"w-5 h-5 text-red-500"})}):t.jsxs("div",{className:"flex flex-col items-end gap-2",children:[O==="publishNow"&&c&&t.jsx("button",{onClick:()=>i?.(Y,M),className:"bg-green-600 hover:bg-green-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"Publish"}),O==="myVideos"&&t.jsx("button",{onClick:()=>s?s(Y,M):N($),className:"bg-blue-600 hover:bg-blue-700 text-white text-xs px-3 py-1 rounded-md transition-colors",children:"View"}),d&&t.jsx("button",{onClick:()=>r?.(X),className:"p-1 h-6 w-6 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})},`${X}-${H}`)})})};return e?t.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[u&&t.jsxs("button",{onClick:n,className:"flex items-center justify-center mr-4 my-2 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"flex items-center justify-between p-4",children:[t.jsx("div",{className:"flex items-center gap-3",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:`https://images.hive.blog/u/${e.username}/avatar`,alt:e.username,className:"w-12 h-12 md:w-16 md:h-16 rounded-full object-cover border-2 border-gray-200 dark:border-gray-700",onError:C=>{C.target.src=`https://ui-avatars.com/api/?name=${e.username}&background=random&size=64`}}),t.jsx("div",{children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold text-gray-900 dark:text-white",children:e.username})})]})}),t.jsx("div",{className:"flex items-center gap-2",children:t.jsx("button",{onClick:y,className:"p-2 rounded-md hover:bg-gray-300 dark:hover:bg-gray-700 transition-colors",children:t.jsx(z.RefreshCw,{className:"w-5 h-5"})})})]}),t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex overflow-x-auto scrollbar-hide",children:[t.jsxs("button",{onClick:()=>m(0),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${o===0?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[t.jsx(z.Upload,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Publish Now"}),t.jsx("span",{className:"sm:hidden",children:"Publish"}),k.length>0&&t.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:k.length})]}),t.jsxs("button",{onClick:()=>m(1),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${o===1?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[t.jsx(z.Video,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"My Videos"}),t.jsx("span",{className:"sm:hidden",children:"Videos"}),_.length>0&&t.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:_.length})]}),t.jsxs("button",{onClick:()=>m(2),className:`flex items-center gap-2 px-4 md:px-6 py-3 border-b-2 font-medium text-sm transition-colors whitespace-nowrap flex-shrink-0 ${o===2?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:[t.jsx(z.Hourglass,{className:"w-4 h-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Encoding"}),t.jsx("span",{className:"sm:hidden",children:"Encoding"}),v.length>0&&t.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-1 rounded-full",children:v.length})]})]})})]}),t.jsx("div",{className:"py-4 md:py-6 w-full",children:x?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):b?t.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] text-center",children:[t.jsx("div",{className:"w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center mb-4",children:t.jsx(z.Info,{className:"w-8 h-8 text-red-600 dark:text-red-400"})}),t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load videos"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:b}),t.jsx("button",{onClick:y,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md transition-colors",children:"Retry"})]}):t.jsxs("div",{className:"space-y-6",children:[o===0&&D(k,"publishNow"),o===1&&D(_,"myVideos"),o===2&&D(v,"encoding")]})})]}):t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Please login to view your account"})})},Sd=({username:e,onSelectUser:a})=>{const[i,s]=P.useState([]),[r,n]=P.useState(!0),[u,c]=P.useState(null),d=async()=>{try{n(!0),c(null);const f=await ge.getFollowers(e);s(f)}catch(f){c(f instanceof Error?f.message:"Failed to load followers")}finally{n(!1)}};return P.useEffect(()=>{d()},[e]),r?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading followers..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load followers"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user has no followers."})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:i.map((f,o)=>t.jsx("div",{onClick:()=>a&&a(f.follower),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1107
1107
  rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
1108
1108
  transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:ge.userAvatar(f.follower),alt:f.follower,className:"w-12 h-12 rounded-full object-cover",onError:h=>{h.target.src=`https://ui-avatars.com/api/?name=${f.follower}&background=random`}}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",f.follower]})})]})},`${f.follower}-${o}`))})})},Cd=({username:e,onSelectUser:a})=>{const[i,s]=P.useState([]),[r,n]=P.useState(!0),[u,c]=P.useState(null),d=async()=>{try{n(!0),c(null);const f=await ge.getFollowing(e);s(f)}catch(f){c(f instanceof Error?f.message:"Failed to load following list")}finally{n(!1)}};return P.useEffect(()=>{d()},[e]),r?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading following list..."]})}):u?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load following list"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:u}),t.jsxs("button",{onClick:d,className:"m-2 inline-flex items-center justify-center rounded-md border border-input text-gray-400 cursor-pointer bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})}):i.length===0?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"This user is not following anyone."})}):t.jsx("div",{className:"space-y-6",children:t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:i.map((f,o)=>t.jsx("div",{onClick:()=>a&&a(f.following),className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700
1109
1109
  rounded-xl p-4 hover:bg-gray-300 dark:hover:bg-gray-700
1110
- transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:ge.userAvatar(f.following),alt:f.following,className:"w-12 h-12 rounded-full object-cover",onError:h=>{h.target.src=`https://ui-avatars.com/api/?name=${f.following}&background=random`}}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",f.following]})})]})},`${f.following}-${o}`))})})},Dd=({username:e})=>{const[a,i]=P.useState(null),[s,r]=P.useState(!0),[n,u]=P.useState(null),c=async()=>{try{r(!0),u(null);const l=await ge.getProfile(e);i(l)}catch(l){u(l instanceof Error?l.message:"Failed to load user details")}finally{r(!1)}};P.useEffect(()=>{c()},[e]);const d=l=>{try{return new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return l}},f=l=>l.replace(/<[^>]*>/g,"");if(s)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading user details..."]})});if(n)return t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load user details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:n}),t.jsxs("button",{onClick:c,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!a?.result)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No user details available"})});const o=a.result,h=o.metadata?.profile;return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[h?.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(h.about)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Location"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:h?.location||"Not specified"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Website"}),t.jsx("a",{href:h?.website,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-500 hover:underline",children:h?.website||"Not specified"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Joined"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.created?d(o.created):"Unknown"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Followers"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.stats?.followers?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Following"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.stats?.following?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Post Count"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.post_count?.toLocaleString()||"0"})]})]})]})})},Zp=({username:e,onVideoClick:a,onAuthorClick:i,onBack:s,onClickUserInfoTab:r,onClickFollowersTab:n,onClickFollowingTab:u,onBookmarkToggle:c,onRss:d,onShare:f,onMoreMenu:o,showMoreMenu:h=!1})=>{const[l,p]=P.useState("videos"),[x,w]=P.useState(null),[b,g]=P.useState(!1),[v,_]=P.useState(!0);P.useEffect(()=>{(async()=>{try{_(!0);const D=await ge.getProfile(e);w(D)}catch(D){console.error("Failed to fetch user details:",D)}finally{_(!1)}})()},[e]);const k=()=>{if(f)f(e);else{const A=`https://3speak.tv/user/${e}`;navigator.share?navigator.share({title:x?.result?.name||e,url:A}):navigator.clipboard.writeText(A)}},y=()=>{d?d(e):window.open(`https://3speak.tv/rss/${e}.xml`,"_blank")},m=A=>{i(A)};if(v)return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[t.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),t.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((A,D)=>t.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},D))})]})]})});const N=x?.result,j=N?.metadata?.profile;return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("button",{onClick:s,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsxs("div",{className:"relative bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl overflow-hidden",children:[t.jsx("img",{src:j.cover_image||ge.userAvatar(e),alt:"Cover",className:"w-full h-48 object-cover",onError:A=>{A.target.src=ge.userAvatar(e)}}),t.jsx("div",{className:"p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:j?.profile_image,alt:j?.name,className:"w-24 h-24 rounded-full object-cover border-4 border-white dark:border-gray-800 -mt-16",onError:A=>{A.target.src=ge.userAvatar(e)}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:j?.name||e}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:j?.about||"No description available"}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(N?.stats?.followers||0).toLocaleString()," Followers"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(N?.stats?.following||0).toLocaleString()," Following"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Joined"," ",N?.created?new Date(N.created).getFullYear():"Unknown"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(ao,{id:e,toastType:"user",onAdd:(A,D)=>{c?c(A,!0):console.log("Added:",A,D)},onRemove:(A,D)=>{c?c(A,!1):console.log("Removed:",A,D)}}),t.jsx("button",{onClick:y,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Rss,{className:"w-4 h-4"})}),t.jsx("button",{onClick:k,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Share2,{className:"w-4 h-4"})}),h&&t.jsx("button",{onClick:()=>{o&&o(e)},className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})})]}),t.jsxs("div",{children:[t.jsx("div",{className:"grid grid-cols-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[{key:"videos",label:"Videos"},{key:"about",label:"User Info",callback:r},{key:"followers",label:"Followers",callback:n},{key:"following",label:"Following",callback:u}].map((A,D)=>t.jsx("button",{onClick:()=>{A.callback?A.callback():p(A.key)},className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${l===A.key?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:A.label},A.key))}),t.jsxs("div",{className:"mt-6",children:[l==="videos"&&t.jsx(ss,{feedType:Ge.USER,username:e,onVideoClick:a,onAuthorClick:i}),l==="about"&&t.jsx(Dd,{username:e}),l==="followers"&&t.jsx(Sd,{username:e,onSelectUser:m}),l==="following"&&t.jsx(Cd,{username:e,onSelectUser:m})]})]})]})},Xp=1,Kp=1e6;let Ti=0;function Qp(){return Ti=(Ti+1)%Number.MAX_SAFE_INTEGER,Ti.toString()}const Oi=new Map,yc=e=>{if(Oi.has(e))return;const a=setTimeout(()=>{Oi.delete(e),Ka({type:"REMOVE_TOAST",toastId:e})},Kp);Oi.set(e,a)},Td=(e,a)=>{switch(a.type){case"ADD_TOAST":return{...e,toasts:[a.toast,...e.toasts].slice(0,Xp)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(i=>i.id===a.toast.id?{...i,...a.toast}:i)};case"DISMISS_TOAST":{const{toastId:i}=a;return i?yc(i):e.toasts.forEach(s=>{yc(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===i||i===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return a.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==a.toastId)}}},Xn=[];let Kn={toasts:[]};function Ka(e){Kn=Td(Kn,e),Xn.forEach(a=>{a(Kn)})}function Od({...e}){const a=Qp(),i=r=>Ka({type:"UPDATE_TOAST",toast:{...r,id:a}}),s=()=>Ka({type:"DISMISS_TOAST",toastId:a});return Ka({type:"ADD_TOAST",toast:{...e,id:a,open:!0,onOpenChange:r=>{r||s()}}}),{id:a,dismiss:s,update:i}}function em(){const[e,a]=Qn.useState(Kn);return Qn.useEffect(()=>(Xn.push(a),()=>{const i=Xn.indexOf(a);i>-1&&Xn.splice(i,1)}),[e]),{...e,toast:Od,dismiss:i=>Ka({type:"DISMISS_TOAST",toastId:i})}}exports.ActivityList=$p;exports.ApiVideoFeedType=Ge;exports.CommunitiesList=Wp;exports.CommunityAbout=jd;exports.CommunityDetail=Gp;exports.CommunityMembers=Ad;exports.CommunityPostDetails=Jp;exports.CommunityTeam=Ed;exports.FavouriteWidget=ao;exports.FollowersList=Op;exports.FollowingList=Pp;exports.ListOfWitnesses=Ip;exports.Modal=xd;exports.PostFeedList=_d;exports.ProposalsList=Dp;exports.TransactionHistory=Bp;exports.UserAccount=Yp;exports.UserChannel=zp;exports.UserFollowers=Sd;exports.UserFollowing=Cd;exports.UserInfo=Dd;exports.UserProfilePage=Zp;exports.VideoCard=kc;exports.VideoDetail=dp;exports.VideoFeed=ss;exports.VideoInfo=Nc;exports.Wallet=Sp;exports.apiService=Ue;exports.reducer=Td;exports.server=sr;exports.toast=Od;exports.useIsMobile=Nd;exports.useToast=em;exports.useWalletStore=wd;exports.witnessService=ct;
1110
+ transition-colors cursor-pointer`,children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("img",{src:ge.userAvatar(f.following),alt:f.following,className:"w-12 h-12 rounded-full object-cover",onError:h=>{h.target.src=`https://ui-avatars.com/api/?name=${f.following}&background=random`}}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("h3",{className:"font-semibold text-gray-900 dark:text-white truncate",children:["@",f.following]})})]})},`${f.following}-${o}`))})})},Dd=({username:e})=>{const[a,i]=P.useState(null),[s,r]=P.useState(!0),[n,u]=P.useState(null),c=async()=>{try{r(!0),u(null);const l=await ge.getProfile(e);i(l)}catch(l){u(l instanceof Error?l.message:"Failed to load user details")}finally{r(!1)}};P.useEffect(()=>{c()},[e]);const d=l=>{try{return new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch{return l}},f=l=>l.replace(/<[^>]*>/g,"");if(s)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Loader2,{className:"w-5 h-5 animate-spin"}),"Loading user details..."]})});if(n)return t.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Failed to load user details"}),t.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-4",children:n}),t.jsxs("button",{onClick:c,className:"m-2 inline-flex items-center justify-center rounded-md border border-input bg-background p-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none",children:[t.jsx(z.RefreshCw,{className:"w-4 h-4"}),"Try Again"]})]})});if(!a?.result)return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No user details available"})});const o=a.result,h=o.metadata?.profile;return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[h?.about&&t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:"About"}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed whitespace-pre-wrap",children:f(h.about)})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Location"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:h?.location||"Not specified"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Website"}),t.jsx("a",{href:h?.website,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-500 hover:underline",children:h?.website||"Not specified"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Joined"}),t.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:o.created?d(o.created):"Unknown"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Followers"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.stats?.followers?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Following"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.stats?.following?.toLocaleString()||"0"})]}),t.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 p-4 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Post Count"}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:o.post_count?.toLocaleString()||"0"})]})]})]})})},Zp=({username:e,onVideoClick:a,onAuthorClick:i,onBack:s,onClickUserInfoTab:r,onClickFollowersTab:n,onClickFollowingTab:u,onBookmarkToggle:c,onRss:d,onShare:f,onMoreMenu:o,showMoreMenu:h=!1})=>{const[l,p]=P.useState("videos"),[x,w]=P.useState(null),[b,g]=P.useState(!1),[v,k]=P.useState(!0);P.useEffect(()=>{(async()=>{try{k(!0);const D=await ge.getProfile(e);w(D)}catch(D){console.error("Failed to fetch user details:",D)}finally{k(!1)}})()},[e]);const _=()=>{if(f)f(e);else{const A=`https://3speak.tv/user/${e}`;navigator.share?navigator.share({title:x?.result?.name||e,url:A}):navigator.clipboard.writeText(A)}},y=()=>{d?d(e):window.open(`https://3speak.tv/rss/${e}.xml`,"_blank")},m=A=>{i(A)};if(v)return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-8 bg-gray-200 dark:bg-gray-700 rounded w-32 mb-6"}),t.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl p-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[t.jsx("div",{className:"w-16 h-16 bg-gray-200 dark:bg-gray-700 rounded-full"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-6 bg-gray-200 dark:bg-gray-700 rounded w-48"}),t.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded w-32"})]})]}),t.jsx("div",{className:"flex gap-2",children:Array.from({length:4}).map((A,D)=>t.jsx("div",{className:"h-10 bg-gray-200 dark:bg-gray-700 rounded w-20"},D))})]})]})});const N=x?.result,j=N?.metadata?.profile;return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("button",{onClick:s,className:"flex items-center justify-center mr-4 px-2 text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full",children:[t.jsx(z.ArrowLeft,{className:"w-4 h-4 mr-2"}),"Back"]}),t.jsxs("div",{className:"relative bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl overflow-hidden",children:[t.jsx("img",{src:j.cover_image||ge.userAvatar(e),alt:"Cover",className:"w-full h-48 object-cover",onError:A=>{A.target.src=ge.userAvatar(e)}}),t.jsx("div",{className:"p-6",children:t.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center gap-6",children:[t.jsx("img",{src:j?.profile_image,alt:j?.name,className:"w-24 h-24 rounded-full object-cover border-4 border-white dark:border-gray-800 -mt-16",onError:A=>{A.target.src=ge.userAvatar(e)}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:j?.name||e}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:j?.about||"No description available"}),t.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(N?.stats?.followers||0).toLocaleString()," Followers"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Users,{className:"w-4 h-4"}),t.jsxs("span",{children:[(N?.stats?.following||0).toLocaleString()," Following"]})]}),t.jsxs("div",{className:"flex items-center gap-2 text-gray-500 dark:text-gray-400",children:[t.jsx(z.Calendar,{className:"w-4 h-4"}),t.jsxs("span",{children:["Joined"," ",N?.created?new Date(N.created).getFullYear():"Unknown"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(ao,{id:e,toastType:"user",onAdd:(A,D)=>{c?c(A,!0):console.log("Added:",A,D)},onRemove:(A,D)=>{c?c(A,!1):console.log("Removed:",A,D)}}),t.jsx("button",{onClick:y,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Rss,{className:"w-4 h-4"})}),t.jsx("button",{onClick:_,className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.Share2,{className:"w-4 h-4"})}),h&&t.jsx("button",{onClick:()=>{o&&o(e)},className:"p-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700",children:t.jsx(z.MoreVertical,{className:"w-4 h-4"})})]})]})})]}),t.jsxs("div",{children:[t.jsx("div",{className:"grid grid-cols-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[{key:"videos",label:"Videos"},{key:"about",label:"User Info",callback:r},{key:"followers",label:"Followers",callback:n},{key:"following",label:"Following",callback:u}].map((A,D)=>t.jsx("button",{onClick:()=>{A.callback?A.callback():p(A.key)},className:`px-4 py-2 text-xs sm:text-sm font-medium transition-colors ${l===A.key?"bg-blue-600 dark:bg-blue-500 text-white":"text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-700"}`,children:A.label},A.key))}),t.jsxs("div",{className:"mt-6",children:[l==="videos"&&t.jsx(ss,{feedType:Ge.USER,username:e,onVideoClick:a,onAuthorClick:i}),l==="about"&&t.jsx(Dd,{username:e}),l==="followers"&&t.jsx(Sd,{username:e,onSelectUser:m}),l==="following"&&t.jsx(Cd,{username:e,onSelectUser:m})]})]})]})},Xp=1,Kp=1e6;let Ti=0;function Qp(){return Ti=(Ti+1)%Number.MAX_SAFE_INTEGER,Ti.toString()}const Oi=new Map,yc=e=>{if(Oi.has(e))return;const a=setTimeout(()=>{Oi.delete(e),Ka({type:"REMOVE_TOAST",toastId:e})},Kp);Oi.set(e,a)},Td=(e,a)=>{switch(a.type){case"ADD_TOAST":return{...e,toasts:[a.toast,...e.toasts].slice(0,Xp)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(i=>i.id===a.toast.id?{...i,...a.toast}:i)};case"DISMISS_TOAST":{const{toastId:i}=a;return i?yc(i):e.toasts.forEach(s=>{yc(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===i||i===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return a.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==a.toastId)}}},Xn=[];let Kn={toasts:[]};function Ka(e){Kn=Td(Kn,e),Xn.forEach(a=>{a(Kn)})}function Od({...e}){const a=Qp(),i=r=>Ka({type:"UPDATE_TOAST",toast:{...r,id:a}}),s=()=>Ka({type:"DISMISS_TOAST",toastId:a});return Ka({type:"ADD_TOAST",toast:{...e,id:a,open:!0,onOpenChange:r=>{r||s()}}}),{id:a,dismiss:s,update:i}}function em(){const[e,a]=Qn.useState(Kn);return Qn.useEffect(()=>(Xn.push(a),()=>{const i=Xn.indexOf(a);i>-1&&Xn.splice(i,1)}),[e]),{...e,toast:Od,dismiss:i=>Ka({type:"DISMISS_TOAST",toastId:i})}}exports.ActivityList=Lp;exports.ApiVideoFeedType=Ge;exports.CommunitiesList=Wp;exports.CommunityAbout=jd;exports.CommunityDetail=Gp;exports.CommunityMembers=Ad;exports.CommunityPostDetails=Jp;exports.CommunityTeam=Ed;exports.FavouriteWidget=ao;exports.FollowersList=Op;exports.FollowingList=Pp;exports.ListOfWitnesses=Ip;exports.Modal=xd;exports.PostFeedList=_d;exports.ProposalsList=Dp;exports.TransactionHistory=Bp;exports.UserAccount=Yp;exports.UserChannel=zp;exports.UserFollowers=Sd;exports.UserFollowing=Cd;exports.UserInfo=Dd;exports.UserProfilePage=Zp;exports.VideoCard=kc;exports.VideoDetail=dp;exports.VideoFeed=ss;exports.VideoInfo=Nc;exports.Wallet=Sp;exports.apiService=Ue;exports.reducer=Td;exports.server=sr;exports.toast=Od;exports.useIsMobile=Nd;exports.useToast=em;exports.useWalletStore=wd;exports.witnessService=ct;