جارٍ فتح تراث…
`,`text/html`).body.firstElementChild}function xpe(e,t){return ype(e,t).outerHTML}function Spe(e,t){return _pe(vpe(e,t))}function Cpe(e,t){return Spe(bpe(e,t),t)}function wpe(e,t){return typeof t==`string`?Cpe(t,{schema:e}):wy(t)?Spe(t,{schema:e}):t}function Tpe(e,t){return iS(t)?t:e.nodeFromJSON(wpe(e,t))}function Epe(e,t){let n=Tpe(e,t);return nS(n.type.schema===e,`Document schema does not match editor schema`),nS(n.type===e.topNodeType,`Document type does not match editor top node type. Expected ${e.topNodeType.name}, got ${n.type.name}`),n}function Dpe(e,t){return Zfe(t)?(nS(t.$head.doc===e,`Selection and doc do not match`),t):t===`start`?Yv.atStart(e):t===`end`?Yv.atEnd(e):Yv.fromJSON(e,t)}function Ope({defaultSelection:e,defaultContent:t}){return cS(bS,[({schema:n})=>{let r={};if(t){let i=wpe(n,t);r.doc=n.nodeFromJSON(i),e&&(r.selection=Yv.fromJSON(r.doc,e))}return r}])}function kpe(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function Ape(e,t,n){return n||={},e.some(e=>e.type===t&&kpe(n,e.attrs))}function jpe(e,t,n,r,i){let a=!1,o=!1;return e.nodesBetween(t,n,(e,t,n)=>{if(a)return!1;n?.type.allowsMarkType(r)&&!e.marks.some(e=>e.type!==r&&e.type.excludes(r))&&(o=!0,Ape(e.marks,r,i)||(a=!0))}),!o||a}function Mpe(e,t,n){let{from:r,$from:i,to:a,empty:o}=e.selection,s=tS(e.schema,t);return o?Ape(e.storedMarks||i.marks(),s,n):!jpe(e.doc,r,a,s,n)}function Npe(e,t,n=Gpe){return Dy(e.nodes,e=>Ppe(e,t,n))}function Ppe(e,t,n){let r=(...t)=>Rpe(e,t,n);return r.isActive=n=>{let r=t();return r?aS(r,e,n):!1},r}function Fpe(e,t,n=Wpe){return Dy(e.marks,e=>Ipe(e,t,n))}function Ipe(e,t,n){let r=(...t)=>Lpe(e,t,n);return r.isActive=n=>{let r=t();return r?Mpe(r,e,n):!1},r}function Lpe(e,t,n){let[r,i]=zpe(t);return n(e.create(r),uS(e.schema,i))}function Rpe(e,t,n){let[r,i]=zpe(t);return n(e,r,uS(e.schema,i))}function uS(e,t){let n=[];for(let r of t)if(typeof r==`string`)r&&n.push(e.text(r,null));else if(Array.isArray(r))n.push(...uS(e,r));else if(iS(r))n.push(r);else throw new pS(`Invalid node child: ${typeof r}`);return n}function zpe(e){let[t,...n]=e;return Bpe(t)?(n.unshift(t),[null,n]):typeof t==`object`?[t,n]:[null,n]}function Bpe(e){return e?typeof e==`string`||Array.isArray(e)||iS(e):!1}function dS(...e){let t=e.flat();return nS(t.length>0,`At least one extension is required`),new Kpe(t)}function Vpe(e){return e.defaultContent?dS(e.extension,Ope(e)):e.extension}function fS(e){return new qpe(new xS(Vpe(e)))}var pS,mS,Hpe,hS,gS,_S,vS,yS,Upe,bS,Wpe,Gpe,Kpe,xS,qpe,Jpe=o((()=>{gy(),_y(),ky(),Xfe(),pS=class extends Error{constructor(e,t){typeof e==`string`&&!e.startsWith(`[`)&&(e=`[prosekit] ${e}`),super(e,t)}},mS=class extends pS{constructor(){super(`Unable to find browser Document. When not in the browser environment, you need to pass a DOM Document.`)}},Hpe=0,hS=class{constructor(e,t,n,r){if(this.index=Hpe++,r&&!n)this.reduce=r;else if(n&&!r)this.reduce=()=>n;else throw new pS(`Incorrect reducer`);this.parent=e,this.singleton=t,this.path=e?[...e.path,this.index]:[]}get reducer(){return this.reduce()}},gS=new hS(null,!0,npe),_S=oS({reducer:e=>{nS(e.length<=1);let t=e[0];return{schema:t?new R_(t):null}},parent:gS,singleton:!0}),vS=class{constructor(){this.trees=[null,null,null,null,null]}getTree(e){let t=e??this.priority??2;return this.trees[t]||=this.createTree(t)}findFacetOutput(e){let t=this.getTree();for(let n of e.path)t=t?.children.get(n);return t?.getOutput()??null}get schema(){return this.findFacetOutput(_S)?.find(Boolean)?.schema??null}},yS=class{constructor(e,t=[null,null,null,null,null],n=new Map,r=[null,null,null,null,null]){this.output=null,this.facet=e,this.inputs=t,this.children=n,this.reducers=r}calcOutput(){let e=[null,null,null,null,null],t=[null,null,null,null,null];for(let t=0;t<5;t++){let n=this.inputs[t];n&&(e[t]=[...n])}for(let t of this.children.values()){let n=t.getOutput();for(let t=0;t<5;t++)n[t]&&(e[t]||=[]).push(n[t])}if(this.facet.singleton)t[2]=(this.reducers[2]||=this.facet.reducer)(e.filter(xy).flat());else for(let n=0;n<5;n++){let r=e[n];r&&(t[n]=(this.reducers[n]||=this.facet.reducer)(r))}return t}getOutput(){return this.output||=this.calcOutput(),this.output}getSingletonOutput(){return nS(this.facet.singleton),this.getOutput()[2]}getRootOutput(){nS(this.isRoot());let e=this.getSingletonOutput();return nS(e),e}isRoot(){return!this.facet.parent}},Upe=class extends vS{constructor(e,t){super(),this.facet=e,this.payloads=t}createTree(e){let t=this.priority??e,n=[null,null,null,null,null];n[t]=[...this.payloads];let r=new yS(this.facet,n);for(;r.facet.parent;){let e=new Map([[r.facet.index,r]]);r=new yS(r.facet.parent,void 0,e)}return r}},bS=oS({reduce:()=>{let e=[],t=t=>{let n,r,i=t.schema,a=new Set,o=new Set,s=[...e].reverse();for(let e of s){let s=e(t);n||=s.doc,r||=s.selection,i||=s.schema;for(let e of s.storedMarks??[])a.add(e);for(let e of s.plugins??[])o.add(e)}return n&&i&&(i=void 0),nS(n||i,`Can't create state without a schema nor a document`),{doc:n,selection:r,schema:i,storedMarks:Array.from(a),plugins:Array.from(o)}};return function(n){return e=n,{state:t}}},singleton:!0,parent:gS}),Wpe=(e,t)=>t.map(t=>t.mark(e.addToSet(t.marks))),Gpe=(e,t,n)=>{let r=e.createAndFill(t,n);return nS(r,`Failed to create node ${e.name}`),r},Kpe=class extends vS{constructor(e=[]){super(),this.extension=e}createTree(e){let t=this.priority??e,n=[...this.extension];n.sort((e,n)=>(e.priority??t)-(n.priority??t));let r=n.map(e=>e.getTree(t));nS(r.length>0);let i=r[0];for(let e=1;e {let t=e.slice(1,-1),n=t.indexOf(`:`);if(n===-1)return;let r=t.slice(0,n);return r?dN+r:void 0},hN=e=>{let{theme:t,classGroups:n}=e;return gN(n,t)},gN=(e,t)=>{let n=cN();for(let r in e){let i=e[r];_N(i,n,r,t)}return n},_N=(e,t,n,r)=>{let i=e.length;for(let a=0;a{if(typeof e==`string`){yN(e,t,n);return}if(typeof e==`function`){bN(e,t,n,r);return}xN(e,t,n,r)},yN=(e,t,n)=>{let r=e===``?t:SN(t,e);r.classGroupId=n},bN=(e,t,n,r)=>{if(CN(e)){_N(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(sN(n,e))},xN=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e{let n=e,r=t.split(lN),i=r.length;for(let e=0;e`isThemeGetter`in e&&e.isThemeGetter===!0,wN=`!`,TN=58,EN=47,DN=91,ON=93,kN=40,AN=41,jN=33,MN=(e,t,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:void 0}),NN=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s
`,1)}));function gLe(e,t){j(t,!0);let n=I(Gc);document.title=[U(n)(144),window.BASE_TITLE].join(` | `);let r=X(t,`params`,19,()=>({})),i=I(()=>r()?.key||``),a=L(null),o=L(``),s=L(!1),c=L(!1),l=L(null);(async()=>{if(!U(i)){R(a,!1);return}try{let e=await kj(U(i));R(a,e?.status===200)}catch(e){Sentry.captureException(e),R(a,!1)}})();async function u(e){e.preventDefault(),R(l,null),R(c,!0);try{let e=await Aj({key:U(i),password:U(o)});if(e?.status!==200)throw Error(e?.message||`فشل تغيير كلمة المرور`);R(l,{variant:`success`,message:U(n)(456)},!0),setTimeout(()=>location.href=`/account/login`,800)}catch(e){Sentry.captureException(e),R(l,{variant:`destructive`,message:U(n)(496)},!0)}finally{R(c,!1)}}ej(e,{children:(e,t)=>{var r=xLe(),i=B(r),d=z(i,!0);A(i);var f=V(i,2),p=e=>{var t=_Le(),r=B(t);{let e=I(()=>U(n)(554));mF(r,{boxed:!0,variant:`destructive`,get description(){return U(e)}})}var i=V(r,2),a=z(i,!0);A(i),H(e=>q(a,e),[()=>U(n)(240)]),K(e,t)},m=e=>{var t=yLe(),r=z(t),i=z(r);WY(i,{for:`reset-password`,children:(e,t)=>{Ct();var r=ao();H(e=>q(r,e),[()=>U(n)(654)]),K(e,r)},$$slots:{default:!0}});var a=V(i,2);{let e=I(()=>U(s)?`text`:`password`);TF(a,{id:`reset-password`,get type(){return U(e)},autocomplete:`new-password`,minlength:`5`,required:!0,dir:`ltr`,get value(){return U(o)},set value(e){R(o,e,!0)}})}A(r);var d=V(r,2),f=z(d,!0);A(d);var p=V(d,2);{let e=I(()=>U(c)||U(l)?.variant===`success`);yF(p,{class:`h-11 w-full`,type:`submit`,get disabled(){return U(e)},children:(e,t)=>{var r=vLe(),i=B(r);_f(i,{id:`rotate-ccw`,get loading(){return U(c)},class:`h-4 w-4`});var a=V(i,2),o=z(a,!0);A(a),H(e=>q(o,e),[()=>U(c)?U(n)(478):U(n)(438)]),K(e,r)},$$slots:{default:!0}})}var m=V(p,2);{let e=I(()=>U(l)?.variant),t=I(()=>U(l)?.message);mF(m,{get variant(){return U(e)},get description(){return U(t)}})}A(t),H(e=>q(f,e),[()=>U(s)?U(n)(82):U(n)(141)]),Ga(`submit`,t,u),Ka(`click`,d,()=>R(s,!U(s))),K(e,t)},h=e=>{var t=bLe(),r=z(t,!0);A(t),H(e=>q(r,e),[()=>U(n)(481)]),K(e,t)};J(f,e=>{U(a)===!1?e(p):U(a)===!0?e(m,1):e(h,-1)}),H(e=>q(d,e),[()=>U(n)(144)]),K(e,r)},$$slots:{default:!0}}),M()}var _Le,vLe,yLe,bLe,xLe,SLe=o((()=>{Q(),Z(),nj(),nM(),vf(),vF(),wF(),OF(),GY(),Kc(),qY(),_Le=W(` `,1),vLe=W(` `,1),yLe=W(``),bLe=W(`
`,1),qa([`click`])}));function CLe(e,t){j(t,!0);let n=I(Gc);document.title=[U(n)(1135),window.BASE_TITLE].join(` | `);let r=X(t,`params`,19,()=>({})),i=L(!0),a=L(``);(async()=>{let e=decodeURIComponent(r()?.key||``);if(!e){R(a,U(n)(555),!0),R(i,!1);return}try{let t=await Dj(e);if(!t?.success)throw Error(t?.errors?.map(e=>e.message).join(`
`)||`رابط تأكيد البريد غير صالح أو منتهي الصلاحية.`);let n=await Ej(e);if(!n?.success)throw Error(n?.errors?.map(e=>e.message).join(`
`));n?.meta?.is_authenticated&&lk.update(e=>({...e,email_verified:!0})),location.href=`/`}catch(e){R(a,U(n)(623,[e?.message||e]),!0)}finally{R(i,!1)}})(),ej(e,{class:`text-center`,children:(e,t)=>{var r=G(),o=B(r),s=e=>{var t=wLe(),r=z(t,!0);A(t),H(e=>q(r,e),[()=>U(n)(214)]),K(e,t)},c=e=>{mF(e,{boxed:!0,variant:`destructive`,get description(){return U(a)}})};J(o,e=>{U(i)?e(s):e(c,-1)}),K(e,r)},$$slots:{default:!0}}),M()}var wLe,TLe=o((()=>{Q(),Z(),nj(),cA(),nM(),vF(),Kc(),qY(),wLe=W(`
{e[t].content=EUe(e[t].content,i[t])})}function OUe(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!==`inline`||!kWe.test(e.tokens[t].content)||DUe(e.tokens[t].children,e)}function kUe(e){let t,n,r=e.tokens,i=r.length;for(let e=0;e32))return a;if(r===41){if(o===0)break;o--}i++}return t===i||o!==0?a:(a.str=_$(e.slice(t,i)),a.pos=i,a.ok=!0,a)}function jUe(e,t,n=!1){let r,i=!1,a,o,s=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos=n)return o;let r=e.charCodeAt(a);if(r!==34&&r!==39&&r!==40)return o;t++,a++,r===40&&(r=41),o.marker=r}for(;a