@valbuild/ui 0.56.0 → 0.58.0
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/valbuild-ui.cjs.js +7 -12
- package/dist/valbuild-ui.esm.js +7 -12
- package/package.json +3 -3
- package/server/.tmp/assets/{index-21XoyKJ-.js → index-3qLLBEVL.js} +1 -1
- package/server/.tmp/assets/{index-p3rwgFuv.css → index-Z7_wRGD5.css} +1 -1
- package/server/.tmp/index.html +2 -2
- package/server/dist/valbuild-ui-main.cjs.js +5 -10
- package/server/dist/valbuild-ui-main.esm.js +5 -10
- package/server/dist/valbuild-ui-server.cjs.js +1 -1
- package/server/dist/valbuild-ui-server.esm.js +1 -1
package/dist/valbuild-ui.cjs.js
CHANGED
|
@@ -39846,7 +39846,7 @@ function ValWindow({
|
|
|
39846
39846
|
"div",
|
|
39847
39847
|
{
|
|
39848
39848
|
ref: dragRef,
|
|
39849
|
-
className: "relative flex items-center justify-center px-2 py-
|
|
39849
|
+
className: "relative flex items-center justify-center px-2 py-2 text-primary",
|
|
39850
39850
|
onTouchStart: (ev) => {
|
|
39851
39851
|
var _a;
|
|
39852
39852
|
const touch = (_a = ev.changedTouches) == null ? void 0 : _a[0];
|
|
@@ -39870,7 +39870,7 @@ function ValWindow({
|
|
|
39870
39870
|
}
|
|
39871
39871
|
},
|
|
39872
39872
|
children: [
|
|
39873
|
-
isDrawer ? /* @__PURE__ */ jsxRuntime$1.jsx("div", { className: "absolute left-1/2 -translate-x-1/2 h-[8px] w-[80px] top-4 bg-primary rounded-lg" }) : /* @__PURE__ */ jsxRuntime$1.jsx(
|
|
39873
|
+
isDrawer ? /* @__PURE__ */ jsxRuntime$1.jsx("div", { className: "py-6", children: /* @__PURE__ */ jsxRuntime$1.jsx("div", { className: "absolute left-1/2 -translate-x-1/2 h-[8px] w-[80px] top-4 bg-primary rounded-lg" }) }) : /* @__PURE__ */ jsxRuntime$1.jsx(
|
|
39874
39874
|
AlignJustify,
|
|
39875
39875
|
{
|
|
39876
39876
|
size: 16,
|
|
@@ -50003,12 +50003,10 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
|
50003
50003
|
return [];
|
|
50004
50004
|
if (line === "")
|
|
50005
50005
|
return {
|
|
50006
|
-
tag: "br"
|
|
50007
|
-
children: []
|
|
50006
|
+
tag: "br"
|
|
50008
50007
|
};
|
|
50009
50008
|
return [line, {
|
|
50010
|
-
tag: "br"
|
|
50011
|
-
children: []
|
|
50009
|
+
tag: "br"
|
|
50012
50010
|
}];
|
|
50013
50011
|
});
|
|
50014
50012
|
children.push.apply(children, _toConsumableArray(tags));
|
|
@@ -50067,8 +50065,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
|
50067
50065
|
src: Internal.convertFileSource(sourceNode).url,
|
|
50068
50066
|
width: (_sourceNode$metadata = sourceNode.metadata) === null || _sourceNode$metadata === void 0 ? void 0 : _sourceNode$metadata.width,
|
|
50069
50067
|
height: (_sourceNode$metadata2 = sourceNode.metadata) === null || _sourceNode$metadata2 === void 0 ? void 0 : _sourceNode$metadata2.height,
|
|
50070
|
-
mimeType: (_sourceNode$metadata3 = sourceNode.metadata) === null || _sourceNode$metadata3 === void 0 ? void 0 : _sourceNode$metadata3.mimeType
|
|
50071
|
-
children: []
|
|
50068
|
+
mimeType: (_sourceNode$metadata3 = sourceNode.metadata) === null || _sourceNode$metadata3 === void 0 ? void 0 : _sourceNode$metadata3.mimeType
|
|
50072
50069
|
});
|
|
50073
50070
|
}
|
|
50074
50071
|
cursor = subCursor;
|
|
@@ -50077,8 +50074,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
|
50077
50074
|
if (token.text.trim().match(br_html_regex)) {
|
|
50078
50075
|
var _tokens;
|
|
50079
50076
|
children.push({
|
|
50080
|
-
tag: "br"
|
|
50081
|
-
children: []
|
|
50077
|
+
tag: "br"
|
|
50082
50078
|
});
|
|
50083
50079
|
if (((_tokens = tokens[cursor + 1]) === null || _tokens === void 0 ? void 0 : _tokens.raw.trim()) === "") {
|
|
50084
50080
|
cursor++;
|
|
@@ -50096,8 +50092,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
|
50096
50092
|
}
|
|
50097
50093
|
} else if (token.type === "br") {
|
|
50098
50094
|
children.push({
|
|
50099
|
-
tag: "br"
|
|
50100
|
-
children: []
|
|
50095
|
+
tag: "br"
|
|
50101
50096
|
});
|
|
50102
50097
|
} else {
|
|
50103
50098
|
console.error("Could not parse markdown: unsupported token type: ".concat(token.type, ". Found: ").concat(token.raw));
|
package/dist/valbuild-ui.esm.js
CHANGED
|
@@ -39828,7 +39828,7 @@ function ValWindow({
|
|
|
39828
39828
|
"div",
|
|
39829
39829
|
{
|
|
39830
39830
|
ref: dragRef,
|
|
39831
|
-
className: "relative flex items-center justify-center px-2 py-
|
|
39831
|
+
className: "relative flex items-center justify-center px-2 py-2 text-primary",
|
|
39832
39832
|
onTouchStart: (ev) => {
|
|
39833
39833
|
var _a;
|
|
39834
39834
|
const touch = (_a = ev.changedTouches) == null ? void 0 : _a[0];
|
|
@@ -39852,7 +39852,7 @@ function ValWindow({
|
|
|
39852
39852
|
}
|
|
39853
39853
|
},
|
|
39854
39854
|
children: [
|
|
39855
|
-
isDrawer ? /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 -translate-x-1/2 h-[8px] w-[80px] top-4 bg-primary rounded-lg" }) : /* @__PURE__ */ jsx(
|
|
39855
|
+
isDrawer ? /* @__PURE__ */ jsx("div", { className: "py-6", children: /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 -translate-x-1/2 h-[8px] w-[80px] top-4 bg-primary rounded-lg" }) }) : /* @__PURE__ */ jsx(
|
|
39856
39856
|
AlignJustify,
|
|
39857
39857
|
{
|
|
39858
39858
|
size: 16,
|
|
@@ -49985,12 +49985,10 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
|
49985
49985
|
return [];
|
|
49986
49986
|
if (line === "")
|
|
49987
49987
|
return {
|
|
49988
|
-
tag: "br"
|
|
49989
|
-
children: []
|
|
49988
|
+
tag: "br"
|
|
49990
49989
|
};
|
|
49991
49990
|
return [line, {
|
|
49992
|
-
tag: "br"
|
|
49993
|
-
children: []
|
|
49991
|
+
tag: "br"
|
|
49994
49992
|
}];
|
|
49995
49993
|
});
|
|
49996
49994
|
children.push.apply(children, _toConsumableArray(tags));
|
|
@@ -50049,8 +50047,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
|
50049
50047
|
src: Internal.convertFileSource(sourceNode).url,
|
|
50050
50048
|
width: (_sourceNode$metadata = sourceNode.metadata) === null || _sourceNode$metadata === void 0 ? void 0 : _sourceNode$metadata.width,
|
|
50051
50049
|
height: (_sourceNode$metadata2 = sourceNode.metadata) === null || _sourceNode$metadata2 === void 0 ? void 0 : _sourceNode$metadata2.height,
|
|
50052
|
-
mimeType: (_sourceNode$metadata3 = sourceNode.metadata) === null || _sourceNode$metadata3 === void 0 ? void 0 : _sourceNode$metadata3.mimeType
|
|
50053
|
-
children: []
|
|
50050
|
+
mimeType: (_sourceNode$metadata3 = sourceNode.metadata) === null || _sourceNode$metadata3 === void 0 ? void 0 : _sourceNode$metadata3.mimeType
|
|
50054
50051
|
});
|
|
50055
50052
|
}
|
|
50056
50053
|
cursor = subCursor;
|
|
@@ -50059,8 +50056,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
|
50059
50056
|
if (token.text.trim().match(br_html_regex)) {
|
|
50060
50057
|
var _tokens;
|
|
50061
50058
|
children.push({
|
|
50062
|
-
tag: "br"
|
|
50063
|
-
children: []
|
|
50059
|
+
tag: "br"
|
|
50064
50060
|
});
|
|
50065
50061
|
if (((_tokens = tokens[cursor + 1]) === null || _tokens === void 0 ? void 0 : _tokens.raw.trim()) === "") {
|
|
50066
50062
|
cursor++;
|
|
@@ -50078,8 +50074,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
|
50078
50074
|
}
|
|
50079
50075
|
} else if (token.type === "br") {
|
|
50080
50076
|
children.push({
|
|
50081
|
-
tag: "br"
|
|
50082
|
-
children: []
|
|
50077
|
+
tag: "br"
|
|
50083
50078
|
});
|
|
50084
50079
|
} else {
|
|
50085
50080
|
console.error("Could not parse markdown: unsupported token type: ".concat(token.type, ". Found: ").concat(token.raw));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valbuild/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"typecheck": "tsc --noEmit",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@remirror/pm": "^2.0.8",
|
|
42
42
|
"@remirror/react": "^2.0.35",
|
|
43
43
|
"@remirror/styles": "^2.0.7",
|
|
44
|
-
"@valbuild/core": "~0.
|
|
45
|
-
"@valbuild/shared": "~0.
|
|
44
|
+
"@valbuild/core": "~0.58.0",
|
|
45
|
+
"@valbuild/shared": "~0.58.0",
|
|
46
46
|
"class-variance-authority": "^0.7.0",
|
|
47
47
|
"classnames": "^2.3.2",
|
|
48
48
|
"clsx": "^2.0.0",
|
|
@@ -157,7 +157,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
157
157
|
`}return $n($n($n($n({},sn,"richtext"),"templateStrings",n),"exprs",r),"files",e)}function CS(t){var e,n=((e=t.marks)===null||e===void 0?void 0:e.flatMap(function(s){return s.type==="bold"?["bold"]:s.type==="italic"?["italic"]:s.type==="strike"?["line-through"]:[]}))||[],r=t.text.trimStart(),o=t.text.length-r.length;r=r.trimEnd();var i=t.text.length-r.length-o;return n.includes("bold")&&n.includes("italic")?r="***".concat(r,"***"):n.includes("bold")?r="**".concat(r,"**"):n.includes("italic")&&(r="_".concat(r,"_")),n.includes("line-through")&&(r="~~".concat(r,"~~")),"".concat(" ".repeat(o)).concat(r).concat(" ".repeat(i))}function C0(t,e){if(t.type==="text"){var n,r=(n=t.marks)===null||n===void 0?void 0:n.find(function(i){return i.type==="link"});return(r==null?void 0:r.type)==="link"?{_type:"link",href:r.attrs.href,children:[CS(t)]}:CS(t)}else{if(t.type==="hardBreak")return"<br />";if(t.type==="image")return F8(t,e);var o=t;throw new Error("Unexpected node type: ".concat(JSON.stringify(o)))}}function hM(t,e,n,r){var o,i,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,a=s?"":`
|
|
158
158
|
`,l=["".concat(a).concat(" ".repeat(n)).concat(t)];return((o=e.content)===null||o===void 0||(o=o[0])===null||o===void 0?void 0:o.type)==="bulletList"||((i=e.content)===null||i===void 0||(i=i[0])===null||i===void 0?void 0:i.type)==="orderedList"||l.push(" "),l.concat((e.content||[]).flatMap(function(c,u){return c.type==="bulletList"||c.type==="orderedList"?(c.content||[]).flatMap(function(d){return hM(mM(c),d,n+4,r)}):(c.content||[]).flatMap(function(d){var f,p,m=[];return(f=c.content)!==null&&f!==void 0&&f.length&&((p=c.content)===null||p===void 0?void 0:p.length)>0&&u>0&&m.push(`<br />
|
|
159
159
|
`),m.push(C0(d,r)),m})}))}function mM(t){if(t.type==="bulletList")return"-";if(t.type==="orderedList")return"1.";var e=t;throw new Error("Unhandled list node: ".concat(JSON.stringify(e)))}var z8=new TextEncoder;function F8(t,e){if(t.attrs&&t.attrs.src.startsWith("data:")){var n=yt.getSHA256Hash(z8.encode(t.attrs.src)),r=hg(t.attrs.src);if(r===void 0)throw new Error("Could not detect Mime Type for image: ".concat(t.attrs.src));var o=mg(r),i=t.attrs.fileName||"".concat(n,".").concat(o),s="/public/".concat(i);return e[s]=t.attrs.src,$n($n($n($n({},sn,"file"),gn,s),gk,xk),"metadata",{width:typeof t.attrs.width=="number"?t.attrs.width:0,height:typeof t.attrs.height=="number"?t.attrs.height:0,sha256:n||"",mimeType:r})}else if(t.attrs){var a=B8("sha256",t.attrs.src),l=t.attrs.src.split("?")[0];return $n($n($n($n({},sn,"file"),gn,"/public".concat(t.attrs.src.split("?")[0])),gk,xk),"metadata",{width:typeof t.attrs.width=="number"?t.attrs.width:0,height:typeof t.attrs.height=="number"?t.attrs.height:0,sha256:a||"",mimeType:l&&I8(l)||""})}else throw new Error("Invalid image node (no attrs): "+JSON.stringify(t))}function B8(t,e){var n=e.split("?");if(!(n.length<2)){var r=n[1],o=new URLSearchParams(r);if(o.has(t))return o.get(t)}}var qh='<val value="',T0='">',O0="</val>";function Go(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=[];function i(l,c){var u=Go(l.tokens?l.tokens:[],e,0);o.push({tag:"span",classes:[c].concat(u.children.flatMap(function(d){return typeof d=="string"?[]:d.classes})),children:u.children.flatMap(function(d){return typeof d=="string"?d:d.children})})}for(var s=function(){var c=t[n];if(c.type==="heading")o.push({tag:"h".concat(c.depth),children:Go(c.tokens?c.tokens:[],e,0).children});else if(c.type==="paragraph")o.push({tag:"p",children:Go(c.tokens?c.tokens:[],e,0).children});else if(c.type==="strong")i(c,"bold");else if(c.type==="em")i(c,"italic");else if(c.type==="del")i(c,"line-through");else if(c.type==="text")if("tokens"in c&&Array.isArray(c.tokens))o.push.apply(o,Wd(Go(c.tokens,e,n,r).children));else if(r&&typeof c.raw=="string"){var u=c.raw.split(`
|
|
160
|
-
`),d=u.flatMap(function(E,C){return C===u.length-1?[E]:C===u.length-1&&E===""?[]:E===""?{tag:"br",children:[]}:[E,{tag:"br",children:[]}]});o.push.apply(o,Wd(d))}else o.push(c.raw);else if(c.type==="list")o.push({tag:c.ordered?"ol":"ul",children:Go(c.items,e,0).children});else if(c.type==="list_item")o.push({tag:"li",children:Go(c.tokens?c.tokens:[],e,0,!0).children});else if(c.type!=="space")if(c.type==="html"){if(c.text===O0)return{v:{children:o,cursor:n}};var f=c.text.indexOf(T0);if(c.text.startsWith(qh)&&f>-1){var p=Number(c.text.slice(qh.length,f));if(Number.isNaN(p))throw Error("Illegal val intermediate node: ".concat(JSON.stringify(c)));var m=Go(t.map(function(E){return E.type==="link"||E.type==="list"?{type:"text",raw:E.raw,text:E.raw}:E}),e,n+1),g=m.children,y=m.cursor,v=e[p];if(v._type==="link")o.push({tag:"a",href:v.href,children:g});else if(v._type==="file"){var x,w,S;o.push({tag:"img",src:yt.convertFileSource(v).url,width:(x=v.metadata)===null||x===void 0?void 0:x.width,height:(w=v.metadata)===null||w===void 0?void 0:w.height,mimeType:(S=v.metadata)===null||S===void 0?void 0:S.mimeType,children:[]})}n=y}var _=/<br\s*\/?>/gi;if(c.text.trim().match(_)){var k;o.push({tag:"br",children:[]}),((k=t[n+1])===null||k===void 0?void 0:k.raw.trim())===""&&n++}}else c.type==="link"?c.raw===c.href?o.push(c.raw):o.push({tag:"a",href:c.href,children:Go(c.tokens?c.tokens:[],e,0).children}):c.type==="br"?o.push({tag:"br",children:[]}):console.error("Could not parse markdown: unsupported token type: ".concat(c.type,". Found: ").concat(c.raw));n++},a;n<t.length;)if(a=s(),a)return a.v;return{children:o,cursor:n}}function gM(t){var e=t.templateStrings,n=t.exprs,r=e.flatMap(function(l,c){var u=n[c];return u?u[sn]==="link"?l.concat("".concat(qh).concat(c).concat(T0).concat(u.children[0]).concat(O0)):l.concat("".concat(qh).concat(c).concat(T0).concat(O0)):l}).join(""),o=S8(r,{gfm:!0}),i=Go(o,n,0),s=i.children,a=i.cursor;if(a!==o.length)throw Error("Unexpectedly terminated markdown parsing. Possible reason: unclosed html tag?");return $n($n({},sn,"richtext"),"children",s)}var vM=j.object({type:j.union([j.literal("bold"),j.literal("strike"),j.literal("italic")])}),U8=j.object({type:j.literal("link"),attrs:j.object({href:j.string(),target:j.union([j.literal("_blank"),j.null()]),auto:j.boolean()})}),yM=j.intersection(j.object({type:j.literal("text"),text:j.string()}),j.object({marks:j.array(j.union([vM,U8]))}).partial()),xM=j.intersection(j.object({type:j.literal("hardBreak")}),j.object({marks:j.array(vM)}).partial()),V8=j.intersection(j.object({type:j.literal("image")}),j.object({attrs:j.intersection(j.object({src:j.string()}),j.object({align:j.union([j.literal("center"),j.literal("end"),j.literal("justify"),j.literal("left"),j.literal("match-parent"),j.literal("right"),j.literal("start"),j.null()]),alt:j.union([j.string(),j.null()]),height:j.union([j.string(),j.number(),j.null()]),width:j.union([j.string(),j.number(),j.null()]),rotate:j.union([j.string(),j.null()]),title:j.union([j.string(),j.null()]),fileName:j.union([j.string(),j.null()])}).partial())}).partial()),H8=j.intersection(j.object({type:j.literal("heading")}),j.object({attrs:j.object({level:j.number()}),content:j.array(j.union([yM,xM]))}).partial()),bM=j.lazy(function(){return j.intersection(j.object({type:j.literal("bulletList")}),j.object({content:j.array(kM)}).partial())}),wM=j.lazy(function(){return j.intersection(j.object({type:j.literal("orderedList")}),j.object({content:j.array(kM)}).partial())}),kM=j.lazy(function(){return j.intersection(j.object({type:j.literal("listItem")}),j.object({content:j.array(j.union([SM,bM,wM]))}).partial())}),SM=j.intersection(j.object({type:j.literal("paragraph")}),j.object({content:j.array(j.union([yM,V8,xM]))}).partial()),W8=j.object({type:j.literal("doc"),content:j.array(j.union([SM,H8,bM,wM]))});function TS(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function OS(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?TS(Object(n),!0).forEach(function(r){$n(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):TS(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function K8(t){return{type:"doc",content:t.children.map(function(e){return q8(e)})}}function q8(t){switch(t.tag){case"h1":return hl(1,t.children);case"h2":return hl(2,t.children);case"h3":return hl(3,t.children);case"h4":return hl(4,t.children);case"h5":return hl(5,t.children);case"h6":return hl(6,t.children);case"p":return MS(t.children);case"ul":return CM(t);case"ol":return TM(t);case"br":return MS([t]);default:{var e=t;throw Error("Unexpected child node: "+JSON.stringify(e))}}}function hl(t,e){return{type:"heading",attrs:{level:t},content:e.flatMap(EM)}}function gg(t){return{type:"text",text:t}}function EM(t){return typeof t=="string"?[gg(t)]:H1(t)}function H1(t){if(t.classes.length===0&&t.children.length===1){if(typeof t.children[0]=="string")return[gg(t.children[0])];throw Error("Unexpected amount of children in span node: "+JSON.stringify(t,null,2))}return t.children.map(function(e){return{type:"text",text:e,marks:t.classes.map(function(n){switch(n){case"bold":return{type:"bold"};case"italic":return{type:"italic"};case"line-through":return{type:"strike"};default:{var r=n;throw Error("Unexpected span class: "+r)}}})}})}function MS(t){return{type:"paragraph",content:t.flatMap(function(e){if(typeof e=="string")return[gg(e)];switch(e.tag){case"span":return H1(e);case"a":return _M(e);case"img":return[Y8(e)];case"br":return[G8()];default:{var n=e;throw Error("Unexpected paragraph child: "+JSON.stringify(n))}}})}}function G8(){return{type:"hardBreak",marks:[]}}function _M(t){return t.children.flatMap(EM).map(function(e){return OS(OS({},e),{},{marks:(e.marks||[]).concat({type:"link",attrs:{href:t.href,auto:!1,target:null}})})})}function Y8(t){return{type:"image",attrs:{height:t.height,width:t.width,src:t.src}}}function CM(t){return{type:"bulletList",content:t.children.map(OM)}}function TM(t){return{type:"orderedList",content:t.children.map(OM)}}function OM(t){return{type:"listItem",content:Z8(t.children)}}function Z8(t){var e=[],n=fM(t),r;try{for(n.s();!(r=n.n()).done;){var o=r.value,i=e[e.length-1];i||(i={type:"paragraph",content:[]},e.push(i));var s=i.content;if(typeof o=="string")s.push(gg(o));else switch(o.tag){case"a":{s.push.apply(s,Wd(_M(o)));break}case"br":{e.push({type:"paragraph",content:[]});break}case"span":{s.push.apply(s,Wd(H1(o)));break}case"ol":{e.push(TM(o));break}case"ul":{e.push(CM(o));break}default:{var a=o;throw Error("Unexpected list item child: "+JSON.stringify(a))}}}}catch(l){n.e(l)}finally{n.f()}return e}const J8=new TextEncoder;function MM(t){return new Promise((e,n)=>{var i;const r=(i=t.currentTarget.files)==null?void 0:i[0],o=new FileReader;o.addEventListener("load",()=>{const s=o.result;if(typeof s=="string"){const a=new Image;a.addEventListener("load",()=>{const l=yt.getSHA256Hash(J8.encode(s));if(a.naturalWidth&&a.naturalHeight){const c=hg(s);e({src:s,width:a.naturalWidth,height:a.naturalHeight,filename:r==null?void 0:r.name,sha256:l,mimeType:c,fileExt:c&&mg(c)})}else e({src:s,filename:r==null?void 0:r.name,sha256:l})}),a.src=s}else n(s?{message:"Unexpected image result type",result:s}:{message:"Empty result"})}),r&&o.readAsDataURL(r)})}function RM(t,e,n){if(!n||!t)return e;const r=n.sha256.slice(0,5),o=hg(t)??"unknown",i=mg(o)??"unknown";if(e){let s=e.split(".").slice(0,-1).join(".")||e;const a=s.lastIndexOf("_");return s.slice(a+1,s.length)===r&&(s=s.slice(0,a)),`${encodeURIComponent(s).replace(/%[0-9A-Fa-f]{2}/g,"").toLowerCase()}_${r}.${i}`}return`${n.sha256}.${i}`}const W1=h.forwardRef(({className:t,type:e,...n},r)=>b.jsx("input",{type:e,className:ze("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...n}));W1.displayName="Input";const X8=h.forwardRef((t,e)=>h.createElement(Re.span,z({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),Q8=[" ","Enter","ArrowUp","ArrowDown"],e9=[" ","Enter"],vg="Select",[yg,K1,t9]=dg(vg),[Fc,Joe]=Lr(vg,[t9,jc]),q1=jc(),[n9,Qa]=Fc(vg),[r9,o9]=Fc(vg),i9=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:p}=t,m=q1(e),[g,y]=h.useState(null),[v,x]=h.useState(null),[w,S]=h.useState(!1),_=_f(c),[k=!1,E]=Ao({prop:r,defaultProp:o,onChange:i}),[C,T]=Ao({prop:s,defaultProp:a,onChange:l}),A=h.useRef(null),B=g?!!g.closest("form"):!0,[D,Z]=h.useState(new Set),U=Array.from(D).map(G=>G.props.value).join(";");return h.createElement(R1,m,h.createElement(n9,{required:p,scope:e,trigger:g,onTriggerChange:y,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:S,contentId:ao(),value:C,onValueChange:T,open:k,onOpenChange:E,dir:_,triggerPointerDownPosRef:A,disabled:f},h.createElement(yg.Provider,{scope:e},h.createElement(r9,{scope:t.__scopeSelect,onNativeOptionAdd:h.useCallback(G=>{Z(R=>new Set(R).add(G))},[]),onNativeOptionRemove:h.useCallback(G=>{Z(R=>{const N=new Set(R);return N.delete(G),N})},[])},n)),B?h.createElement(AM,{key:U,"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:C,onChange:G=>T(G.target.value),disabled:f},C===void 0?h.createElement("option",{value:""}):null,Array.from(D)):null))},s9="SelectTrigger",a9=h.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...o}=t,i=q1(n),s=Qa(s9,n),a=s.disabled||r,l=We(e,s.onTriggerChange),c=K1(n),[u,d,f]=IM(m=>{const g=c().filter(x=>!x.disabled),y=g.find(x=>x.value===s.value),v=DM(g,m,y);v!==void 0&&s.onValueChange(v.value)}),p=()=>{a||(s.onOpenChange(!0),f())};return h.createElement(N1,z({asChild:!0},i),h.createElement(Re.button,z({type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":$M(s.value)?"":void 0},o,{ref:l,onClick:se(o.onClick,m=>{m.currentTarget.focus()}),onPointerDown:se(o.onPointerDown,m=>{const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(p(),s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)},m.preventDefault())}),onKeyDown:se(o.onKeyDown,m=>{const g=u.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&d(m.key),!(g&&m.key===" ")&&Q8.includes(m.key)&&(p(),m.preventDefault())})})))}),l9="SelectValue",c9=h.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=t,l=Qa(l9,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=We(e,l.onValueNodeChange);return hr(()=>{c(u)},[c,u]),h.createElement(Re.span,z({},a,{ref:d,style:{pointerEvents:"none"}}),$M(l.value)?h.createElement(h.Fragment,null,s):i)}),u9=h.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...o}=t;return h.createElement(Re.span,z({"aria-hidden":!0},o,{ref:e}),r||"▼")}),d9=t=>h.createElement(sg,z({asChild:!0},t)),yc="SelectContent",f9=h.forwardRef((t,e)=>{const n=Qa(yc,t.__scopeSelect),[r,o]=h.useState();if(hr(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Vo.createPortal(h.createElement(NM,{scope:t.__scopeSelect},h.createElement(yg.Slot,{scope:t.__scopeSelect},h.createElement("div",null,t.children))),i):null}return h.createElement(p9,z({},t,{ref:e}))}),Qo=10,[NM,xg]=Fc(yc),p9=h.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:y,...v}=t,x=Qa(yc,n),[w,S]=h.useState(null),[_,k]=h.useState(null),E=We(e,ne=>S(ne)),[C,T]=h.useState(null),[A,B]=h.useState(null),D=K1(n),[Z,U]=h.useState(!1),G=h.useRef(!1);h.useEffect(()=>{if(w)return ag(w)},[w]),ng();const R=h.useCallback(ne=>{const[et,...tt]=D().map(Ke=>Ke.ref.current),[nt]=tt.slice(-1),Te=document.activeElement;for(const Ke of ne)if(Ke===Te||(Ke==null||Ke.scrollIntoView({block:"nearest"}),Ke===et&&_&&(_.scrollTop=0),Ke===nt&&_&&(_.scrollTop=_.scrollHeight),Ke==null||Ke.focus(),document.activeElement!==Te))return},[D,_]),N=h.useCallback(()=>R([C,w]),[R,C,w]);h.useEffect(()=>{Z&&N()},[Z,N]);const{onOpenChange:O,triggerPointerDownPosRef:P}=x;h.useEffect(()=>{if(w){let ne={x:0,y:0};const et=nt=>{var Te,Ke,bn,Rn;ne={x:Math.abs(Math.round(nt.pageX)-((Te=(Ke=P.current)===null||Ke===void 0?void 0:Ke.x)!==null&&Te!==void 0?Te:0)),y:Math.abs(Math.round(nt.pageY)-((bn=(Rn=P.current)===null||Rn===void 0?void 0:Rn.y)!==null&&bn!==void 0?bn:0))}},tt=nt=>{ne.x<=10&&ne.y<=10?nt.preventDefault():w.contains(nt.target)||O(!1),document.removeEventListener("pointermove",et),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",et),document.addEventListener("pointerup",tt,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",et),document.removeEventListener("pointerup",tt,{capture:!0})}}},[w,O,P]),h.useEffect(()=>{const ne=()=>O(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[O]);const[I,H]=IM(ne=>{const et=D().filter(Te=>!Te.disabled),tt=et.find(Te=>Te.ref.current===document.activeElement),nt=DM(et,ne,tt);nt&&setTimeout(()=>nt.ref.current.focus())}),le=h.useCallback((ne,et,tt)=>{const nt=!G.current&&!tt;(x.value!==void 0&&x.value===et||nt)&&(T(ne),nt&&(G.current=!0))},[x.value]),Le=h.useCallback(()=>w==null?void 0:w.focus(),[w]),Ee=h.useCallback((ne,et,tt)=>{const nt=!G.current&&!tt;(x.value!==void 0&&x.value===et||nt)&&B(ne)},[x.value]),Je=r==="popper"?RS:h9,Ae=Je===RS?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:y}:{};return h.createElement(NM,{scope:n,content:w,viewport:_,onViewportChange:k,itemRefCallback:le,selectedItem:C,onItemLeave:Le,itemTextRefCallback:Ee,focusSelectedItem:N,selectedItemText:A,position:r,isPositioned:Z,searchRef:I},h.createElement(cg,{as:mi,allowPinchZoom:!0},h.createElement(rg,{asChild:!0,trapped:x.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:se(o,ne=>{var et;(et=x.trigger)===null||et===void 0||et.focus({preventScroll:!0}),ne.preventDefault()})},h.createElement(tg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>x.onOpenChange(!1)},h.createElement(Je,z({role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:ne=>ne.preventDefault()},v,Ae,{onPlaced:()=>U(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:se(v.onKeyDown,ne=>{const et=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!et&&ne.key.length===1&&H(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let nt=D().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(nt=nt.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Te=ne.target,Ke=nt.indexOf(Te);nt=nt.slice(Ke+1)}setTimeout(()=>R(nt)),ne.preventDefault()}})}))))))}),h9=h.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...o}=t,i=Qa(yc,n),s=xg(yc,n),[a,l]=h.useState(null),[c,u]=h.useState(null),d=We(e,E=>u(E)),f=K1(n),p=h.useRef(!1),m=h.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:v,focusSelectedItem:x}=s,w=h.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&g&&y&&v){const E=i.trigger.getBoundingClientRect(),C=c.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),A=v.getBoundingClientRect();if(i.dir!=="rtl"){const Te=A.left-C.left,Ke=T.left-Te,bn=E.left-Ke,Rn=E.width+bn,un=Math.max(Rn,C.width),Mi=window.innerWidth-Qo,Ks=i0(Ke,[Qo,Mi-un]);a.style.minWidth=Rn+"px",a.style.left=Ks+"px"}else{const Te=C.right-A.right,Ke=window.innerWidth-T.right-Te,bn=window.innerWidth-E.right-Ke,Rn=E.width+bn,un=Math.max(Rn,C.width),Mi=window.innerWidth-Qo,Ks=i0(Ke,[Qo,Mi-un]);a.style.minWidth=Rn+"px",a.style.right=Ks+"px"}const B=f(),D=window.innerHeight-Qo*2,Z=g.scrollHeight,U=window.getComputedStyle(c),G=parseInt(U.borderTopWidth,10),R=parseInt(U.paddingTop,10),N=parseInt(U.borderBottomWidth,10),O=parseInt(U.paddingBottom,10),P=G+R+Z+O+N,I=Math.min(y.offsetHeight*5,P),H=window.getComputedStyle(g),le=parseInt(H.paddingTop,10),Le=parseInt(H.paddingBottom,10),Ee=E.top+E.height/2-Qo,Je=D-Ee,Ae=y.offsetHeight/2,ne=y.offsetTop+Ae,et=G+R+ne,tt=P-et;if(et<=Ee){const Te=y===B[B.length-1].ref.current;a.style.bottom="0px";const Ke=c.clientHeight-g.offsetTop-g.offsetHeight,bn=Math.max(Je,Ae+(Te?Le:0)+Ke+N),Rn=et+bn;a.style.height=Rn+"px"}else{const Te=y===B[0].ref.current;a.style.top="0px";const bn=Math.max(Ee,G+g.offsetTop+(Te?le:0)+Ae)+tt;a.style.height=bn+"px",g.scrollTop=et-Ee+g.offsetTop}a.style.margin=`${Qo}px 0`,a.style.minHeight=I+"px",a.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,a,c,g,y,v,i.dir,r]);hr(()=>w(),[w]);const[S,_]=h.useState();hr(()=>{c&&_(window.getComputedStyle(c).zIndex)},[c]);const k=h.useCallback(E=>{E&&m.current===!0&&(w(),x==null||x(),m.current=!1)},[w,x]);return h.createElement(m9,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:k},h.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S}},h.createElement(Re.div,z({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),RS=h.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Qo,...i}=t,s=q1(n);return h.createElement(P1,z({},s,i,{ref:e,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[m9,g9]=Fc(yc,{}),NS="SelectViewport",v9=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,o=xg(NS,n),i=g9(NS,n),s=We(e,o.onViewportChange),a=h.useRef(0);return h.createElement(h.Fragment,null,h.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),h.createElement(yg.Slot,{scope:n},h.createElement(Re.div,z({"data-radix-select-viewport":"",role:"presentation"},r,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:se(r.onScroll,l=>{const c=l.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:d}=i;if(d!=null&&d.current&&u){const f=Math.abs(a.current-c.scrollTop);if(f>0){const p=window.innerHeight-Qo*2,m=parseFloat(u.style.minHeight),g=parseFloat(u.style.height),y=Math.max(m,g);if(y<p){const v=y+f,x=Math.min(p,v),w=v-x;u.style.height=x+"px",u.style.bottom==="0px"&&(c.scrollTop=w>0?w:0,u.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),y9="SelectGroup",[Xoe,x9]=Fc(y9),b9="SelectLabel",w9=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,o=x9(b9,n);return h.createElement(Re.div,z({id:o.id},r,{ref:e}))}),M0="SelectItem",[k9,PM]=Fc(M0),S9=h.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=t,a=Qa(M0,n),l=xg(M0,n),c=a.value===r,[u,d]=h.useState(i??""),[f,p]=h.useState(!1),m=We(e,v=>{var x;return(x=l.itemRefCallback)===null||x===void 0?void 0:x.call(l,v,r,o)}),g=ao(),y=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.createElement(k9,{scope:n,value:r,disabled:o,textId:g,isSelected:c,onItemTextChange:h.useCallback(v=>{d(x=>{var w;return x||((w=v==null?void 0:v.textContent)!==null&&w!==void 0?w:"").trim()})},[])},h.createElement(yg.ItemSlot,{scope:n,value:r,disabled:o,textValue:u},h.createElement(Re.div,z({role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},s,{ref:m,onFocus:se(s.onFocus,()=>p(!0)),onBlur:se(s.onBlur,()=>p(!1)),onPointerUp:se(s.onPointerUp,y),onPointerMove:se(s.onPointerMove,v=>{if(o){var x;(x=l.onItemLeave)===null||x===void 0||x.call(l)}else v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:se(s.onPointerLeave,v=>{if(v.currentTarget===document.activeElement){var x;(x=l.onItemLeave)===null||x===void 0||x.call(l)}}),onKeyDown:se(s.onKeyDown,v=>{var x;((x=l.searchRef)===null||x===void 0?void 0:x.current)!==""&&v.key===" "||(e9.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})}))))}),vp="SelectItemText",E9=h.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:o,...i}=t,s=Qa(vp,n),a=xg(vp,n),l=PM(vp,n),c=o9(vp,n),[u,d]=h.useState(null),f=We(e,v=>d(v),l.onItemTextChange,v=>{var x;return(x=a.itemTextRefCallback)===null||x===void 0?void 0:x.call(a,v,l.value,l.disabled)}),p=u==null?void 0:u.textContent,m=h.useMemo(()=>h.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},p),[l.disabled,l.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=c;return hr(()=>(g(m),()=>y(m)),[g,y,m]),h.createElement(h.Fragment,null,h.createElement(Re.span,z({id:l.textId},i,{ref:f})),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Vo.createPortal(i.children,s.valueNode):null)}),_9="SelectItemIndicator",C9=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return PM(_9,n).isSelected?h.createElement(Re.span,z({"aria-hidden":!0},r,{ref:e})):null}),T9=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return h.createElement(Re.div,z({"aria-hidden":!0},r,{ref:e}))});function $M(t){return t===""||t===void 0}const AM=h.forwardRef((t,e)=>{const{value:n,...r}=t,o=h.useRef(null),i=We(e,o),s=o2(n);return h.useEffect(()=>{const a=o.current,l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==n&&u){const d=new Event("change",{bubbles:!0});u.call(a,n),a.dispatchEvent(d)}},[s,n]),h.createElement(X8,{asChild:!0},h.createElement("select",z({},r,{ref:i,defaultValue:n})))});AM.displayName="BubbleSelect";function IM(t){const e=rn(t),n=h.useRef(""),r=h.useRef(0),o=h.useCallback(s=>{const a=n.current+s;e(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function DM(t,e,n){const o=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let s=O9(t,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function O9(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const M9=i9,LM=a9,R9=c9,N9=u9,P9=d9,jM=f9,$9=v9,zM=w9,FM=S9,A9=E9,I9=C9,BM=T9,UM=M9,VM=R9,G1=h.forwardRef(({className:t,children:e,...n},r)=>b.jsxs(LM,{ref:r,className:ze("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...n,children:[e,b.jsx(N9,{asChild:!0,children:b.jsx(Th,{className:"w-4 h-4 opacity-50"})})]}));G1.displayName=LM.displayName;const Y1=h.forwardRef(({className:t,children:e,position:n="popper",...r},o)=>b.jsx(P9,{children:b.jsx(jM,{ref:o,className:ze("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...r,children:b.jsx($9,{className:ze("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e})})}));Y1.displayName=jM.displayName;const D9=h.forwardRef(({className:t,...e},n)=>b.jsx(zM,{ref:n,className:ze("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));D9.displayName=zM.displayName;const Z1=h.forwardRef(({className:t,children:e,...n},r)=>b.jsxs(FM,{ref:r,className:ze("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(I9,{children:b.jsx(y1,{className:"w-4 h-4"})})}),b.jsx(A9,{children:e})]}));Z1.displayName=FM.displayName;const L9=h.forwardRef(({className:t,...e},n)=>b.jsx(BM,{ref:n,className:ze("-mx-1 my-1 h-px bg-muted",t),...e}));L9.displayName=BM.displayName;let bg=()=>({events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}});var R0={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,o=Error.captureStackTrace;o===void 0&&(o=function(c){var u=new Error;r(c,"stack",{configurable:!0,get:function(){var f=u.stack;return r(this,"stack",{configurable:!0,value:f,writable:!0}),f},set:function(f){r(c,"stack",{configurable:!0,value:f,writable:!0})}})});function i(l){l!==void 0&&r(this,"message",{configurable:!0,value:l,writable:!0});var c=this.constructor.name;c!==void 0&&c!==this.name&&r(this,"name",{configurable:!0,value:c,writable:!0}),o(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var s=function(){function l(u,d){return r(u,"name",{configurable:!0,value:d})}try{var c=function(){};if(l(c,"foo"),c.name==="foo")return l}catch{}}();function a(l,c){if(c==null||c===Error)c=i;else if(typeof c!="function")throw new TypeError("super_ should be a function");var u;if(typeof l=="string")u=l,l=n!==void 0?function(){return n(c,arguments,this.constructor)}:function(){c.apply(this,arguments)},s!==void 0&&(s(l,u),u=void 0);else if(typeof l!="function")throw new TypeError("constructor should be either a string or a function");l.super_=l.super=c;var d={constructor:{configurable:!0,value:l,writable:!0}};return u!==void 0&&(d.name={configurable:!0,value:u,writable:!0}),l.prototype=Object.create(c.prototype,d),l}e=t.exports=a,e.BaseError=i})(R0,R0.exports);var HM=R0.exports,PS="ProseMirror-selectednode",WM="",ss="\0",$S="__state_override__",j9={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},Ie=j9,bi=Symbol.for("__remirror__"),an=(t=>(t.PlainExtension="RemirrorPlainExtension",t.NodeExtension="RemirrorNodeExtension",t.MarkExtension="RemirrorMarkExtension",t.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",t.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",t.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",t.Manager="RemirrorManager",t.Preset="RemirrorPreset",t.PresetConstructor="RemirrorPresetConstructor",t))(an||{}),at=(t=>(t[t.Critical=1e6]="Critical",t[t.Highest=1e5]="Highest",t[t.High=1e4]="High",t[t.Medium=1e3]="Medium",t[t.Default=100]="Default",t[t.Low=10]="Low",t[t.Lowest=0]="Lowest",t))(at||{}),qn=(t=>(t[t.None=0]="None",t[t.Create=1]="Create",t[t.EditorView=2]="EditorView",t[t.Runtime=3]="Runtime",t[t.Destroy=4]="Destroy",t))(qn||{}),q=(t=>(t.Undo="_|undo|_",t.Redo="_|redo|_",t.Bold="_|bold|_",t.Italic="_|italic|_",t.Underline="_|underline|_",t.Strike="_|strike|_",t.Code="_|code|_",t.Paragraph="_|paragraph|_",t.H1="_|h1|_",t.H2="_|h2|_",t.H3="_|h3|_",t.H4="_|h4|_",t.H5="_|h5|_",t.H6="_|h6|_",t.TaskList="_|task|_",t.BulletList="_|bullet|_",t.OrderedList="_|number|_",t.Quote="_|quote|_",t.Divider="_|divider|_",t.Codeblock="_|codeblock|_",t.ClearFormatting="_|clear|_",t.Superscript="_|sup|_",t.Subscript="_|sub|_",t.LeftAlignment="_|left-align|_",t.CenterAlignment="_|center-align|_",t.RightAlignment="_|right-align|_",t.JustifyAlignment="_|justify-align|_",t.InsertLink="_|link|_",t.Find="_|find|_",t.FindBackwards="_|find-backwards|_",t.FindReplace="_|find-replace|_",t.AddFootnote="_|footnote|_",t.AddComment="_|comment|_",t.ContextMenu="_|context-menu|_",t.IncreaseFontSize="_|inc-font-size|_",t.DecreaseFontSize="_|dec-font-size|_",t.IncreaseIndent="_|indent|_",t.DecreaseIndent="_|dedent|_",t.Shortcuts="_|shortcuts|_",t.Copy="_|copy|_",t.Cut="_|cut|_",t.Paste="_|paste|_",t.PastePlain="_|paste-plain|_",t.SelectAll="_|select-all|_",t.Format="_|format|_",t))(q||{}),K=(t=>(t.PROD="RMR0000",t.UNKNOWN="RMR0001",t.INVALID_COMMAND_ARGUMENTS="RMR0002",t.CUSTOM="RMR0003",t.CORE_HELPERS="RMR0004",t.MUTATION="RMR0005",t.INTERNAL="RMR0006",t.MISSING_REQUIRED_EXTENSION="RMR0007",t.MANAGER_PHASE_ERROR="RMR0008",t.INVALID_GET_EXTENSION="RMR0010",t.INVALID_MANAGER_ARGUMENTS="RMR0011",t.SCHEMA="RMR0012",t.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",t.INVALID_MANAGER_EXTENSION="RMR0014",t.DUPLICATE_COMMAND_NAMES="RMR0016",t.DUPLICATE_HELPER_NAMES="RMR0017",t.NON_CHAINABLE_COMMAND="RMR0018",t.INVALID_EXTENSION="RMR0019",t.INVALID_CONTENT="RMR0021",t.INVALID_NAME="RMR0050",t.EXTENSION="RMR0100",t.EXTENSION_SPEC="RMR0101",t.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",t.INVALID_SET_EXTENSION_OPTIONS="RMR0103",t.REACT_PROVIDER_CONTEXT="RMR0200",t.REACT_GET_ROOT_PROPS="RMR0201",t.REACT_EDITOR_VIEW="RMR0202",t.REACT_CONTROLLED="RMR0203",t.REACT_NODE_VIEW="RMR0204",t.REACT_GET_CONTEXT="RMR0205",t.REACT_COMPONENTS="RMR0206",t.REACT_HOOKS="RMR0207",t.I18N_CONTEXT="RMR0300",t))(K||{}),z9=function(e){return F9(e)&&!B9(e)};function F9(t){return!!t&&typeof t=="object"}function B9(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||H9(t)}var U9=typeof Symbol=="function"&&Symbol.for,V9=U9?Symbol.for("react.element"):60103;function H9(t){return t.$$typeof===V9}function W9(t){return Array.isArray(t)?[]:{}}function Kd(t,e){return e.clone!==!1&&e.isMergeableObject(t)?xc(W9(t),t,e):t}function K9(t,e,n){return t.concat(e).map(function(r){return Kd(r,n)})}function q9(t,e){if(!e.customMerge)return xc;var n=e.customMerge(t);return typeof n=="function"?n:xc}function G9(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function AS(t){return Object.keys(t).concat(G9(t))}function KM(t,e){try{return e in t}catch{return!1}}function Y9(t,e){return KM(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Z9(t,e,n){var r={};return n.isMergeableObject(t)&&AS(t).forEach(function(o){r[o]=Kd(t[o],n)}),AS(e).forEach(function(o){Y9(t,o)||(KM(t,o)&&n.isMergeableObject(e[o])?r[o]=q9(o,n)(t[o],e[o],n):r[o]=Kd(e[o],n))}),r}function xc(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||K9,n.isMergeableObject=n.isMergeableObject||z9,n.cloneUnlessOtherwiseSpecified=Kd;var r=Array.isArray(e),o=Array.isArray(t),i=r===o;return i?r?n.arrayMerge(t,e,n):Z9(t,e,n):Kd(e,n)}xc.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,o){return xc(r,o,n)},{})};var J9=xc,X9=J9;const Q9=ki(X9);/*!
|
|
160
|
+
`),d=u.flatMap(function(E,C){return C===u.length-1?[E]:C===u.length-1&&E===""?[]:E===""?{tag:"br"}:[E,{tag:"br"}]});o.push.apply(o,Wd(d))}else o.push(c.raw);else if(c.type==="list")o.push({tag:c.ordered?"ol":"ul",children:Go(c.items,e,0).children});else if(c.type==="list_item")o.push({tag:"li",children:Go(c.tokens?c.tokens:[],e,0,!0).children});else if(c.type!=="space")if(c.type==="html"){if(c.text===O0)return{v:{children:o,cursor:n}};var f=c.text.indexOf(T0);if(c.text.startsWith(qh)&&f>-1){var p=Number(c.text.slice(qh.length,f));if(Number.isNaN(p))throw Error("Illegal val intermediate node: ".concat(JSON.stringify(c)));var m=Go(t.map(function(E){return E.type==="link"||E.type==="list"?{type:"text",raw:E.raw,text:E.raw}:E}),e,n+1),g=m.children,y=m.cursor,v=e[p];if(v._type==="link")o.push({tag:"a",href:v.href,children:g});else if(v._type==="file"){var x,w,S;o.push({tag:"img",src:yt.convertFileSource(v).url,width:(x=v.metadata)===null||x===void 0?void 0:x.width,height:(w=v.metadata)===null||w===void 0?void 0:w.height,mimeType:(S=v.metadata)===null||S===void 0?void 0:S.mimeType})}n=y}var _=/<br\s*\/?>/gi;if(c.text.trim().match(_)){var k;o.push({tag:"br"}),((k=t[n+1])===null||k===void 0?void 0:k.raw.trim())===""&&n++}}else c.type==="link"?c.raw===c.href?o.push(c.raw):o.push({tag:"a",href:c.href,children:Go(c.tokens?c.tokens:[],e,0).children}):c.type==="br"?o.push({tag:"br"}):console.error("Could not parse markdown: unsupported token type: ".concat(c.type,". Found: ").concat(c.raw));n++},a;n<t.length;)if(a=s(),a)return a.v;return{children:o,cursor:n}}function gM(t){var e=t.templateStrings,n=t.exprs,r=e.flatMap(function(l,c){var u=n[c];return u?u[sn]==="link"?l.concat("".concat(qh).concat(c).concat(T0).concat(u.children[0]).concat(O0)):l.concat("".concat(qh).concat(c).concat(T0).concat(O0)):l}).join(""),o=S8(r,{gfm:!0}),i=Go(o,n,0),s=i.children,a=i.cursor;if(a!==o.length)throw Error("Unexpectedly terminated markdown parsing. Possible reason: unclosed html tag?");return $n($n({},sn,"richtext"),"children",s)}var vM=j.object({type:j.union([j.literal("bold"),j.literal("strike"),j.literal("italic")])}),U8=j.object({type:j.literal("link"),attrs:j.object({href:j.string(),target:j.union([j.literal("_blank"),j.null()]),auto:j.boolean()})}),yM=j.intersection(j.object({type:j.literal("text"),text:j.string()}),j.object({marks:j.array(j.union([vM,U8]))}).partial()),xM=j.intersection(j.object({type:j.literal("hardBreak")}),j.object({marks:j.array(vM)}).partial()),V8=j.intersection(j.object({type:j.literal("image")}),j.object({attrs:j.intersection(j.object({src:j.string()}),j.object({align:j.union([j.literal("center"),j.literal("end"),j.literal("justify"),j.literal("left"),j.literal("match-parent"),j.literal("right"),j.literal("start"),j.null()]),alt:j.union([j.string(),j.null()]),height:j.union([j.string(),j.number(),j.null()]),width:j.union([j.string(),j.number(),j.null()]),rotate:j.union([j.string(),j.null()]),title:j.union([j.string(),j.null()]),fileName:j.union([j.string(),j.null()])}).partial())}).partial()),H8=j.intersection(j.object({type:j.literal("heading")}),j.object({attrs:j.object({level:j.number()}),content:j.array(j.union([yM,xM]))}).partial()),bM=j.lazy(function(){return j.intersection(j.object({type:j.literal("bulletList")}),j.object({content:j.array(kM)}).partial())}),wM=j.lazy(function(){return j.intersection(j.object({type:j.literal("orderedList")}),j.object({content:j.array(kM)}).partial())}),kM=j.lazy(function(){return j.intersection(j.object({type:j.literal("listItem")}),j.object({content:j.array(j.union([SM,bM,wM]))}).partial())}),SM=j.intersection(j.object({type:j.literal("paragraph")}),j.object({content:j.array(j.union([yM,V8,xM]))}).partial()),W8=j.object({type:j.literal("doc"),content:j.array(j.union([SM,H8,bM,wM]))});function TS(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function OS(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?TS(Object(n),!0).forEach(function(r){$n(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):TS(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function K8(t){return{type:"doc",content:t.children.map(function(e){return q8(e)})}}function q8(t){switch(t.tag){case"h1":return hl(1,t.children);case"h2":return hl(2,t.children);case"h3":return hl(3,t.children);case"h4":return hl(4,t.children);case"h5":return hl(5,t.children);case"h6":return hl(6,t.children);case"p":return MS(t.children);case"ul":return CM(t);case"ol":return TM(t);case"br":return MS([t]);default:{var e=t;throw Error("Unexpected child node: "+JSON.stringify(e))}}}function hl(t,e){return{type:"heading",attrs:{level:t},content:e.flatMap(EM)}}function gg(t){return{type:"text",text:t}}function EM(t){return typeof t=="string"?[gg(t)]:H1(t)}function H1(t){if(t.classes.length===0&&t.children.length===1){if(typeof t.children[0]=="string")return[gg(t.children[0])];throw Error("Unexpected amount of children in span node: "+JSON.stringify(t,null,2))}return t.children.map(function(e){return{type:"text",text:e,marks:t.classes.map(function(n){switch(n){case"bold":return{type:"bold"};case"italic":return{type:"italic"};case"line-through":return{type:"strike"};default:{var r=n;throw Error("Unexpected span class: "+r)}}})}})}function MS(t){return{type:"paragraph",content:t.flatMap(function(e){if(typeof e=="string")return[gg(e)];switch(e.tag){case"span":return H1(e);case"a":return _M(e);case"img":return[Y8(e)];case"br":return[G8()];default:{var n=e;throw Error("Unexpected paragraph child: "+JSON.stringify(n))}}})}}function G8(){return{type:"hardBreak",marks:[]}}function _M(t){return t.children.flatMap(EM).map(function(e){return OS(OS({},e),{},{marks:(e.marks||[]).concat({type:"link",attrs:{href:t.href,auto:!1,target:null}})})})}function Y8(t){return{type:"image",attrs:{height:t.height,width:t.width,src:t.src}}}function CM(t){return{type:"bulletList",content:t.children.map(OM)}}function TM(t){return{type:"orderedList",content:t.children.map(OM)}}function OM(t){return{type:"listItem",content:Z8(t.children)}}function Z8(t){var e=[],n=fM(t),r;try{for(n.s();!(r=n.n()).done;){var o=r.value,i=e[e.length-1];i||(i={type:"paragraph",content:[]},e.push(i));var s=i.content;if(typeof o=="string")s.push(gg(o));else switch(o.tag){case"a":{s.push.apply(s,Wd(_M(o)));break}case"br":{e.push({type:"paragraph",content:[]});break}case"span":{s.push.apply(s,Wd(H1(o)));break}case"ol":{e.push(TM(o));break}case"ul":{e.push(CM(o));break}default:{var a=o;throw Error("Unexpected list item child: "+JSON.stringify(a))}}}}catch(l){n.e(l)}finally{n.f()}return e}const J8=new TextEncoder;function MM(t){return new Promise((e,n)=>{var i;const r=(i=t.currentTarget.files)==null?void 0:i[0],o=new FileReader;o.addEventListener("load",()=>{const s=o.result;if(typeof s=="string"){const a=new Image;a.addEventListener("load",()=>{const l=yt.getSHA256Hash(J8.encode(s));if(a.naturalWidth&&a.naturalHeight){const c=hg(s);e({src:s,width:a.naturalWidth,height:a.naturalHeight,filename:r==null?void 0:r.name,sha256:l,mimeType:c,fileExt:c&&mg(c)})}else e({src:s,filename:r==null?void 0:r.name,sha256:l})}),a.src=s}else n(s?{message:"Unexpected image result type",result:s}:{message:"Empty result"})}),r&&o.readAsDataURL(r)})}function RM(t,e,n){if(!n||!t)return e;const r=n.sha256.slice(0,5),o=hg(t)??"unknown",i=mg(o)??"unknown";if(e){let s=e.split(".").slice(0,-1).join(".")||e;const a=s.lastIndexOf("_");return s.slice(a+1,s.length)===r&&(s=s.slice(0,a)),`${encodeURIComponent(s).replace(/%[0-9A-Fa-f]{2}/g,"").toLowerCase()}_${r}.${i}`}return`${n.sha256}.${i}`}const W1=h.forwardRef(({className:t,type:e,...n},r)=>b.jsx("input",{type:e,className:ze("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...n}));W1.displayName="Input";const X8=h.forwardRef((t,e)=>h.createElement(Re.span,z({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),Q8=[" ","Enter","ArrowUp","ArrowDown"],e9=[" ","Enter"],vg="Select",[yg,K1,t9]=dg(vg),[Fc,Joe]=Lr(vg,[t9,jc]),q1=jc(),[n9,Qa]=Fc(vg),[r9,o9]=Fc(vg),i9=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:p}=t,m=q1(e),[g,y]=h.useState(null),[v,x]=h.useState(null),[w,S]=h.useState(!1),_=_f(c),[k=!1,E]=Ao({prop:r,defaultProp:o,onChange:i}),[C,T]=Ao({prop:s,defaultProp:a,onChange:l}),A=h.useRef(null),B=g?!!g.closest("form"):!0,[D,Z]=h.useState(new Set),U=Array.from(D).map(G=>G.props.value).join(";");return h.createElement(R1,m,h.createElement(n9,{required:p,scope:e,trigger:g,onTriggerChange:y,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:S,contentId:ao(),value:C,onValueChange:T,open:k,onOpenChange:E,dir:_,triggerPointerDownPosRef:A,disabled:f},h.createElement(yg.Provider,{scope:e},h.createElement(r9,{scope:t.__scopeSelect,onNativeOptionAdd:h.useCallback(G=>{Z(R=>new Set(R).add(G))},[]),onNativeOptionRemove:h.useCallback(G=>{Z(R=>{const N=new Set(R);return N.delete(G),N})},[])},n)),B?h.createElement(AM,{key:U,"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:C,onChange:G=>T(G.target.value),disabled:f},C===void 0?h.createElement("option",{value:""}):null,Array.from(D)):null))},s9="SelectTrigger",a9=h.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...o}=t,i=q1(n),s=Qa(s9,n),a=s.disabled||r,l=We(e,s.onTriggerChange),c=K1(n),[u,d,f]=IM(m=>{const g=c().filter(x=>!x.disabled),y=g.find(x=>x.value===s.value),v=DM(g,m,y);v!==void 0&&s.onValueChange(v.value)}),p=()=>{a||(s.onOpenChange(!0),f())};return h.createElement(N1,z({asChild:!0},i),h.createElement(Re.button,z({type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":$M(s.value)?"":void 0},o,{ref:l,onClick:se(o.onClick,m=>{m.currentTarget.focus()}),onPointerDown:se(o.onPointerDown,m=>{const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(p(),s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)},m.preventDefault())}),onKeyDown:se(o.onKeyDown,m=>{const g=u.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&d(m.key),!(g&&m.key===" ")&&Q8.includes(m.key)&&(p(),m.preventDefault())})})))}),l9="SelectValue",c9=h.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=t,l=Qa(l9,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=We(e,l.onValueNodeChange);return hr(()=>{c(u)},[c,u]),h.createElement(Re.span,z({},a,{ref:d,style:{pointerEvents:"none"}}),$M(l.value)?h.createElement(h.Fragment,null,s):i)}),u9=h.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...o}=t;return h.createElement(Re.span,z({"aria-hidden":!0},o,{ref:e}),r||"▼")}),d9=t=>h.createElement(sg,z({asChild:!0},t)),yc="SelectContent",f9=h.forwardRef((t,e)=>{const n=Qa(yc,t.__scopeSelect),[r,o]=h.useState();if(hr(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Vo.createPortal(h.createElement(NM,{scope:t.__scopeSelect},h.createElement(yg.Slot,{scope:t.__scopeSelect},h.createElement("div",null,t.children))),i):null}return h.createElement(p9,z({},t,{ref:e}))}),Qo=10,[NM,xg]=Fc(yc),p9=h.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:y,...v}=t,x=Qa(yc,n),[w,S]=h.useState(null),[_,k]=h.useState(null),E=We(e,ne=>S(ne)),[C,T]=h.useState(null),[A,B]=h.useState(null),D=K1(n),[Z,U]=h.useState(!1),G=h.useRef(!1);h.useEffect(()=>{if(w)return ag(w)},[w]),ng();const R=h.useCallback(ne=>{const[et,...tt]=D().map(Ke=>Ke.ref.current),[nt]=tt.slice(-1),Te=document.activeElement;for(const Ke of ne)if(Ke===Te||(Ke==null||Ke.scrollIntoView({block:"nearest"}),Ke===et&&_&&(_.scrollTop=0),Ke===nt&&_&&(_.scrollTop=_.scrollHeight),Ke==null||Ke.focus(),document.activeElement!==Te))return},[D,_]),N=h.useCallback(()=>R([C,w]),[R,C,w]);h.useEffect(()=>{Z&&N()},[Z,N]);const{onOpenChange:O,triggerPointerDownPosRef:P}=x;h.useEffect(()=>{if(w){let ne={x:0,y:0};const et=nt=>{var Te,Ke,bn,Rn;ne={x:Math.abs(Math.round(nt.pageX)-((Te=(Ke=P.current)===null||Ke===void 0?void 0:Ke.x)!==null&&Te!==void 0?Te:0)),y:Math.abs(Math.round(nt.pageY)-((bn=(Rn=P.current)===null||Rn===void 0?void 0:Rn.y)!==null&&bn!==void 0?bn:0))}},tt=nt=>{ne.x<=10&&ne.y<=10?nt.preventDefault():w.contains(nt.target)||O(!1),document.removeEventListener("pointermove",et),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",et),document.addEventListener("pointerup",tt,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",et),document.removeEventListener("pointerup",tt,{capture:!0})}}},[w,O,P]),h.useEffect(()=>{const ne=()=>O(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[O]);const[I,H]=IM(ne=>{const et=D().filter(Te=>!Te.disabled),tt=et.find(Te=>Te.ref.current===document.activeElement),nt=DM(et,ne,tt);nt&&setTimeout(()=>nt.ref.current.focus())}),le=h.useCallback((ne,et,tt)=>{const nt=!G.current&&!tt;(x.value!==void 0&&x.value===et||nt)&&(T(ne),nt&&(G.current=!0))},[x.value]),Le=h.useCallback(()=>w==null?void 0:w.focus(),[w]),Ee=h.useCallback((ne,et,tt)=>{const nt=!G.current&&!tt;(x.value!==void 0&&x.value===et||nt)&&B(ne)},[x.value]),Je=r==="popper"?RS:h9,Ae=Je===RS?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:y}:{};return h.createElement(NM,{scope:n,content:w,viewport:_,onViewportChange:k,itemRefCallback:le,selectedItem:C,onItemLeave:Le,itemTextRefCallback:Ee,focusSelectedItem:N,selectedItemText:A,position:r,isPositioned:Z,searchRef:I},h.createElement(cg,{as:mi,allowPinchZoom:!0},h.createElement(rg,{asChild:!0,trapped:x.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:se(o,ne=>{var et;(et=x.trigger)===null||et===void 0||et.focus({preventScroll:!0}),ne.preventDefault()})},h.createElement(tg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>x.onOpenChange(!1)},h.createElement(Je,z({role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:ne=>ne.preventDefault()},v,Ae,{onPlaced:()=>U(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:se(v.onKeyDown,ne=>{const et=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!et&&ne.key.length===1&&H(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let nt=D().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(nt=nt.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Te=ne.target,Ke=nt.indexOf(Te);nt=nt.slice(Ke+1)}setTimeout(()=>R(nt)),ne.preventDefault()}})}))))))}),h9=h.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...o}=t,i=Qa(yc,n),s=xg(yc,n),[a,l]=h.useState(null),[c,u]=h.useState(null),d=We(e,E=>u(E)),f=K1(n),p=h.useRef(!1),m=h.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:v,focusSelectedItem:x}=s,w=h.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&g&&y&&v){const E=i.trigger.getBoundingClientRect(),C=c.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),A=v.getBoundingClientRect();if(i.dir!=="rtl"){const Te=A.left-C.left,Ke=T.left-Te,bn=E.left-Ke,Rn=E.width+bn,un=Math.max(Rn,C.width),Mi=window.innerWidth-Qo,Ks=i0(Ke,[Qo,Mi-un]);a.style.minWidth=Rn+"px",a.style.left=Ks+"px"}else{const Te=C.right-A.right,Ke=window.innerWidth-T.right-Te,bn=window.innerWidth-E.right-Ke,Rn=E.width+bn,un=Math.max(Rn,C.width),Mi=window.innerWidth-Qo,Ks=i0(Ke,[Qo,Mi-un]);a.style.minWidth=Rn+"px",a.style.right=Ks+"px"}const B=f(),D=window.innerHeight-Qo*2,Z=g.scrollHeight,U=window.getComputedStyle(c),G=parseInt(U.borderTopWidth,10),R=parseInt(U.paddingTop,10),N=parseInt(U.borderBottomWidth,10),O=parseInt(U.paddingBottom,10),P=G+R+Z+O+N,I=Math.min(y.offsetHeight*5,P),H=window.getComputedStyle(g),le=parseInt(H.paddingTop,10),Le=parseInt(H.paddingBottom,10),Ee=E.top+E.height/2-Qo,Je=D-Ee,Ae=y.offsetHeight/2,ne=y.offsetTop+Ae,et=G+R+ne,tt=P-et;if(et<=Ee){const Te=y===B[B.length-1].ref.current;a.style.bottom="0px";const Ke=c.clientHeight-g.offsetTop-g.offsetHeight,bn=Math.max(Je,Ae+(Te?Le:0)+Ke+N),Rn=et+bn;a.style.height=Rn+"px"}else{const Te=y===B[0].ref.current;a.style.top="0px";const bn=Math.max(Ee,G+g.offsetTop+(Te?le:0)+Ae)+tt;a.style.height=bn+"px",g.scrollTop=et-Ee+g.offsetTop}a.style.margin=`${Qo}px 0`,a.style.minHeight=I+"px",a.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,a,c,g,y,v,i.dir,r]);hr(()=>w(),[w]);const[S,_]=h.useState();hr(()=>{c&&_(window.getComputedStyle(c).zIndex)},[c]);const k=h.useCallback(E=>{E&&m.current===!0&&(w(),x==null||x(),m.current=!1)},[w,x]);return h.createElement(m9,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:k},h.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S}},h.createElement(Re.div,z({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),RS=h.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Qo,...i}=t,s=q1(n);return h.createElement(P1,z({},s,i,{ref:e,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[m9,g9]=Fc(yc,{}),NS="SelectViewport",v9=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,o=xg(NS,n),i=g9(NS,n),s=We(e,o.onViewportChange),a=h.useRef(0);return h.createElement(h.Fragment,null,h.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),h.createElement(yg.Slot,{scope:n},h.createElement(Re.div,z({"data-radix-select-viewport":"",role:"presentation"},r,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:se(r.onScroll,l=>{const c=l.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:d}=i;if(d!=null&&d.current&&u){const f=Math.abs(a.current-c.scrollTop);if(f>0){const p=window.innerHeight-Qo*2,m=parseFloat(u.style.minHeight),g=parseFloat(u.style.height),y=Math.max(m,g);if(y<p){const v=y+f,x=Math.min(p,v),w=v-x;u.style.height=x+"px",u.style.bottom==="0px"&&(c.scrollTop=w>0?w:0,u.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),y9="SelectGroup",[Xoe,x9]=Fc(y9),b9="SelectLabel",w9=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,o=x9(b9,n);return h.createElement(Re.div,z({id:o.id},r,{ref:e}))}),M0="SelectItem",[k9,PM]=Fc(M0),S9=h.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=t,a=Qa(M0,n),l=xg(M0,n),c=a.value===r,[u,d]=h.useState(i??""),[f,p]=h.useState(!1),m=We(e,v=>{var x;return(x=l.itemRefCallback)===null||x===void 0?void 0:x.call(l,v,r,o)}),g=ao(),y=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.createElement(k9,{scope:n,value:r,disabled:o,textId:g,isSelected:c,onItemTextChange:h.useCallback(v=>{d(x=>{var w;return x||((w=v==null?void 0:v.textContent)!==null&&w!==void 0?w:"").trim()})},[])},h.createElement(yg.ItemSlot,{scope:n,value:r,disabled:o,textValue:u},h.createElement(Re.div,z({role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},s,{ref:m,onFocus:se(s.onFocus,()=>p(!0)),onBlur:se(s.onBlur,()=>p(!1)),onPointerUp:se(s.onPointerUp,y),onPointerMove:se(s.onPointerMove,v=>{if(o){var x;(x=l.onItemLeave)===null||x===void 0||x.call(l)}else v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:se(s.onPointerLeave,v=>{if(v.currentTarget===document.activeElement){var x;(x=l.onItemLeave)===null||x===void 0||x.call(l)}}),onKeyDown:se(s.onKeyDown,v=>{var x;((x=l.searchRef)===null||x===void 0?void 0:x.current)!==""&&v.key===" "||(e9.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})}))))}),vp="SelectItemText",E9=h.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:o,...i}=t,s=Qa(vp,n),a=xg(vp,n),l=PM(vp,n),c=o9(vp,n),[u,d]=h.useState(null),f=We(e,v=>d(v),l.onItemTextChange,v=>{var x;return(x=a.itemTextRefCallback)===null||x===void 0?void 0:x.call(a,v,l.value,l.disabled)}),p=u==null?void 0:u.textContent,m=h.useMemo(()=>h.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},p),[l.disabled,l.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=c;return hr(()=>(g(m),()=>y(m)),[g,y,m]),h.createElement(h.Fragment,null,h.createElement(Re.span,z({id:l.textId},i,{ref:f})),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Vo.createPortal(i.children,s.valueNode):null)}),_9="SelectItemIndicator",C9=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return PM(_9,n).isSelected?h.createElement(Re.span,z({"aria-hidden":!0},r,{ref:e})):null}),T9=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return h.createElement(Re.div,z({"aria-hidden":!0},r,{ref:e}))});function $M(t){return t===""||t===void 0}const AM=h.forwardRef((t,e)=>{const{value:n,...r}=t,o=h.useRef(null),i=We(e,o),s=o2(n);return h.useEffect(()=>{const a=o.current,l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==n&&u){const d=new Event("change",{bubbles:!0});u.call(a,n),a.dispatchEvent(d)}},[s,n]),h.createElement(X8,{asChild:!0},h.createElement("select",z({},r,{ref:i,defaultValue:n})))});AM.displayName="BubbleSelect";function IM(t){const e=rn(t),n=h.useRef(""),r=h.useRef(0),o=h.useCallback(s=>{const a=n.current+s;e(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function DM(t,e,n){const o=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let s=O9(t,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function O9(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const M9=i9,LM=a9,R9=c9,N9=u9,P9=d9,jM=f9,$9=v9,zM=w9,FM=S9,A9=E9,I9=C9,BM=T9,UM=M9,VM=R9,G1=h.forwardRef(({className:t,children:e,...n},r)=>b.jsxs(LM,{ref:r,className:ze("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...n,children:[e,b.jsx(N9,{asChild:!0,children:b.jsx(Th,{className:"w-4 h-4 opacity-50"})})]}));G1.displayName=LM.displayName;const Y1=h.forwardRef(({className:t,children:e,position:n="popper",...r},o)=>b.jsx(P9,{children:b.jsx(jM,{ref:o,className:ze("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...r,children:b.jsx($9,{className:ze("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e})})}));Y1.displayName=jM.displayName;const D9=h.forwardRef(({className:t,...e},n)=>b.jsx(zM,{ref:n,className:ze("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));D9.displayName=zM.displayName;const Z1=h.forwardRef(({className:t,children:e,...n},r)=>b.jsxs(FM,{ref:r,className:ze("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(I9,{children:b.jsx(y1,{className:"w-4 h-4"})})}),b.jsx(A9,{children:e})]}));Z1.displayName=FM.displayName;const L9=h.forwardRef(({className:t,...e},n)=>b.jsx(BM,{ref:n,className:ze("-mx-1 my-1 h-px bg-muted",t),...e}));L9.displayName=BM.displayName;let bg=()=>({events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}});var R0={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,o=Error.captureStackTrace;o===void 0&&(o=function(c){var u=new Error;r(c,"stack",{configurable:!0,get:function(){var f=u.stack;return r(this,"stack",{configurable:!0,value:f,writable:!0}),f},set:function(f){r(c,"stack",{configurable:!0,value:f,writable:!0})}})});function i(l){l!==void 0&&r(this,"message",{configurable:!0,value:l,writable:!0});var c=this.constructor.name;c!==void 0&&c!==this.name&&r(this,"name",{configurable:!0,value:c,writable:!0}),o(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var s=function(){function l(u,d){return r(u,"name",{configurable:!0,value:d})}try{var c=function(){};if(l(c,"foo"),c.name==="foo")return l}catch{}}();function a(l,c){if(c==null||c===Error)c=i;else if(typeof c!="function")throw new TypeError("super_ should be a function");var u;if(typeof l=="string")u=l,l=n!==void 0?function(){return n(c,arguments,this.constructor)}:function(){c.apply(this,arguments)},s!==void 0&&(s(l,u),u=void 0);else if(typeof l!="function")throw new TypeError("constructor should be either a string or a function");l.super_=l.super=c;var d={constructor:{configurable:!0,value:l,writable:!0}};return u!==void 0&&(d.name={configurable:!0,value:u,writable:!0}),l.prototype=Object.create(c.prototype,d),l}e=t.exports=a,e.BaseError=i})(R0,R0.exports);var HM=R0.exports,PS="ProseMirror-selectednode",WM="",ss="\0",$S="__state_override__",j9={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},Ie=j9,bi=Symbol.for("__remirror__"),an=(t=>(t.PlainExtension="RemirrorPlainExtension",t.NodeExtension="RemirrorNodeExtension",t.MarkExtension="RemirrorMarkExtension",t.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",t.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",t.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",t.Manager="RemirrorManager",t.Preset="RemirrorPreset",t.PresetConstructor="RemirrorPresetConstructor",t))(an||{}),at=(t=>(t[t.Critical=1e6]="Critical",t[t.Highest=1e5]="Highest",t[t.High=1e4]="High",t[t.Medium=1e3]="Medium",t[t.Default=100]="Default",t[t.Low=10]="Low",t[t.Lowest=0]="Lowest",t))(at||{}),qn=(t=>(t[t.None=0]="None",t[t.Create=1]="Create",t[t.EditorView=2]="EditorView",t[t.Runtime=3]="Runtime",t[t.Destroy=4]="Destroy",t))(qn||{}),q=(t=>(t.Undo="_|undo|_",t.Redo="_|redo|_",t.Bold="_|bold|_",t.Italic="_|italic|_",t.Underline="_|underline|_",t.Strike="_|strike|_",t.Code="_|code|_",t.Paragraph="_|paragraph|_",t.H1="_|h1|_",t.H2="_|h2|_",t.H3="_|h3|_",t.H4="_|h4|_",t.H5="_|h5|_",t.H6="_|h6|_",t.TaskList="_|task|_",t.BulletList="_|bullet|_",t.OrderedList="_|number|_",t.Quote="_|quote|_",t.Divider="_|divider|_",t.Codeblock="_|codeblock|_",t.ClearFormatting="_|clear|_",t.Superscript="_|sup|_",t.Subscript="_|sub|_",t.LeftAlignment="_|left-align|_",t.CenterAlignment="_|center-align|_",t.RightAlignment="_|right-align|_",t.JustifyAlignment="_|justify-align|_",t.InsertLink="_|link|_",t.Find="_|find|_",t.FindBackwards="_|find-backwards|_",t.FindReplace="_|find-replace|_",t.AddFootnote="_|footnote|_",t.AddComment="_|comment|_",t.ContextMenu="_|context-menu|_",t.IncreaseFontSize="_|inc-font-size|_",t.DecreaseFontSize="_|dec-font-size|_",t.IncreaseIndent="_|indent|_",t.DecreaseIndent="_|dedent|_",t.Shortcuts="_|shortcuts|_",t.Copy="_|copy|_",t.Cut="_|cut|_",t.Paste="_|paste|_",t.PastePlain="_|paste-plain|_",t.SelectAll="_|select-all|_",t.Format="_|format|_",t))(q||{}),K=(t=>(t.PROD="RMR0000",t.UNKNOWN="RMR0001",t.INVALID_COMMAND_ARGUMENTS="RMR0002",t.CUSTOM="RMR0003",t.CORE_HELPERS="RMR0004",t.MUTATION="RMR0005",t.INTERNAL="RMR0006",t.MISSING_REQUIRED_EXTENSION="RMR0007",t.MANAGER_PHASE_ERROR="RMR0008",t.INVALID_GET_EXTENSION="RMR0010",t.INVALID_MANAGER_ARGUMENTS="RMR0011",t.SCHEMA="RMR0012",t.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",t.INVALID_MANAGER_EXTENSION="RMR0014",t.DUPLICATE_COMMAND_NAMES="RMR0016",t.DUPLICATE_HELPER_NAMES="RMR0017",t.NON_CHAINABLE_COMMAND="RMR0018",t.INVALID_EXTENSION="RMR0019",t.INVALID_CONTENT="RMR0021",t.INVALID_NAME="RMR0050",t.EXTENSION="RMR0100",t.EXTENSION_SPEC="RMR0101",t.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",t.INVALID_SET_EXTENSION_OPTIONS="RMR0103",t.REACT_PROVIDER_CONTEXT="RMR0200",t.REACT_GET_ROOT_PROPS="RMR0201",t.REACT_EDITOR_VIEW="RMR0202",t.REACT_CONTROLLED="RMR0203",t.REACT_NODE_VIEW="RMR0204",t.REACT_GET_CONTEXT="RMR0205",t.REACT_COMPONENTS="RMR0206",t.REACT_HOOKS="RMR0207",t.I18N_CONTEXT="RMR0300",t))(K||{}),z9=function(e){return F9(e)&&!B9(e)};function F9(t){return!!t&&typeof t=="object"}function B9(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||H9(t)}var U9=typeof Symbol=="function"&&Symbol.for,V9=U9?Symbol.for("react.element"):60103;function H9(t){return t.$$typeof===V9}function W9(t){return Array.isArray(t)?[]:{}}function Kd(t,e){return e.clone!==!1&&e.isMergeableObject(t)?xc(W9(t),t,e):t}function K9(t,e,n){return t.concat(e).map(function(r){return Kd(r,n)})}function q9(t,e){if(!e.customMerge)return xc;var n=e.customMerge(t);return typeof n=="function"?n:xc}function G9(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function AS(t){return Object.keys(t).concat(G9(t))}function KM(t,e){try{return e in t}catch{return!1}}function Y9(t,e){return KM(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Z9(t,e,n){var r={};return n.isMergeableObject(t)&&AS(t).forEach(function(o){r[o]=Kd(t[o],n)}),AS(e).forEach(function(o){Y9(t,o)||(KM(t,o)&&n.isMergeableObject(e[o])?r[o]=q9(o,n)(t[o],e[o],n):r[o]=Kd(e[o],n))}),r}function xc(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||K9,n.isMergeableObject=n.isMergeableObject||z9,n.cloneUnlessOtherwiseSpecified=Kd;var r=Array.isArray(e),o=Array.isArray(t),i=r===o;return i?r?n.arrayMerge(t,e,n):Z9(t,e,n):Kd(e,n)}xc.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,o){return xc(r,o,n)},{})};var J9=xc,X9=J9;const Q9=ki(X9);/*!
|
|
161
161
|
* isobject <https://github.com/jonschlinkert/isobject>
|
|
162
162
|
*
|
|
163
163
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|