dev-process-kit 0.0.11 → 0.0.13
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/THIRD_PARTY_LICENSES.md +46 -0
- package/dist/chunks/{shared-CrE-y5oF.js → shared-0MFKKPnB.js} +165 -96
- package/dist/chunks/shared-B2YRwZ0P.js +2062 -0
- package/dist/chunks/{shared-OGH3pSVq.js → shared-B4Mwapvi.js} +89 -63
- package/dist/chunks/shared-BDUe3aT-.js +1 -0
- package/dist/chunks/{shared-DGI_sFo5.js → shared-C1KQ5iU8.js} +55 -32
- package/dist/chunks/{shared-BgCDocVX.js → shared-CQG0dnvb.js} +17 -7
- package/dist/chunks/shared-CSC14I4g.js +2370 -0
- package/dist/chunks/shared-Cd8A5TjZ.js +2428 -0
- package/dist/chunks/shared-CirHYajF.js +30 -0
- package/dist/chunks/shared-D4K7KsfJ.js +1 -0
- package/dist/chunks/{shared-TW6kWbUL.js → shared-D7poXZ0z.js} +17 -9
- package/dist/chunks/shared-DO0pUSjw.js +571 -0
- package/dist/chunks/shared-DdefS1nG.js +1 -0
- package/dist/chunks/{shared-BSFZSMH5.js → shared-DjmQsa0n.js} +1 -1
- package/dist/chunks/{shared-DZfXwU7f.js → shared-DklLt1Sc.js} +1 -1
- package/dist/chunks/{shared-CHaHI5X3.js → shared-DrMSORn-.js} +34 -11
- package/dist/chunks/shared-DxAiavwJ.js +1102 -0
- package/dist/chunks/shared-aDPp8Vry.js +1 -0
- package/dist/components.js +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/delegation-poker.js +1 -1
- package/dist/templates/event-storming.js +1 -1
- package/dist/templates/example-mapping.js +1 -1
- package/dist/templates/grill.js +1 -1
- package/dist/templates/plain.js +1 -1
- package/dist/templates/prototype.js +1 -1
- package/dist/templates/slides.js +1 -1
- package/dist/templates/task-board.js +1 -1
- package/dist/templates/usm.js +1 -1
- package/dist/templates/whiteboard.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/shared-B4ewpBuM.js +0 -30
- package/dist/chunks/shared-B9OVJ7XA.js +0 -556
- package/dist/chunks/shared-BHRhwgui.js +0 -1252
- package/dist/chunks/shared-B_MMP97h.js +0 -2402
- package/dist/chunks/shared-CxFItadP.js +0 -1094
- package/dist/chunks/shared-DIJgMVpY.js +0 -2239
- package/dist/chunks/shared-xrCdgpNS.js +0 -1
|
@@ -1,2402 +0,0 @@
|
|
|
1
|
-
const je=globalThis,lt=je.ShadowRoot&&(je.ShadyCSS===void 0||je.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ct=Symbol(),xs=new WeakMap;let ys=class{constructor(e,s,n){if(this._$cssResult$=!0,n!==ct)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o;const s=this.t;if(lt&&e===void 0){const n=s!==void 0&&s.length===1;n&&(e=xs.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&xs.set(s,e))}return e}toString(){return this.cssText}};const ws=t=>new ys(typeof t=="string"?t:t+"",void 0,ct),D=(t,...e)=>{const s=t.length===1?t[0]:e.reduce((n,r,i)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[i+1],t[0]);return new ys(s,t,ct)},Fr=(t,e)=>{if(lt)t.adoptedStyleSheets=e.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(const s of e){const n=document.createElement("style"),r=je.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=s.cssText,t.appendChild(n)}},$s=lt?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(const n of e.cssRules)s+=n.cssText;return ws(s)})(t):t,{is:Kr,defineProperty:Zr,getOwnPropertyDescriptor:Wr,getOwnPropertyNames:Vr,getOwnPropertySymbols:Gr,getPrototypeOf:Jr}=Object,Ie=globalThis,Ss=Ie.trustedTypes,Yr=Ss?Ss.emptyScript:"",Qr=Ie.reactiveElementPolyfillSupport,be=(t,e)=>t,dt={toAttribute(t,e){switch(e){case Boolean:t=t?Yr:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},As=(t,e)=>!Kr(t,e),Cs={attribute:!0,type:String,converter:dt,reflect:!1,useDefault:!1,hasChanged:As};Symbol.metadata??=Symbol("metadata"),Ie.litPropertyMetadata??=new WeakMap;let ae=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,s=Cs){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(e,s),!s.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(e,n,s);r!==void 0&&Zr(this.prototype,e,r)}}static getPropertyDescriptor(e,s,n){const{get:r,set:i}=Wr(this.prototype,e)??{get(){return this[s]},set(o){this[s]=o}};return{get:r,set(o){const a=r?.call(this);i?.call(this,o),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Cs}static _$Ei(){if(this.hasOwnProperty(be("elementProperties")))return;const e=Jr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(be("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(be("properties"))){const s=this.properties,n=[...Vr(s),...Gr(s)];for(const r of n)this.createProperty(r,s[r])}const e=this[Symbol.metadata];if(e!==null){const s=litPropertyMetadata.get(e);if(s!==void 0)for(const[n,r]of s)this.elementProperties.set(n,r)}this._$Eh=new Map;for(const[s,n]of this.elementProperties){const r=this._$Eu(s,n);r!==void 0&&this._$Eh.set(r,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const r of n)s.unshift($s(r))}else e!==void 0&&s.push($s(e));return s}static _$Eu(e,s){const n=s.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,s=this.constructor.elementProperties;for(const n of s.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Fr(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,s,n){this._$AK(e,n)}_$ET(e,s){const n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&n.reflect===!0){const i=(n.converter?.toAttribute!==void 0?n.converter:dt).toAttribute(s,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,s){const n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const i=n.getPropertyOptions(r),o=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:dt;this._$Em=r;const a=o.fromAttribute(s,i.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,s,n,r=!1,i){if(e!==void 0){const o=this.constructor;if(r===!1&&(i=this[e]),n??=o.getPropertyOptions(e),!((n.hasChanged??As)(i,s)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,n))))return;this.C(e,s,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:n,reflect:r,wrapped:i},o){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??s??this[e]),i!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(s=void 0),this._$AL.set(e,s)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[r,i]of n){const{wrapped:o}=i,a=this[r];o!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,i,a)}}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(s)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(s)}willUpdate(e){}_$AE(e){this._$EO?.forEach(s=>s.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(s=>this._$ET(s,this[s])),this._$EM()}updated(e){}firstUpdated(e){}};ae.elementStyles=[],ae.shadowRootOptions={mode:"open"},ae[be("elementProperties")]=new Map,ae[be("finalized")]=new Map,Qr?.({ReactiveElement:ae}),(Ie.reactiveElementVersions??=[]).push("2.1.2");const pt=globalThis,Ts=t=>t,qe=pt.trustedTypes,Es=qe?qe.createPolicy("lit-html",{createHTML:t=>t}):void 0,_s="$lit$",U=`lit$${Math.random().toFixed(9).slice(2)}$`,Rs="?"+U,Xr=`<${Rs}>`,J=document,ve=()=>J.createComment(""),xe=t=>t===null||typeof t!="object"&&typeof t!="function",ht=Array.isArray,ei=t=>ht(t)||typeof t?.[Symbol.iterator]=="function",ut=`[
|
|
2
|
-
\f\r]`,ye=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ls=/-->/g,Ps=/>/g,Y=RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),zs=/'/g,Ms=/"/g,Os=/^(?:script|style|textarea|title)$/i,js=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),g=js(1),ti=js(2),z=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Is=new WeakMap,Q=J.createTreeWalker(J,129);function qs(t,e){if(!ht(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Es!==void 0?Es.createHTML(e):e}const si=(t,e)=>{const s=t.length-1,n=[];let r,i=e===2?"<svg>":e===3?"<math>":"",o=ye;for(let a=0;a<s;a++){const l=t[a];let c,p,d=-1,h=0;for(;h<l.length&&(o.lastIndex=h,p=o.exec(l),p!==null);)h=o.lastIndex,o===ye?p[1]==="!--"?o=Ls:p[1]!==void 0?o=Ps:p[2]!==void 0?(Os.test(p[2])&&(r=RegExp("</"+p[2],"g")),o=Y):p[3]!==void 0&&(o=Y):o===Y?p[0]===">"?(o=r??ye,d=-1):p[1]===void 0?d=-2:(d=o.lastIndex-p[2].length,c=p[1],o=p[3]===void 0?Y:p[3]==='"'?Ms:zs):o===Ms||o===zs?o=Y:o===Ls||o===Ps?o=ye:(o=Y,r=void 0);const u=o===Y&&t[a+1].startsWith("/>")?" ":"";i+=o===ye?l+Xr:d>=0?(n.push(c),l.slice(0,d)+_s+l.slice(d)+U+u):l+U+(d===-2?a:u)}return[qs(t,i+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]};let ft=class Nr{constructor({strings:e,_$litType$:s},n){let r;this.parts=[];let i=0,o=0;const a=e.length-1,l=this.parts,[c,p]=si(e,s);if(this.el=Nr.createElement(c,n),Q.currentNode=this.el.content,s===2||s===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(r=Q.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const d of r.getAttributeNames())if(d.endsWith(_s)){const h=p[o++],u=r.getAttribute(d).split(U),f=/([.?@])?(.*)/.exec(h);l.push({type:1,index:i,name:f[2],strings:u,ctor:f[1]==="."?ri:f[1]==="?"?ii:f[1]==="@"?oi:Be}),r.removeAttribute(d)}else d.startsWith(U)&&(l.push({type:6,index:i}),r.removeAttribute(d));if(Os.test(r.tagName)){const d=r.textContent.split(U),h=d.length-1;if(h>0){r.textContent=qe?qe.emptyScript:"";for(let u=0;u<h;u++)r.append(d[u],ve()),Q.nextNode(),l.push({type:2,index:++i});r.append(d[h],ve())}}}else if(r.nodeType===8)if(r.data===Rs)l.push({type:2,index:i});else{let d=-1;for(;(d=r.data.indexOf(U,d+1))!==-1;)l.push({type:7,index:i}),d+=U.length-1}i++}}static createElement(e,s){const n=J.createElement("template");return n.innerHTML=e,n}};function le(t,e,s=t,n){if(e===z)return e;let r=n!==void 0?s._$Co?.[n]:s._$Cl;const i=xe(e)?void 0:e._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(t),r._$AT(t,s,n)),n!==void 0?(s._$Co??=[])[n]=r:s._$Cl=r),r!==void 0&&(e=le(t,r._$AS(t,e.values),r,n)),e}let ni=class{constructor(e,s){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:s},parts:n}=this._$AD,r=(e?.creationScope??J).importNode(s,!0);Q.currentNode=r;let i=Q.nextNode(),o=0,a=0,l=n[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new Ne(i,i.nextSibling,this,e):l.type===1?c=new l.ctor(i,l.name,l.strings,this,e):l.type===6&&(c=new ai(i,this,e)),this._$AV.push(c),l=n[++a]}o!==l?.index&&(i=Q.nextNode(),o++)}return Q.currentNode=J,r}p(e){let s=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,s),s+=n.strings.length-2):n._$AI(e[s])),s++}},Ne=class Br{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,n,r){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&e?.nodeType===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=le(this,e,s),xe(e)?e===m||e==null||e===""?(this._$AH!==m&&this._$AR(),this._$AH=m):e!==this._$AH&&e!==z&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):ei(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==m&&xe(this._$AH)?this._$AA.nextSibling.data=e:this.T(J.createTextNode(e)),this._$AH=e}$(e){const{values:s,_$litType$:n}=e,r=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=ft.createElement(qs(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(s);else{const i=new ni(r,this),o=i.u(this.options);i.p(s),this.T(o),this._$AH=i}}_$AC(e){let s=Is.get(e.strings);return s===void 0&&Is.set(e.strings,s=new ft(e)),s}k(e){ht(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let n,r=0;for(const i of e)r===s.length?s.push(n=new Br(this.O(ve()),this.O(ve()),this,this.options)):n=s[r],n._$AI(i),r++;r<s.length&&(this._$AR(n&&n._$AB.nextSibling,r),s.length=r)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){const n=Ts(e).nextSibling;Ts(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}};class Be{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,n,r,i){this.type=1,this._$AH=m,this._$AN=void 0,this.element=e,this.name=s,this._$AM=r,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=m}_$AI(e,s=this,n,r){const i=this.strings;let o=!1;if(i===void 0)e=le(this,e,s,0),o=!xe(e)||e!==this._$AH&&e!==z,o&&(this._$AH=e);else{const a=e;let l,c;for(e=i[0],l=0;l<i.length-1;l++)c=le(this,a[n+l],s,l),c===z&&(c=this._$AH[l]),o||=!xe(c)||c!==this._$AH[l],c===m?e=m:e!==m&&(e+=(c??"")+i[l+1]),this._$AH[l]=c}o&&!r&&this.j(e)}j(e){e===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}let ri=class extends Be{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===m?void 0:e}},ii=class extends Be{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==m)}},oi=class extends Be{constructor(e,s,n,r,i){super(e,s,n,r,i),this.type=5}_$AI(e,s=this){if((e=le(this,e,s,0)??m)===z)return;const n=this._$AH,r=e===m&&n!==m||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==m&&(n===m||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}};class ai{constructor(e,s,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){le(this,e)}}const li={I:Ne},ci=pt.litHtmlPolyfillSupport;ci?.(ft,Ne),(pt.litHtmlVersions??=[]).push("3.3.3");const di=(t,e,s)=>{const n=s?.renderBefore??e;let r=n._$litPart$;if(r===void 0){const i=s?.renderBefore??null;n._$litPart$=r=new Ne(e.insertBefore(ve(),i),i,void 0,s??{})}return r._$AI(t),r},gt=globalThis;let H=class extends ae{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=di(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return z}};H._$litElement$=!0,H.finalized=!0,gt.litElementHydrateSupport?.({LitElement:H});const pi=gt.litElementPolyfillSupport;pi?.({LitElement:H}),(gt.litElementVersions??=[]).push("4.2.2");const F={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},De=t=>(...e)=>({_$litDirective$:t,values:e});let Ue=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,n){this._$Ct=e,this._$AM=s,this._$Ci=n}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};const{I:hi}=li,Ns=t=>t,ui=t=>t.strings===void 0,Bs=()=>document.createComment(""),we=(t,e,s)=>{const n=t._$AA.parentNode,r=e===void 0?t._$AB:e._$AA;if(s===void 0){const i=n.insertBefore(Bs(),r),o=n.insertBefore(Bs(),r);s=new hi(i,o,t,t.options)}else{const i=s._$AB.nextSibling,o=s._$AM,a=o!==t;if(a){let l;s._$AQ?.(t),s._$AM=t,s._$AP!==void 0&&(l=t._$AU)!==o._$AU&&s._$AP(l)}if(i!==r||a){let l=s._$AA;for(;l!==i;){const c=Ns(l).nextSibling;Ns(n).insertBefore(l,r),l=c}}}return s},X=(t,e,s=t)=>(t._$AI(e,s),t),fi={},mt=(t,e=fi)=>t._$AH=e,gi=t=>t._$AH,kt=t=>{t._$AR(),t._$AA.remove()},bt=De(class extends Ue{constructor(t){if(super(t),t.type!==F.PROPERTY&&t.type!==F.ATTRIBUTE&&t.type!==F.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ui(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===z||e===m)return e;const s=t.element,n=t.name;if(t.type===F.PROPERTY){if(e===s[n])return z}else if(t.type===F.BOOLEAN_ATTRIBUTE){if(!!e===s.hasAttribute(n))return z}else if(t.type===F.ATTRIBUTE&&s.getAttribute(n)===e+"")return z;return mt(t),e}});class vt extends Ue{constructor(e){if(super(e),this.it=m,e.type!==F.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===m||e==null)return this._t=void 0,this.it=e;if(e===z)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const s=[e];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}vt.directiveName="unsafeHTML",vt.resultType=1;const Ds=De(vt),He=t=>{let e=t;for(;e!==null;){if(e instanceof Element){const s=e.getAttribute("lang");if(s!==null)return s}e=e instanceof ShadowRoot?e.host:e.parentNode}return null},xt=["en","ja"],Us="en",Hs=t=>xt.some(e=>e===t),Fe=t=>{const e=(t??"").split("-")[0]?.toLowerCase()??"";return Hs(e)?e:Us},Fs=t=>Fe(He(t)),yt="dpk-locale-change",Ks=t=>typeof t=="string"&&Hs(t)?t:null,mi=t=>t.preference??t.authored,ki=(t,e)=>t===e?null:t,Ke=t=>e=>e==="ja"?t.ja:t.en;class wt{#e;#i;#n=Us;constructor(e,s=()=>{}){this.#e=e,this.#i=s,e.addController(this)}get locale(){return this.#n}hostConnected(){this.#n=Fs(this.#e),document.addEventListener(yt,this.#r)}hostDisconnected(){document.removeEventListener(yt,this.#r)}#r=()=>{const e=Fs(this.#e);e!==this.#n&&(this.#n=e,this.#i(),this.#e.requestUpdate())}}const bi={paper:["#f6f7f9","#0e1014"],"paper-raised":["#ffffff","#171a20"],"paper-sunken":["#eff1f4","#0a0b0e"],"paper-inset":["#e7eaef","#22262e"],ink:["#11141b","#eceef3"],"ink-soft":["#464e5f","#a9b0bd"],"ink-faint":["#788195","#737b8b"],rule:["rgba(17, 24, 39, 0.08)","rgba(226, 232, 244, 0.08)"],"rule-strong":["rgba(17, 24, 39, 0.13)","rgba(226, 232, 244, 0.14)"],"rule-hover":["rgba(17, 24, 39, 0.24)","rgba(226, 232, 244, 0.26)"],accent:["#e04e1f","#f26a3d"],"accent-strong":["#c63f12","#dc5226"],"accent-bright":["#f0652f","#ff8a5e"],"accent-soft":["rgba(224, 78, 31, 0.08)","rgba(242, 106, 61, 0.14)"],"accent-ink":["#ffffff","#ffffff"],blue:["#3563d9","#7aa2f7"],"blue-strong":["#2a4fb3","#5b86e8"],"blue-soft":["rgba(53, 99, 217, 0.09)","rgba(122, 162, 247, 0.15)"],green:["#15894a","#4cc787"],"green-soft":["rgba(21, 137, 74, 0.09)","rgba(76, 199, 135, 0.14)"],amber:["#b27406","#e9ae45"],"amber-soft":["rgba(178, 116, 6, 0.1)","rgba(233, 174, 69, 0.15)"],violet:["#7549d6","#ab90f5"],"violet-soft":["rgba(117, 73, 214, 0.09)","rgba(171, 144, 245, 0.15)"],danger:["#c11d38","#f5707f"],"danger-soft":["rgba(214, 53, 80, 0.09)","rgba(245, 112, 127, 0.14)"],shade:["rgb(17, 24, 39)","rgb(0, 0, 0)"],"shade-1":["rgba(17, 24, 39, 0.06)","rgba(0, 0, 0, 0.32)"],"shade-2":["rgba(17, 24, 39, 0.08)","rgba(0, 0, 0, 0.38)"],"shade-3":["rgba(17, 24, 39, 0.13)","rgba(0, 0, 0, 0.5)"],highlight:["rgba(255, 255, 255, 0.9)","rgba(255, 255, 255, 0.05)"]},Zs=t=>ws(Object.entries(bi).map(([e,[s,n]])=>`--dpk-${e}: ${t(s,n)};`).join(`
|
|
4
|
-
`)),Ze=D`
|
|
5
|
-
:host {
|
|
6
|
-
/* Browsers without light-dark() stay light. */
|
|
7
|
-
${Zs(t=>t)}
|
|
8
|
-
--dpk-display: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
9
|
-
--dpk-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
10
|
-
--dpk-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
|
|
11
|
-
|
|
12
|
-
/* Shape + elevation scale, so every surface reads as one system. */
|
|
13
|
-
--dpk-radius-xs: 6px;
|
|
14
|
-
--dpk-radius-sm: 8px;
|
|
15
|
-
--dpk-radius: 10px;
|
|
16
|
-
--dpk-radius-lg: 14px;
|
|
17
|
-
--dpk-radius-xl: 20px;
|
|
18
|
-
--dpk-bevel: inset 0 1px 0 var(--dpk-highlight);
|
|
19
|
-
--dpk-shadow-xs: 0 1px 2px var(--dpk-shade-1);
|
|
20
|
-
--dpk-shadow-sm: 0 1px 2px var(--dpk-shade-1), 0 3px 8px -2px var(--dpk-shade-2);
|
|
21
|
-
--dpk-shadow:
|
|
22
|
-
0 1px 2px var(--dpk-shade-1), 0 6px 16px -4px var(--dpk-shade-2), 0 14px 32px -12px var(--dpk-shade-3);
|
|
23
|
-
--dpk-shadow-lg:
|
|
24
|
-
0 2px 4px var(--dpk-shade-1), 0 12px 28px -6px var(--dpk-shade-2), 0 32px 64px -20px var(--dpk-shade-3);
|
|
25
|
-
--dpk-focus: 0 0 0 1px var(--dpk-paper-raised), 0 0 0 3.5px color-mix(in srgb, var(--dpk-blue) 45%, transparent);
|
|
26
|
-
--dpk-control-h: 32px;
|
|
27
|
-
--dpk-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
|
|
28
|
-
--dpk-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
29
|
-
/* Frosted chrome: headers and toolbars that float over scrolling content. */
|
|
30
|
-
--dpk-glass: color-mix(in srgb, var(--dpk-paper-raised) 78%, transparent);
|
|
31
|
-
/* Working surface behind boards and canvases: a quiet dot lattice. */
|
|
32
|
-
--dpk-dots: radial-gradient(circle at 1px 1px, var(--dpk-rule-strong) 1px, transparent 0) 0 0 / 20px 20px;
|
|
33
|
-
|
|
34
|
-
color: var(--dpk-ink);
|
|
35
|
-
font-family: var(--dpk-body);
|
|
36
|
-
font-size: 14px;
|
|
37
|
-
line-height: 1.5;
|
|
38
|
-
-webkit-font-smoothing: antialiased;
|
|
39
|
-
text-rendering: optimizeLegibility;
|
|
40
|
-
display: block;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@supports (color: light-dark(#000, #fff)) {
|
|
44
|
-
:host {
|
|
45
|
-
${Zs((t,e)=>`light-dark(${t}, ${e})`)}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
*,
|
|
50
|
-
*::before,
|
|
51
|
-
*::after {
|
|
52
|
-
box-sizing: border-box;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
h1,
|
|
56
|
-
h2,
|
|
57
|
-
h3,
|
|
58
|
-
h4 {
|
|
59
|
-
font-family: var(--dpk-display);
|
|
60
|
-
font-weight: 660;
|
|
61
|
-
margin: 0;
|
|
62
|
-
line-height: 1.2;
|
|
63
|
-
letter-spacing: -0.015em;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
button {
|
|
67
|
-
font: inherit;
|
|
68
|
-
color: inherit;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
::selection {
|
|
72
|
-
background: color-mix(in srgb, var(--dpk-blue) 22%, transparent);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.dpk-mono,
|
|
76
|
-
.dpk-num {
|
|
77
|
-
font-variant-numeric: tabular-nums;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.dpk-label {
|
|
81
|
-
font-family: var(--dpk-mono);
|
|
82
|
-
font-size: 10px;
|
|
83
|
-
font-weight: 550;
|
|
84
|
-
letter-spacing: 0.1em;
|
|
85
|
-
text-transform: uppercase;
|
|
86
|
-
color: var(--dpk-ink-faint);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@media (prefers-reduced-motion: reduce) {
|
|
90
|
-
*,
|
|
91
|
-
*::before,
|
|
92
|
-
*::after {
|
|
93
|
-
animation-duration: 1ms !important;
|
|
94
|
-
animation-iteration-count: 1 !important;
|
|
95
|
-
transition-duration: 1ms !important;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
`,$t=D`
|
|
99
|
-
.dpk-btn {
|
|
100
|
-
display: inline-flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
justify-content: center;
|
|
103
|
-
gap: 6px;
|
|
104
|
-
min-height: 30px;
|
|
105
|
-
padding: 0 12px;
|
|
106
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
107
|
-
border-radius: var(--dpk-radius-sm);
|
|
108
|
-
background: var(--dpk-paper-raised);
|
|
109
|
-
color: var(--dpk-ink);
|
|
110
|
-
font-size: 12.5px;
|
|
111
|
-
font-weight: 550;
|
|
112
|
-
line-height: 1;
|
|
113
|
-
white-space: nowrap;
|
|
114
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
115
|
-
cursor: pointer;
|
|
116
|
-
transition:
|
|
117
|
-
background 160ms var(--dpk-ease),
|
|
118
|
-
border-color 160ms var(--dpk-ease),
|
|
119
|
-
box-shadow 160ms var(--dpk-ease),
|
|
120
|
-
color 160ms var(--dpk-ease),
|
|
121
|
-
transform 120ms var(--dpk-ease);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.dpk-btn:hover:not([disabled]) {
|
|
125
|
-
border-color: var(--dpk-rule-hover);
|
|
126
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.dpk-btn:active:not([disabled]) {
|
|
130
|
-
transform: translateY(1px) scale(0.985);
|
|
131
|
-
box-shadow: none;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.dpk-btn:focus-visible {
|
|
135
|
-
outline: none;
|
|
136
|
-
box-shadow: var(--dpk-focus);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.dpk-btn[disabled] {
|
|
140
|
-
opacity: 0.45;
|
|
141
|
-
box-shadow: none;
|
|
142
|
-
cursor: not-allowed;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.dpk-btn--accent {
|
|
146
|
-
border-color: color-mix(in srgb, var(--dpk-accent-strong) 70%, transparent);
|
|
147
|
-
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent) 55%, var(--dpk-accent-strong));
|
|
148
|
-
color: var(--dpk-accent-ink);
|
|
149
|
-
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
|
|
150
|
-
box-shadow:
|
|
151
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.22),
|
|
152
|
-
0 1px 2px color-mix(in srgb, var(--dpk-accent) 30%, transparent),
|
|
153
|
-
0 4px 12px -4px color-mix(in srgb, var(--dpk-accent) 55%, transparent);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.dpk-btn--accent:hover:not([disabled]) {
|
|
157
|
-
border-color: color-mix(in srgb, var(--dpk-accent-strong) 70%, transparent);
|
|
158
|
-
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent-bright) 40%, var(--dpk-accent));
|
|
159
|
-
box-shadow:
|
|
160
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
161
|
-
0 2px 4px color-mix(in srgb, var(--dpk-accent) 30%, transparent),
|
|
162
|
-
0 8px 20px -6px color-mix(in srgb, var(--dpk-accent) 65%, transparent);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/* Selection state, shared by every template's filter/nav controls. */
|
|
166
|
-
.dpk-btn--selected {
|
|
167
|
-
border-color: color-mix(in srgb, var(--dpk-blue-strong) 70%, transparent);
|
|
168
|
-
background: linear-gradient(180deg, var(--dpk-blue), var(--dpk-blue-strong));
|
|
169
|
-
color: #fff;
|
|
170
|
-
box-shadow:
|
|
171
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.2),
|
|
172
|
-
0 2px 8px -2px color-mix(in srgb, var(--dpk-blue) 60%, transparent);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.dpk-btn--selected:hover:not([disabled]) {
|
|
176
|
-
border-color: color-mix(in srgb, var(--dpk-blue-strong) 70%, transparent);
|
|
177
|
-
background: linear-gradient(180deg, var(--dpk-blue), var(--dpk-blue));
|
|
178
|
-
box-shadow:
|
|
179
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.22),
|
|
180
|
-
0 4px 12px -3px color-mix(in srgb, var(--dpk-blue) 65%, transparent);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.dpk-btn--ghost {
|
|
184
|
-
border-color: transparent;
|
|
185
|
-
background: transparent;
|
|
186
|
-
box-shadow: none;
|
|
187
|
-
color: var(--dpk-ink-soft);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.dpk-btn--ghost:hover:not([disabled]) {
|
|
191
|
-
background: var(--dpk-paper-inset);
|
|
192
|
-
border-color: transparent;
|
|
193
|
-
box-shadow: none;
|
|
194
|
-
color: var(--dpk-ink);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.dpk-icon-btn {
|
|
198
|
-
position: relative;
|
|
199
|
-
display: inline-flex;
|
|
200
|
-
align-items: center;
|
|
201
|
-
justify-content: center;
|
|
202
|
-
width: 26px;
|
|
203
|
-
height: 26px;
|
|
204
|
-
padding: 0;
|
|
205
|
-
border: 1px solid transparent;
|
|
206
|
-
border-radius: var(--dpk-radius-xs);
|
|
207
|
-
background: transparent;
|
|
208
|
-
color: var(--dpk-ink-faint);
|
|
209
|
-
font-size: 11px;
|
|
210
|
-
line-height: 1;
|
|
211
|
-
cursor: pointer;
|
|
212
|
-
transition:
|
|
213
|
-
background 160ms var(--dpk-ease),
|
|
214
|
-
color 160ms var(--dpk-ease),
|
|
215
|
-
transform 160ms var(--dpk-ease-spring);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.dpk-icon-btn:hover:not([disabled]) {
|
|
219
|
-
background: var(--dpk-paper-inset);
|
|
220
|
-
color: var(--dpk-ink);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.dpk-icon-btn:active:not([disabled]) {
|
|
224
|
-
transform: scale(0.92);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.dpk-icon-btn:focus-visible {
|
|
228
|
-
outline: none;
|
|
229
|
-
box-shadow: var(--dpk-focus);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.dpk-icon-btn[disabled] {
|
|
233
|
-
opacity: 0.35;
|
|
234
|
-
cursor: default;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.dpk-icon-btn[data-active='true'] {
|
|
238
|
-
background: var(--dpk-blue-soft);
|
|
239
|
-
color: var(--dpk-blue);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.dpk-icon-btn svg {
|
|
243
|
-
display: block;
|
|
244
|
-
width: 15px;
|
|
245
|
-
height: 15px;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/* Count badge for an icon-only control (comments on a card, drafts on the rail). */
|
|
249
|
-
.dpk-icon-badge {
|
|
250
|
-
position: absolute;
|
|
251
|
-
top: -5px;
|
|
252
|
-
right: -5px;
|
|
253
|
-
min-width: 16px;
|
|
254
|
-
height: 16px;
|
|
255
|
-
padding: 0 4px;
|
|
256
|
-
border: 1.5px solid var(--dpk-paper-raised);
|
|
257
|
-
border-radius: 999px;
|
|
258
|
-
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
259
|
-
color: var(--dpk-accent-ink);
|
|
260
|
-
font-family: var(--dpk-mono);
|
|
261
|
-
font-size: 9px;
|
|
262
|
-
font-weight: 650;
|
|
263
|
-
font-variant-numeric: tabular-nums;
|
|
264
|
-
line-height: 13px;
|
|
265
|
-
text-align: center;
|
|
266
|
-
box-shadow: 0 2px 6px -1px color-mix(in srgb, var(--dpk-accent) 55%, transparent);
|
|
267
|
-
animation: dpk-pop 260ms var(--dpk-ease-spring);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
@keyframes dpk-pop {
|
|
271
|
-
from {
|
|
272
|
-
transform: scale(0.4);
|
|
273
|
-
opacity: 0;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.dpk-input,
|
|
278
|
-
.dpk-textarea,
|
|
279
|
-
.dpk-select {
|
|
280
|
-
box-sizing: border-box;
|
|
281
|
-
width: 100%;
|
|
282
|
-
min-height: var(--dpk-control-h);
|
|
283
|
-
padding: 6px 10px;
|
|
284
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
285
|
-
border-radius: var(--dpk-radius-sm);
|
|
286
|
-
background: var(--dpk-paper-raised);
|
|
287
|
-
color: var(--dpk-ink);
|
|
288
|
-
font: inherit;
|
|
289
|
-
font-size: 12.5px;
|
|
290
|
-
box-shadow: inset 0 1px 2px var(--dpk-shade-1);
|
|
291
|
-
transition:
|
|
292
|
-
border-color 160ms var(--dpk-ease),
|
|
293
|
-
box-shadow 160ms var(--dpk-ease),
|
|
294
|
-
background 160ms var(--dpk-ease);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.dpk-input::placeholder,
|
|
298
|
-
.dpk-textarea::placeholder {
|
|
299
|
-
color: var(--dpk-ink-faint);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.dpk-input:hover,
|
|
303
|
-
.dpk-textarea:hover,
|
|
304
|
-
.dpk-select:hover {
|
|
305
|
-
border-color: var(--dpk-rule-hover);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
.dpk-input:focus,
|
|
309
|
-
.dpk-textarea:focus,
|
|
310
|
-
.dpk-select:focus {
|
|
311
|
-
outline: none;
|
|
312
|
-
border-color: var(--dpk-blue);
|
|
313
|
-
box-shadow: var(--dpk-focus);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.dpk-select {
|
|
317
|
-
appearance: none;
|
|
318
|
-
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23878e9e' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
|
|
319
|
-
background-repeat: no-repeat;
|
|
320
|
-
background-position: right 8px center;
|
|
321
|
-
padding-right: 28px;
|
|
322
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
323
|
-
cursor: pointer;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.dpk-textarea {
|
|
327
|
-
resize: vertical;
|
|
328
|
-
min-height: 64px;
|
|
329
|
-
line-height: 1.55;
|
|
330
|
-
}
|
|
331
|
-
`,vi=D`
|
|
332
|
-
.comment-pop {
|
|
333
|
-
box-sizing: border-box;
|
|
334
|
-
overflow: auto;
|
|
335
|
-
position: fixed;
|
|
336
|
-
inset: auto;
|
|
337
|
-
margin: 0;
|
|
338
|
-
display: grid;
|
|
339
|
-
gap: 10px;
|
|
340
|
-
padding: 14px;
|
|
341
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
342
|
-
border-radius: var(--dpk-radius-lg);
|
|
343
|
-
background: var(--dpk-paper-raised);
|
|
344
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
345
|
-
color: var(--dpk-ink);
|
|
346
|
-
font-size: 12.5px;
|
|
347
|
-
animation: dpk-pop-in 180ms var(--dpk-ease);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
@keyframes dpk-pop-in {
|
|
351
|
-
from {
|
|
352
|
-
opacity: 0;
|
|
353
|
-
transform: translateY(4px) scale(0.98);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.comment-pop .comment-list {
|
|
358
|
-
list-style: none;
|
|
359
|
-
margin: 0;
|
|
360
|
-
padding: 0;
|
|
361
|
-
display: grid;
|
|
362
|
-
gap: 6px;
|
|
363
|
-
max-height: 140px;
|
|
364
|
-
overflow: auto;
|
|
365
|
-
font-size: 12px;
|
|
366
|
-
color: var(--dpk-ink-soft);
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.comment-pop .comment-list li {
|
|
370
|
-
padding: 6px 10px;
|
|
371
|
-
border-radius: var(--dpk-radius-xs);
|
|
372
|
-
background: var(--dpk-accent-soft);
|
|
373
|
-
border-left: 2px solid var(--dpk-accent);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.comment-pop .dpk-textarea {
|
|
377
|
-
min-height: 54px;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.pop-actions {
|
|
381
|
-
display: flex;
|
|
382
|
-
gap: 4px;
|
|
383
|
-
align-items: center;
|
|
384
|
-
justify-content: flex-end;
|
|
385
|
-
}
|
|
386
|
-
`,Ws=D`
|
|
387
|
-
.dpk-prose {
|
|
388
|
-
overflow-wrap: anywhere;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.dpk-prose > :first-child {
|
|
392
|
-
margin-top: 0;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.dpk-prose > :last-child {
|
|
396
|
-
margin-bottom: 0;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.dpk-prose :is(p, ul, ol, pre, blockquote, table) {
|
|
400
|
-
margin: 0 0 0.6em;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.dpk-prose :is(h1, h2, h3, h4, h5, h6) {
|
|
404
|
-
margin: 0.8em 0 0.3em;
|
|
405
|
-
font-size: 1em;
|
|
406
|
-
font-weight: 650;
|
|
407
|
-
line-height: 1.4;
|
|
408
|
-
color: var(--dpk-ink);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.dpk-prose :is(ul, ol) {
|
|
412
|
-
padding-left: 1.3em;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
.dpk-prose li + li {
|
|
416
|
-
margin-top: 0.15em;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
/* A task list item: its checkbox is the marker, so it has no bullet of its own. */
|
|
420
|
-
.dpk-prose li:has(> input[type='checkbox']:first-child) {
|
|
421
|
-
margin-left: -1.3em;
|
|
422
|
-
list-style: none;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
.dpk-prose li > input[type='checkbox']:first-child {
|
|
426
|
-
margin: 0 0.4em 0 0;
|
|
427
|
-
vertical-align: -0.1em;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
.dpk-prose strong {
|
|
431
|
-
font-weight: 650;
|
|
432
|
-
color: var(--dpk-ink);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.dpk-prose a {
|
|
436
|
-
color: var(--dpk-blue);
|
|
437
|
-
text-decoration: underline;
|
|
438
|
-
text-underline-offset: 2px;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.dpk-prose code {
|
|
442
|
-
padding: 0.05em 0.3em;
|
|
443
|
-
border-radius: var(--dpk-radius-xs);
|
|
444
|
-
background: var(--dpk-paper-sunken);
|
|
445
|
-
font-family: var(--dpk-mono);
|
|
446
|
-
font-size: 0.9em;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
.dpk-prose pre {
|
|
450
|
-
padding: 8px 10px;
|
|
451
|
-
border-radius: var(--dpk-radius-xs);
|
|
452
|
-
background: var(--dpk-paper-sunken);
|
|
453
|
-
overflow: auto;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.dpk-prose pre code {
|
|
457
|
-
padding: 0;
|
|
458
|
-
background: none;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.dpk-prose blockquote {
|
|
462
|
-
padding-left: 0.8em;
|
|
463
|
-
border-left: 2px solid var(--dpk-rule-strong);
|
|
464
|
-
color: var(--dpk-ink-soft);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.dpk-prose table {
|
|
468
|
-
border-collapse: collapse;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
.dpk-prose :is(th, td) {
|
|
472
|
-
padding: 2px 8px;
|
|
473
|
-
border: 1px solid var(--dpk-rule);
|
|
474
|
-
text-align: left;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
.dpk-prose hr {
|
|
478
|
-
border: none;
|
|
479
|
-
border-top: 1px solid var(--dpk-rule);
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
.dpk-prose img {
|
|
483
|
-
max-width: 100%;
|
|
484
|
-
}
|
|
485
|
-
`,ce=(t,e)=>t instanceof e?t:null;function St(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ee=St();function Vs(t){ee=t}var te={exec:()=>null};function de(t){let e=[];return s=>{let n=Math.max(0,Math.min(3,s-1)),r=e[n];return r||(r=t(n),e[n]=r),r}}function b(t,e=""){let s=typeof t=="string"?t:t.source,n={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(T.caret,"$1"),s=s.replace(r,o),n},getRegex:()=>new RegExp(s,e)};return n}var xi=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),T={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:de(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:de(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:de(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:de(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:de(t=>new RegExp(`^ {0,${t}}(?:</?(?:${Se})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:de(t=>new RegExp(`^ {0,${t}}>`))},yi=/^(?:[ \t]*(?:\n|$))+/,wi=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$i=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$e=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Si=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,At=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Gs=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Js=b(Gs).replace(/bull/g,At).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ai=b(Gs).replace(/bull/g,At).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ct=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Ci=/^[^\n]+/,Tt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ti=b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Tt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ei=b(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,At).getRegex(),Se="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Et=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_i=b("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Et).replace("tag",Se).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ys=t=>b(Ct).replace("hr",$e).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Se).getRegex(),Ri=Ys(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Li=Ys(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Pi=b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Li).getRegex(),_t={blockquote:Pi,code:wi,def:Ti,fences:$i,heading:Si,hr:$e,html:_i,lheading:Js,list:Ei,newline:yi,paragraph:Ri,table:te,text:Ci},Qs=b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$e).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Se).getRegex(),zi={..._t,lheading:Ai,table:Qs,paragraph:b(Ct).replace("hr",$e).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Qs).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Se).getRegex()},Mi={..._t,html:b(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Et).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:te,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:b(Ct).replace("hr",$e).replace("heading",` *#{1,6} *[^
|
|
486
|
-
]`).replace("lheading",Js).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Oi=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ji=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Xs=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Ii=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,B=/[\p{P}\p{S}]/u,pe=/[\s\p{P}\p{S}]/u,Ae=/[^\s\p{P}\p{S}]/u,qi=b(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,pe).getRegex(),Ni=/[\p{Pi}\p{Ps}"']/u,en=/(?!~)[\p{P}\p{S}]/u,Bi=/(?!~)[\s\p{P}\p{S}]/u,Di=/(?:[^\s\p{P}\p{S}]|~)/u,Ui=b(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",xi?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),tn=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Hi=b(tn,"u").replace(/punct/g,B).getRegex(),Fi=b(tn,"u").replace(/punct/g,en).getRegex(),Ki=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Zi=b(Ki,"u").replace(/openQuote/g,Ni).replace(/punct/g,B).getRegex(),sn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Wi=b(sn,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,pe).replace(/punct/g,B).getRegex(),Vi=b(sn,"gu").replace(/notPunctSpace/g,Di).replace(/punctSpace/g,Bi).replace(/punct/g,en).getRegex(),Gi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Ji=b(Gi,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,pe).replace(/punct/g,B).getRegex(),Yi=b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,pe).replace(/punct/g,B).getRegex(),Qi="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Xi=b(Qi,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,pe).replace(/punct/g,B).getRegex(),eo=b(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,B).getRegex(),to="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",so=b(to,"gu").replace(/notPunctSpace/g,Ae).replace(/punctSpace/g,pe).replace(/punct/g,B).getRegex(),no=b(/\\(punct)/,"gu").replace(/punct/g,B).getRegex(),ro=b(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),io=b(Et).replace("(?:-->|$)","-->").getRegex(),oo=b("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",io).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nn=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,We=b(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",nn).getRegex(),ao=b(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",We).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),lo=b(/^!?\[(label)\]\[(ref)\]/).replace("label",We).replace("ref",Tt).getRegex(),co=b(/^!?\[(ref)\](?:\[\])?/).replace("ref",Tt).getRegex(),rn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,po=b(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",nn).getRegex(),ho=b("reflink|nolink(?!\\()","g").replace("reflink",b(/^!?\[(label)\]\[(ref)\]/).replace("label",po).replace("ref",rn).getRegex()).replace("nolink",b(/^!?\[(ref)\](?:\[\])?/).replace("ref",rn).getRegex()).getRegex(),on=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,uo=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,fo=b(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,uo).getRegex(),Rt={_backpedal:te,anyPunctuation:no,autolink:ro,blockSkip:Ui,br:Xs,code:ji,del:te,delLDelim:te,delRDelim:te,emStrongLDelim:Hi,emStrongRDelimAst:Wi,emStrongRDelimUnd:Yi,escape:Oi,link:ao,nolink:co,punctuation:qi,reflink:lo,reflinkSearch:ho,tag:oo,text:Ii,url:te},go={...Rt,emStrongLDelim:Zi,emStrongRDelimAst:Ji,emStrongRDelimUnd:Xi,link:b(/^!?\[(label)\]\((.*?)\)/).replace("label",We).getRegex(),reflink:b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",We).getRegex()},Lt={...Rt,emStrongRDelimAst:Vi,emStrongLDelim:Fi,delLDelim:eo,delRDelim:so,url:b(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",fo).replace("protocol",on).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:b(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",on).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},mo={...Lt,br:b(Xs).replace("{2,}","*").getRegex(),text:b(Lt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ve={normal:_t,gfm:zi,pedantic:Mi},Ce={normal:Rt,gfm:Lt,breaks:mo,pedantic:go},ko={"&":"&","<":"<",">":">",'"':""","'":"'"},an=t=>ko[t];function R(t,e){if(e){if(T.escapeTest.test(t))return t.replace(T.escapeReplace,an)}else if(T.escapeTestNoEncode.test(t))return t.replace(T.escapeReplaceNoEncode,an);return t}function bo(t){return t.replace(T.numericCharacterReference,(e,s,n)=>{let r=s===void 0?Number.parseInt(n,16):Number.parseInt(s,10);return r===0||r>1114111||r>=55296&&r<=57343?"\uFFFD":String.fromCodePoint(r)})}function ln(t){try{t=encodeURI(t).replace(T.percentDecode,"%")}catch{return null}return t}function cn(t,e){let s=t.replace(T.findPipe,(i,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),n=s.split(T.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(T.slashPipe,"|");return n}function K(t,e,s){let n=t.length;if(n===0)return"";let r=0;for(;r<n&&t.charAt(n-r-1)===e;)r++;return t.slice(0,n-r)}function dn(t){let e=t.split(`
|
|
487
|
-
`),s=e.length-1;for(;s>=0&&T.blankLine.test(e[s]);)s--;return e.length-s<=2?t:e.slice(0,s+1).join(`
|
|
488
|
-
`)}function Ge(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function pn(t,e){if(t.indexOf(e[0])===-1&&t.indexOf(e[1])===-1)return-1;let s=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])s++;else if(t[n]===e[1]&&(s--,s<0))return n;return s>0?-2:-1}function hn(t,e=0){let s=e,n="";for(let r of t)if(r===" "){let i=4-s%4;n+=" ".repeat(i),s+=i}else n+=r,s++;return n}function un(t,e,s,n,r){let i=e.href,o=e.title||null,a=t[1].replace(r.other.outputLinkReplace,"$1"),l=t[0].charAt(0)==="!";n.state.inLink=!0;let c=n.state.linkEmitted,p=n.state.inRawBlock;n.state.linkEmitted=!1;let d=n.inlineTokens(a),h=n.state.linkEmitted;if(n.state.linkEmitted=c,n.state.inLink=!1,!l){if(h){n.state.inRawBlock=p;return}n.state.linkEmitted=!0}return{type:l?"image":"link",raw:s,href:i,title:o,text:a,tokens:d}}function vo(t,e,s){let n=t.match(s.other.indentCodeCompensation);if(n===null)return e;let r=n[1];return e.split(`
|
|
489
|
-
`).map(i=>{let o=i.match(s.other.beginningSpace);if(o===null)return i;let[a]=o;return i.slice(Math.min(a.length,r.length))}).join(`
|
|
490
|
-
`)}function fn(t,e,s,n){if(!e.includes("<"))return!1;for(let r=0;r<e.length;r++){if(e[r]==="\\"){r++;continue}if(e[r]==="`"){let a=n.inline.code.exec(e.slice(r));if(a){r+=a[0].length-1;continue}}if(e[r]!=="<")continue;let i=t.slice(s+r),o=n.inline.tag.exec(i)||n.inline.autolink.exec(i);if(o){if(o[0].length>e.length-r)return!0;r+=o[0].length-1}}return!1}var Je=class{options;rules;lexer;constructor(t){this.options=t||ee}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let s=this.options.pedantic?e[0]:dn(e[0]),n=s.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:s,codeBlockStyle:"indented",text:n}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let s=e[0],n=vo(s,e[3]||"",this.rules);return{type:"code",raw:s,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let s=e[2].trim();if(this.rules.other.endingHash.test(s)){let n=K(s,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceTabChar.test(n))&&(s=n.trim())}return{type:"heading",raw:K(e[0],`
|
|
491
|
-
`),depth:e[1].length,text:s,tokens:this.lexer.inline(s)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:K(e[0],`
|
|
492
|
-
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let s=K(e[0],`
|
|
493
|
-
`).split(`
|
|
494
|
-
`),n="",r="",i=[];for(;s.length>0;){let o=!1,a=[],l;for(l=0;l<s.length;l++)if(this.rules.other.blockquoteStart.test(s[l]))a.push(s[l]),o=!0;else if(!o)a.push(s[l]);else break;s=s.slice(l);let c=a.join(`
|
|
495
|
-
`),p=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
496
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
497
|
-
${c}`:c,r=r?`${r}
|
|
498
|
-
${p}`:p;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,i,!0),this.lexer.state.top=d,s.length===0)break;let h=i.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let u=h,f=s.join(`
|
|
499
|
-
`),y=u.raw+`
|
|
500
|
-
`+f.replace(this.rules.other.blockquoteSetextReplace2,""),v=this.blockquote(y);i[i.length-1]=v;let _=y.substring(v.raw.length).replace(/^\n/,""),ge=_?_.split(`
|
|
501
|
-
`).length:0,me=ge?s.slice(0,-ge):s;me.length>0&&(n=`${n}
|
|
502
|
-
${me.join(`
|
|
503
|
-
`)}`),r=r.substring(0,r.length-u.text.length)+v.text;break}else if(h?.type==="list"){let u=h,f=u.raw+`
|
|
504
|
-
`+s.join(`
|
|
505
|
-
`),y=this.list(f);i[i.length-1]=y,n=n.substring(0,n.length-h.raw.length)+y.raw,r=r.substring(0,r.length-u.raw.length)+y.raw,s=f.substring(i.at(-1).raw.length).split(`
|
|
506
|
-
`);continue}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let s=e[1].trim(),n=s.length>1,r={type:"list",raw:"",ordered:n,start:n?+s.slice(0,-1):"",loose:!1,items:[]};s=n?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=n?s:"[*+-]");let i=this.rules.other.listItemRegex(s),o=!1;for(;t;){let l=!1,c="",p="";if(!(e=i.exec(t))||this.rules.block.hr.test(t))break;c=e[0],t=t.substring(c.length);let d=e[2].split(`
|
|
507
|
-
`,1)[0],h=e[1].length,u=this.options.pedantic?hn(d,h):d.replace(this.rules.other.leadingSpaceTab,_=>hn(_,h)),f=t.split(`
|
|
508
|
-
`,1)[0],y=!u.trim(),v=0;if(this.options.pedantic?(v=2,p=u.trimStart()):y?v=h+1:(v=u.search(this.rules.other.nonSpaceChar),v=v>4?1:v,p=u.slice(v),v+=h),y&&this.rules.other.blankLine.test(f)&&(c+=f+`
|
|
509
|
-
`,t=t.substring(f.length+1),l=!0),!l){let _=this.rules.other.nextBulletRegex(v),ge=this.rules.other.hrRegex(v),me=this.rules.other.fencesBeginRegex(v),vs=this.rules.other.headingBeginRegex(v),Dr=this.rules.other.htmlBeginRegex(v),Ur=this.rules.other.blockquoteBeginRegex(v);for(;t;){let at=t.split(`
|
|
510
|
-
`,1)[0],ke;if(f=at,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),ke=f):ke=f.replace(this.rules.other.leadingSpaceTab,Hr=>Hr.replace(this.rules.other.tabCharGlobal," ")),me.test(f)||vs.test(f)||Dr.test(f)||Ur.test(f)||_.test(f)||ge.test(f))break;if(ke.search(this.rules.other.nonSpaceChar)>=v||!f.trim())p+=`
|
|
511
|
-
`+ke.slice(v);else{if(y||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||me.test(u)||vs.test(u)||ge.test(u))break;p+=`
|
|
512
|
-
`+f}y=!f.trim(),c+=at+`
|
|
513
|
-
`,t=t.substring(at.length+1),u=ke.slice(v)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0)),r.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),r.raw+=c}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l of r.items)if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),!r.loose){let c=l.tokens.filter(d=>d.type==="space"),p=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));r.loose=p}for(let l of r.items){let c=l.tokens[0];if(l.task&&(c?.type==="text"||c?.type==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(l.raw);if(p){let d={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};l.checked=d.checked,r.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=d.raw+l.tokens[0].raw,l.tokens[0].text=d.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(d)):l.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):l.tokens.unshift(d)}}else l.task&&(l.task=!1)}if(r.loose)for(let l of r.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return r}}html(t){let e=this.rules.block.html.exec(t);if(e){let s=dn(e[0]);return{type:"html",block:!0,raw:s,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:s}}}def(t){let e=this.rules.block.def.exec(t);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&pn(e[2],"()")!==-1)return;let s=Ge(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:s,raw:K(e[0],`
|
|
514
|
-
`),href:n,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let s=cn(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
515
|
-
`):[],i={type:"table",raw:K(e[0],`
|
|
516
|
-
`),header:[],align:[],rows:[]};if(s.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?i.align.push("right"):this.rules.other.tableAlignCenter.test(o)?i.align.push("center"):this.rules.other.tableAlignLeft.test(o)?i.align.push("left"):i.align.push(null);for(let o=0;o<s.length;o++)i.header.push({text:s[o],tokens:this.lexer.inline(s[o]),header:!0,align:i.align[o]});for(let o of r)i.rows.push(cn(o,i.header.length).map((a,l)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:i.align[l]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let s=e[1].trim();return{type:"heading",raw:K(e[0],`
|
|
517
|
-
`),depth:e[2].charAt(0)==="="?1:2,text:s,tokens:this.lexer.inline(s)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let s=e[1].charAt(e[1].length-1)===`
|
|
518
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:s,tokens:this.lexer.inline(s)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(t);if(e){let s=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&fn(t,e[1],s,this.rules))return;let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=K(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=pn(e[2],"()");if(o===-2)return;if(o>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],i=o[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),un(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let s;if((s=this.rules.inline.reflink.exec(t))||(s=this.rules.inline.nolink.exec(t))){let n=s[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&fn(t,s[1],n,this.rules))return;let r=(s[2]||s[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[Ge(r)];if(!i){let o=s[0].charAt(0);return{type:"text",raw:o,text:o}}return un(s,i,s[0],this.lexer,this.rules)}}emStrong(t,e,s=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&s.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!s||this.rules.inline.punctuation.exec(s))){let r=[...n[0]].length-1,i,o,a=r,l=0,c=n[0][0],p=s===c,d=c==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*t.length+r);(n=d.exec(e))!==null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(o=[...i].length,n[3]||n[4]){a+=o;continue}else if(n[5]||n[6]){if(r%3&&!((r+o)%3)){l+=o;continue}if(p)break}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let h=[...n[0]][0].length,u=t.slice(0,r+n.index+h+o);if(Math.min(r,o)%2){let y=u.slice(1,-1);return{type:"em",raw:u,text:y,tokens:this.lexer.inlineTokens(y)}}let f=u.slice(2,-2);return{type:"strong",raw:u,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let s=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(s),r=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return n&&r&&(s=s.substring(1,s.length-1)),{type:"codespan",raw:e[0],text:s}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,s=""){let n=this.rules.inline.delLDelim.exec(t);if(n&&(!n[1]||!s||this.rules.inline.punctuation.exec(s))){let r=[...n[0]].length-1,i,o,a=r,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*t.length+r);(n=l.exec(e))!==null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i||(o=[...i].length,o!==r))continue;if(n[3]||n[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let c=[...n[0]][0].length,p=t.slice(0,r+n.index+c+o),d=p.slice(r,-r);return{type:"del",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let s,n;return e[2]==="@"?(s=e[1],n="mailto:"+s):(s=e[1],n=s),{type:"link",raw:e[0],text:s,href:n,autolink:!0,tokens:[{type:"text",raw:s,text:s}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let s,n;if(e[2]==="@")s=e[0],n="mailto:"+s;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);s=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:s,href:n,autolink:!0,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let s=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:s?e[0]:bo(e[0]),escaped:s}}}},O=class ks{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ee,this.options.tokenizer=this.options.tokenizer||new Je,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let s={other:T,block:Ve.normal,inline:Ce.normal};this.options.pedantic?(s.block=Ve.pedantic,s.inline=Ce.pedantic):this.options.gfm&&(s.block=Ve.gfm,this.options.breaks?s.inline=Ce.breaks:s.inline=Ce.gfm),this.tokenizer.rules=s}static get rules(){return{block:Ve,inline:Ce}}static lex(e,s){return new ks(s).lex(e)}static lexInline(e,s){return new ks(s).inlineTokens(e)}lex(e){e=e.replace(T.carriageReturn,`
|
|
519
|
-
`),this.blockTokens(e,this.tokens);for(let s=0;s<this.inlineQueue.length;s++){let n=this.inlineQueue[s];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,s=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(T.tabCharGlobal," ").replace(T.spaceLine,""));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(a=>(i=a.call({lexer:this},e,s))?(e=e.substring(i.raw.length),s.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let a=s.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
|
|
520
|
-
`:s.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let a=s.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
521
|
-
`)?"":`
|
|
522
|
-
`)+i.raw,a.text+=`
|
|
523
|
-
`+i.text,this.inlineQueue.at(-1).src=a.text):s.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let a=s.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
524
|
-
`)?"":`
|
|
525
|
-
`)+i.raw,a.text+=`
|
|
526
|
-
`+i.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},s.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),s.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),s.push(i);continue}let o=e;if(this.options.extensions?.startBlock){let a=1/0,l=e.slice(1),c;this.options.extensions.startBlock.forEach(p=>{c=p.call({lexer:this},l),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(o=e.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let a=s.at(-1);n&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
527
|
-
`)?"":`
|
|
528
|
-
`)+i.raw,a.text+=`
|
|
529
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):s.push(i),n=o.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let a=s.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
530
|
-
`)?"":`
|
|
531
|
-
`)+i.raw,a.text+=`
|
|
532
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):s.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,s}inline(e,s=[]){return this.inlineQueue.push({src:e,tokens:s}),s}linkInText(e){if(!e.includes("["))return!1;let s=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(s.test(n[0])&&e.charAt(n.index-1)!=="!")return!0;for(let n of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let r=n[0],i=r.lastIndexOf("[");if(!(r.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Ge(r.slice(i+1,-1))))&&!(i>1&&this.linkInText(r.slice(1,i-1))))return!0}return!1}inlineTokens(e,s=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(")");try{return this.#e(e,s)}finally{this.state.linkParenPossible=n}}#e(e,s){let n=e;if(this.tokens.links&&e.includes("[")){let a=this.tokenizer.rules.inline.reflinkSearch,l=c=>{let p=c.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Ge(c.slice(p+1,-1))))return c;if(p>1&&c.charAt(0)!=="!"){let d=c.slice(1,p-1);if(this.linkInText(d))return"["+d.replace(a,l)+"]["+"a".repeat(c.length-p-2)+"]"}return"["+"a".repeat(c.length-2)+"]"};n=n.replace(a,l)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,a=>"+".repeat(a.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(a,l,c)=>{let p=c?c.length:0;return a.slice(0,p)+"["+"a".repeat(a.length-p-2)+"]"}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i="",o=1/0;for(;e;){if(e.length<o)o=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=""),r=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},e,s))?(e=e.substring(a.raw.length),s.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let c=s.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):s.push(a);continue}if(a=this.tokenizer.emStrong(e,n,i)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.del(e,n,i)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),s.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),s.push(a);continue}let l=e;if(this.options.extensions?.startInline){let c=1/0,p=e.slice(1),d;this.options.extensions.startInline.forEach(h=>{d=h.call({lexer:this},p),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(l)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(i=a.raw.slice(-1)),r=!0;let c=s.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):s.push(a);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return s}infiniteLoopError(e){let s="Infinite loop on byte: "+e;if(this.options.silent)console.error(s);else throw new Error(s)}},Ye=class{options;parser;constructor(t){this.options=t||ee}space(t){return""}code({text:t,lang:e,escaped:s}){let n=(e||"").match(T.notSpaceStart)?.[0],r=t?t.replace(T.endingNewline,"")+`
|
|
533
|
-
`:"";return n?'<pre><code class="language-'+R(n)+'">'+(s?r:R(r,!0))+`</code></pre>
|
|
534
|
-
`:"<pre><code>"+(s?r:R(r,!0))+`</code></pre>
|
|
535
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
536
|
-
${this.parser.parse(t)}</blockquote>
|
|
537
|
-
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
538
|
-
`}hr(t){return`<hr>
|
|
539
|
-
`}list(t){let e=t.ordered,s=t.start,n="";for(let o=0;o<t.items.length;o++){let a=t.items[o];n+=this.listitem(a)}let r=e?"ol":"ul",i=e&&s!==1?' start="'+s+'"':"";return"<"+r+i+`>
|
|
540
|
-
`+n+"</"+r+`>
|
|
541
|
-
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
542
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
543
|
-
`}table(t){let e="",s="";for(let r=0;r<t.header.length;r++)s+=this.tablecell(t.header[r]);e+=this.tablerow({text:s});let n="";for(let r=0;r<t.rows.length;r++){let i=t.rows[r];s="";for(let o=0;o<i.length;o++)s+=this.tablecell(i[o]);n+=this.tablerow({text:s})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
544
|
-
<thead>
|
|
545
|
-
`+e+`</thead>
|
|
546
|
-
`+n+`</table>
|
|
547
|
-
`}tablerow({text:t}){return`<tr>
|
|
548
|
-
${t}</tr>
|
|
549
|
-
`}tablecell(t){let e=this.parser.parseInline(t.tokens),s=t.header?"th":"td";return(t.align?`<${s} align="${t.align}">`:`<${s}>`)+e+`</${s}>
|
|
550
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${R(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:s,tokens:n,autolink:r}){let i=r?R(s,!0):this.parser.parseInline(n),o=ln(t);if(o===null)return i;t=R(o,r);let a='<a href="'+t+'"';return e&&(a+=' title="'+R(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:s,tokens:n}){n&&(s=this.parser.parseInline(n,this.parser.textRenderer));let r=ln(t);if(r===null)return R(s);t=r;let i=`<img src="${R(t)}" alt="${R(s)}"`;return e&&(i+=` title="${R(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:R(t.text)}},Pt=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},j=class bs{options;renderer;textRenderer;constructor(e){this.options=e||ee,this.options.renderer=this.options.renderer||new Ye,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Pt}static parse(e,s){return new bs(s).parse(e)}static parseInline(e,s){return new bs(s).parseInline(e)}parse(e){this.renderer.parser=this;let s="";for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let o=r,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(o.type)){s+=a||"";continue}}let i=r;switch(i.type){case"space":{s+=this.renderer.space(i);break}case"hr":{s+=this.renderer.hr(i);break}case"heading":{s+=this.renderer.heading(i);break}case"code":{s+=this.renderer.code(i);break}case"table":{s+=this.renderer.table(i);break}case"blockquote":{s+=this.renderer.blockquote(i);break}case"list":{s+=this.renderer.list(i);break}case"checkbox":{s+=this.renderer.checkbox(i);break}case"html":{s+=this.renderer.html(i);break}case"def":{s+=this.renderer.def(i);break}case"paragraph":{s+=this.renderer.paragraph(i);break}case"text":{s+=this.renderer.text(i);break}default:{let o='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return s}parseInline(e,s=this.renderer){this.renderer.parser=this;let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){n+=a||"";continue}}let o=i;switch(o.type){case"escape":{n+=s.text(o);break}case"html":{n+=s.html(o);break}case"link":{n+=s.link(o);break}case"image":{n+=s.image(o);break}case"checkbox":{n+=s.checkbox(o);break}case"strong":{n+=s.strong(o);break}case"em":{n+=s.em(o);break}case"codespan":{n+=s.codespan(o);break}case"br":{n+=s.br(o);break}case"del":{n+=s.del(o);break}case"text":{n+=s.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}},Te=class{options;block;constructor(t){this.options=t||ee}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?O.lex:O.lexInline}provideParser(t=this.block){return t?j.parse:j.parseInline}},gn=class{defaults=St();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=j;Renderer=Ye;TextRenderer=Pt;Lexer=O;Tokenizer=Je;Hooks=Te;constructor(...t){this.use(...t)}walkTokens(t,e){let s=[];for(let n of t)switch(s=s.concat(e.call(this,n)),n.type){case"table":{let r=n;for(let i of r.header)s=s.concat(this.walkTokens(i.tokens,e));for(let i of r.rows)for(let o of i)s=s.concat(this.walkTokens(o.tokens,e));break}case"list":{let r=n;s=s.concat(this.walkTokens(r.items,e));break}default:{let r=n;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let o=r[i].flat(1/0);s=s.concat(this.walkTokens(o,e))}):r.tokens&&(s=s.concat(this.walkTokens(r.tokens,e)))}}return s}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(s=>{let n={...s};if(n.async=this.defaults.async||n.async||!1,s.extensions&&(s.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=e.renderers[r.name];i?e.renderers[r.name]=function(...o){let a=r.renderer.apply(this,o);return a===!1&&(a=i.apply(this,o)),a}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[r.level];i?i.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),n.extensions=e),s.renderer){let r=this.defaults.renderer||new Ye(this.defaults);for(let i in s.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,a=s.renderer[o],l=r[o];r[o]=(...c)=>{let p=a.apply(r,c);return p===!1&&(p=l.apply(r,c)),p||""}}n.renderer=r}if(s.tokenizer){let r=this.defaults.tokenizer||new Je(this.defaults);for(let i in s.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,a=s.tokenizer[o],l=r[o];r[o]=(...c)=>{let p=a.apply(r,c);return p===!1&&(p=l.apply(r,c)),p}}n.tokenizer=r}if(s.hooks){let r=this.defaults.hooks||new Te;for(let i in s.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,a=s.hooks[o],l=r[o];Te.passThroughHooks.has(i)?r[o]=c=>{if(this.defaults.async&&Te.passThroughHooksRespectAsync.has(i))return(async()=>{let d=await a.call(r,c);return l.call(r,d)})();let p=a.call(r,c);return l.call(r,p)}:r[o]=(...c)=>{if(this.defaults.async)return(async()=>{let d=await a.apply(r,c);return d===!1&&(d=await l.apply(r,c)),d})();let p=a.apply(r,c);return p===!1&&(p=l.apply(r,c)),p}}n.hooks=r}if(s.walkTokens){let r=this.defaults.walkTokens,i=s.walkTokens;n.walkTokens=function(o){let a=[];return a.push(i.call(this,o)),r&&(a=a.concat(r.call(this,o))),a}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return O.lex(t,e??this.defaults)}parser(t,e){return j.parse(t,e??this.defaults)}parseMarkdown(t){return(e,s)=>{let n={...s},r={...this.defaults,...n},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&n.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=t),r.async)return(async()=>{let o=r.hooks?await r.hooks.preprocess(e):e,a=await(r.hooks?await r.hooks.provideLexer(t):t?O.lex:O.lexInline)(o,r),l=r.hooks?await r.hooks.processAllTokens(a):a;r.walkTokens&&await Promise.all(this.walkTokens(l,r.walkTokens));let c=await(r.hooks?await r.hooks.provideParser(t):t?j.parse:j.parseInline)(l,r);return r.hooks?await r.hooks.postprocess(c):c})().catch(i);try{r.hooks&&(e=r.hooks.preprocess(e));let o=(r.hooks?r.hooks.provideLexer(t):t?O.lex:O.lexInline)(e,r);r.hooks&&(o=r.hooks.processAllTokens(o)),r.walkTokens&&this.walkTokens(o,r.walkTokens);let a=(r.hooks?r.hooks.provideParser(t):t?j.parse:j.parseInline)(o,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(o){return i(o)}}}onError(t,e){return s=>{if(s.message+=`
|
|
551
|
-
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+R(s.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(s);throw s}}},se=new gn;function $(t,e){return se.parse(t,e)}$.options=$.setOptions=function(t){return se.setOptions(t),$.defaults=se.defaults,Vs($.defaults),$},$.getDefaults=St,$.defaults=ee;function xo(...t){return se.use(...t),$.defaults=se.defaults,Vs($.defaults),$}$.use=xo,$.walkTokens=function(t,e){return se.walkTokens(t,e)},$.parseInline=se.parseInline,$.Parser=j,$.parser=j.parse,$.Renderer=Ye,$.TextRenderer=Pt,$.Lexer=O,$.lexer=O.lex,$.Tokenizer=Je,$.Hooks=Te,$.parse=$,$.options,$.setOptions,$.walkTokens,$.parseInline,j.parse,O.lex;const yo={"&":"&","<":"<",">":">",'"':""","'":"'"},ne=t=>t.replace(/[&<>"']/g,e=>yo[e]??e),wo=new Set(["http","https","mailto"]),mn=t=>{const e=t.replace(/[\u0000- \u007f]/g,""),s=/^([a-z][a-z0-9+.-]*):/i.exec(e)?.[1];return s===void 0||wo.has(s.toLowerCase())},$o=t=>/^https?:/i.test(t.trim()),So=new gn({gfm:!0,breaks:!0,renderer:{html({text:t}){return ne(t)},link({href:t,title:e,tokens:s}){const n=this.parser.parseInline(s);if(!mn(t))return n;const r=e?` title="${ne(e)}"`:"",i=$o(t)?' target="_blank" rel="noopener noreferrer"':"";return`<a href="${ne(t)}"${r}${i}>${n}</a>`},image({href:t,title:e,text:s}){if(!mn(t))return ne(s);const n=e?` title="${ne(e)}"`:"";return`<img src="${ne(t)}" alt="${ne(s)}"${n}>`}}}),kn=t=>So.parse(t,{async:!1}),Ao=Ke({en:{clickToEdit:"Click to edit",unset:"Not set",edit:"Edit"},ja:{clickToEdit:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u7DE8\u96C6",unset:"\u672A\u8A2D\u5B9A",edit:"\u7DE8\u96C6"}});class bn extends H{static{this.styles=[Ze,Ws,D`
|
|
552
|
-
/* One atomic box in both states, so the text can be edited where it sits:
|
|
553
|
-
while editing, the text stays (hidden) underneath and keeps sizing the
|
|
554
|
-
box, and the field lies over it. Starting an edit moves nothing; the
|
|
555
|
-
box grows only as the draft does. */
|
|
556
|
-
:host {
|
|
557
|
-
display: inline-block;
|
|
558
|
-
max-width: 100%;
|
|
559
|
-
vertical-align: baseline;
|
|
560
|
-
/* Inherit the surrounding type scale instead of forcing the chrome size:
|
|
561
|
-
an inline edit inside a 17px heading must look like a 17px heading.
|
|
562
|
-
Color comes along too, so an edit on a colored card stays legible. */
|
|
563
|
-
font-family: inherit;
|
|
564
|
-
font-size: inherit;
|
|
565
|
-
font-weight: inherit;
|
|
566
|
-
line-height: inherit;
|
|
567
|
-
color: inherit;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
.box {
|
|
571
|
-
position: relative;
|
|
572
|
-
display: block;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
/* No vertical padding or border: the box is exactly the lines of text.
|
|
576
|
-
The underline and ring are shadows, which never move the layout. */
|
|
577
|
-
.view {
|
|
578
|
-
display: block;
|
|
579
|
-
padding: 0 4px;
|
|
580
|
-
border-radius: var(--dpk-radius-xs);
|
|
581
|
-
white-space: pre-wrap;
|
|
582
|
-
overflow-wrap: anywhere;
|
|
583
|
-
cursor: text;
|
|
584
|
-
transition:
|
|
585
|
-
background 140ms var(--dpk-ease),
|
|
586
|
-
box-shadow 140ms var(--dpk-ease);
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
.view:hover {
|
|
590
|
-
background: var(--dpk-blue-soft);
|
|
591
|
-
box-shadow:
|
|
592
|
-
inset 0 -1px 0 var(--dpk-blue),
|
|
593
|
-
inset 0 0 0 1px color-mix(in srgb, var(--dpk-blue) 22%, transparent);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/* Formatted text keeps its own line breaks: a break in the source is a <br>. */
|
|
597
|
-
.view.dpk-prose {
|
|
598
|
-
white-space: normal;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
.view[data-empty='true'] {
|
|
602
|
-
box-shadow: inset 0 -1px 0 var(--dpk-rule-strong);
|
|
603
|
-
color: var(--dpk-ink-faint);
|
|
604
|
-
font-style: italic;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
.view[data-empty='true']:hover {
|
|
608
|
-
box-shadow: inset 0 -1px 0 var(--dpk-blue);
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
.view[aria-hidden='true'] {
|
|
612
|
-
visibility: hidden;
|
|
613
|
-
transition: none;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
.field {
|
|
617
|
-
position: absolute;
|
|
618
|
-
inset: 0;
|
|
619
|
-
box-sizing: border-box;
|
|
620
|
-
width: 100%;
|
|
621
|
-
height: 100%;
|
|
622
|
-
min-width: 0;
|
|
623
|
-
margin: 0;
|
|
624
|
-
padding: 0 4px;
|
|
625
|
-
border: none;
|
|
626
|
-
border-radius: var(--dpk-radius-xs);
|
|
627
|
-
outline: none;
|
|
628
|
-
background: var(--dpk-paper-raised);
|
|
629
|
-
box-shadow:
|
|
630
|
-
inset 0 0 0 1px var(--dpk-blue),
|
|
631
|
-
var(--dpk-focus);
|
|
632
|
-
font: inherit;
|
|
633
|
-
line-height: inherit;
|
|
634
|
-
letter-spacing: inherit;
|
|
635
|
-
color: inherit;
|
|
636
|
-
white-space: pre-wrap;
|
|
637
|
-
overflow-wrap: anywhere;
|
|
638
|
-
overflow: hidden;
|
|
639
|
-
resize: none;
|
|
640
|
-
animation: dpk-inline-edit-in 140ms var(--dpk-ease) backwards;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
.field::placeholder {
|
|
644
|
-
color: var(--dpk-ink-faint);
|
|
645
|
-
font-style: italic;
|
|
646
|
-
opacity: 1;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
@keyframes dpk-inline-edit-in {
|
|
650
|
-
from {
|
|
651
|
-
opacity: 0;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
/* seamless: no field chrome at all — the text is edited where it sits. */
|
|
656
|
-
:host([seamless]) .view,
|
|
657
|
-
:host([seamless]) .field {
|
|
658
|
-
padding: 0;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
:host([seamless]) .field {
|
|
662
|
-
border-radius: 0;
|
|
663
|
-
background: transparent;
|
|
664
|
-
box-shadow: none;
|
|
665
|
-
}
|
|
666
|
-
`]}static{this.properties={value:{type:String},placeholder:{type:String},multiline:{type:Boolean},wrap:{type:Boolean,reflect:!0},seamless:{type:Boolean,reflect:!0},markdown:{type:Boolean},label:{type:String},editing:{state:!0}}}#e="";#i=0;#n=new wt(this);connectedCallback(){super.connectedCallback(),this.#i+=1}constructor(){super(),this.value="",this.placeholder="",this.multiline=!1,this.wrap=!1,this.seamless=!1,this.markdown=!1,this.label="",this.editing=!1,this.#e=""}startEditing(){this.#e=this.value,this.editing=!0}willUpdate(e){e.has("value")&&!this.editing&&(this.#e=this.value)}updated(){if(!this.editing)return;const e=this.renderRoot.querySelector(".field"),s=this.renderRoot,n=s instanceof ShadowRoot?s.activeElement:document.activeElement;e&&n!==e&&(e.focus(),e.select())}render(){const e=Ao(this.#n.locale),s=this.placeholder||e.unset,{editing:n}=this,r=n?this.#e:this.value,i=r===""?s:n&&r.endsWith(`
|
|
667
|
-
`)?`${r}\u200B`:r;return this.markdown&&!n&&r!==""?g`<span class="box"
|
|
668
|
-
><div
|
|
669
|
-
class="view dpk-prose"
|
|
670
|
-
data-empty="false"
|
|
671
|
-
role="button"
|
|
672
|
-
tabindex="0"
|
|
673
|
-
title=${e.clickToEdit}
|
|
674
|
-
@click=${this.#t}
|
|
675
|
-
@keydown=${this.#s}
|
|
676
|
-
>
|
|
677
|
-
${Ds(kn(r))}
|
|
678
|
-
</div></span
|
|
679
|
-
>`:g`<span class="box"
|
|
680
|
-
><span
|
|
681
|
-
class="view"
|
|
682
|
-
data-empty=${String(r==="")}
|
|
683
|
-
aria-hidden=${n?"true":m}
|
|
684
|
-
role=${n?m:"button"}
|
|
685
|
-
tabindex=${n?m:"0"}
|
|
686
|
-
title=${n?m:e.clickToEdit}
|
|
687
|
-
@click=${this.#t}
|
|
688
|
-
@keydown=${this.#s}
|
|
689
|
-
>${i}</span
|
|
690
|
-
>${n?this.#r(this.label||this.placeholder||e.edit,s):m}</span
|
|
691
|
-
>`}#r(e,s){return this.multiline||this.wrap?g`<textarea
|
|
692
|
-
class="field"
|
|
693
|
-
rows="1"
|
|
694
|
-
.value=${bt(this.#e)}
|
|
695
|
-
placeholder=${s}
|
|
696
|
-
aria-label=${e}
|
|
697
|
-
@input=${this.#o}
|
|
698
|
-
@keydown=${this.#a}
|
|
699
|
-
@blur=${this.#l}
|
|
700
|
-
></textarea>`:g`<input
|
|
701
|
-
class="field"
|
|
702
|
-
.value=${bt(this.#e)}
|
|
703
|
-
placeholder=${s}
|
|
704
|
-
aria-label=${e}
|
|
705
|
-
@input=${this.#o}
|
|
706
|
-
@keydown=${this.#a}
|
|
707
|
-
@blur=${this.#l}
|
|
708
|
-
/>`}#t=e=>{e.composedPath().some(s=>s instanceof HTMLAnchorElement)||(e.stopPropagation(),!this.editing&&(this.#e=this.value,this.editing=!0))};#s=e=>{e.isComposing||this.editing||e.target instanceof HTMLAnchorElement||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.editing=!0)};#o=e=>{const s=ce(e.target,HTMLInputElement)??ce(e.target,HTMLTextAreaElement);s!==null&&(this.#e=s.value,this.requestUpdate())};#a=e=>{if(!e.isComposing){if(e.key==="Escape"){e.preventDefault(),this.#e=this.value,this.editing=!1;return}e.key==="Enter"&&(!this.multiline||this.wrap||e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.#p())}};#l=e=>{const s=e.currentTarget;if(!(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement))return;const n=this.#i,{selectionStart:r,selectionEnd:i}=s;queueMicrotask(()=>{!this.isConnected||!this.editing||(n!==this.#i?(s.focus(),s.setSelectionRange(r,i)):this.#p())})};#p=()=>{if(!this.editing)return;this.editing=!1;const s=(this.wrap?this.#e.replace(/\r?\n/g," "):this.#e).trim();s!==this.value&&this.dispatchEvent(new CustomEvent("dpk-commit",{detail:{value:s},bubbles:!0,composed:!0}))}}const Co=()=>{customElements.get("dpk-component-inline-edit")||customElements.define("dpk-component-inline-edit",bn)},To={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function zt(t){return To}let Eo;function _o(t){return Eo?.get(t)}let Ro;function Lo(t){return Ro?.get(t)}let Po;function zo(t,e){return Po?.get(t)?.get(e)}function Ee(t){const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function A(t,e,s,n,r){const i=r&&"input"in r?r.input:s.value,o=r?.expected??t.expects??null,a=r?.received??Ee(i),l={kind:t.kind,type:t.type,input:i,expected:o,received:a,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${a}`,requirement:t.requirement,path:r?.path,issues:r?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},c=t.kind==="schema",p=r?.message??t.message??zo(t.reference,l.lang)??(c?Lo(l.lang):null)??n.message??_o(l.lang);p!==void 0&&(l.message=typeof p=="function"?p(l):p),c&&(s.typed=!1),s.issues?s.issues.push(l):s.issues=[l]}function Mo(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function Oo(t,e){return Object.prototype.hasOwnProperty.call(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Mt(t,e){const s=[...new Set(t)];return s.length>1?`(${s.join(` ${e} `)})`:s[0]??"never"}function E(t){return t["~standard"]={version:1,vendor:"valibot",validate:e=>t["~run"]({value:e},zt())},t}var jo=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function vn(t,e){return{kind:"validation",type:"check",reference:vn,async:!1,expects:null,requirement:t,message:e,"~run"(s,n){return s.typed&&!this.requirement(s.value)&&A(this,"input",s,n),s}}}function xn(t){return{kind:"validation",type:"finite",reference:xn,async:!1,expects:null,requirement:Number.isFinite,message:t,"~run"(e,s){return e.typed&&!this.requirement(e.value)&&A(this,"finite",e,s),e}}}function yn(t){return{kind:"validation",type:"integer",reference:yn,async:!1,expects:null,requirement:Number.isInteger,message:t,"~run"(e,s){return e.typed&&!this.requirement(e.value)&&A(this,"integer",e,s),e}}}function w(t,e){return{kind:"validation",type:"min_length",reference:w,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(s,n){return s.typed&&s.value.length<this.requirement&&A(this,"length",s,n,{received:`${s.value.length}`}),s}}}function wn(t,e){return{kind:"validation",type:"min_value",reference:wn,async:!1,expects:`>=${t instanceof Date?t.toJSON():Ee(t)}`,requirement:t,message:e,"~run"(s,n){return s.typed&&!(s.value>=this.requirement)&&A(this,"value",s,n,{received:s.value instanceof Date?s.value.toJSON():Ee(s.value)}),s}}}function re(t,e){return{kind:"validation",type:"regex",reference:re,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(s,n){return s.typed&&!this.requirement.test(s.value)&&A(this,"format",s,n),s}}}function Ot(){return{kind:"transformation",type:"trim",reference:Ot,async:!1,"~run"(t){return t.value=t.value.trim(),t}}}const $n={abortEarly:!0};function Sn(t,e,s){return typeof t.fallback=="function"?t.fallback(e,s):t.fallback}function Qe(t,e,s){return typeof t.default=="function"?t.default(e,s):t.default}function Io(t,e){return!t["~run"]({value:e},$n).issues}function Z(t,e){return E({kind:"schema",type:"array",reference:Z,expects:"Array",async:!1,item:t,message:e,"~run"(s,n){const r=s.value;if(Array.isArray(r)){s.typed=!0,s.value=[];for(let i=0;i<r.length;i++){const o=r[i],a=this.item["~run"]({value:o},n);if(a.issues){const l={type:"array",origin:"value",input:r,key:i,value:o};for(const c of a.issues)c.path?c.path.unshift(l):c.path=[l],s.issues?.push(c);if(s.issues||(s.issues=a.issues),n.abortEarly){s.typed=!1;break}}a.typed||(s.typed=!1),s.value.push(a.value)}}else A(this,"type",s,n);return s}})}function An(t){return E({kind:"schema",type:"boolean",reference:An,expects:"boolean",async:!1,message:t,"~run"(e,s){return typeof e.value=="boolean"?e.typed=!0:A(this,"type",e,s),e}})}function L(t,e){return E({kind:"schema",type:"exact_optional",reference:L,expects:t.expects,async:!1,wrapped:t,default:e,"~run"(s,n){return this.wrapped["~run"](s,n)}})}function Cn(t){return E({kind:"schema",type:"lazy",reference:Cn,expects:"unknown",async:!1,getter:t,"~run"(e,s){return this.getter(e.value)["~run"](e,s)}})}function he(t,e){return E({kind:"schema",type:"literal",reference:he,expects:Ee(t),async:!1,literal:t,message:e,"~run"(s,n){return Mo(s.value,this.literal)?s.typed=!0:A(this,"type",s,n),s}})}function Tn(t,e){return E({kind:"schema",type:"nullable",reference:Tn,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,"~run"(s,n){return s.value===null&&(this.default!==void 0&&(s.value=Qe(this,s,n)),s.value===null)?(s.typed=!0,s):this.wrapped["~run"](s,n)}})}function En(t){return E({kind:"schema",type:"number",reference:En,expects:"number",async:!1,message:t,"~run"(e,s){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:A(this,"type",e,s),e}})}function C(t,e){return E({kind:"schema",type:"object",reference:C,expects:"Object",async:!1,entries:t,message:e,"~run"(s,n){const r=s.value;if(r&&typeof r=="object"){s.typed=!0,s.value={};for(const i in this.entries){const o=this.entries[i];if(i in r||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){const a=i in r?r[i]:Qe(o),l=o["~run"]({value:a},n);if(l.issues){const c={type:"object",origin:"value",input:r,key:i,value:a};for(const p of l.issues)p.path?p.path.unshift(c):p.path=[c],s.issues?.push(p);if(s.issues||(s.issues=l.issues),n.abortEarly){s.typed=!1;break}}l.typed||(s.typed=!1),s.value[i]=l.value}else if(o.fallback!==void 0)s.value[i]=Sn(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(A(this,"key",s,n,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]}),n.abortEarly))break}}else A(this,"type",s,n);return s}})}function _e(t,e){return E({kind:"schema",type:"optional",reference:_e,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,"~run"(s,n){return s.value===void 0&&(this.default!==void 0&&(s.value=Qe(this,s,n)),s.value===void 0)?(s.typed=!0,s):this.wrapped["~run"](s,n)}})}function Xe(t,e){return E({kind:"schema",type:"picklist",reference:Xe,expects:Mt(t.map(Ee),"|"),async:!1,options:t,message:e,"~run"(s,n){return this.options.includes(s.value)?s.typed=!0:A(this,"type",s,n),s}})}function et(t,e,s){return E({kind:"schema",type:"record",reference:et,expects:"Object",async:!1,key:t,value:e,message:s,"~run"(n,r){const i=n.value;if(i&&typeof i=="object"){n.typed=!0,n.value={};for(const o in i)if(Oo(i,o)){const a=i[o],l=this.key["~run"]({value:o},r);if(l.issues){const p={type:"object",origin:"key",input:i,key:o,value:a};for(const d of l.issues)d.path=[p],n.issues?.push(d);if(n.issues||(n.issues=l.issues),r.abortEarly){n.typed=!1;break}}const c=this.value["~run"]({value:a},r);if(c.issues){const p={type:"object",origin:"value",input:i,key:o,value:a};for(const d of c.issues)d.path?d.path.unshift(p):d.path=[p],n.issues?.push(d);if(n.issues||(n.issues=c.issues),r.abortEarly){n.typed=!1;break}}(!l.typed||!c.typed)&&(n.typed=!1),l.typed&&(n.value[l.value]=c.value)}}else A(this,"type",n,r);return n}})}function ue(t,e){return E({kind:"schema",type:"strict_object",reference:ue,expects:"Object",async:!1,entries:t,message:e,"~run"(s,n){const r=s.value;if(r&&typeof r=="object"){s.typed=!0,s.value={};for(const i in this.entries){const o=this.entries[i];if(i in r||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){const a=i in r?r[i]:Qe(o),l=o["~run"]({value:a},n);if(l.issues){const c={type:"object",origin:"value",input:r,key:i,value:a};for(const p of l.issues)p.path?p.path.unshift(c):p.path=[c],s.issues?.push(p);if(s.issues||(s.issues=l.issues),n.abortEarly){s.typed=!1;break}}l.typed||(s.typed=!1),s.value[i]=l.value}else if(o.fallback!==void 0)s.value[i]=Sn(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(A(this,"key",s,n,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]}),n.abortEarly))break}if(!s.issues||!n.abortEarly){for(const i in r)if(!Object.prototype.hasOwnProperty.call(this.entries,i)){A(this,"key",s,n,{input:i,expected:"never",path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]});break}}}else A(this,"type",s,n);return s}})}function k(t){return E({kind:"schema",type:"string",reference:k,expects:"string",async:!1,message:t,"~run"(e,s){return typeof e.value=="string"?e.typed=!0:A(this,"type",e,s),e}})}function _n(t){let e;if(t)for(const s of t)if(e)for(const n of s.issues)e.push(n);else e=s.issues;return e}function jt(t,e){return E({kind:"schema",type:"union",reference:jt,expects:Mt(t.map(s=>s.expects),"|"),async:!1,options:t,message:e,"~run"(s,n){let r,i,o;for(const a of this.options){const l=a["~run"]({value:s.value},n);if(l.typed)if(l.issues)i?i.push(l):i=[l];else{r=l;break}else o?o.push(l):o=[l]}if(r)return r;if(i){if(i.length===1)return i[0];A(this,"type",s,n,{issues:_n(i)}),s.typed=!0}else{if(o?.length===1)return o[0];A(this,"type",s,n,{issues:_n(o)})}return s}})}function W(){return E({kind:"schema",type:"unknown",reference:W,expects:"unknown",async:!1,"~run"(t){return t.typed=!0,t}})}function Rn(t,e,s){return E({kind:"schema",type:"variant",reference:Rn,expects:"Object",async:!1,key:t,options:e,message:s,"~run"(n,r){const i=n.value;if(i&&typeof i=="object"){let o,a=0,l=this.key,c=[];const p=(d,h)=>{for(const u of d.options){if(u.type==="variant")p(u,new Set(h).add(u.key));else{let f=!0,y=0;for(const v of h){const _=u.entries[v];if(v in i?_["~run"]({typed:!1,value:i[v]},$n).issues:_.type!=="exact_optional"&&_.type!=="optional"&&_.type!=="nullish"){f=!1,l!==v&&(a<y||a===y&&v in i&&!(l in i))&&(a=y,l=v,c=[]),l===v&&c.push(u.entries[v].expects);break}y++}if(f){const v=u["~run"]({value:i},r);(!o||!o.typed&&v.typed)&&(o=v)}}if(o&&!o.issues)break}};if(p(this,new Set([this.key])),o)return o;A(this,"type",n,r,{input:i[l],expected:Mt(c,"|"),path:[{type:"object",origin:"value",input:i,key:l,value:i[l]}]})}else A(this,"type",n,r);return n}})}function It(t,e,s){const n=t["~run"]({value:e},zt());if(n.issues)throw new jo(n.issues);return n.value}function x(...t){return E({...t[0],pipe:t,"~run"(e,s){for(const n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!s.abortEarly&&!s.abortPipeEarly)&&(e=n["~run"](e,s))}return e}})}function S(t,e,s){const n=t["~run"]({value:e},zt());return{typed:n.typed,success:!n.issues,output:n.value,issues:n.issues}}const tt=C({type:x(k(),w(1)),id:x(k(),w(1))}),qo=x(k(),w(1),re(/^[A-Za-z0-9_-]+$/,'ids may only contain letters, digits, "_" and "-" (a "." builds a path)')),No=(t,e)=>{if(e===1)return t.includes(".")?null:[t];const s=t.split(".");return s.length===e&&s.every(n=>n.length>0)?s:null},ie=C({id:x(k(),w(1)),type:x(k(),w(1)),target:tt,payload:W(),note:L(k()),createdAt:x(k(),w(1))}),Bo=(t,e,s,n={})=>{const r=C({id:x(k(),w(1)),type:he(t),target:tt,payload:s,note:L(k()),createdAt:x(k(),w(1))}),i=o=>{const a=S(ie,o);if(!a.success||a.output.type!==t)return null;const l=S(s,o.payload);return l.success?{id:a.output.id,type:t,target:a.output.target,payload:l.output,...a.output.note===void 0?{}:{note:a.output.note},createdAt:a.output.createdAt}:null};return{schema:r,mode:n.mode??"patch",targetType:e,actionType:t,payloadSchema:s,parse:i,...n.dedupeKey?{dedupeKey:n.dedupeKey}:{}}},Do=(t,e)=>{const s=st(t,e.type);if(s===void 0)return null;const n=s.parse(e);return n===null?null:n},Uo=(t,e)=>{const s=S(t.payloadSchema,e.payload);if(!s.success)throw new Error(`invalid payload for action "${e.type}"`);return s.output},st=(t,e)=>Object.hasOwn(t,e)?t[e]:void 0,Ho=t=>{throw new Error(`unhandled action: ${JSON.stringify(t)}`)},Fo=C({id:x(k(),w(1))}),Ko=t=>{const e=S(Fo,t.payload);return`${t.type}|${e.success?e.output.id:JSON.stringify(t.payload)}`},M=t=>`${t.type}:${t.id}`,Ln=t=>{const e=t.indexOf(":");return e<=0?{type:"unknown",id:t}:{type:t.slice(0,e),id:t.slice(e+1)}},qt=(t,e)=>typeof t=="string"?Ln(t.includes(":")?t:`${e}:${t}`):{type:t.type,id:t.id},Zo=(t,e)=>t.type===e.type&&t.id===e.id,Pn=t=>{const e=t.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return e.length>0?e:"item"},Wo=(t,e)=>{const s=Pn(t),n=new Set(e);if(!n.has(s))return s;for(let r=2;r<1e3;r+=1){const i=`${s}-${r}`;if(!n.has(i))return i}return`${s}-${Math.random().toString(36).slice(2,8)}`},zn=()=>{const t=globalThis.crypto;return t?.randomUUID?t.randomUUID():`a-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`},P="comment",oe=t=>{const[e]=t;return{path:e?.path?.map(s=>String(s.key)).join(".")??"",message:e?.message??"invalid action"}},Mn=C({type:x(k(),w(1)),target:jt([x(k(),w(1)),tt]),payload:_e(W()),note:L(k()),id:L(x(k(),w(1))),createdAt:L(x(k(),w(1)))}),Vo=(t,e)=>{const s=S(Mn,t);if(!s.success)return{ok:!1,issue:oe(s.issues)};const n=s.output,r=qt(n.target,e.targetType),i={id:n.id??zn(),type:n.type,target:r,payload:n.payload??{},...n.note===void 0?{}:{note:n.note},createdAt:n.createdAt??new Date().toISOString()},o=S(e.schema,i);if(!o.success)return{ok:!1,issue:oe(o.issues)};const a=S(ie,o.output);return a.success?{ok:!0,action:a.output}:{ok:!1,issue:oe(a.issues)}},Nt=(t,e)=>e.dedupeKey?e.dedupeKey(t):e.mode!=="patch"?null:`${t.type}|${M(t.target)}`,Bt=(t,e,s)=>{const n=Nt(e,s);if(n===null)return[...t,e];const r=t.at(-1);return!r||Nt(r,s)!==n||!Go(r,e)?[...t,e]:[...t.slice(0,-1),e]},Go=(t,e)=>Zo(t.target,e.target),Dt=t=>JSON.stringify(t.map(e=>({id:e.id,type:e.type,target:e.target,payload:e.payload,...e.note===void 0?{}:{note:e.note},createdAt:e.createdAt})),null,2),On=C({id:x(k(),w(1)),type:he(P),target:C({type:x(k(),w(1)),id:x(k(),w(1))}),payload:C({body:x(k(),w(1))}),note:L(k()),createdAt:x(k(),w(1))}),Ut={schema:On,mode:"append",targetType:"page"},Jo=C({body:k()}),Re=t=>{const e=S(Jo,t.payload);return e.success?e.output.body:""},Ht="element",jn=x(k(),re(/^[A-Z][A-Z0-9_]*$/,"component action types are CONSTANT_CASE")),In=et(k(),W()),Yo=C({type:he(Ht),id:x(k(),re(/^[^/]+\/.+/,"component references start with a provider id"))}),Qo=C({id:x(k(),w(1)),type:jn,target:Yo,payload:In,note:L(k()),createdAt:x(k(),w(1))}),Xo={schema:Qo,mode:"sequence",targetType:Ht},ea=ue({type:jn,target:x(k(),re(/^element:[^/]+\/.+/)),payload:_e(In,{})}),qn=ue({id:x(k(),w(1)),title:x(k(),w(1)),summary:L(k()),tone:L(Xe(["create","update","delete","move","meta"])),stale:L(Xe(["unsupported-action-type","target-missing","constraint-violated"]))}),Ft=t=>{if(t.type!==Ht)return null;const e=t.id.indexOf("/");if(e<=0)return null;try{return decodeURIComponent(t.id.slice(0,e))}catch{return null}},I=t=>t.type!==P&&Ft(t.target)!==null,ta=(t,e)=>t.filter(s=>I(s)&&Ft(s.target)===e),Nn=(t,e)=>{const s=new Map(t.flatMap(n=>I(n)?[[n.id,Ft(n.target)]]:[]));return new Map(e.flatMap(n=>n.results.flatMap(r=>s.get(r.id)===n.id?[[r.id,r]]:[])))},Kt=Object.freeze({}),Zt=t=>{const e=t.startsWith("#")?t.slice(1):t;if(e.length===0)return Kt;const s=new URLSearchParams(e.startsWith("?")?e.slice(1):e),n={};for(const[r,i]of s)r.length>0&&i.length>0&&(n[r]=i);return n},fe=t=>{const e=new URLSearchParams;for(const n of Object.keys(t).sort((r,i)=>r<i?-1:r>i?1:0)){const r=t[n];r!=null&&r!==""&&e.set(n,r)}const s=e.toString();return s.length===0?"":`#${s}`},Wt=(t,e,s=[])=>{const n={...t},r=Object.keys(e).map(i=>s.indexOf(i)).filter(i=>i>=0);if(r.length>0)for(const i of s.slice(Math.min(...r)+1))Object.hasOwn(e,i)||delete n[i];for(const[i,o]of Object.entries(e))o==null||o===""?delete n[i]:n[i]=o;return n},sa=(t,e="json")=>`\`\`\`${e}
|
|
709
|
-
${t}
|
|
710
|
-
\`\`\``,na=t=>JSON.stringify({type:t.type,target:t.target,payload:t.payload,...t.note===void 0?{}:{note:t.note}},null,2),Vt=(t,e,s)=>{const{actions:n,state:r}=t,i=new Set(t.stale.map(p=>p.action.id)),o=n.filter(p=>!i.has(p.id)),a=o.filter(p=>p.type===P),l=o.filter(p=>p.type!==P),c=[];if(c.push(`# Review draft \u2014 ${e.label}`),c.push(""),c.push(`- template: \`${e.name}\``),c.push(`- framework: \`dev-process-kit@${s}\``),c.push(`- navigation: \`${fe(t.navigation)||"(none)"}\``),c.push(`- pending: ${l.length} change(s), ${a.length} comment(s)`),t.stale.length>0&&c.push(`- stale (not applicable to the current base): ${t.stale.length}`),c.push(""),c.push("## How to apply"),c.push(""),c.push("These are patches against the base HTML, not a command log. Apply the requested end state to the meaning model, keep the stable ids of surviving concepts, and keep the base JSON free of any draft envelope."),l.some(I)&&(c.push(""),c.push("Changes targeting `element:<id>/\u2026` belong to the component with that `id` (for example a diagram): apply them to that component's own JSON, following its documented action vocabulary.")),c.push(""),a.length>0){c.push(`## Comments (${a.length})`),c.push("");for(const[p,d]of a.entries()){const h=e.describe(d,r,t.base);c.push(`${p+1}. **${h.targetLabel}** \u2014 \`${M(d.target)}\``),c.push(` > ${Re(d).replace(/\n/g,`
|
|
711
|
-
> `)}`)}c.push("")}if(l.length>0){c.push(`## Requested changes (${l.length})`),c.push("");for(const[p,d]of l.entries()){const h=e.describe(d,r,t.base),u=h.summary?` \u2014 ${h.summary}`:"";c.push(`${p+1}. **${h.title}**${u}`),c.push(` target: \`${M(d.target)}\` (${d.target.type})`),c.push(` \`\`\`json
|
|
712
|
-
${na(d).replace(/\n/g,`
|
|
713
|
-
`)}
|
|
714
|
-
\`\`\``)}c.push("")}if(l.length===0&&a.length===0&&(c.push("_No pending draft actions._"),c.push("")),t.stale.length>0){c.push(`## Not applicable to the current base (${t.stale.length})`),c.push(""),c.push("These actions were made against an earlier base and no longer fit it. Do not apply them; mention them if they still matter. The reader can remove them from the review rail."),c.push("");for(const[p,{action:d,reason:h}]of t.stale.entries()){const u=e.describe(d,r,t.base),f=d.type===P?Re(d):u.title;c.push(`${p+1}. \`${d.type}\` on \`${M(d.target)}\` (${h}) \u2014 ${f}`)}c.push("")}return c.push("## Canonical draft (JSON)"),c.push(""),c.push(sa(Dt(n))),c.push(""),c.join(`
|
|
715
|
-
`)},q="0.0.11",Gt=async t=>{try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const e=document.activeElement,s=document.createElement("textarea");try{return s.value=t,s.setAttribute("readonly",""),s.style.position="fixed",s.style.opacity="0",document.body.append(s),s.select(),document.execCommand("copy")}catch{return!1}finally{s.remove(),e instanceof HTMLElement&&e.focus()}},Bn=Ke({en:{heading:"Review notes",rejected:"Action rejected.",commentLabel:"Review comment",commentPlaceholder:"What should change, or what you noticed (passed to the agent as an instruction)",detach:"Detach",attachTo:t=>`Attach to this ${t}`,addNote:"Add note",empty:"No draft actions yet.",emptyHint:"Comments and structural patches both land here, and survive reload via LocalStorage.",sendToClaude:"Send to Claude",copy:"Copy changes & comments",copyTitle:"Copy the review to paste it to the agent",clear:"Clear",deleteAction:"Delete this draft action",editComment:"Edit this comment",editLabel:"Edit the comment",saveEdit:"Save",cancelEdit:"Cancel",editHint:"Ctrl/Cmd + Enter to save, Esc to cancel",wholePage:"Whole page",comment:"Comment",sent:"Sent to Claude \u2713",copied:"Copied \u2713",copyFailed:"Could not copy"},ja:{heading:"\u30EC\u30D3\u30E5\u30FC\u30CE\u30FC\u30C8",rejected:"action \u3092\u53D7\u3051\u4ED8\u3051\u3089\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",commentLabel:"\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8",commentPlaceholder:"\u5909\u66F4\u3057\u305F\u3044\u3053\u3068 / \u6C17\u3065\u304D\u3092\u66F8\u304F\uFF08Agent \u3078\u306E\u6307\u793A\u3068\u3057\u3066\u6E21\u308B\uFF09",detach:"\u7D10\u3065\u3051\u3092\u89E3\u9664",attachTo:t=>`\u3053\u306E ${t} \u306B\u7D10\u3065\u3051\u308B`,addNote:"\u30CE\u30FC\u30C8\u3092\u8FFD\u52A0",empty:"draft action \u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",emptyHint:"\u30B3\u30E1\u30F3\u30C8\u3082\u69CB\u9020\u306E\u5909\u66F4\u3082\u3053\u3053\u306B\u96C6\u307E\u308A\u3001LocalStorage \u306B\u6B8B\u308B\u306E\u3067\u30EA\u30ED\u30FC\u30C9\u3057\u3066\u3082\u6D88\u3048\u307E\u305B\u3093\u3002",sendToClaude:"Claude \u306B\u9001\u308B",copy:"\u5909\u66F4\u30FB\u30B3\u30E1\u30F3\u30C8\u3092\u30B3\u30D4\u30FC",copyTitle:"Review \u3092\u30B3\u30D4\u30FC\u3057\u3066 Agent \u306B\u8CBC\u308A\u4ED8\u3051\u308B",clear:"\u30AF\u30EA\u30A2",deleteAction:"\u3053\u306E draft action \u3092\u524A\u9664",editComment:"\u3053\u306E\u30B3\u30E1\u30F3\u30C8\u3092\u7DE8\u96C6",editLabel:"\u30B3\u30E1\u30F3\u30C8\u3092\u7DE8\u96C6",saveEdit:"\u4FDD\u5B58",cancelEdit:"\u30AD\u30E3\u30F3\u30BB\u30EB",editHint:"Ctrl/Cmd + Enter \u3067\u4FDD\u5B58\u3001Esc \u3067\u30AD\u30E3\u30F3\u30BB\u30EB",wholePage:"\u30DA\u30FC\u30B8\u5168\u4F53",comment:"\u30B3\u30E1\u30F3\u30C8",sent:"Claude \u306B\u9001\u308A\u307E\u3057\u305F \u2713",copied:"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F \u2713",copyFailed:"\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F"}}),ra=()=>({body:"",editing:null,attachment:{kind:"page"},copy:{kind:"idle"},copyRequest:0,send:{kind:"idle"},sendRequest:0}),Dn=t=>t.kind==="explicit"?{kind:t.resume}:t,Un=(t,e)=>{switch(e.kind){case"input":return{...t,body:e.body};case"attach":return{...t,attachment:{kind:e.current?"current":"page"}};case"clear-target":return{...t,attachment:Dn(t.attachment)};case"edit-start":return{...t,editing:{id:e.id,body:e.body}};case"edit-input":return t.editing?{...t,editing:{...t.editing,body:e.body}}:t;case"edit-cancel":case"edited":return{...t,editing:null};case"target-requested":return{...t,attachment:{kind:"explicit",ref:e.ref,resume:t.attachment.kind==="explicit"?t.attachment.resume:t.attachment.kind}};case"submitted":return{...t,body:"",attachment:Dn(t.attachment),copy:{kind:"idle"},copyRequest:t.copyRequest+1,send:{kind:"idle"},sendRequest:t.sendRequest+1};case"copy-started":return{...t,copy:{kind:"pending"},copyRequest:t.copyRequest+1,send:{kind:"idle"},sendRequest:t.sendRequest+1};case"copy-finished":return e.request!==t.copyRequest||t.copy.kind!=="pending"?t:{...t,copy:{kind:e.ok?"copied":"failed"}};case"send-started":return{...t,send:{kind:"pending"},sendRequest:t.sendRequest+1,copy:{kind:"idle"},copyRequest:t.copyRequest+1};case"send-finished":return e.request!==t.sendRequest||t.send.kind!=="pending"?t:{...t,send:e.outcome.ok?{kind:"sent"}:{kind:"failed",reason:e.outcome.reason}}}},ia=(t,e)=>{const s=t.body.trim();return s===""?null:{target:e,body:s}},oa=t=>{if(!t.editing)return null;const e=t.editing.body.trim();return e===""?null:{id:t.editing.id,body:e}},aa={en:"English",ja:"\u65E5\u672C\u8A9E"},N=Ke({en:{review:"Review",reviewToggle:"Review / comments",useLightTheme:"Switch to light theme",useDarkTheme:"Switch to dark theme",language:"Language",versionLabel:"dev-process-kit version (reloads the page)",versionPinned:"Pinned by the page",versionLatest:t=>`${t} (latest)`,resizeSidebar:"Resize sidebar",resizeSidebarHint:"Drag to resize. Double-click to reset",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",baseDataError:"Could not read the base data (showing an empty page)",memo:"Memo",handoffTooLarge:"The review is too long to send. Copy it and paste it instead",handoffConsent:"Commenting needs your permission. Allow it, then send again",handoffForbidden:"This page cannot send to Claude. Copy the review and paste it instead",handoffClaudeUnavailable:"Could not reach the Claude session. Copy the review and paste it instead",handoffRateLimited:"Too many sends in a row. Wait a moment, then send again",handoffStorage:"Could not save the review. Copy it and paste it instead",handoffError:"Could not send. Copy the review and paste it instead",handoffLabel:"Hand the review to the agent",handoffSend:"Send to Claude",handoffSending:"Sending\u2026",handoffSent:"Sent to Claude \u2713",handoffCopy:"Copy changes & comments",handoffCopyTitle:"Copy the review to paste it to the agent",handoffCopied:"Copied \u2713",handoffCopyFailed:"Could not copy"},ja:{review:"\u30EC\u30D3\u30E5\u30FC",reviewToggle:"\u30EC\u30D3\u30E5\u30FC / \u30B3\u30E1\u30F3\u30C8",useLightTheme:"\u30E9\u30A4\u30C8\u30C6\u30FC\u30DE\u306B\u3059\u308B",useDarkTheme:"\u30C0\u30FC\u30AF\u30C6\u30FC\u30DE\u306B\u3059\u308B",language:"\u8A00\u8A9E",versionLabel:"dev-process-kit \u306E\u30D0\u30FC\u30B8\u30E7\u30F3\uFF08\u30DA\u30FC\u30B8\u3092\u518D\u8AAD\u307F\u8FBC\u307F\u3057\u307E\u3059\uFF09",versionPinned:"\u30DA\u30FC\u30B8\u6307\u5B9A\u306E\u30D0\u30FC\u30B8\u30E7\u30F3",versionLatest:t=>`${t}\uFF08\u6700\u65B0\uFF09`,resizeSidebar:"\u30B5\u30A4\u30C9\u30D0\u30FC\u306E\u5E45\u3092\u5909\u66F4",resizeSidebarHint:"\u30C9\u30E9\u30C3\u30B0\u3067\u5E45\u3092\u5909\u66F4\u3002\u30C0\u30D6\u30EB\u30AF\u30EA\u30C3\u30AF\u3067\u5143\u306B\u623B\u3059",collapseSidebar:"\u30B5\u30A4\u30C9\u30D0\u30FC\u3092\u6298\u308A\u305F\u305F\u3080",expandSidebar:"\u30B5\u30A4\u30C9\u30D0\u30FC\u3092\u958B\u304F",baseDataError:"base data \u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\uFF08\u7A7A\u306E\u30DA\u30FC\u30B8\u3068\u3057\u3066\u8868\u793A\u4E2D\uFF09",memo:"\u30E1\u30E2",handoffTooLarge:"Review \u304C\u9577\u3059\u304E\u3066\u9001\u308C\u307E\u305B\u3093\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffConsent:"\u30B3\u30E1\u30F3\u30C8\u306E\u8A31\u53EF\u304C\u5FC5\u8981\u3067\u3059\u3002\u8A31\u53EF\u3057\u3066\u304B\u3089\u3082\u3046\u4E00\u5EA6\u9001\u3063\u3066\u304F\u3060\u3055\u3044",handoffForbidden:"\u3053\u306E\u30DA\u30FC\u30B8\u304B\u3089\u306F\u9001\u308C\u307E\u305B\u3093\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffClaudeUnavailable:"Claude \u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306B\u5C4A\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffRateLimited:"\u9001\u4FE1\u304C\u7D9A\u3044\u3066\u3044\u307E\u3059\u3002\u5C11\u3057\u5F85\u3063\u3066\u304B\u3089\u9001\u3063\u3066\u304F\u3060\u3055\u3044",handoffStorage:"Review \u3092\u4FDD\u5B58\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffError:"\u9001\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B3\u30D4\u30FC\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044",handoffLabel:"Review \u3092 Agent \u306B\u6E21\u3059",handoffSend:"Claude \u306B\u9001\u308B",handoffSending:"\u9001\u4FE1\u4E2D\u2026",handoffSent:"Claude \u306B\u9001\u308A\u307E\u3057\u305F \u2713",handoffCopy:"\u5909\u66F4\u30FB\u30B3\u30E1\u30F3\u30C8\u3092\u30B3\u30D4\u30FC",handoffCopyTitle:"Review \u3092\u30B3\u30D4\u30FC\u3057\u3066 Agent \u306B\u8CBC\u308A\u4ED8\u3051\u308B",handoffCopied:"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F \u2713",handoffCopyFailed:"\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F"}}),la=4096,ca="reviews",Hn="Review from the page (dev-process-kit). Apply it to the base data and republish this artifact. Then answer with ArtifactComments `reply` in this thread: the reader sees only this thread, and the page never shows anything written to the database.",da=t=>new TextEncoder().encode(t).length,pa=t=>t.replace(/[\u0000-\u0008\u000B-\u001F\u007F]/g,""),ha=t=>{const e=`${Hn}
|
|
716
|
-
|
|
717
|
-
${pa(t)}`;return da(e)<=la?e:null},ua=t=>`${Hn}
|
|
718
|
-
|
|
719
|
-
The brief is too long for a comment, so it is stored in this artifact's database: read the document \`${t}\` (\`brief\` is the review, \`draft\` the raw draft JSON).`,fa={consent_required:"consent",forbidden:"forbidden",not_granted:"forbidden",capability_disabled:"forbidden",capability_removed:"forbidden",claude_unavailable:"claude_unavailable",rate_limited:"rate_limited"},ga=t=>{const e=typeof t=="object"&&t!==null&&"code"in t?t.code:void 0;return(typeof e=="string"?fa[e]:void 0)??"error"},ma={too_large:"handoffTooLarge",consent:"handoffConsent",forbidden:"handoffForbidden",claude_unavailable:"handoffClaudeUnavailable",rate_limited:"handoffRateLimited",storage:"handoffStorage",error:"handoffError"},Jt=(t,e)=>N(e)[ma[t]],Fn=t=>t.group?`${t.group} \xB7 ${t.label}`:t.label,Kn=(t,e)=>{const{definition:s,state:n,navigation:r,derivation:i}=t,o=Bn(t.locale),a=s.currentTarget?.(n,r)??null,l=e.attachment,c=l.kind==="explicit"?s.commentTargets(n,r).find(h=>h.value===l.ref):null,p=l.kind==="explicit"?{ref:l.ref,label:c?Fn(c):l.ref}:l.kind==="current"&&a?{ref:a.value,label:Fn(a)}:{ref:`page:${s.name}`,label:o.wholePage},d=new Map(i.stale.map(h=>[h.action.id,h.reason]));return{body:e.body,target:p,attachment:l.kind==="explicit"?{kind:"explicit"}:a?{kind:"checkbox",checked:l.kind==="current",group:a.group??""}:{kind:"none"},canSubmit:e.body.trim().length>0,items:i.actions.map(h=>{const u=s.describe(h,n,i.base),f=h.type==="comment";return{id:h.id,title:f?o.comment:u.title,targetLabel:u.targetLabel,tone:f?"comment":u.tone,text:{kind:f?"comment":"summary",body:f?Re(h):u.summary??""},code:s.serialize(h),stale:d.get(h.id)??null,edit:!f||t.editable!==!0?{kind:"none"}:e.editing?.id===h.id?{kind:"editing",body:e.editing.body,canSave:e.editing.body.trim().length>0}:{kind:"available"}}}),issues:t.issues.map(h=>`${h.path?`${h.path}: `:""}${h.message}`),send:t.sendable!==!0?"hidden":i.actions.length===0||e.send.kind==="pending"?"disabled":"ready",flash:e.send.kind==="sent"?o.sent:e.send.kind==="failed"?Jt(e.send.reason,t.locale):e.copy.kind==="copied"?o.copied:e.copy.kind==="failed"?o.copyFailed:""}},ka=[Ze,$t,D`
|
|
720
|
-
:host {
|
|
721
|
-
display: flex;
|
|
722
|
-
flex-direction: column;
|
|
723
|
-
min-height: 0;
|
|
724
|
-
width: 100%;
|
|
725
|
-
background: var(--dpk-paper-raised);
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
header {
|
|
729
|
-
position: relative;
|
|
730
|
-
z-index: 1;
|
|
731
|
-
display: flex;
|
|
732
|
-
align-items: center;
|
|
733
|
-
justify-content: space-between;
|
|
734
|
-
gap: 8px;
|
|
735
|
-
padding: 14px 16px 12px;
|
|
736
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
737
|
-
background: var(--dpk-glass);
|
|
738
|
-
backdrop-filter: blur(12px);
|
|
739
|
-
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
header h2 {
|
|
743
|
-
font-size: 13.5px;
|
|
744
|
-
font-weight: 660;
|
|
745
|
-
letter-spacing: -0.015em;
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
.composer {
|
|
749
|
-
display: grid;
|
|
750
|
-
gap: 10px;
|
|
751
|
-
padding: 14px 16px 14px;
|
|
752
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
753
|
-
background: var(--dpk-paper-sunken);
|
|
754
|
-
box-shadow: inset 0 1px 3px var(--dpk-shade-1);
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
.composer textarea {
|
|
758
|
-
min-height: 62px;
|
|
759
|
-
background: var(--dpk-paper-raised);
|
|
760
|
-
border-radius: var(--dpk-radius);
|
|
761
|
-
box-shadow:
|
|
762
|
-
var(--dpk-bevel),
|
|
763
|
-
inset 0 1px 2px var(--dpk-shade-1);
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
.composer .row {
|
|
767
|
-
display: flex;
|
|
768
|
-
align-items: center;
|
|
769
|
-
gap: 8px;
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
.composer .attach {
|
|
773
|
-
display: inline-flex;
|
|
774
|
-
align-items: center;
|
|
775
|
-
gap: 7px;
|
|
776
|
-
font-size: 12px;
|
|
777
|
-
color: var(--dpk-ink-soft);
|
|
778
|
-
cursor: pointer;
|
|
779
|
-
transition: color 140ms var(--dpk-ease);
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
.composer .attach:hover {
|
|
783
|
-
color: var(--dpk-ink);
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
.composer .attach input {
|
|
787
|
-
width: 14px;
|
|
788
|
-
height: 14px;
|
|
789
|
-
margin: 0;
|
|
790
|
-
accent-color: var(--dpk-accent);
|
|
791
|
-
cursor: pointer;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
.composer .chip {
|
|
795
|
-
display: inline-flex;
|
|
796
|
-
align-items: center;
|
|
797
|
-
gap: 6px;
|
|
798
|
-
padding: 3px 10px;
|
|
799
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
800
|
-
border-radius: 999px;
|
|
801
|
-
background: var(--dpk-paper-raised);
|
|
802
|
-
box-shadow: var(--dpk-shadow-xs);
|
|
803
|
-
font-size: 11.5px;
|
|
804
|
-
cursor: pointer;
|
|
805
|
-
transition:
|
|
806
|
-
border-color 140ms var(--dpk-ease),
|
|
807
|
-
box-shadow 140ms var(--dpk-ease),
|
|
808
|
-
transform 140ms var(--dpk-ease);
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
.composer .chip svg {
|
|
812
|
-
flex: none;
|
|
813
|
-
width: 12px;
|
|
814
|
-
height: 12px;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
.composer .chip:hover {
|
|
818
|
-
border-color: color-mix(in srgb, var(--dpk-accent) 45%, var(--dpk-rule-strong));
|
|
819
|
-
box-shadow: var(--dpk-shadow-sm);
|
|
820
|
-
transform: translateY(-1px);
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
.target-line {
|
|
824
|
-
margin-right: auto;
|
|
825
|
-
padding: 3px 9px;
|
|
826
|
-
border-radius: 999px;
|
|
827
|
-
background: var(--dpk-paper-inset);
|
|
828
|
-
font-family: var(--dpk-mono);
|
|
829
|
-
font-size: 10px;
|
|
830
|
-
letter-spacing: 0.03em;
|
|
831
|
-
color: var(--dpk-ink-faint);
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
.list {
|
|
835
|
-
list-style: none;
|
|
836
|
-
margin: 0;
|
|
837
|
-
padding: 10px 12px;
|
|
838
|
-
overflow: auto;
|
|
839
|
-
flex: 1;
|
|
840
|
-
min-height: 0;
|
|
841
|
-
display: grid;
|
|
842
|
-
gap: 8px;
|
|
843
|
-
align-content: start;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
.item {
|
|
847
|
-
position: relative;
|
|
848
|
-
display: grid;
|
|
849
|
-
gap: 5px;
|
|
850
|
-
padding: 10px 12px 11px 16px;
|
|
851
|
-
border: 1px solid var(--dpk-rule);
|
|
852
|
-
border-radius: var(--dpk-radius);
|
|
853
|
-
background: var(--dpk-paper-raised);
|
|
854
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
855
|
-
transition:
|
|
856
|
-
box-shadow 160ms var(--dpk-ease),
|
|
857
|
-
border-color 160ms var(--dpk-ease),
|
|
858
|
-
transform 160ms var(--dpk-ease);
|
|
859
|
-
animation: dpk-item-in 200ms var(--dpk-ease) backwards;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
@keyframes dpk-item-in {
|
|
863
|
-
from {
|
|
864
|
-
opacity: 0;
|
|
865
|
-
transform: translateY(3px);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
.item:hover {
|
|
870
|
-
border-color: var(--dpk-rule-hover);
|
|
871
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
872
|
-
transform: translateY(-1px);
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
.item::before {
|
|
876
|
-
content: '';
|
|
877
|
-
position: absolute;
|
|
878
|
-
left: 0;
|
|
879
|
-
top: 10px;
|
|
880
|
-
bottom: 10px;
|
|
881
|
-
width: 3px;
|
|
882
|
-
border-radius: 0 2px 2px 0;
|
|
883
|
-
background: var(--tone, var(--dpk-ink-faint));
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
.item[data-tone='comment'] {
|
|
887
|
-
--tone: var(--dpk-accent);
|
|
888
|
-
background: linear-gradient(90deg, var(--dpk-accent-soft), transparent 55%), var(--dpk-paper-raised);
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
.item[data-tone='create'] {
|
|
892
|
-
--tone: var(--dpk-green);
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
.item[data-tone='update'] {
|
|
896
|
-
--tone: var(--dpk-blue);
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
.item[data-tone='delete'] {
|
|
900
|
-
--tone: var(--dpk-accent);
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
.item[data-tone='move'] {
|
|
904
|
-
--tone: var(--dpk-violet);
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
.item[data-stale='true'] {
|
|
908
|
-
opacity: 0.62;
|
|
909
|
-
border-style: dashed;
|
|
910
|
-
box-shadow: none;
|
|
911
|
-
transform: none;
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
.item-head {
|
|
915
|
-
display: flex;
|
|
916
|
-
align-items: center;
|
|
917
|
-
gap: 7px;
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
.item-icon {
|
|
921
|
-
display: inline-flex;
|
|
922
|
-
flex: none;
|
|
923
|
-
align-items: center;
|
|
924
|
-
justify-content: center;
|
|
925
|
-
width: 18px;
|
|
926
|
-
height: 18px;
|
|
927
|
-
border-radius: var(--dpk-radius-xs);
|
|
928
|
-
background: color-mix(in srgb, var(--tone, var(--dpk-ink-faint)) 16%, transparent);
|
|
929
|
-
color: var(--tone, var(--dpk-ink-faint));
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
.item-icon svg {
|
|
933
|
-
display: block;
|
|
934
|
-
width: 11px;
|
|
935
|
-
height: 11px;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
.item-title {
|
|
939
|
-
font-size: 12.5px;
|
|
940
|
-
font-weight: 600;
|
|
941
|
-
letter-spacing: -0.005em;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
.stale-badge {
|
|
945
|
-
padding: 1px 7px;
|
|
946
|
-
border: 1px solid color-mix(in srgb, var(--dpk-amber) 40%, transparent);
|
|
947
|
-
border-radius: 999px;
|
|
948
|
-
background: var(--dpk-amber-soft);
|
|
949
|
-
font-family: var(--dpk-mono);
|
|
950
|
-
font-size: 9px;
|
|
951
|
-
letter-spacing: 0.06em;
|
|
952
|
-
text-transform: uppercase;
|
|
953
|
-
color: var(--dpk-amber);
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
.item-head .dpk-icon-btn {
|
|
957
|
-
margin-left: auto;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
/* Edit and delete sit together at the end of the row. */
|
|
961
|
-
.item-head .item-edit + .dpk-icon-btn {
|
|
962
|
-
margin-left: -4px;
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
.item-target {
|
|
966
|
-
display: inline-flex;
|
|
967
|
-
align-items: center;
|
|
968
|
-
width: fit-content;
|
|
969
|
-
padding: 1px 7px;
|
|
970
|
-
border-radius: var(--dpk-radius-xs);
|
|
971
|
-
background: var(--dpk-paper-sunken);
|
|
972
|
-
font-family: var(--dpk-mono);
|
|
973
|
-
font-size: 10px;
|
|
974
|
-
color: var(--dpk-ink-faint);
|
|
975
|
-
overflow-wrap: anywhere;
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
.item-summary {
|
|
979
|
-
font-size: 12px;
|
|
980
|
-
color: var(--dpk-ink-soft);
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
.item-body {
|
|
984
|
-
margin: 2px 0 0;
|
|
985
|
-
padding-left: 9px;
|
|
986
|
-
border-left: 2px solid var(--dpk-accent);
|
|
987
|
-
font-size: 12.5px;
|
|
988
|
-
white-space: pre-wrap;
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
.item-editor {
|
|
992
|
-
display: grid;
|
|
993
|
-
gap: 8px;
|
|
994
|
-
margin-top: 2px;
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
.item-editor textarea {
|
|
998
|
-
min-height: 62px;
|
|
999
|
-
background: var(--dpk-paper-raised);
|
|
1000
|
-
border-radius: var(--dpk-radius);
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
.item-editor-actions {
|
|
1004
|
-
display: flex;
|
|
1005
|
-
justify-content: flex-end;
|
|
1006
|
-
gap: 6px;
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
.item-code {
|
|
1010
|
-
margin-top: 2px;
|
|
1011
|
-
padding: 5px 7px;
|
|
1012
|
-
border-radius: var(--dpk-radius-xs);
|
|
1013
|
-
background: var(--dpk-paper-sunken);
|
|
1014
|
-
font-family: var(--dpk-mono);
|
|
1015
|
-
font-size: 10px;
|
|
1016
|
-
color: var(--dpk-ink-faint);
|
|
1017
|
-
overflow-wrap: anywhere;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
.empty {
|
|
1021
|
-
padding: 4px;
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
.empty-box {
|
|
1025
|
-
display: grid;
|
|
1026
|
-
justify-items: center;
|
|
1027
|
-
gap: 6px;
|
|
1028
|
-
padding: 26px 16px;
|
|
1029
|
-
border: 1px dashed var(--dpk-rule-strong);
|
|
1030
|
-
border-radius: var(--dpk-radius-lg);
|
|
1031
|
-
background: var(--dpk-paper-sunken);
|
|
1032
|
-
text-align: center;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
.empty-box svg {
|
|
1036
|
-
width: 20px;
|
|
1037
|
-
height: 20px;
|
|
1038
|
-
color: var(--dpk-ink-faint);
|
|
1039
|
-
opacity: 0.7;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
.empty-box p {
|
|
1043
|
-
margin: 0;
|
|
1044
|
-
font-size: 12px;
|
|
1045
|
-
line-height: 1.6;
|
|
1046
|
-
color: var(--dpk-ink-soft);
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
.empty-box .empty-hint {
|
|
1050
|
-
max-width: 30ch;
|
|
1051
|
-
color: var(--dpk-ink-faint);
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
.issues {
|
|
1055
|
-
margin: 10px 12px 0;
|
|
1056
|
-
padding: 9px 11px 9px 13px;
|
|
1057
|
-
border: 1px solid color-mix(in srgb, var(--dpk-danger) 35%, transparent);
|
|
1058
|
-
border-radius: var(--dpk-radius-sm);
|
|
1059
|
-
background: linear-gradient(90deg, var(--dpk-danger) 0 3px, transparent 3px), var(--dpk-danger-soft);
|
|
1060
|
-
font-size: 11.5px;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
.issues strong {
|
|
1064
|
-
color: var(--dpk-danger);
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
.issues ul {
|
|
1068
|
-
margin: 4px 0 0;
|
|
1069
|
-
padding-left: 16px;
|
|
1070
|
-
color: var(--dpk-ink-soft);
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
footer {
|
|
1074
|
-
display: flex;
|
|
1075
|
-
flex-wrap: wrap;
|
|
1076
|
-
align-items: center;
|
|
1077
|
-
gap: 8px;
|
|
1078
|
-
padding: 12px 16px;
|
|
1079
|
-
border-top: 1px solid var(--dpk-rule);
|
|
1080
|
-
background: var(--dpk-glass);
|
|
1081
|
-
backdrop-filter: blur(12px);
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
.footer-actions {
|
|
1085
|
-
display: flex;
|
|
1086
|
-
align-items: center;
|
|
1087
|
-
gap: 6px;
|
|
1088
|
-
flex-wrap: wrap;
|
|
1089
|
-
margin-left: auto;
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
.flash {
|
|
1093
|
-
font-family: var(--dpk-mono);
|
|
1094
|
-
font-size: 10px;
|
|
1095
|
-
letter-spacing: 0.04em;
|
|
1096
|
-
color: var(--dpk-green);
|
|
1097
|
-
}
|
|
1098
|
-
`],Zn=(t,e,s)=>{const n=new Map;for(let r=e;r<=s;r++)n.set(t[r],r);return n},Wn=De(class extends Ue{constructor(t){if(super(t),t.type!==F.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let n;s===void 0?s=e:e!==void 0&&(n=e);const r=[],i=[];let o=0;for(const a of t)r[o]=n?n(a,o):o,i[o]=s(a,o),o++;return{values:i,keys:r}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,n]){const r=gi(t),{values:i,keys:o}=this.dt(e,s,n);if(!Array.isArray(r))return this.ut=o,i;const a=this.ut??=[],l=[];let c,p,d=0,h=r.length-1,u=0,f=i.length-1;for(;d<=h&&u<=f;)if(r[d]===null)d++;else if(r[h]===null)h--;else if(a[d]===o[u])l[u]=X(r[d],i[u]),d++,u++;else if(a[h]===o[f])l[f]=X(r[h],i[f]),h--,f--;else if(a[d]===o[f])l[f]=X(r[d],i[f]),we(t,l[f+1],r[d]),d++,f--;else if(a[h]===o[u])l[u]=X(r[h],i[u]),we(t,r[d],r[h]),h--,u++;else if(c===void 0&&(c=Zn(o,u,f),p=Zn(a,d,h)),c.has(a[d]))if(c.has(a[h])){const y=p.get(o[u]),v=y!==void 0?r[y]:null;if(v===null){const _=we(t,r[d]);X(_,i[u]),l[u]=_}else l[u]=X(v,i[u]),we(t,r[d],v),r[y]=null;u++}else kt(r[h]),h--;else kt(r[d]),d++;for(;u<=f;){const y=we(t,l[f+1]);X(y,i[u]),l[u++]=y}for(;d<=h;){const y=r[d++];y!==null&&kt(y)}return this.ut=o,mt(t,l),z}}),Yt=()=>g`<svg
|
|
1099
|
-
viewBox="0 0 16 16"
|
|
1100
|
-
fill="none"
|
|
1101
|
-
stroke="currentColor"
|
|
1102
|
-
stroke-width="1.5"
|
|
1103
|
-
stroke-linecap="round"
|
|
1104
|
-
stroke-linejoin="round"
|
|
1105
|
-
aria-hidden="true"
|
|
1106
|
-
focusable="false"
|
|
1107
|
-
>
|
|
1108
|
-
<path d="M4 4l8 8M12 4l-8 8" />
|
|
1109
|
-
</svg>`,Vn=()=>g`<svg
|
|
1110
|
-
viewBox="0 0 16 16"
|
|
1111
|
-
fill="none"
|
|
1112
|
-
stroke="currentColor"
|
|
1113
|
-
stroke-width="1.5"
|
|
1114
|
-
stroke-linecap="round"
|
|
1115
|
-
stroke-linejoin="round"
|
|
1116
|
-
aria-hidden="true"
|
|
1117
|
-
focusable="false"
|
|
1118
|
-
>
|
|
1119
|
-
<path d="M3.5 5h9M5.5 5V3.5a1 1 0 011-1h3a1 1 0 011 1V5" />
|
|
1120
|
-
<path d="M5 5l.5 7.5h5L11 5" />
|
|
1121
|
-
<path d="M6.8 7.5v3.5M9.2 7.5v3.5" />
|
|
1122
|
-
</svg>`,Qt=()=>g`<svg
|
|
1123
|
-
viewBox="0 0 16 16"
|
|
1124
|
-
fill="none"
|
|
1125
|
-
stroke="currentColor"
|
|
1126
|
-
stroke-width="1.5"
|
|
1127
|
-
stroke-linecap="round"
|
|
1128
|
-
stroke-linejoin="round"
|
|
1129
|
-
aria-hidden="true"
|
|
1130
|
-
focusable="false"
|
|
1131
|
-
>
|
|
1132
|
-
<path d="M3 13l1.5-1.5M11.3 2.7a1.5 1.5 0 012.1 2.1L5.5 12.7l-3 .8.8-3z" />
|
|
1133
|
-
</svg>`,Xt=()=>g`<svg
|
|
1134
|
-
viewBox="0 0 16 16"
|
|
1135
|
-
fill="none"
|
|
1136
|
-
stroke="currentColor"
|
|
1137
|
-
stroke-width="1.5"
|
|
1138
|
-
stroke-linecap="round"
|
|
1139
|
-
stroke-linejoin="round"
|
|
1140
|
-
aria-hidden="true"
|
|
1141
|
-
focusable="false"
|
|
1142
|
-
>
|
|
1143
|
-
<path d="M3.5 3.5h9a1 1 0 011 1v5a1 1 0 01-1 1H8.2l-2.7 2.2v-2.2H3.5a1 1 0 01-1-1v-5a1 1 0 011-1z" />
|
|
1144
|
-
</svg>`,Gn=()=>g`<svg
|
|
1145
|
-
viewBox="0 0 16 16"
|
|
1146
|
-
fill="none"
|
|
1147
|
-
stroke="currentColor"
|
|
1148
|
-
stroke-width="1.5"
|
|
1149
|
-
stroke-linecap="round"
|
|
1150
|
-
stroke-linejoin="round"
|
|
1151
|
-
aria-hidden="true"
|
|
1152
|
-
focusable="false"
|
|
1153
|
-
>
|
|
1154
|
-
<path d="M6.5 9.5l3-3" />
|
|
1155
|
-
<path d="M7 5.5l1-1a2.1 2.1 0 013 3l-1 1" />
|
|
1156
|
-
<path d="M9 10.5l-1 1a2.1 2.1 0 01-3-3l1-1" />
|
|
1157
|
-
</svg>`,ba=()=>g`<svg
|
|
1158
|
-
viewBox="0 0 16 16"
|
|
1159
|
-
fill="none"
|
|
1160
|
-
stroke="currentColor"
|
|
1161
|
-
stroke-width="1.5"
|
|
1162
|
-
stroke-linecap="round"
|
|
1163
|
-
stroke-linejoin="round"
|
|
1164
|
-
aria-hidden="true"
|
|
1165
|
-
focusable="false"
|
|
1166
|
-
>
|
|
1167
|
-
<rect x="5.5" y="5.5" width="7" height="7" rx="1.5" />
|
|
1168
|
-
<path d="M10.5 5.5V4.5a1 1 0 00-1-1h-5a1 1 0 00-1 1v5a1 1 0 001 1h1" />
|
|
1169
|
-
</svg>`,va=()=>g`<svg
|
|
1170
|
-
viewBox="0 0 16 16"
|
|
1171
|
-
fill="none"
|
|
1172
|
-
stroke="currentColor"
|
|
1173
|
-
stroke-width="1.5"
|
|
1174
|
-
stroke-linecap="round"
|
|
1175
|
-
stroke-linejoin="round"
|
|
1176
|
-
aria-hidden="true"
|
|
1177
|
-
focusable="false"
|
|
1178
|
-
>
|
|
1179
|
-
<path d="M3.5 8.5l3 3 6-7" />
|
|
1180
|
-
</svg>`,Jn=()=>g`<svg
|
|
1181
|
-
viewBox="0 0 16 16"
|
|
1182
|
-
fill="none"
|
|
1183
|
-
stroke="currentColor"
|
|
1184
|
-
stroke-width="1.5"
|
|
1185
|
-
stroke-linecap="round"
|
|
1186
|
-
stroke-linejoin="round"
|
|
1187
|
-
aria-hidden="true"
|
|
1188
|
-
focusable="false"
|
|
1189
|
-
>
|
|
1190
|
-
<path d="M8 3.5v9M3.5 8h9" />
|
|
1191
|
-
</svg>`,xa=()=>g`<svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" focusable="false">
|
|
1192
|
-
<circle cx="6.5" cy="4.5" r="1" />
|
|
1193
|
-
<circle cx="9.5" cy="4.5" r="1" />
|
|
1194
|
-
<circle cx="6.5" cy="8" r="1" />
|
|
1195
|
-
<circle cx="9.5" cy="8" r="1" />
|
|
1196
|
-
<circle cx="6.5" cy="11.5" r="1" />
|
|
1197
|
-
<circle cx="9.5" cy="11.5" r="1" />
|
|
1198
|
-
</svg>`,Yn=()=>g`<svg
|
|
1199
|
-
viewBox="0 0 16 16"
|
|
1200
|
-
fill="none"
|
|
1201
|
-
stroke="currentColor"
|
|
1202
|
-
stroke-width="1.5"
|
|
1203
|
-
stroke-linecap="round"
|
|
1204
|
-
stroke-linejoin="round"
|
|
1205
|
-
aria-hidden="true"
|
|
1206
|
-
focusable="false"
|
|
1207
|
-
>
|
|
1208
|
-
<path
|
|
1209
|
-
d="M8 2.5v11M8 2.5L5.5 5M8 2.5l2.5 2.5M8 13.5l-2.5-2.5M8 13.5l2.5-2.5M2.5 8h11M2.5 8L5 5.5M2.5 8l2.5 2.5M13.5 8L11 5.5M13.5 8L11 10.5"
|
|
1210
|
-
/>
|
|
1211
|
-
</svg>`,ya=()=>g`<svg
|
|
1212
|
-
viewBox="0 0 16 16"
|
|
1213
|
-
fill="none"
|
|
1214
|
-
stroke="currentColor"
|
|
1215
|
-
stroke-width="1.5"
|
|
1216
|
-
stroke-linecap="round"
|
|
1217
|
-
stroke-linejoin="round"
|
|
1218
|
-
aria-hidden="true"
|
|
1219
|
-
focusable="false"
|
|
1220
|
-
>
|
|
1221
|
-
<path d="M8 12.5V3.5M4.5 7L8 3.5 11.5 7" />
|
|
1222
|
-
</svg>`,wa=()=>g`<svg
|
|
1223
|
-
viewBox="0 0 16 16"
|
|
1224
|
-
fill="none"
|
|
1225
|
-
stroke="currentColor"
|
|
1226
|
-
stroke-width="1.5"
|
|
1227
|
-
stroke-linecap="round"
|
|
1228
|
-
stroke-linejoin="round"
|
|
1229
|
-
aria-hidden="true"
|
|
1230
|
-
focusable="false"
|
|
1231
|
-
>
|
|
1232
|
-
<path d="M8 3.5v9M4.5 9L8 12.5 11.5 9" />
|
|
1233
|
-
</svg>`,Qn=()=>g`<svg
|
|
1234
|
-
viewBox="0 0 16 16"
|
|
1235
|
-
fill="none"
|
|
1236
|
-
stroke="currentColor"
|
|
1237
|
-
stroke-width="1.5"
|
|
1238
|
-
stroke-linecap="round"
|
|
1239
|
-
stroke-linejoin="round"
|
|
1240
|
-
aria-hidden="true"
|
|
1241
|
-
focusable="false"
|
|
1242
|
-
>
|
|
1243
|
-
<path d="M10 3.5L5.5 8 10 12.5" />
|
|
1244
|
-
</svg>`,es=()=>g`<svg
|
|
1245
|
-
viewBox="0 0 16 16"
|
|
1246
|
-
fill="none"
|
|
1247
|
-
stroke="currentColor"
|
|
1248
|
-
stroke-width="1.5"
|
|
1249
|
-
stroke-linecap="round"
|
|
1250
|
-
stroke-linejoin="round"
|
|
1251
|
-
aria-hidden="true"
|
|
1252
|
-
focusable="false"
|
|
1253
|
-
>
|
|
1254
|
-
<path d="M6 3.5L10.5 8 6 12.5" />
|
|
1255
|
-
</svg>`,$a=()=>g`<svg
|
|
1256
|
-
viewBox="0 0 16 16"
|
|
1257
|
-
fill="none"
|
|
1258
|
-
stroke="currentColor"
|
|
1259
|
-
stroke-width="1.5"
|
|
1260
|
-
stroke-linecap="round"
|
|
1261
|
-
stroke-linejoin="round"
|
|
1262
|
-
aria-hidden="true"
|
|
1263
|
-
focusable="false"
|
|
1264
|
-
>
|
|
1265
|
-
<path d="M9.5 2.5h4v4M6.5 13.5h-4v-4M13.5 2.5L9 7M2.5 13.5L7 9" />
|
|
1266
|
-
</svg>`,Sa=()=>g`<svg
|
|
1267
|
-
viewBox="0 0 16 16"
|
|
1268
|
-
fill="none"
|
|
1269
|
-
stroke="currentColor"
|
|
1270
|
-
stroke-width="1.5"
|
|
1271
|
-
stroke-linecap="round"
|
|
1272
|
-
stroke-linejoin="round"
|
|
1273
|
-
aria-hidden="true"
|
|
1274
|
-
focusable="false"
|
|
1275
|
-
>
|
|
1276
|
-
<path d="M13.5 7h-4.5v-4.5M2.5 9h4.5v4.5M9 7l4.5-4.5M7 9l-4.5 4.5" />
|
|
1277
|
-
</svg>`,Aa=()=>g`<svg
|
|
1278
|
-
viewBox="0 0 16 16"
|
|
1279
|
-
fill="none"
|
|
1280
|
-
stroke="currentColor"
|
|
1281
|
-
stroke-width="1.5"
|
|
1282
|
-
stroke-linecap="round"
|
|
1283
|
-
stroke-linejoin="round"
|
|
1284
|
-
aria-hidden="true"
|
|
1285
|
-
focusable="false"
|
|
1286
|
-
>
|
|
1287
|
-
<circle cx="8" cy="8" r="2.75" />
|
|
1288
|
-
<path
|
|
1289
|
-
d="M8 1.5v1.5M8 13v1.5M1.5 8H3M13 8h1.5M3.4 3.4l1.06 1.06M11.54 11.54l1.06 1.06M3.4 12.6l1.06-1.06M11.54 4.46l1.06-1.06"
|
|
1290
|
-
/>
|
|
1291
|
-
</svg>`,Ca=()=>g`<svg
|
|
1292
|
-
viewBox="0 0 16 16"
|
|
1293
|
-
fill="none"
|
|
1294
|
-
stroke="currentColor"
|
|
1295
|
-
stroke-width="1.5"
|
|
1296
|
-
stroke-linecap="round"
|
|
1297
|
-
stroke-linejoin="round"
|
|
1298
|
-
aria-hidden="true"
|
|
1299
|
-
focusable="false"
|
|
1300
|
-
>
|
|
1301
|
-
<path d="M13.5 9.6A5.75 5.75 0 016.4 2.5a5.75 5.75 0 107.1 7.1z" />
|
|
1302
|
-
</svg>`,Ta=t=>{switch(t){case"comment":return Xt();case"create":return Jn();case"update":return Qt();case"delete":return Vn();case"move":return Yn();default:return Gn()}},Ea=(t,e,s,n=!1)=>g`
|
|
1303
|
-
${n?m:g`<header><h2>${t.heading}</h2></header>`}
|
|
1304
|
-
${e.issues.length>0?g`<div class="issues" role="alert">
|
|
1305
|
-
<strong>${t.rejected}</strong>
|
|
1306
|
-
<ul>
|
|
1307
|
-
${e.issues.map(r=>g`<li>${r}</li>`)}
|
|
1308
|
-
</ul>
|
|
1309
|
-
</div>`:m}
|
|
1310
|
-
<div class="composer">
|
|
1311
|
-
<textarea
|
|
1312
|
-
class="dpk-textarea"
|
|
1313
|
-
aria-label=${t.commentLabel}
|
|
1314
|
-
placeholder=${t.commentPlaceholder}
|
|
1315
|
-
.value=${e.body}
|
|
1316
|
-
@input=${r=>{r.currentTarget instanceof HTMLTextAreaElement&&s({kind:"input",body:r.currentTarget.value})}}
|
|
1317
|
-
@keydown=${r=>{!r.isComposing&&r.key==="Enter"&&(r.metaKey||r.ctrlKey)&&(r.preventDefault(),s({kind:"submit"}))}}
|
|
1318
|
-
></textarea>
|
|
1319
|
-
${e.attachment.kind==="explicit"?g`<div class="row">
|
|
1320
|
-
<button class="chip" type="button" aria-label=${t.detach} @click=${()=>s({kind:"clear-target"})}>
|
|
1321
|
-
${e.target.label} ${Yt()}
|
|
1322
|
-
</button>
|
|
1323
|
-
</div>`:e.attachment.kind==="checkbox"?g`<div class="row">
|
|
1324
|
-
<label class="attach">
|
|
1325
|
-
<input
|
|
1326
|
-
type="checkbox"
|
|
1327
|
-
.checked=${e.attachment.checked}
|
|
1328
|
-
@change=${r=>{r.currentTarget instanceof HTMLInputElement&&s({kind:"attach",current:r.currentTarget.checked})}}
|
|
1329
|
-
/>
|
|
1330
|
-
<span>${t.attachTo(e.attachment.group)}</span>
|
|
1331
|
-
</label>
|
|
1332
|
-
</div>`:m}
|
|
1333
|
-
<div class="row">
|
|
1334
|
-
<span class="target-line">→ ${e.target.label}</span>
|
|
1335
|
-
<button
|
|
1336
|
-
class="dpk-btn dpk-btn--accent"
|
|
1337
|
-
type="button"
|
|
1338
|
-
?disabled=${!e.canSubmit}
|
|
1339
|
-
@click=${()=>s({kind:"submit"})}
|
|
1340
|
-
>
|
|
1341
|
-
${t.addNote}
|
|
1342
|
-
</button>
|
|
1343
|
-
</div>
|
|
1344
|
-
</div>
|
|
1345
|
-
<ul class="list">
|
|
1346
|
-
${e.items.length===0?g`<li class="empty">
|
|
1347
|
-
<div class="empty-box">
|
|
1348
|
-
${Xt()}
|
|
1349
|
-
<p>${t.empty}</p>
|
|
1350
|
-
<p class="empty-hint">${t.emptyHint}</p>
|
|
1351
|
-
</div>
|
|
1352
|
-
</li>`:Wn(e.items,r=>r.id,r=>_a(t,r,s))}
|
|
1353
|
-
</ul>
|
|
1354
|
-
<footer>
|
|
1355
|
-
${n||e.send==="hidden"?m:g`<button
|
|
1356
|
-
class="dpk-btn dpk-btn--accent"
|
|
1357
|
-
type="button"
|
|
1358
|
-
?disabled=${e.send==="disabled"}
|
|
1359
|
-
@click=${()=>s({kind:"send"})}
|
|
1360
|
-
>
|
|
1361
|
-
${t.sendToClaude}
|
|
1362
|
-
</button>`}
|
|
1363
|
-
<div class="footer-actions">
|
|
1364
|
-
${n?m:g`<button
|
|
1365
|
-
class=${e.send==="hidden"?"dpk-btn dpk-btn--accent":"dpk-btn"}
|
|
1366
|
-
type="button"
|
|
1367
|
-
title=${t.copyTitle}
|
|
1368
|
-
?disabled=${e.items.length===0}
|
|
1369
|
-
@click=${()=>s({kind:"copy"})}
|
|
1370
|
-
>
|
|
1371
|
-
${t.copy}
|
|
1372
|
-
</button>`}
|
|
1373
|
-
<button
|
|
1374
|
-
class="dpk-btn dpk-btn--ghost"
|
|
1375
|
-
type="button"
|
|
1376
|
-
?disabled=${e.items.length===0}
|
|
1377
|
-
@click=${()=>s({kind:"clear"})}
|
|
1378
|
-
>
|
|
1379
|
-
${t.clear}
|
|
1380
|
-
</button>
|
|
1381
|
-
</div>
|
|
1382
|
-
${e.flash?g`<span class="flash" role="status">${e.flash}</span>`:m}
|
|
1383
|
-
</footer>
|
|
1384
|
-
`,_a=(t,e,s)=>g`
|
|
1385
|
-
<li class="item" data-tone=${e.tone} data-stale=${String(e.stale!==null)} data-id=${e.id}>
|
|
1386
|
-
<div class="item-head">
|
|
1387
|
-
<span class="item-icon">${Ta(e.tone)}</span>
|
|
1388
|
-
<span class="item-title">${e.title}</span>
|
|
1389
|
-
${e.stale?g`<span class="stale-badge">${e.stale}</span>`:m}
|
|
1390
|
-
${e.edit.kind==="available"?g`<button
|
|
1391
|
-
class="dpk-icon-btn item-edit"
|
|
1392
|
-
type="button"
|
|
1393
|
-
aria-label=${t.editComment}
|
|
1394
|
-
title=${t.editComment}
|
|
1395
|
-
@click=${()=>s({kind:"edit-start",id:e.id,body:e.text.body})}
|
|
1396
|
-
>
|
|
1397
|
-
${Qt()}
|
|
1398
|
-
</button>`:m}
|
|
1399
|
-
<button
|
|
1400
|
-
class="dpk-icon-btn"
|
|
1401
|
-
type="button"
|
|
1402
|
-
aria-label=${t.deleteAction}
|
|
1403
|
-
@click=${()=>s({kind:"delete",id:e.id})}
|
|
1404
|
-
>
|
|
1405
|
-
${Yt()}
|
|
1406
|
-
</button>
|
|
1407
|
-
</div>
|
|
1408
|
-
<div class="item-target">${e.targetLabel}</div>
|
|
1409
|
-
${e.edit.kind==="editing"?Ra(t,e.edit,s):e.text.kind==="comment"?g`<p class="item-body">${e.text.body}</p>`:e.text.body?g`<div class="item-summary">${e.text.body}</div>`:m}
|
|
1410
|
-
<code class="item-code">${e.code}</code>
|
|
1411
|
-
</li>
|
|
1412
|
-
`,Ra=(t,e,s)=>g`
|
|
1413
|
-
<div class="item-editor">
|
|
1414
|
-
<textarea
|
|
1415
|
-
class="dpk-textarea"
|
|
1416
|
-
aria-label=${t.editLabel}
|
|
1417
|
-
title=${t.editHint}
|
|
1418
|
-
.value=${e.body}
|
|
1419
|
-
@input=${n=>{n.currentTarget instanceof HTMLTextAreaElement&&s({kind:"edit-input",body:n.currentTarget.value})}}
|
|
1420
|
-
@keydown=${n=>{n.isComposing||(n.key==="Enter"&&(n.metaKey||n.ctrlKey)?(n.preventDefault(),s({kind:"edit-save"})):n.key==="Escape"&&(n.preventDefault(),n.stopPropagation(),s({kind:"edit-cancel"})))}}
|
|
1421
|
-
></textarea>
|
|
1422
|
-
<div class="row item-editor-actions">
|
|
1423
|
-
<button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>s({kind:"edit-cancel"})}>
|
|
1424
|
-
${t.cancelEdit}
|
|
1425
|
-
</button>
|
|
1426
|
-
<button
|
|
1427
|
-
class="dpk-btn dpk-btn--accent"
|
|
1428
|
-
type="button"
|
|
1429
|
-
?disabled=${!e.canSave}
|
|
1430
|
-
@click=${()=>s({kind:"edit-save"})}
|
|
1431
|
-
>
|
|
1432
|
-
${t.saveEdit}
|
|
1433
|
-
</button>
|
|
1434
|
-
</div>
|
|
1435
|
-
</div>
|
|
1436
|
-
`;class Xn extends H{static{this.styles=ka}static{this.properties={definition:{attribute:!1},state:{attribute:!1},navigation:{attribute:!1},derivation:{attribute:!1},issues:{attribute:!1},pendingTarget:{attribute:!1},onDelete:{attribute:!1},onClear:{attribute:!1},onComment:{attribute:!1},onEditComment:{attribute:!1},exportBrief:{attribute:!1},sendToClaude:{attribute:!1},embedded:{type:Boolean}}}#e=ra();#i=null;#n=new wt(this);constructor(){super(),this.embedded=!1,this.definition=null,this.state=void 0,this.navigation={},this.derivation=null,this.issues=[],this.pendingTarget=null}willUpdate(e){e.has("pendingTarget")&&this.pendingTarget&&(this.#e=Un(this.#e,{kind:"target-requested",ref:this.pendingTarget}))}updated(e){e.has("pendingTarget")&&this.pendingTarget&&this.isConnected&&this.renderRoot.querySelector("textarea")?.focus();const s=this.#i;s&&(this.#i=null,[...this.renderRoot.querySelectorAll(".item")].find(r=>r.dataset.id===s.id)?.querySelector(s.kind==="editor"?".item-editor textarea":".item-edit")?.focus())}#r(){return!this.definition||!this.derivation?null:{definition:this.definition,state:this.state,navigation:this.navigation,derivation:this.derivation,issues:this.issues,sendable:this.sendToClaude!==void 0,editable:this.onEditComment!==void 0,locale:this.#n.locale}}render(){const e=this.#r();return e?Ea(Bn(this.#n.locale),Kn(e,this.#e),this.#s,this.embedded):m}#t(e){this.#e=Un(this.#e,e),this.requestUpdate()}#s=e=>{switch(e.kind){case"delete":this.onDelete?.(e.id);return;case"clear":this.onClear?.();return;case"copy":this.#a();return;case"send":this.#o();return;case"edit-start":this.#i={kind:"editor",id:e.id},this.#t(e);return;case"edit-cancel":{const s=this.#e.editing;s&&(this.#i={kind:"edit-button",id:s.id}),this.#t(e);return}case"edit-save":{const s=oa(this.#e);if(!s||!this.onEditComment||!this.onEditComment(s.id,s.body).ok)return;this.#i={kind:"edit-button",id:s.id},this.#t({kind:"edited"});return}case"submit":{const s=this.#r();if(!s||!this.onComment)return;const n=ia(this.#e,Kn(s,this.#e).target.ref);if(!n||!this.onComment(n.target,n.body).ok)return;this.#t({kind:"submitted"});return}default:this.#t(e)}};async#o(){const e=this.sendToClaude;if(!e||this.#e.send.kind==="pending")return;this.#t({kind:"send-started"});const s=this.#e.sendRequest,n=await e().catch(()=>({ok:!1,reason:"error"}));this.isConnected&&this.#t({kind:"send-finished",request:s,outcome:n})}async#a(){const e=this.#r();if(!e)return;this.#t({kind:"copy-started"});const s=this.#e.copyRequest;try{const n=this.exportBrief?.()??Vt({...e.derivation,navigation:e.navigation,issues:e.issues},e.definition,q),r=await Gt(n);this.isConnected&&this.#t({kind:"copy-finished",request:s,ok:r})}catch{this.isConnected&&this.#t({kind:"copy-finished",request:s,ok:!1})}}}const La=()=>{customElements.get("dpk-component-comment-panel")||customElements.define("dpk-component-comment-panel",Xn)},er=(t,e,s)=>{typeof window>"u"||Object.assign(window,{devProcessKit:{version:t,templates:e,versionParam:s}})},Le="dpk-version",tr="version",Pa=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,nt=t=>Pa.test(t),za="https://cdn.jsdelivr.net/npm/dev-process-kit@",sr="https://data.jsdelivr.com/v1/packages/npm/dev-process-kit",ts=t=>{const e=new URLSearchParams(t),s=e.get(Le)??e.get(tr);return s!==null&&nt(s)?s:null},Ma=(t,e)=>{const s=ts(t);return s===null||s===e?null:s},Oa=(t,e)=>{if(!nt(t))throw new Error(`not an exact version: ${t}`);if(!/^[a-z0-9-]+(?:\/[a-z0-9-]+)*\.js$/.test(e))throw new Error(`not an entry path: ${e}`);return`${za}${t}/dist/${e}`},ja=(t,e)=>{const s=new URL(t);return s.searchParams.delete(tr),e===null?s.searchParams.delete(Le):s.searchParams.set(Le,e),s.href},Ia=C({tags:_e(et(k(),W()),{}),versions:Z(C({version:k()}))}),qa=t=>{const e=It(Ia,t),s=e.tags.latest;return{latest:typeof s=="string"&&nt(s)?s:null,versions:e.versions.map(n=>n.version).filter(nt)}},nr=t=>{const e=t.published?.versions??[],s=e.includes(t.current)?e:[t.current,...e],n=t.published?.latest??null;return{value:t.current,options:[...t.requested?[{value:"",label:t.text.pinned}]:[],...s.map(r=>({value:r,label:r===n&&r!==t.current?t.text.latest(r):r}))]}};let rt;const rr=()=>(rt??=fetch(sr).then(async t=>{if(!t.ok)throw new Error(`${sr} answered ${t.status}`);return qa(await t.json())}),rt.catch(()=>{rt=void 0}),rt),ir=t=>{location.assign(ja(location.href,t))},Na=t=>import(t),Ba=({entry:t,templates:e,register:s,importModule:n=Na})=>{const r=()=>{s(),er(q,e,Le)},i=typeof location>"u"?null:Ma(location.search,q);if(i===null){r();return}n(Oa(i,t)).then(()=>{Da()||Ha(i)},o=>{console.error(`dev-process-kit@${i} could not be loaded; running ${q}`,o),r()})},Da=()=>{const t=Reflect.get(window,"devProcessKit");return typeof t=="object"&&t!==null&&"versionParam"in t},ss="dpk-version-fallback",Ua=`
|
|
1437
|
-
.${ss} {
|
|
1438
|
-
flex: none;
|
|
1439
|
-
height: 24px;
|
|
1440
|
-
margin-left: auto;
|
|
1441
|
-
padding: 0 22px 0 10px;
|
|
1442
|
-
border: 1px solid var(--dpk-rule, #8884);
|
|
1443
|
-
border-radius: 999px;
|
|
1444
|
-
background: var(--dpk-paper-sunken, transparent)
|
|
1445
|
-
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23878e9e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>")
|
|
1446
|
-
no-repeat right 8px center;
|
|
1447
|
-
appearance: none;
|
|
1448
|
-
field-sizing: content;
|
|
1449
|
-
color: var(--dpk-ink-soft, inherit);
|
|
1450
|
-
font-family: var(--dpk-mono, ui-monospace, monospace);
|
|
1451
|
-
font-size: 10px;
|
|
1452
|
-
letter-spacing: 0.02em;
|
|
1453
|
-
cursor: pointer;
|
|
1454
|
-
}
|
|
1455
|
-
`,Ha=t=>{const e=[...document.body.querySelectorAll("*")].filter(s=>s.localName.startsWith("dpk-template-")&&!s.querySelector(`:scope > .${ss}`));if(e.length!==0){document.head.append(Object.assign(document.createElement("style"),{textContent:Ua}));for(const s of e)s.append(Fa(s,t))}},Fa=(t,e)=>{const s=N(Fe(He(t))),n=document.createElement("select");n.className=ss,n.slot="header",n.setAttribute("aria-label",s.versionLabel),n.title=s.versionLabel;const r=o=>{const a=nr({current:e,requested:ts(location.search)!==null,published:o,text:{pinned:s.versionPinned,latest:s.versionLatest}});n.replaceChildren(...a.options.map(l=>Object.assign(document.createElement("option"),{value:l.value,textContent:l.label}))),n.value=a.value},i=()=>{rr().then(r,o=>console.warn(o))};return n.addEventListener("pointerenter",i,{once:!0}),n.addEventListener("focus",i,{once:!0}),n.addEventListener("change",()=>ir(n.value===""?null:n.value)),r(null),n},Ka=C({value:k()}),Za=t=>e=>{if(!(e instanceof CustomEvent))return;const s=S(Ka,e.detail);s.success&&t(s.output.value)},ns=t=>e=>{const s=ce(e.target,HTMLSelectElement);s!==null&&t(s.value)},Wa=t=>e=>{const s=ce(e.target,HTMLInputElement);s!==null&&t(s.checked)},Pe=t=>t==="light"||t==="dark"?t:null,or=t=>t.authored??t.environment,ar=t=>t.preference??or(t),Va=t=>{const e=ar(t)==="dark"?"light":"dark";return e===or(t)?null:e},lr=Z(ue({value:x(k(),re(/^element:.+/)),label:x(k(),w(1)),group:L(k())})),Ga=C({targets:lr,providers:Z(C({id:x(k(),w(1)),results:Z(qn)}))}),Ja=ue({target:x(k(),re(/^element:.+/)),body:x(k(),Ot(),w(1))}),cr=t=>t.group?`${t.group} \xB7 ${t.label}`:t.label,dr=(t,e,s)=>{const n=new Map(e.map(r=>[r.value,r]));return{...t,hasTarget:(r,i)=>t.hasTarget(r,i)||n.has(M(i)),commentTargets:(r,i)=>{const o=t.commentTargets(r,i),a=new Set(o.map(l=>l.value));return[...o,...e.filter(l=>!a.has(l.value))]},describe:(r,i,o)=>{if(I(r)){const c=s.get(r.id),p=n.get(M(r.target));return{title:c?.title??r.type,...c?.summary===void 0?{}:{summary:c.summary},tone:c?.tone??"update",targetLabel:p?cr(p):r.target.id}}const a=t.describe(r,i,o),l=r.type==="comment"&&!t.hasTarget(i,r.target)?n.get(M(r.target)):void 0;return l===void 0?a:{...a,targetLabel:cr(l)}},serialize:r=>I(r)?`${r.type} ${M(r.target)} ${JSON.stringify(r.payload)}`:t.serialize(r)}},pr=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function hr(t){return typeof pr.Buffer<"u"&&pr.Buffer.isBuffer(t)}function ur(t){if(!t||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)==="[object Object]":!1}function fr(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function gr(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Ya="[object RegExp]",Qa="[object String]",Xa="[object Number]",el="[object Boolean]",tl="[object Symbol]",sl="[object Date]",nl="[object Map]",rl="[object Set]",il="[object Array]",ol="[object Function]",al="[object ArrayBuffer]",rs="[object Object]",ll="[object Error]",cl="[object DataView]",dl="[object Uint8Array]",pl="[object Uint8ClampedArray]",hl="[object Uint16Array]",ul="[object Uint32Array]",fl="[object BigUint64Array]",gl="[object Int8Array]",ml="[object Int16Array]",kl="[object Int32Array]",bl="[object BigInt64Array]",vl="[object Float32Array]",xl="[object Float64Array]";function yl(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function wl(t,e,s){return ze(t,e,void 0,void 0,void 0,void 0,s)}function ze(t,e,s,n,r,i,o){const a=o(t,e,s,n,r,i);if(a!==void 0)return a;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return t===e;case"number":return t===e||Object.is(t,e);case"function":return t===e;case"object":return Me(t,e,i,o)}return Me(t,e,i,o)}function Me(t,e,s,n){if(Object.is(t,e))return!0;let r=gr(t),i=gr(e);if(r==="[object Arguments]"&&(r=rs),i==="[object Arguments]"&&(i=rs),r!==i)return!1;switch(r){case Qa:return t.toString()===e.toString();case Xa:return yl(t.valueOf(),e.valueOf());case el:case sl:case tl:return Object.is(t.valueOf(),e.valueOf());case Ya:return t.source===e.source&&t.flags===e.flags;case ol:return t===e}s=s??new Map;const o=s.get(t),a=s.get(e);if(o!=null&&a!=null)return o===e;s.set(t,e),s.set(e,t);try{switch(r){case nl:if(t.size!==e.size)return!1;for(const[l,c]of t.entries())if(!e.has(l)||!ze(c,e.get(l),l,t,e,s,n))return!1;return!0;case rl:{if(t.size!==e.size)return!1;const l=Array.from(t.values()),c=Array.from(e.values());for(let p=0;p<l.length;p++){const d=l[p],h=c.findIndex(u=>ze(d,u,void 0,t,e,s,n));if(h===-1)return!1;c.splice(h,1)}return!0}case il:case dl:case pl:case hl:case ul:case fl:case gl:case ml:case kl:case bl:case vl:case xl:if(hr(t)!==hr(e)||t.length!==e.length)return!1;for(let l=0;l<t.length;l++)if(!ze(t[l],e[l],l,t,e,s,n))return!1;return!0;case al:return t.byteLength!==e.byteLength?!1:Me(new Uint8Array(t),new Uint8Array(e),s,n);case cl:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:Me(new Uint8Array(t),new Uint8Array(e),s,n);case ll:return t.name===e.name&&t.message===e.message;case rs:{if(!(Me(t.constructor,e.constructor,s,n)||ur(t)&&ur(e)))return!1;const l=[...Object.keys(t),...fr(t)],c=[...Object.keys(e),...fr(e)];if(l.length!==c.length)return!1;for(let p=0;p<l.length;p++){const d=l[p],h=t[d];if(!Object.hasOwn(e,d))return!1;const u=e[d];if(!ze(h,u,d,t,e,s,n))return!1}return!0}default:return!1}}finally{s.delete(t),s.delete(e)}}function $l(){}function it(t,e){return wl(t,e,$l)}const mr="page",kr=t=>M(t),br=(t,e,s,n=new Map)=>{let r=e;const i=[],o=[],a=[],l=[],c=new Map;for(const d of s){if(d.type===P)continue;if(I(d)){const f=n.get(d.id);f===void 0||f.stale!==void 0?o.push({action:d,reason:f?.stale??"target-missing"}):i.push(d);continue}const h=st(t.actions,d.type);if(!h){o.push({action:d,reason:"unsupported-action-type"});continue}const u=t.apply(r,d);if(u===null){o.push({action:d,reason:t.hasTarget(r,d.target)?"constraint-violated":"target-missing"});continue}if(h.mode!=="append"&&is(t,r,u)){a.push(d);continue}r=u,i.push(d)}for(const d of s){if(d.type!==P)continue;if(d.target.type!==mr&&!t.hasTarget(r,d.target)){o.push({action:d,reason:"target-missing"});continue}l.push(d);const h=kr(d.target);c.set(h,[...c.get(h)??[],d])}const p=new Map(s.map((d,h)=>[d.id,h]));return o.sort((d,h)=>(p.get(d.action.id)??0)-(p.get(h.action.id)??0)),{base:e,state:r,actions:s,applied:i,stale:o,obsolete:a,comments:l,commentsByTarget:c}},is=(t,e,s)=>e===s?!0:t.canonicalState===void 0?it(e,s):it(t.canonicalState(e),t.canonicalState(s)),vr=t=>{const e=new Set(t.obsolete.map(s=>s.id));return t.actions.filter(s=>!e.has(s.id))},Sl=(t,e,s,n)=>{let r=e;const i=n??xr(r).map(o=>o.id);for(const o of[...i].reverse())r=Al(t,r,s,o,n!==void 0)??r;return r},xr=t=>t.applied.filter(e=>!I(e)),Al=(t,e,s,n,r)=>{const i=xr(e),o=i.findIndex(h=>h.id===n),a=i[o];if(a===void 0)return null;const l=i.slice(0,o),c=[...r?Cl(t,e.base,i,o):[],...Tl(t,l,a)],p=new Set,d=c.filter(h=>{const u=h.join(" ");return p.has(u)?!1:(p.add(u),!0)}).sort((h,u)=>u.length-h.length);for(const h of d){const u=El(t,e,s,h);if(u!==null)return u}return null},Cl=(t,e,s,n)=>{const r=[];let i=e;for(const o of s.slice(0,n+1))r.push(i),i=t.apply(i,o)??i;return r.flatMap((o,a)=>is(t,o,i)?[s.slice(a,n+1).map(l=>l.id)]:[])},Tl=(t,e,s)=>{const n=yr(s),r=e.filter(l=>yr(l).some(c=>n.includes(c))),i=wr(t,s),o=r.filter(l=>wr(t,l)===i),a=l=>l.map((c,p)=>[...l.slice(p).map(d=>d.id),s.id]);return[...a(r),...a(o),...r.map(l=>[l.id,s.id]),...r.map(l=>[l.id])]},yr=t=>{const e=t.target.type===mr?[]:t.target.id.split("."),s=typeof t.payload=="object"&&t.payload!==null?Object.values(t.payload).filter(n=>typeof n=="string"&&n!==""):[];return[...e,...s]},wr=(t,e)=>st(t.actions,e.type)?.mode,El=(t,e,s,n)=>{const r=new Set(e.stale.map(o=>o.action.id)),i=new Set(n);for(;;){const o=s(e.actions.filter(l=>!i.has(l.id))),a=o.stale.filter(l=>!r.has(l.action.id)).map(l=>l.action);if(a.length===0)return is(t,o.state,e.state)?o:null;if(a.some(l=>l.type===P||I(l)))return null;for(const l of a)i.add(l.id)}},_l=C({v:he(1),template:x(k(),w(1)),actions:Z(W())});class os{constructor(e){this.storage=e}load(e,s){try{const n=this.storage.getItem(e);if(n===null)return[];const r=S(_l,JSON.parse(n));return!r.success||r.output.template!==s?[]:r.output.actions.flatMap(i=>{const o=S(ie,i);return o.success?[o.output]:[]})}catch{return[]}}save(e,s,n){const r={v:1,template:s,actions:n};try{this.storage.setItem(e,JSON.stringify(r))}catch{}}clear(e){try{this.storage.removeItem(e)}catch{}}}class as{constructor(){this.store=new Map}load(e,s){return new os({getItem:n=>this.store.get(n)??null,setItem:(n,r)=>{this.store.set(n,r)},removeItem:n=>{this.store.delete(n)}}).load(e,s)}save(e,s,n){this.store.set(e,JSON.stringify({v:1,template:s,actions:n}))}clear(e){this.store.delete(e)}}const ls=()=>{try{if(typeof localStorage<"u")return new os(localStorage)}catch{}return new as},cs=t=>`dev-process-kit:draft:${typeof location>"u"?"local":`${location.pathname}${location.search}`}:${t}`,Rl=Z(W());class $r{#e;#i;#n={targets:[],providers:[]};#r=new Map;#t;#s;#o;#a;#l;#p=new Set;#v=[];#m=0;constructor(e){this.#e=e.definition,this.#i=dr(e.definition,[],this.#r),this.#t=e.base,this.#l=e.storageKey??cs(e.definition.name),this.#a=e.storage===void 0?ls():e.storage;const s=e.initialActions??this.#a?.load(this.#l,this.definition.name)??[];this.#s=Ar(this.definition,s),this.#o=this.#d(this.#s),this.#y()&&this.#k()}get definition(){return this.#i}setComponentSnapshot(e){const s=It(Ga,e);if(!it(s,this.#n)){this.#n=s,this.#c(),this.#o=this.#d(this.#s);for(const n of this.#p)n()}}setTemplate(e){this.#e=e,this.#c(),this.#o=this.#d(this.#s);for(const s of this.#p)s()}#c(){this.#r=Nn(this.#s,this.#n.providers),this.#i=dr(this.#e,this.#n.targets,this.#r)}#d(e){return br(this.definition,this.#t,e,Nn(e,this.#n.providers))}get base(){return this.#t}get actions(){return this.#s}get derivation(){return this.#o}get lastIssues(){return this.#v}get prunedCount(){return this.#m}descriptorFor(e,s){return Sr(this.definition,e,s)}dispatch(e){const s=this.#x(e,this.#o.state);if(!s.ok)return this.#h([s.issue]);const n=this.descriptorFor(s.action.type,s.action.target);return n?(this.#u(Bt(this.#s,s.action,n),[s.action.id]),{ok:!0,id:s.action.id}):this.#h([{path:"type",message:"unknown action type"}])}dispatchBatch(e){const s=S(Rl,e);if(!s.success)return this.#h([oe(s.issues)]);const n=s.output;if(n.length===0)return{ok:!0,ids:[]};let r=this.#s,i=this.#o.state;const o=[];for(const a of n){const l=this.#x(a,i);if(!l.ok)return this.#h([l.issue]);const c=l.action,p=this.descriptorFor(c.type,c.target);if(!p)return this.#h([{path:"type",message:"unknown action type"}]);if((c.type==="comment"||I(c)?c.target.type==="page"||this.definition.hasTarget(i,c.target)?i:null:this.definition.apply(i,c))===null)return this.#h([{path:"target",message:"batch action is not applicable"}]);r=Bt(r,c,p),i=this.#d(r).state,o.push(c.id)}return this.#u(r,o),{ok:!0,ids:o}}#x(e,s){const n=S(Mn,e);if(!n.success)return{ok:!1,issue:oe(n.issues)};const r=this.descriptorFor(n.output.type,typeof n.output.target=="string"?qt(n.output.target,"page"):n.output.target);if(!r)return{ok:!1,issue:{path:"type",message:`unknown action type "${n.output.type}"`}};const i=Vo(n.output,r);if(!i.ok)return i;const o=this.definition.canonicalTarget?.(s,i.action.target)??i.action.target;return{ok:!0,action:{...i.action,target:o}}}#h(e){return this.#v=e,{ok:!1,issues:e}}editComment(e,s){const n=this.#s.find(a=>a.id===e);if(n?.type!==P)return this.#h([{path:"id",message:`no comment "${e}" in the draft`}]);if(Re(n)===s)return{ok:!0,id:e};const r=S(Ut.schema,{...n,payload:{body:s}});if(!r.success)return this.#h([oe(r.issues)]);const i=S(ie,r.output);if(!i.success)return this.#h([oe(i.issues)]);const o=i.output;return this.#u(this.#s.map(a=>a===n?o:a),[]),{ok:!0,id:e}}removeAction(e){const s=this.#s.filter(n=>n.id!==e);s.length!==this.#s.length&&this.#u(s)}clearActions(){this.#s.length>0&&this.#u([])}replaceActions(e){this.#u(Ar(this.definition,e))}setBase(e){this.#t=e,this.#u(this.#s)}subscribe(e){return this.#p.add(e),()=>{this.#p.delete(e)}}exportDraft(e){return{template:this.definition.name,frameworkVersion:e,exportedAt:new Date().toISOString(),actions:this.#s}}#u(e,s){this.#v=[],this.#s=e,this.#c(),this.#o=this.#d(this.#s),this.#y(s),this.#k();for(const n of this.#p)n()}#y(e){const s=this.#g(),n=Sl(this.definition,this.#o,r=>this.#d(r),e);return n===this.#o?s:(this.#m+=this.#s.length-n.actions.length,this.#s=[...n.actions],this.#c(),this.#o=this.#d(this.#s),this.#g(),!0)}#g(){return this.#o.obsolete.length===0?!1:(this.#m+=this.#o.obsolete.length,this.#s=vr(this.#o),this.#c(),this.#o=this.#d(this.#s),!0)}#k(){this.#a?.save(this.#l,this.definition.name,this.#s)}}const Sr=(t,e,s)=>e==="comment"?Ut:s!==void 0&&I({type:e,target:s})?Xo:st(t.actions,e),Ar=(t,e)=>e.flatMap(s=>{const n=S(ie,s);if(!n.success)return[];const r=n.output,i=Sr(t,r.type,r.target);if(!i)return[];const o=S(i.schema,r);if(!o.success)return[];const a=S(ie,o.output);return a.success?[a.output]:[]}),Ll=()=>({status:{kind:"idle"},request:0}),Pl=(t,e)=>{switch(e.kind){case"copy-started":return{status:{kind:"copying"},request:t.request+1};case"send-started":return{status:{kind:"sending"},request:t.request+1};case"copy-finished":return e.request!==t.request||t.status.kind!=="copying"?t:{...t,status:{kind:e.ok?"copied":"copy-failed"}};case"send-finished":return e.request!==t.request||t.status.kind!=="sending"?t:{...t,status:e.outcome.ok?{kind:"sent"}:{kind:"send-failed",reason:e.outcome.reason}};case"settled":return e.request===t.request?{...t,status:{kind:"idle"}}:t}},zl=(t,e)=>{if(t.actions===0||t.railOpen)return null;const s=N(t.locale),n=e.status;return{send:t.sendable?{label:n.kind==="sending"?s.handoffSending:n.kind==="sent"?s.handoffSent:s.handoffSend,disabled:n.kind==="sending"}:null,copy:n.kind==="copied"?{label:s.handoffCopied,status:"copied"}:n.kind==="copy-failed"?{label:s.handoffCopyFailed,status:"failed"}:{label:s.handoffCopy,status:"idle"},note:n.kind==="send-failed"?Jt(n.reason,t.locale):null}},Cr=t=>{const e=t.derivation();return{base:e.base,state:e.state,navigation:t.navigation(),actions:t.controller().actions,comments:e.comments,stale:e.stale,issues:t.issues()}},Ml=t=>{const e=t.derivation();return{state:e.state,base:e.base,navigation:t.navigation(),actions:t.controller().actions,comments:e.comments,stale:e.stale,commentCount:s=>{const n=typeof s=="string"?s:M(s);return e.commentsByTarget.get(n)?.length??0},dispatch:s=>t.dispatch(s),dispatchBatch:s=>t.dispatchBatch(s),navigate:(s,n)=>t.navigate(s,n),hashFor:s=>t.hashFor(s),requestComment:s=>t.requestComment(s)}},Ol=(t,e)=>{const s=()=>Cr(t);return{version:q,template:t.definition.name,host:e,ready:t.ready,get base(){return t.controller().base},get state(){return t.derivation().state},get navigation(){return t.navigation()},get actions(){return t.controller().actions},get comments(){return t.derivation().comments},get stale(){return t.derivation().stale},get issues(){return t.issues()},dispatch:n=>t.dispatch(n),dispatchBatch:n=>t.dispatchBatch(n),comment:(n,r)=>t.dispatch({type:P,target:n,payload:{body:r}}),editComment:(n,r)=>t.editComment(n,r),removeAction:n=>t.removeAction(n),clearActions:()=>t.clearActions(),importDraft:n=>t.controller().replaceActions(n),navigate:(n,r)=>t.navigate(n,r),hashFor:n=>t.hashFor(n),snapshot:s,exportDraft:()=>t.controller().exportDraft(q),exportBrief:()=>Vt(s(),t.controller().definition,q),subscribe:n=>t.subscribe(n)}},ds=(t,e)=>typeof t=="object"&&t!==null&&e.every(s=>typeof Reflect.get(t,s)=="function"),jl=t=>ds(t,["use"]),Il=t=>ds(t,["anchorFor","canSendToClaude","sendToClaude"]),ql=t=>ds(t,["collection"]),Tr=async(t,e)=>{try{return await t.use(e)}catch{return null}},Nl=(t,e)=>({async canSend(){try{return await t.canSendToClaude()==="available"}catch{return!1}},async send({brief:s,draft:n,anchor:r}){let i=ha(s);if(i===null){if(e===null)return{ok:!1,reason:"too_large"};try{const o=e.collection(ca).doc();await o.set({brief:s,draft:n,createdAt:new Date().toISOString()}),i=ua(o.path)}catch{return{ok:!1,reason:"storage"}}}try{return await t.sendToClaude({anchor:await t.anchorFor(r),text:i}),{ok:!0}}catch(o){return{ok:!1,reason:ga(o)}}}}),Bl=async t=>{if(!jl(t))return null;const[e,s]=await Promise.all([Tr(t,"comments"),Tr(t,"db")]);return Il(e)?Nl(e,ql(s)?s:null):null},Dl=()=>Reflect.get(globalThis,"claude");class Ul{#e;#i;#n=null;#r=!1;constructor(e,s=Dl){this.#e=e,this.#i=s,e.addController(this)}get available(){return this.#r}hostConnected(){this.#n??=Bl(this.#i()),this.#t(),window.addEventListener("focus",this.#t)}hostDisconnected(){window.removeEventListener("focus",this.#t)}async send(e){const s=await this.#n;if(!s)return{ok:!1,reason:"forbidden"};const n=await s.send(e);return this.#t(),n}#t=async()=>{const e=await this.#n,s=e?await e.canSend():!1;s!==this.#r&&(this.#r=s,this.#e.requestUpdate())}}const ps=(t,e)=>({read(s){try{const n=t.getItem(s);return n===null?null:e(JSON.parse(n))}catch{return null}},write(s,n){try{return t.setItem(s,JSON.stringify(n)),!0}catch{return!1}},remove(s){try{t.removeItem(s)}catch{}}}),V=t=>{const e=new Map;return ps({getItem:s=>e.get(s)??null,setItem:(s,n)=>{e.set(s,n)},removeItem:s=>{e.delete(s)}},t)},Oe=t=>{try{if(typeof localStorage<"u")return ps(localStorage,t)}catch{}return V(t)},Hl=t=>{try{if(typeof sessionStorage<"u")return ps(sessionStorage,t)}catch{}return V(t)},hs="dev-process-kit:color-scheme",Fl="(prefers-color-scheme: dark)",Er=()=>typeof matchMedia=="function"?matchMedia(Fl):null,_r=()=>Pe(document.documentElement.dataset.theme)??(Er()?.matches===!0?"dark":"light");class Kl{#e;#i;#n=null;#r=null;#t="light";#s=null;#o=null;constructor(e,s){this.#e=e,this.#i=s,e.addController(this)}hostConnected(){this.#n===null&&(this.#n=this.#i()?Oe(Pe):V(Pe),this.#r=this.#n.read(hs)),this.#t=_r(),this.#s=Er(),this.#s?.addEventListener("change",this.#l),this.#o=new MutationObserver(this.#l),this.#o.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}hostDisconnected(){this.#s?.removeEventListener("change",this.#l),this.#s=null,this.#o?.disconnect(),this.#o=null}resolve(e){return ar(this.#a(e))}toggle(e){this.#r=Va(this.#a(e)),this.#r===null?this.#n?.remove(hs):this.#n?.write(hs,this.#r),this.#e.requestUpdate()}#a(e){return{preference:this.#r,authored:e,environment:this.#t}}#l=()=>{const e=_r();e!==this.#t&&(this.#t=e,this.#e.requestUpdate())}}const Zl=(t,e)=>{const s=[],n=r=>{(r===t||r instanceof ShadowRoot)&&e?.(r);for(const i of r.children)i.hasAttribute("data-template")||(("commentTargets"in i||"elementActions"in i)&&s.push(i),n(i),i.shadowRoot&&n(i.shadowRoot))};return n(t),s},Rr=(t,e)=>{const s=new Map;for(const n of t)s.set(e(n),(s.get(e(n))??0)+1);return t.filter(n=>s.get(e(n))===1)},Lr=t=>Rr(t.filter(e=>"elementActions"in e&&e.id.length>0),e=>e.id),Pr=(t,e)=>{for(const s of Lr(t)){const n=ta(e,s.id),r=Reflect.get(s,"elementActions");Array.isArray(r)&&r.length===n.length&&n.every((o,a)=>{const l=r[a];return typeof l=="object"&&l!==null&&"id"in l&&l.id===o.id})||Reflect.set(s,"elementActions",n)}},Wl=t=>{const e=Reflect.get(t,"elementActionResults");return Array.isArray(e)?e.flatMap(s=>{const n=S(qn,s);return n.success?[n.output]:[]}):[]},Vl=t=>{const e=[];for(const s of t){if(!("commentTargets"in s))continue;const n=S(lr,s.commentTargets);n.success&&e.push(...n.output)}return{targets:Rr(e,s=>s.value),providers:Lr(t).map(s=>({id:s.id,results:Wl(s)}))}},Gl=2400;class Jl{#e=Ll();#i=null;#n;constructor(e){this.#n=e,e.addController(this)}get state(){return this.#e}hostDisconnected(){this.#s()}async copy(e){this.#r({kind:"copy-started"});const s=this.#e.request,n=await Gt(e()).catch(()=>!1);this.#r({kind:"copy-finished",request:s,ok:n}),this.#t(s)}async send(e){if(this.#e.status.kind==="sending")return;this.#r({kind:"send-started"});const s=this.#e.request,n=await e().catch(()=>({ok:!1,reason:"error"}));this.#r({kind:"send-finished",request:s,outcome:n}),n.ok&&this.#t(s)}#r(e){(e.kind==="copy-started"||e.kind==="send-started")&&this.#s(),this.#e=Pl(this.#e,e),this.#n.requestUpdate()}#t(e){e===this.#e.request&&(this.#s(),this.#i=setTimeout(()=>{this.#i=null,this.#r({kind:"settled",request:e})},Gl))}#s(){this.#i!==null&&clearTimeout(this.#i),this.#i=null}}const us="dev-process-kit:locale";class Yl{#e;#i;#n;#r=null;#t=null;#s;#o;constructor(e,s,n){this.#e=e,this.#i=s,this.#n=n,e.addController(this)}get authored(){if(this.#s===void 0)return Fe(He(this.#e));const e=this.#e.parentNode;return Fe(this.#s??(e===null?null:He(e)))}get locale(){return this.#o??this.#a()}#a(){return mi({preference:this.#t,authored:this.authored})}hostConnected(){this.#r===null&&(this.#r=this.#i()?Oe(Ks):V(Ks),this.#t=this.#r.read(us)),this.#s??=this.#e.getAttribute("lang"),this.#l()}pick(e){this.#t=ki(e,this.authored),this.#t===null?this.#r?.remove(us):this.#r?.write(us,this.#t),this.#l(),this.#e.requestUpdate()}#l(){const e=this.#t??this.#s??null;e===null?this.#e.removeAttribute("lang"):this.#e.getAttribute("lang")!==e&&this.#e.setAttribute("lang",e);const s=this.#a();if(s===this.#o)return;const n=this.#o===void 0;this.#o=s,this.#n(),(!n||this.#t!==null)&&document.dispatchEvent(new Event(yt))}}const zr=()=>Zt(typeof location>"u"?"":location.hash),Ql=(t,e)=>{if(typeof history>"u")return;const s=`${location.pathname}${location.search}${fe(t)}`;`${location.pathname}${location.search}${location.hash}`!==s&&(e?history.replaceState(null,"",s):history.pushState(null,"",s))};class Xl{#e;#i=null;#n=0;constructor(e){this.#e=e}get orphans(){return this.#n}route(){const e=this.#e.renderRoot,s=ce(e.querySelector('slot[name="preview"]'),HTMLSlotElement);if(s===null)return;this.#i!==s&&(this.#i=s,s.addEventListener("slotchange",this.#r));const n=new Set(Array.from(e.querySelectorAll("slot")).map(i=>i.getAttribute("name")??"")),r=s.assignedElements();for(const i of r){const o=i.getAttribute("data-preview-id");if(!o)continue;const a=`preview:${o}`;i.getAttribute("slot")!==a&&n.has(a)&&i.setAttribute("slot",a)}r.length!==this.#n&&(this.#n=r.length,queueMicrotask(()=>this.#e.requestUpdate()))}#r=()=>{queueMicrotask(()=>this.route())}}const G={min:180,max:560,step:16,largeStep:64},ec={side:"left",defaultWidth:260},ot=t=>Math.round(Math.min(G.max,Math.max(G.min,t))),Mr=t=>typeof t=="number"&&Number.isFinite(t)?ot(t):null,fs=(t,e)=>t==="left"?e:-e,tc=(t,e)=>ot(t.startWidth+fs(t.side,e-t.startX)),sc=(t,e,{key:s,shiftKey:n})=>{const r=n?G.largeStep:G.step;switch(s){case"ArrowLeft":return ot(t+fs(e,-r));case"ArrowRight":return ot(t+fs(e,r));case"Home":return G.min;case"End":return G.max;default:return null}},Or=t=>typeof t=="boolean"?t:null,nc=t=>t==="left"?"right":"left",rc=(t,e)=>e?{action:"expand",points:nc(t)}:{action:"collapse",points:t},ic=t=>`dev-process-kit:sidebar-collapsed:${t}`;class oc{#e;#i;#n=null;#r="";#t=!1;constructor(e,s){this.#e=e,this.#i=s,e.addController(this)}hostConnected(){this.#n===null&&(this.#n=this.#i.persist()?Oe(Or):V(Or),this.#r=ic(this.#i.template()),this.#t=this.#n.read(this.#r)??!1)}get collapsed(){return this.#t}toggle(){this.#t=!this.#t,this.#t?this.#n?.write(this.#r,!0):this.#n?.remove(this.#r),this.#e.requestUpdate()}}const ac=t=>`dev-process-kit:sidebar-width:${t}`,gs={kind:"idle"};class lc{constructor(e,s){this.#n=null,this.#r="",this.#t=null,this.#s=gs,this.handlers={pointerdown:n=>{n.button===0&&(n.preventDefault(),n.currentTarget instanceof Element&&n.currentTarget.setPointerCapture(n.pointerId),this.#s={kind:"dragging",pointerId:n.pointerId,side:this.#i.layout().side,startX:n.clientX,startWidth:this.width},this.#e.requestUpdate())},pointermove:n=>{const r=this.#s;r.kind!=="dragging"||r.pointerId!==n.pointerId||this.#a(tc(r,n.clientX))},pointerup:n=>this.#o(n),pointercancel:n=>this.#o(n),keydown:n=>{const r=sc(this.width,this.#i.layout().side,n);r!==null&&(n.preventDefault(),this.#a(r),this.#l())},dblclick:()=>{this.#a(this.#i.layout().defaultWidth),this.#l()}},this.#e=e,this.#i=s,e.addController(this)}#e;#i;#n;#r;#t;#s;hostConnected(){this.#n===null&&(this.#n=this.#i.persist()?Oe(Mr):V(Mr),this.#r=ac(this.#i.template()),this.#t=this.#n.read(this.#r))}hostDisconnected(){this.#s=gs}get width(){return this.#t??this.#i.layout().defaultWidth}get dragging(){return this.#s.kind==="dragging"}#o(e){const s=this.#s;s.kind!=="dragging"||s.pointerId!==e.pointerId||(this.#s=gs,this.#l(),this.#e.requestUpdate())}#a(e){const s=e===this.#i.layout().defaultWidth?null:e;s!==this.#t&&(this.#t=s,this.#e.requestUpdate())}#l(){this.#t===null?this.#n?.remove(this.#r):this.#n?.write(this.#r,this.#t)}}const cc=[Ze,$t,D`
|
|
1456
|
-
:host {
|
|
1457
|
-
display: block;
|
|
1458
|
-
min-height: 100%;
|
|
1459
|
-
background: var(--dpk-paper);
|
|
1460
|
-
color-scheme: light;
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
/* The element stamps its resolved scheme; nested components inherit it. */
|
|
1464
|
-
:host([data-theme='dark']) {
|
|
1465
|
-
color-scheme: dark;
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
.dpk-shell {
|
|
1469
|
-
display: grid;
|
|
1470
|
-
/* One column no wider than the host: a truncated title must not widen
|
|
1471
|
-
the page past a phone screen. */
|
|
1472
|
-
grid-template-columns: minmax(0, 1fr);
|
|
1473
|
-
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
1474
|
-
min-height: 100%;
|
|
1475
|
-
max-height: 100%;
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
/* ------------------------------------------------------------- header */
|
|
1479
|
-
|
|
1480
|
-
.dpk-header {
|
|
1481
|
-
position: relative;
|
|
1482
|
-
z-index: 20;
|
|
1483
|
-
display: flex;
|
|
1484
|
-
align-items: center;
|
|
1485
|
-
gap: 14px;
|
|
1486
|
-
min-height: 60px;
|
|
1487
|
-
/* Right padding keeps the header content clear of the fixed review button. */
|
|
1488
|
-
padding: 10px 72px 10px 16px;
|
|
1489
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
1490
|
-
background: var(--dpk-glass);
|
|
1491
|
-
backdrop-filter: saturate(1.6) blur(14px);
|
|
1492
|
-
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
/* A hairline of the accent along the bottom edge, fading out to the right. */
|
|
1496
|
-
.dpk-header::after {
|
|
1497
|
-
content: '';
|
|
1498
|
-
position: absolute;
|
|
1499
|
-
left: 0;
|
|
1500
|
-
right: 0;
|
|
1501
|
-
bottom: -1px;
|
|
1502
|
-
height: 1px;
|
|
1503
|
-
background: linear-gradient(
|
|
1504
|
-
90deg,
|
|
1505
|
-
color-mix(in srgb, var(--dpk-accent) 70%, transparent),
|
|
1506
|
-
color-mix(in srgb, var(--dpk-accent) 0%, transparent) 38%
|
|
1507
|
-
);
|
|
1508
|
-
pointer-events: none;
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
/* Kit mark: a stack of pages, the single HTML page the agent wrote. */
|
|
1512
|
-
.dpk-brand {
|
|
1513
|
-
position: relative;
|
|
1514
|
-
flex: none;
|
|
1515
|
-
width: 32px;
|
|
1516
|
-
height: 32px;
|
|
1517
|
-
border-radius: 9px;
|
|
1518
|
-
background:
|
|
1519
|
-
radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 60%),
|
|
1520
|
-
linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
1521
|
-
box-shadow:
|
|
1522
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.3),
|
|
1523
|
-
inset 0 -1px 0 rgba(0, 0, 0, 0.12),
|
|
1524
|
-
0 4px 12px -4px color-mix(in srgb, var(--dpk-accent) 70%, transparent);
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
.dpk-brand::before,
|
|
1528
|
-
.dpk-brand::after {
|
|
1529
|
-
content: '';
|
|
1530
|
-
position: absolute;
|
|
1531
|
-
width: 12px;
|
|
1532
|
-
height: 15px;
|
|
1533
|
-
border-radius: 3px;
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
.dpk-brand::before {
|
|
1537
|
-
left: 12px;
|
|
1538
|
-
top: 7px;
|
|
1539
|
-
background: rgba(255, 255, 255, 0.4);
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
.dpk-brand::after {
|
|
1543
|
-
left: 8px;
|
|
1544
|
-
top: 10px;
|
|
1545
|
-
background:
|
|
1546
|
-
linear-gradient(var(--dpk-accent), var(--dpk-accent)) 3px 4px / 6px 1.5px no-repeat,
|
|
1547
|
-
linear-gradient(var(--dpk-accent), var(--dpk-accent)) 3px 7.5px / 4px 1.5px no-repeat,
|
|
1548
|
-
#fff;
|
|
1549
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
.dpk-title {
|
|
1553
|
-
display: flex;
|
|
1554
|
-
flex-direction: column;
|
|
1555
|
-
gap: 3px;
|
|
1556
|
-
min-width: 0;
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
.dpk-title h1 {
|
|
1560
|
-
font-size: 16px;
|
|
1561
|
-
font-weight: 680;
|
|
1562
|
-
letter-spacing: -0.02em;
|
|
1563
|
-
white-space: nowrap;
|
|
1564
|
-
overflow: hidden;
|
|
1565
|
-
text-overflow: ellipsis;
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
.dpk-template-mark {
|
|
1569
|
-
align-self: flex-start;
|
|
1570
|
-
font-family: var(--dpk-mono);
|
|
1571
|
-
font-size: 9.5px;
|
|
1572
|
-
font-weight: 600;
|
|
1573
|
-
letter-spacing: 0.14em;
|
|
1574
|
-
line-height: 1;
|
|
1575
|
-
text-transform: uppercase;
|
|
1576
|
-
color: var(--dpk-accent);
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
.dpk-header-slot {
|
|
1580
|
-
flex: 1;
|
|
1581
|
-
min-width: 0;
|
|
1582
|
-
display: flex;
|
|
1583
|
-
align-items: center;
|
|
1584
|
-
gap: 10px;
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
.dpk-header-meta {
|
|
1588
|
-
display: flex;
|
|
1589
|
-
align-items: center;
|
|
1590
|
-
gap: 0;
|
|
1591
|
-
margin-left: auto;
|
|
1592
|
-
padding: 3px;
|
|
1593
|
-
border-radius: 999px;
|
|
1594
|
-
border: 1px solid var(--dpk-rule);
|
|
1595
|
-
background: var(--dpk-paper-sunken);
|
|
1596
|
-
font-family: var(--dpk-mono);
|
|
1597
|
-
font-size: 10px;
|
|
1598
|
-
letter-spacing: 0.02em;
|
|
1599
|
-
color: var(--dpk-ink-faint);
|
|
1600
|
-
white-space: nowrap;
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
.dpk-header-meta span {
|
|
1604
|
-
padding: 3px 9px;
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
.dpk-header-meta span + span {
|
|
1608
|
-
border-left: 1px solid var(--dpk-rule);
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
.dpk-version-select {
|
|
1612
|
-
margin: -3px 0;
|
|
1613
|
-
padding: 3px 14px 3px 0;
|
|
1614
|
-
border: 0;
|
|
1615
|
-
border-radius: 4px;
|
|
1616
|
-
background: transparent
|
|
1617
|
-
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23878e9e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>")
|
|
1618
|
-
no-repeat right 2px center;
|
|
1619
|
-
appearance: none;
|
|
1620
|
-
/* As wide as the version shown, not the longest prerelease in the list. */
|
|
1621
|
-
field-sizing: content;
|
|
1622
|
-
color: inherit;
|
|
1623
|
-
font: inherit;
|
|
1624
|
-
letter-spacing: inherit;
|
|
1625
|
-
cursor: pointer;
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
.dpk-version-select:hover {
|
|
1629
|
-
color: var(--dpk-ink-soft);
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
.dpk-version-select:focus-visible {
|
|
1633
|
-
outline: none;
|
|
1634
|
-
box-shadow: var(--dpk-focus);
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
.dpk-header-meta .dpk-meta-count {
|
|
1638
|
-
margin-left: 2px;
|
|
1639
|
-
border-left: 0;
|
|
1640
|
-
border-radius: 999px;
|
|
1641
|
-
background: var(--dpk-paper-raised);
|
|
1642
|
-
color: var(--dpk-ink-soft);
|
|
1643
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
.dpk-header-meta .dpk-meta-count[data-active='true'] {
|
|
1647
|
-
background: var(--dpk-accent-soft);
|
|
1648
|
-
color: var(--dpk-accent);
|
|
1649
|
-
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dpk-accent) 25%, transparent);
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
.dpk-header-tools {
|
|
1653
|
-
display: flex;
|
|
1654
|
-
flex: none;
|
|
1655
|
-
align-items: center;
|
|
1656
|
-
gap: 2px;
|
|
1657
|
-
padding: 3px;
|
|
1658
|
-
border: 1px solid var(--dpk-rule);
|
|
1659
|
-
border-radius: 999px;
|
|
1660
|
-
background: var(--dpk-paper-sunken);
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
.dpk-lang-select {
|
|
1664
|
-
flex: none;
|
|
1665
|
-
height: 26px;
|
|
1666
|
-
padding: 0 24px 0 10px;
|
|
1667
|
-
border: 0;
|
|
1668
|
-
border-radius: 999px;
|
|
1669
|
-
background: transparent
|
|
1670
|
-
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23878e9e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>")
|
|
1671
|
-
no-repeat right 8px center;
|
|
1672
|
-
appearance: none;
|
|
1673
|
-
color: var(--dpk-ink-soft);
|
|
1674
|
-
font: inherit;
|
|
1675
|
-
font-size: 12px;
|
|
1676
|
-
font-weight: 520;
|
|
1677
|
-
cursor: pointer;
|
|
1678
|
-
transition:
|
|
1679
|
-
color 160ms var(--dpk-ease),
|
|
1680
|
-
background-color 160ms var(--dpk-ease);
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
.dpk-lang-select:hover {
|
|
1684
|
-
color: var(--dpk-ink);
|
|
1685
|
-
background-color: var(--dpk-paper-raised);
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
.dpk-lang-select:focus-visible {
|
|
1689
|
-
outline: none;
|
|
1690
|
-
box-shadow: var(--dpk-focus);
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
|
-
.dpk-theme-toggle {
|
|
1694
|
-
display: inline-flex;
|
|
1695
|
-
flex: none;
|
|
1696
|
-
align-items: center;
|
|
1697
|
-
justify-content: center;
|
|
1698
|
-
width: 26px;
|
|
1699
|
-
height: 26px;
|
|
1700
|
-
padding: 0;
|
|
1701
|
-
border: 0;
|
|
1702
|
-
border-radius: 999px;
|
|
1703
|
-
background: transparent;
|
|
1704
|
-
color: var(--dpk-ink-soft);
|
|
1705
|
-
cursor: pointer;
|
|
1706
|
-
transition:
|
|
1707
|
-
color 160ms var(--dpk-ease),
|
|
1708
|
-
background 160ms var(--dpk-ease),
|
|
1709
|
-
transform 300ms var(--dpk-ease-spring);
|
|
1710
|
-
}
|
|
1711
|
-
|
|
1712
|
-
.dpk-theme-toggle svg {
|
|
1713
|
-
width: 14px;
|
|
1714
|
-
height: 14px;
|
|
1715
|
-
}
|
|
1716
|
-
|
|
1717
|
-
.dpk-theme-toggle:hover {
|
|
1718
|
-
color: var(--dpk-ink);
|
|
1719
|
-
background: var(--dpk-paper-raised);
|
|
1720
|
-
transform: rotate(-18deg);
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
.dpk-theme-toggle:focus-visible {
|
|
1724
|
-
outline: none;
|
|
1725
|
-
box-shadow: var(--dpk-focus);
|
|
1726
|
-
}
|
|
1727
|
-
|
|
1728
|
-
/* --------------------------------------------------------------- body */
|
|
1729
|
-
|
|
1730
|
-
.dpk-body {
|
|
1731
|
-
display: flex;
|
|
1732
|
-
min-height: 0;
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
.dpk-sidebar {
|
|
1736
|
-
/* The element sets the template's or the reader's width; on a narrow
|
|
1737
|
-
screen a wide one still leaves the main column some room. */
|
|
1738
|
-
width: var(--dpk-sidebar-width);
|
|
1739
|
-
max-width: calc(100% - 120px);
|
|
1740
|
-
flex: 0 0 auto;
|
|
1741
|
-
border-right: 1px solid var(--dpk-rule);
|
|
1742
|
-
background: var(--dpk-paper-sunken);
|
|
1743
|
-
overflow: auto;
|
|
1744
|
-
padding: 18px 14px;
|
|
1745
|
-
scrollbar-width: thin;
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
.dpk-sidebar[hidden] {
|
|
1749
|
-
display: none;
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
/*
|
|
1753
|
-
* A right-hand sidebar: a rail beside the main column rather than a list
|
|
1754
|
-
* before it. \`:where\` keeps these as weak as the rules above, so a
|
|
1755
|
-
* template can still restyle the rail (stacking it on a phone, say).
|
|
1756
|
-
*/
|
|
1757
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-main {
|
|
1758
|
-
order: 1;
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar,
|
|
1762
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-resizer,
|
|
1763
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-toggle,
|
|
1764
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-strip {
|
|
1765
|
-
order: 2;
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar,
|
|
1769
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-strip {
|
|
1770
|
-
border-right: 0;
|
|
1771
|
-
border-left: 1px solid var(--dpk-rule);
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
/*
|
|
1775
|
-
* The fold button. Expanded, it sits on the sidebar's border near the top
|
|
1776
|
-
* and, like the resizer, takes no room of its own; folded, it is the only
|
|
1777
|
-
* thing left in a narrow strip where the sidebar was.
|
|
1778
|
-
*/
|
|
1779
|
-
.dpk-sidebar-toggle {
|
|
1780
|
-
position: relative;
|
|
1781
|
-
z-index: 7;
|
|
1782
|
-
display: inline-flex;
|
|
1783
|
-
flex: none;
|
|
1784
|
-
align-self: flex-start;
|
|
1785
|
-
align-items: center;
|
|
1786
|
-
justify-content: center;
|
|
1787
|
-
width: 22px;
|
|
1788
|
-
height: 22px;
|
|
1789
|
-
margin: 14px -11px 0;
|
|
1790
|
-
padding: 0;
|
|
1791
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
1792
|
-
border-radius: 999px;
|
|
1793
|
-
background: var(--dpk-paper-raised);
|
|
1794
|
-
color: var(--dpk-ink-soft);
|
|
1795
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
1796
|
-
cursor: pointer;
|
|
1797
|
-
transition:
|
|
1798
|
-
color 160ms var(--dpk-ease),
|
|
1799
|
-
border-color 160ms var(--dpk-ease),
|
|
1800
|
-
background 160ms var(--dpk-ease);
|
|
1801
|
-
}
|
|
1802
|
-
|
|
1803
|
-
.dpk-sidebar-toggle svg {
|
|
1804
|
-
width: 13px;
|
|
1805
|
-
height: 13px;
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
.dpk-sidebar-toggle:hover {
|
|
1809
|
-
color: var(--dpk-accent);
|
|
1810
|
-
border-color: color-mix(in srgb, var(--dpk-accent) 45%, transparent);
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
.dpk-sidebar-toggle:focus-visible {
|
|
1814
|
-
outline: none;
|
|
1815
|
-
box-shadow: var(--dpk-focus);
|
|
1816
|
-
}
|
|
1817
|
-
|
|
1818
|
-
.dpk-sidebar-strip {
|
|
1819
|
-
display: flex;
|
|
1820
|
-
flex: none;
|
|
1821
|
-
justify-content: center;
|
|
1822
|
-
width: 36px;
|
|
1823
|
-
padding-top: 14px;
|
|
1824
|
-
border-right: 1px solid var(--dpk-rule);
|
|
1825
|
-
background: var(--dpk-paper-sunken);
|
|
1826
|
-
}
|
|
1827
|
-
|
|
1828
|
-
.dpk-sidebar-strip .dpk-sidebar-toggle {
|
|
1829
|
-
margin: 0;
|
|
1830
|
-
}
|
|
1831
|
-
|
|
1832
|
-
/*
|
|
1833
|
-
* The sidebar's resizable edge: a hit area straddling its border that takes
|
|
1834
|
-
* no room of its own, with an accent line while hovered, focused or dragged.
|
|
1835
|
-
*/
|
|
1836
|
-
.dpk-sidebar-resizer {
|
|
1837
|
-
position: relative;
|
|
1838
|
-
z-index: 6;
|
|
1839
|
-
flex: none;
|
|
1840
|
-
width: 9px;
|
|
1841
|
-
/* Centred on the sidebar's border, whichever side that is. */
|
|
1842
|
-
margin: 0 -5px 0 -4px;
|
|
1843
|
-
cursor: col-resize;
|
|
1844
|
-
touch-action: none;
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
.dpk-sidebar-resizer::after {
|
|
1848
|
-
content: '';
|
|
1849
|
-
position: absolute;
|
|
1850
|
-
top: 0;
|
|
1851
|
-
bottom: 0;
|
|
1852
|
-
left: 3px;
|
|
1853
|
-
width: 2px;
|
|
1854
|
-
border-radius: 1px;
|
|
1855
|
-
background: var(--dpk-accent);
|
|
1856
|
-
opacity: 0;
|
|
1857
|
-
transition: opacity 160ms var(--dpk-ease);
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
.dpk-sidebar-resizer:hover::after,
|
|
1861
|
-
.dpk-sidebar-resizer:focus-visible::after,
|
|
1862
|
-
.dpk-shell[data-resizing] .dpk-sidebar-resizer::after {
|
|
1863
|
-
opacity: 1;
|
|
1864
|
-
}
|
|
1865
|
-
|
|
1866
|
-
.dpk-sidebar-resizer:focus-visible {
|
|
1867
|
-
outline: none;
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
/* While dragging, the cursor stays put and nothing underneath (text, preview frames) reacts. */
|
|
1871
|
-
.dpk-shell[data-resizing] {
|
|
1872
|
-
cursor: col-resize;
|
|
1873
|
-
user-select: none;
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
.dpk-shell[data-resizing] .dpk-main {
|
|
1877
|
-
pointer-events: none;
|
|
1878
|
-
}
|
|
1879
|
-
|
|
1880
|
-
.dpk-main {
|
|
1881
|
-
flex: 1 1 0%;
|
|
1882
|
-
display: flex;
|
|
1883
|
-
flex-direction: column;
|
|
1884
|
-
min-width: 0;
|
|
1885
|
-
overflow: auto;
|
|
1886
|
-
/* A faint wash of the accent from the top left corner gives the ground some depth. */
|
|
1887
|
-
background:
|
|
1888
|
-
radial-gradient(
|
|
1889
|
-
ellipse 900px 360px at 0% 0%,
|
|
1890
|
-
color-mix(in srgb, var(--dpk-accent) 5%, transparent),
|
|
1891
|
-
transparent 70%
|
|
1892
|
-
),
|
|
1893
|
-
radial-gradient(
|
|
1894
|
-
ellipse 700px 320px at 100% 0%,
|
|
1895
|
-
color-mix(in srgb, var(--dpk-blue) 4%, transparent),
|
|
1896
|
-
transparent 70%
|
|
1897
|
-
),
|
|
1898
|
-
var(--dpk-paper);
|
|
1899
|
-
background-attachment: local;
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
.dpk-main-body {
|
|
1903
|
-
flex: 1 0 auto;
|
|
1904
|
-
display: grid;
|
|
1905
|
-
align-content: start;
|
|
1906
|
-
gap: 16px;
|
|
1907
|
-
min-width: 0;
|
|
1908
|
-
padding: 24px;
|
|
1909
|
-
animation: dpk-rise 420ms var(--dpk-ease) backwards;
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
|
-
@keyframes dpk-rise {
|
|
1913
|
-
from {
|
|
1914
|
-
opacity: 0;
|
|
1915
|
-
transform: translateY(6px);
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
/*
|
|
1920
|
-
* Author memo. It sits at the end of the main column and sticks to the
|
|
1921
|
-
* bottom of the scrollport as a bar the full width of the column, edge to
|
|
1922
|
-
* edge: always in reach and never stealing height from the preview. Opened,
|
|
1923
|
-
* it grows upward over the content and shows the memo whole; only a memo
|
|
1924
|
-
* taller than the window scrolls, so its top stays reachable.
|
|
1925
|
-
*/
|
|
1926
|
-
.dpk-memo {
|
|
1927
|
-
position: sticky;
|
|
1928
|
-
bottom: 0;
|
|
1929
|
-
z-index: 5;
|
|
1930
|
-
margin-top: auto;
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
.dpk-memo[hidden] {
|
|
1934
|
-
display: none;
|
|
1935
|
-
}
|
|
1936
|
-
|
|
1937
|
-
.dpk-memo-fold {
|
|
1938
|
-
/* A faint amber wash over the whole note marks it as the author's aside. */
|
|
1939
|
-
border-top: 1px solid color-mix(in srgb, var(--dpk-amber) 28%, var(--dpk-rule-strong));
|
|
1940
|
-
background: color-mix(in srgb, color-mix(in srgb, var(--dpk-amber) 7%, var(--dpk-paper-raised)) 94%, transparent);
|
|
1941
|
-
backdrop-filter: blur(12px);
|
|
1942
|
-
box-shadow: 0 -8px 24px -18px color-mix(in srgb, var(--dpk-ink) 40%, transparent);
|
|
1943
|
-
}
|
|
1944
|
-
|
|
1945
|
-
.dpk-memo-bar {
|
|
1946
|
-
display: flex;
|
|
1947
|
-
align-items: center;
|
|
1948
|
-
gap: 6px;
|
|
1949
|
-
/* Clear of the hand-off dock at the bottom right while it is shown. */
|
|
1950
|
-
padding: 8px calc(16px + var(--dpk-dock-space, 0px)) 8px 16px;
|
|
1951
|
-
font-size: 12.5px;
|
|
1952
|
-
font-weight: 600;
|
|
1953
|
-
color: var(--dpk-ink-soft);
|
|
1954
|
-
cursor: pointer;
|
|
1955
|
-
list-style: none;
|
|
1956
|
-
user-select: none;
|
|
1957
|
-
}
|
|
1958
|
-
|
|
1959
|
-
.dpk-memo-bar::-webkit-details-marker {
|
|
1960
|
-
display: none;
|
|
1961
|
-
}
|
|
1962
|
-
|
|
1963
|
-
.dpk-memo-bar:hover {
|
|
1964
|
-
color: var(--dpk-ink);
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
.dpk-memo-bar:focus-visible {
|
|
1968
|
-
outline: none;
|
|
1969
|
-
box-shadow: var(--dpk-focus);
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
.dpk-memo-bar svg {
|
|
1973
|
-
width: 14px;
|
|
1974
|
-
height: 14px;
|
|
1975
|
-
transition: transform 160ms var(--dpk-ease);
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
.dpk-memo-fold[open] .dpk-memo-bar svg {
|
|
1979
|
-
transform: rotate(90deg);
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
.dpk-memo-body {
|
|
1983
|
-
max-height: calc(100dvh - 120px);
|
|
1984
|
-
overflow: auto;
|
|
1985
|
-
overscroll-behavior: contain;
|
|
1986
|
-
padding: 0 calc(16px + var(--dpk-dock-space, 0px)) 16px 16px;
|
|
1987
|
-
font-size: 12.5px;
|
|
1988
|
-
line-height: 1.7;
|
|
1989
|
-
color: var(--dpk-ink-soft);
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
.dpk-memo ::slotted(*) {
|
|
1993
|
-
display: block;
|
|
1994
|
-
max-width: 100%;
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
.dpk-orphans {
|
|
1998
|
-
margin-top: 16px;
|
|
1999
|
-
border: 1px dashed var(--dpk-rule-strong);
|
|
2000
|
-
border-radius: var(--dpk-radius);
|
|
2001
|
-
padding: 12px;
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2004
|
-
.dpk-banner {
|
|
2005
|
-
display: grid;
|
|
2006
|
-
gap: 4px;
|
|
2007
|
-
margin-bottom: 14px;
|
|
2008
|
-
border: 1px solid color-mix(in srgb, var(--dpk-danger) 35%, transparent);
|
|
2009
|
-
border-radius: var(--dpk-radius);
|
|
2010
|
-
background: linear-gradient(90deg, var(--dpk-danger) 0 3px, transparent 3px), var(--dpk-danger-soft);
|
|
2011
|
-
padding: 12px 14px 12px 17px;
|
|
2012
|
-
max-width: 900px;
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
.dpk-banner strong {
|
|
2016
|
-
font-size: 13px;
|
|
2017
|
-
color: var(--dpk-danger);
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
.dpk-banner code {
|
|
2021
|
-
font-family: var(--dpk-mono);
|
|
2022
|
-
font-size: 11px;
|
|
2023
|
-
color: var(--dpk-ink-soft);
|
|
2024
|
-
overflow-wrap: anywhere;
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
.dpk-notes {
|
|
2028
|
-
flex: 0 0 auto;
|
|
2029
|
-
width: 360px;
|
|
2030
|
-
border-left: 1px solid var(--dpk-rule);
|
|
2031
|
-
background: var(--dpk-paper-raised);
|
|
2032
|
-
box-shadow: -12px 0 32px -24px var(--dpk-shade-3);
|
|
2033
|
-
overflow: hidden;
|
|
2034
|
-
display: flex;
|
|
2035
|
-
animation: dpk-slide-in 260ms var(--dpk-ease) backwards;
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
@keyframes dpk-slide-in {
|
|
2039
|
-
from {
|
|
2040
|
-
opacity: 0;
|
|
2041
|
-
transform: translateX(16px);
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
.dpk-notes[hidden] {
|
|
2046
|
-
display: none;
|
|
2047
|
-
}
|
|
2048
|
-
|
|
2049
|
-
/* ------------------------------------------------------------- footer */
|
|
2050
|
-
|
|
2051
|
-
.dpk-footer {
|
|
2052
|
-
border-top: 1px solid var(--dpk-rule);
|
|
2053
|
-
padding: 10px 20px;
|
|
2054
|
-
display: flex;
|
|
2055
|
-
gap: 12px;
|
|
2056
|
-
align-items: center;
|
|
2057
|
-
background: var(--dpk-glass);
|
|
2058
|
-
backdrop-filter: blur(12px);
|
|
2059
|
-
font-size: 12px;
|
|
2060
|
-
color: var(--dpk-ink-faint);
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
|
-
/* --------------------------------------------------- floating review */
|
|
2064
|
-
|
|
2065
|
-
/* Review toggle: pinned to the top right corner, always in the same place. */
|
|
2066
|
-
.dpk-fab {
|
|
2067
|
-
position: fixed;
|
|
2068
|
-
top: 12px;
|
|
2069
|
-
right: 16px;
|
|
2070
|
-
z-index: 60;
|
|
2071
|
-
display: inline-flex;
|
|
2072
|
-
align-items: center;
|
|
2073
|
-
justify-content: center;
|
|
2074
|
-
width: 36px;
|
|
2075
|
-
height: 36px;
|
|
2076
|
-
padding: 0;
|
|
2077
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2078
|
-
border-radius: 11px;
|
|
2079
|
-
background: var(--dpk-paper-raised);
|
|
2080
|
-
color: var(--dpk-ink-soft);
|
|
2081
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
2082
|
-
cursor: pointer;
|
|
2083
|
-
transition:
|
|
2084
|
-
color 180ms var(--dpk-ease),
|
|
2085
|
-
background 180ms var(--dpk-ease),
|
|
2086
|
-
border-color 180ms var(--dpk-ease),
|
|
2087
|
-
box-shadow 180ms var(--dpk-ease),
|
|
2088
|
-
transform 220ms var(--dpk-ease-spring);
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
.dpk-fab:hover {
|
|
2092
|
-
color: var(--dpk-ink);
|
|
2093
|
-
border-color: var(--dpk-rule-hover);
|
|
2094
|
-
transform: translateY(-1px);
|
|
2095
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow);
|
|
2096
|
-
}
|
|
2097
|
-
|
|
2098
|
-
.dpk-fab:active {
|
|
2099
|
-
transform: translateY(0) scale(0.95);
|
|
2100
|
-
box-shadow: var(--dpk-shadow-xs);
|
|
2101
|
-
}
|
|
2102
|
-
|
|
2103
|
-
.dpk-fab:focus-visible {
|
|
2104
|
-
outline: none;
|
|
2105
|
-
box-shadow: var(--dpk-focus);
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2108
|
-
.dpk-fab[aria-expanded='true'] {
|
|
2109
|
-
color: var(--dpk-accent-ink);
|
|
2110
|
-
border-color: color-mix(in srgb, var(--dpk-accent-strong) 70%, transparent);
|
|
2111
|
-
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
2112
|
-
box-shadow:
|
|
2113
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
2114
|
-
0 6px 16px -6px color-mix(in srgb, var(--dpk-accent) 70%, transparent);
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2117
|
-
.dpk-fab[aria-expanded='true']:hover {
|
|
2118
|
-
box-shadow:
|
|
2119
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
2120
|
-
0 10px 22px -8px color-mix(in srgb, var(--dpk-accent) 80%, transparent);
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
|
-
.dpk-fab-icon {
|
|
2124
|
-
position: relative;
|
|
2125
|
-
display: block;
|
|
2126
|
-
width: 16px;
|
|
2127
|
-
height: 12px;
|
|
2128
|
-
border: 1.6px solid currentColor;
|
|
2129
|
-
border-radius: 4px;
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
.dpk-fab-icon::after {
|
|
2133
|
-
content: '';
|
|
2134
|
-
position: absolute;
|
|
2135
|
-
left: 2px;
|
|
2136
|
-
bottom: -4px;
|
|
2137
|
-
border-left: 3.5px solid transparent;
|
|
2138
|
-
border-right: 3.5px solid transparent;
|
|
2139
|
-
border-top: 4px solid currentColor;
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
.dpk-fab-badge {
|
|
2143
|
-
position: absolute;
|
|
2144
|
-
top: -6px;
|
|
2145
|
-
right: -6px;
|
|
2146
|
-
min-width: 18px;
|
|
2147
|
-
height: 18px;
|
|
2148
|
-
padding: 0 4px;
|
|
2149
|
-
border: 2px solid var(--dpk-paper);
|
|
2150
|
-
border-radius: 999px;
|
|
2151
|
-
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
2152
|
-
color: var(--dpk-accent-ink);
|
|
2153
|
-
font-family: var(--dpk-mono);
|
|
2154
|
-
font-size: 9.5px;
|
|
2155
|
-
font-weight: 650;
|
|
2156
|
-
font-variant-numeric: tabular-nums;
|
|
2157
|
-
line-height: 14px;
|
|
2158
|
-
text-align: center;
|
|
2159
|
-
box-shadow: 0 3px 8px -2px color-mix(in srgb, var(--dpk-accent) 60%, transparent);
|
|
2160
|
-
animation: dpk-pop 260ms var(--dpk-ease-spring);
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
|
-
@keyframes dpk-pop {
|
|
2164
|
-
from {
|
|
2165
|
-
transform: scale(0.4);
|
|
2166
|
-
opacity: 0;
|
|
2167
|
-
}
|
|
2168
|
-
}
|
|
2169
|
-
|
|
2170
|
-
/* ------------------------------------------------------ hand-off dock */
|
|
2171
|
-
|
|
2172
|
-
.dpk-dock {
|
|
2173
|
-
position: fixed;
|
|
2174
|
-
right: 16px;
|
|
2175
|
-
bottom: 16px;
|
|
2176
|
-
z-index: 60;
|
|
2177
|
-
display: flex;
|
|
2178
|
-
flex-direction: column;
|
|
2179
|
-
align-items: flex-end;
|
|
2180
|
-
gap: 8px;
|
|
2181
|
-
max-width: calc(100vw - 32px);
|
|
2182
|
-
animation: dpk-dock-in 260ms var(--dpk-ease) backwards;
|
|
2183
|
-
}
|
|
2184
|
-
|
|
2185
|
-
@keyframes dpk-dock-in {
|
|
2186
|
-
from {
|
|
2187
|
-
transform: translateY(8px);
|
|
2188
|
-
opacity: 0;
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
|
-
.dpk-dock-actions {
|
|
2193
|
-
display: flex;
|
|
2194
|
-
gap: 6px;
|
|
2195
|
-
padding: 6px;
|
|
2196
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2197
|
-
border-radius: var(--dpk-radius-lg);
|
|
2198
|
-
background: var(--dpk-glass);
|
|
2199
|
-
backdrop-filter: blur(12px);
|
|
2200
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
.dpk-dock-note {
|
|
2204
|
-
max-width: 320px;
|
|
2205
|
-
margin: 0;
|
|
2206
|
-
padding: 8px 12px;
|
|
2207
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2208
|
-
border-radius: var(--dpk-radius);
|
|
2209
|
-
background: var(--dpk-paper-raised);
|
|
2210
|
-
box-shadow: var(--dpk-shadow);
|
|
2211
|
-
color: var(--dpk-ink-soft);
|
|
2212
|
-
font-size: 12px;
|
|
2213
|
-
line-height: 1.6;
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
@media (max-width: 720px) {
|
|
2217
|
-
/* The version select stays: it is the reader's only way to switch versions. */
|
|
2218
|
-
.dpk-header-meta > :not(.dpk-version) {
|
|
2219
|
-
display: none;
|
|
2220
|
-
}
|
|
2221
|
-
|
|
2222
|
-
/* The title takes the first row whole; the version select and tools wrap below it. */
|
|
2223
|
-
.dpk-header {
|
|
2224
|
-
flex-wrap: wrap;
|
|
2225
|
-
row-gap: 8px;
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
|
-
.dpk-title {
|
|
2229
|
-
flex: 1 0 100%;
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
|
-
.dpk-brand {
|
|
2233
|
-
display: none;
|
|
2234
|
-
}
|
|
2235
|
-
}
|
|
2236
|
-
`],dc=30,pc=et(k(),C({base:k(),value:k()})),jr=t=>{const e=S(pc,t);return e.success?e.output:null},hc=t=>t.key===void 0?JSON.stringify(["field",t.hosts,t.name,t.base]):JSON.stringify(["key",t.key,t.name]),uc=(t,e,s)=>{const{[e]:n,...r}=t;if(s.value===s.base)return r;const i=Object.entries({...r,[e]:s});return Object.fromEntries(i.slice(Math.max(0,i.length-dc)))},fc=(t,e)=>{if(!(e in t))return t;const{[e]:s,...n}=t;return n},gc=(t,e,s)=>{const n=t[e];return n===void 0||n.base!==s||n.value===s?null:n.value},mc=new Set(["text","search","url","email","tel"]),Ir=t=>t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&mc.has(t.type)?t:null,kc=(t,e)=>{const s=[];let n=e.getRootNode();for(;n instanceof ShadowRoot;){if(n.host===t)return s;s.unshift(n.host.localName),n=n.host.getRootNode()}return null},bc=t=>{let e=t;for(;e!==null;){const s=e.getAttribute("data-dpk-text-key");if(s!==null&&s!=="")return s;const n=e.getRootNode();e=e.parentElement??(n instanceof ShadowRoot?n.host:null)}},vc=t=>t.getAttribute("aria-label")??(t.placeholder||t.name||t.localName),ms=t=>typeof t=="string"?[t]:Array.isArray(t)?t.flatMap(ms):typeof t=="object"&&t!==null?Object.values(t).flatMap(ms):[],qr=t=>t.replace(/\s+/g," ").trim();class xc{#e;#i;#n=null;#r="";#t=new WeakMap;#s=new Set;constructor(e,s){this.#e=e,this.#i=s,e.addController(this)}hostConnected(){this.#n===null&&(this.#n=this.#i.persist()?Hl(jr):V(jr),this.#r=this.#i.storageKey()),this.#e.addEventListener("focusin",this.#o),this.#e.addEventListener("input",this.#a)}hostDisconnected(){this.#e.removeEventListener("focusin",this.#o),this.#e.removeEventListener("input",this.#a)}settle(e){const s=new Set(e.flatMap(ms).map(qr));for(const n of this.#s){if(!s.has(qr(n.value)))continue;this.#s.delete(n);const r=this.#t.get(n);r!==void 0&&this.#p(fc(this.#l(),r.id))}}#o=e=>{const s=Ir(e.composedPath()[0]);if(s===null||this.#s.has(s))return;const n=kc(this.#e,s);if(n===null)return;const r=bc(s),i=s.value,o=hc({...r===void 0?{}:{key:r},hosts:n,name:vc(s),base:i});this.#t.set(s,{id:o,base:i});const a=gc(this.#l(),o,i);a!==null&&queueMicrotask(()=>{if(s.value===i){s.value=a;try{s.setSelectionRange(a.length,a.length)}catch{}this.#s.add(s),s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}})};#a=e=>{const s=Ir(e.composedPath()[0]),n=s===null?void 0:this.#t.get(s);if(!(s===null||n===void 0)){for(const r of this.#s)r.isConnected||this.#s.delete(r);this.#s.add(s),this.#p(uc(this.#l(),n.id,{base:n.base,value:s.value}))}};#l(){return this.#n?.read(this.#r)??{}}#p(e){Object.keys(e).length===0?this.#n?.remove(this.#r):this.#n?.write(this.#r,e)}}class yc{#e;#i;#n;#r=null;#t=!1;constructor(e,s={}){this.#e=e,this.#i=s.fetchVersions??rr,this.#n=s.switchTo??ir,e.addController(this)}hostConnected(){}load(){this.#t||this.#r!==null||(this.#t=!0,this.#i().then(e=>{this.#r=e,this.#t=!1,this.#e.requestUpdate()},e=>{this.#t=!1,console.warn("dev-process-kit: could not list the published versions",e)}))}pick(e){e!==q&&this.#n(e===""?null:e)}render(e){const s=N(e),n=nr({current:q,requested:ts(location.search)!==null,published:this.#r,text:{pinned:s.versionPinned,latest:s.versionLatest}}),r=()=>this.load();return g`<span class="dpk-version"
|
|
2237
|
-
>dev-process-kit@<select
|
|
2238
|
-
class="dpk-version-select"
|
|
2239
|
-
aria-label=${s.versionLabel}
|
|
2240
|
-
title=${s.versionLabel}
|
|
2241
|
-
@pointerenter=${r}
|
|
2242
|
-
@focus=${r}
|
|
2243
|
-
@change=${ns(i=>this.pick(i))}
|
|
2244
|
-
>
|
|
2245
|
-
${n.options.map(i=>g`<option value=${i.value} ?selected=${i.value===n.value}>${i.label}</option>`)}
|
|
2246
|
-
</select></span
|
|
2247
|
-
>`}}class wc extends H{static{this.styles=cc}static{this.properties={storageKey:{type:String,attribute:"storage-key"},storage:{type:String},notes:{type:String},theme:{type:String},notesOpen:{state:!0}}}#e=!1;#i=new Xl(this);#n=new Kl(this,()=>this.storage!=="off"&&this.storage!=="memory");#r=new Ul(this);#t=new Jl(this);#s=new lc(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",template:()=>this.definition.name,layout:()=>this.sidebarLayout});#o=new oc(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",template:()=>this.definition.name});#a=new xc(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",storageKey:()=>`${this.storageKey??cs(this.definition.name)}:unsent-text`});#l=!1;#p=new yc(this);#v=new Yl(this,()=>this.storage!=="off"&&this.storage!=="memory",()=>this.#c?.setTemplate(this.definition));#m;#c;#d=Kt;#x=null;#h=new Set;#u=null;#y;#g;#k;#$=[];#C;#N=new Promise(e=>{this.#C=e});#T;get locale(){return this.#v.locale}get definition(){const e=this.locale;return this.#m?.locale!==e&&(this.#m={locale:e,value:this.definitionFor(e)}),this.#m.value}connectedCallback(){super.connectedCallback(),this.dataset.template=this.definition.name,this.#e||(this.#e=!0,this.notesOpen=this.notes==="on"||this.notes==="open"),this.#E(),window.addEventListener("hashchange",this.#M),this.addEventListener("click",this.#q),this.addEventListener("dpk-comment-targets-change",this.#f),this.addEventListener("dpk-comment-request",this.#O),this.addEventListener("dpk-comment-submit",this.#j),this.addEventListener("dpk-element-action",this.#I),this.#k??=new MutationObserver(this.#f),this.#f()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("hashchange",this.#M),this.removeEventListener("click",this.#q),this.#g?.disconnect(),this.#k?.disconnect(),this.removeEventListener("dpk-comment-targets-change",this.#f),this.removeEventListener("dpk-comment-request",this.#O),this.removeEventListener("dpk-comment-submit",this.#j),this.removeEventListener("dpk-element-action",this.#I)}#E(e=0){if(this.#c){this.#_();return}if(this.childNodes.length===0&&e<2){queueMicrotask(()=>this.#E(e+1));return}this.#Z()}#_(){this.#y||(this.#y=this.#c?.subscribe(()=>this.#J()))}willUpdate(){this.dataset.theme=this.#n.resolve(Pe(this.theme))}updated(){this.#Q(),this.#Y(),this.#l&&(this.#l=!1,this.renderRoot.querySelector(".dpk-sidebar-toggle")?.focus())}get api(){return this.#T??=this.#K(),this.#T}get controller(){if(!this.#c)throw new Error(`<${this.tagName.toLowerCase()}> is not initialized yet`);return this.#c}get derivation(){return this.controller.derivation}get navigation(){return this.#d}dispatch(e){const s=this.controller.dispatch(e);return s.ok&&this.#a.settle([e.payload,e.note]),s.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:s.issues},bubbles:!0,composed:!0})),this.#b()),s}dispatchBatch(e){const s=this.controller.dispatchBatch(e);return s.ok&&this.#a.settle(e.flatMap(n=>[n.payload,n.note])),s.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:s.issues},bubbles:!0,composed:!0})),this.#b()),s}editComment(e,s){const n=this.controller.editComment(e,s);return n.ok&&this.#a.settle([s]),n.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:n.issues},bubbles:!0,composed:!0})),this.#b()),n}removeAction(e){this.controller.removeAction(e)}clearActions(){this.controller.clearActions()}navigate(e,s={}){const n=fe(this.#w());this.#d=Wt(this.#d,e,this.definition.navigationHierarchy),this.#S(s.replace??!1);const r=fe(this.#w());this.requestUpdate(),n!==r&&(this.#b(),this.dispatchEvent(new CustomEvent("dpk-navigate",{detail:{navigation:this.#d},bubbles:!0,composed:!0})))}hashFor(e){const s=this.#w();return fe(this.definition.resolveNavigation(this.derivation.state,Wt(s,e,this.definition.navigationHierarchy)))}requestComment(e){this.#x=typeof e=="string"?e:M(e),this.notesOpen=!0,this.requestUpdate()}get integratedReview(){return!1}get canSendToClaude(){return this.#r.available}sendToClaude(){return this.#r.send({brief:this.api.exportBrief(),draft:Dt(this.derivation.actions),anchor:this})}renderReviewPanel(e){return g`<dpk-component-comment-panel
|
|
2248
|
-
.definition=${this.controller.definition}
|
|
2249
|
-
.state=${e.state}
|
|
2250
|
-
.navigation=${e.navigation}
|
|
2251
|
-
.derivation=${this.derivation}
|
|
2252
|
-
.issues=${this.controller.lastIssues}
|
|
2253
|
-
.exportBrief=${()=>this.api.exportBrief()}
|
|
2254
|
-
.sendToClaude=${this.canSendToClaude?()=>this.sendToClaude():void 0}
|
|
2255
|
-
.pendingTarget=${this.#x}
|
|
2256
|
-
.embedded=${this.integratedReview}
|
|
2257
|
-
.onDelete=${s=>this.removeAction(s)}
|
|
2258
|
-
.onEditComment=${(s,n)=>this.editComment(s,n)}
|
|
2259
|
-
.onClear=${()=>this.clearActions()}
|
|
2260
|
-
.onComment=${(s,n)=>{const r=this.dispatch({type:P,target:s,payload:{body:n}});return r.ok&&(this.#x=null),r}}
|
|
2261
|
-
></dpk-component-comment-panel>`}renderChrome(e,s){const n=e.actions.length,r=e.comments.length,i=N(this.locale),o=s.sidebarHidden===!0||!s.sidebar&&!this.hasSidebarContent(),a=this.sidebarLayout.side,l=!o&&this.#R&&this.#o.collapsed,c=o?m:this.#H(l);return g`
|
|
2262
|
-
<div class="dpk-shell" ?data-resizing=${this.#s.dragging}>
|
|
2263
|
-
<header class="dpk-header">
|
|
2264
|
-
<span class="dpk-brand" aria-hidden="true"></span>
|
|
2265
|
-
<div class="dpk-title">
|
|
2266
|
-
<span class="dpk-template-mark">${this.definition.label}</span>
|
|
2267
|
-
<h1>${this.definition.title(e.state)}</h1>
|
|
2268
|
-
</div>
|
|
2269
|
-
<div class="dpk-header-slot">
|
|
2270
|
-
${s.header??m}
|
|
2271
|
-
<slot name="header"></slot>
|
|
2272
|
-
</div>
|
|
2273
|
-
<div class="dpk-header-meta">
|
|
2274
|
-
${this.#p.render(this.locale)}
|
|
2275
|
-
<span>${this.definition.name}</span>
|
|
2276
|
-
<span class="dpk-meta-count" data-active=${n>0?"true":"false"}>
|
|
2277
|
-
${n} draft · ${r} note
|
|
2278
|
-
</span>
|
|
2279
|
-
</div>
|
|
2280
|
-
<div class="dpk-header-tools">${this.#D()} ${this.#U()}</div>
|
|
2281
|
-
</header>
|
|
2282
|
-
<div class="dpk-body" data-sidebar-side=${a}>
|
|
2283
|
-
${a==="right"?c:m}
|
|
2284
|
-
<aside
|
|
2285
|
-
id="dpk-sidebar"
|
|
2286
|
-
class="dpk-sidebar"
|
|
2287
|
-
?hidden=${o||l}
|
|
2288
|
-
style=${`--dpk-sidebar-width: ${this.#s.width}px`}
|
|
2289
|
-
>
|
|
2290
|
-
${s.sidebar??m}
|
|
2291
|
-
<slot name="sidebar"></slot>
|
|
2292
|
-
</aside>
|
|
2293
|
-
${a==="left"?c:m}
|
|
2294
|
-
<main class="dpk-main">
|
|
2295
|
-
<div class="dpk-main-body">
|
|
2296
|
-
${this.#u?g`<div class="dpk-banner" role="alert">
|
|
2297
|
-
<strong>${i.baseDataError}</strong>
|
|
2298
|
-
<code>${this.#u}</code>
|
|
2299
|
-
</div>`:m}
|
|
2300
|
-
${s.main??m}
|
|
2301
|
-
<slot name="main"></slot>
|
|
2302
|
-
<section class="dpk-orphans" ?hidden=${this.#i.orphans===0}>
|
|
2303
|
-
<p class="dpk-label">previews without metadata</p>
|
|
2304
|
-
<slot name="preview"></slot>
|
|
2305
|
-
</section>
|
|
2306
|
-
</div>
|
|
2307
|
-
<div class="dpk-memo" ?hidden=${!this.hasMemoContent()}>
|
|
2308
|
-
<details class="dpk-memo-fold">
|
|
2309
|
-
<summary class="dpk-memo-bar">${es()} ${i.memo}</summary>
|
|
2310
|
-
<div class="dpk-memo-body"><slot name="memo"></slot></div>
|
|
2311
|
-
</details>
|
|
2312
|
-
</div>
|
|
2313
|
-
</main>
|
|
2314
|
-
${this.integratedReview?m:g`<aside class="dpk-notes" ?hidden=${!this.notesOpen}>${this.renderReviewPanel(e)}</aside>`}
|
|
2315
|
-
</div>
|
|
2316
|
-
${s.footer||this.hasFooterContent()?g`<footer class="dpk-footer">
|
|
2317
|
-
${s.footer??m}
|
|
2318
|
-
<slot name="footer"></slot>
|
|
2319
|
-
</footer>`:m}
|
|
2320
|
-
${this.integratedReview?m:g`<button
|
|
2321
|
-
class="dpk-fab"
|
|
2322
|
-
type="button"
|
|
2323
|
-
aria-expanded=${this.notesOpen?"true":"false"}
|
|
2324
|
-
title=${i.reviewToggle}
|
|
2325
|
-
@click=${()=>{this.notesOpen=!this.notesOpen}}
|
|
2326
|
-
>
|
|
2327
|
-
<span class="dpk-fab-icon" aria-hidden="true"></span>
|
|
2328
|
-
<span
|
|
2329
|
-
class="dpk-label"
|
|
2330
|
-
style="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"
|
|
2331
|
-
>
|
|
2332
|
-
${i.review}
|
|
2333
|
-
</span>
|
|
2334
|
-
${n>0?g`<span class="dpk-fab-badge">${n}</span>`:m}
|
|
2335
|
-
</button>`}
|
|
2336
|
-
${this.integratedReview?m:this.#B(n)}
|
|
2337
|
-
</div>
|
|
2338
|
-
`}#B(e){const s=zl({actions:e,railOpen:this.notesOpen,sendable:this.canSendToClaude,locale:this.locale},this.#t.state);if(!s)return m;const n=N(this.locale);return g`<div class="dpk-dock" role="group" aria-label=${n.handoffLabel}>
|
|
2339
|
-
${s.note?g`<p class="dpk-dock-note" role="alert">${s.note}</p>`:m}
|
|
2340
|
-
<div class="dpk-dock-actions">
|
|
2341
|
-
${s.send?g`<button
|
|
2342
|
-
class="dpk-btn dpk-btn--accent"
|
|
2343
|
-
type="button"
|
|
2344
|
-
?disabled=${s.send.disabled}
|
|
2345
|
-
@click=${()=>{this.#t.send(()=>this.sendToClaude())}}
|
|
2346
|
-
>
|
|
2347
|
-
${s.send.label}
|
|
2348
|
-
</button>`:m}
|
|
2349
|
-
<button
|
|
2350
|
-
class=${s.send?"dpk-btn":"dpk-btn dpk-btn--accent"}
|
|
2351
|
-
type="button"
|
|
2352
|
-
data-status=${s.copy.status}
|
|
2353
|
-
title=${n.handoffCopyTitle}
|
|
2354
|
-
@click=${()=>{this.#t.copy(()=>this.api.exportBrief())}}
|
|
2355
|
-
>
|
|
2356
|
-
${s.copy.label}
|
|
2357
|
-
</button>
|
|
2358
|
-
</div>
|
|
2359
|
-
</div>`}#D(){const e=this.locale,s=N(e).language;return g`<select
|
|
2360
|
-
class="dpk-lang-select"
|
|
2361
|
-
aria-label=${s}
|
|
2362
|
-
title=${s}
|
|
2363
|
-
@change=${ns(n=>{const r=xt.find(i=>i===n);r!==void 0&&this.#v.pick(r)})}
|
|
2364
|
-
>
|
|
2365
|
-
${xt.map(n=>g`<option value=${n} lang=${n} ?selected=${n===e}>
|
|
2366
|
-
${aa[n]}
|
|
2367
|
-
</option>`)}
|
|
2368
|
-
</select>`}#U(){const e=this.dataset.theme==="dark",s=N(this.locale),n=e?s.useLightTheme:s.useDarkTheme;return g`<button
|
|
2369
|
-
class="dpk-theme-toggle"
|
|
2370
|
-
type="button"
|
|
2371
|
-
aria-label=${n}
|
|
2372
|
-
title=${n}
|
|
2373
|
-
@click=${()=>this.#n.toggle(Pe(this.theme))}
|
|
2374
|
-
>
|
|
2375
|
-
${e?Aa():Ca()}
|
|
2376
|
-
</button>`}get#R(){return this.sidebarLayout.collapsible!==!1}#H(e){const s=this.#R?this.#F(e):m;return e?g`<div class="dpk-sidebar-strip">${s}</div>`:this.sidebarLayout.side==="left"?g`${this.#L()}${s}`:g`${s}${this.#L()}`}#F(e){const s=N(this.locale),n=rc(this.sidebarLayout.side,e),r=n.action==="collapse"?s.collapseSidebar:s.expandSidebar;return g`<button
|
|
2377
|
-
class="dpk-sidebar-toggle"
|
|
2378
|
-
type="button"
|
|
2379
|
-
aria-controls="dpk-sidebar"
|
|
2380
|
-
aria-expanded=${e?"false":"true"}
|
|
2381
|
-
aria-label=${r}
|
|
2382
|
-
title=${r}
|
|
2383
|
-
@click=${()=>{this.#l=!0,this.#o.toggle()}}
|
|
2384
|
-
>
|
|
2385
|
-
${n.points==="left"?Qn():es()}
|
|
2386
|
-
</button>`}#L(){const e=N(this.locale),s=this.#s.handlers;return g`<div
|
|
2387
|
-
class="dpk-sidebar-resizer"
|
|
2388
|
-
role="separator"
|
|
2389
|
-
tabindex="0"
|
|
2390
|
-
aria-orientation="vertical"
|
|
2391
|
-
aria-label=${e.resizeSidebar}
|
|
2392
|
-
aria-valuemin=${G.min}
|
|
2393
|
-
aria-valuemax=${G.max}
|
|
2394
|
-
aria-valuenow=${this.#s.width}
|
|
2395
|
-
title=${e.resizeSidebarHint}
|
|
2396
|
-
@pointerdown=${s.pointerdown}
|
|
2397
|
-
@pointermove=${s.pointermove}
|
|
2398
|
-
@pointerup=${s.pointerup}
|
|
2399
|
-
@pointercancel=${s.pointercancel}
|
|
2400
|
-
@keydown=${s.keydown}
|
|
2401
|
-
@dblclick=${s.dblclick}
|
|
2402
|
-
></div>`}render(){if(!this.#c)return m;const e=this.#z();return this.renderChrome(e,this.renderRegions(e))}get sidebarLayout(){return ec}hasSidebarContent(){return this.querySelector('[slot="sidebar"]')!==null}hasMemoContent(){return this.querySelector('[slot="memo"]')!==null}hasFooterContent(){return this.querySelector('[slot="footer"]')!==null}context(){return this.#z()}#A(){return{definition:this.definition,controller:()=>this.controller,derivation:()=>this.derivation,ready:this.#N,navigation:()=>this.#w(),issues:()=>this.controller.lastIssues,dispatch:e=>this.dispatch(e),dispatchBatch:e=>this.dispatchBatch(e),subscribe:e=>(this.#h.add(e),()=>{this.#h.delete(e)}),editComment:(e,s)=>this.editComment(e,s),removeAction:e=>this.removeAction(e),clearActions:()=>this.clearActions(),navigate:(e,s)=>this.navigate(e,s),hashFor:e=>this.hashFor(e),requestComment:e=>this.requestComment(e)}}#K(){return Ol(this.#A(),this)}#P(){return Cr(this.#A())}#z(){return Ml(this.#A())}#w(){return this.definition.resolveNavigation(this.derivation.state,this.#d)}#Z(){const e=this.#V();this.#d=zr();const s=this.storageKey;this.#c=new $r({definition:this.definition,base:e,storage:this.#W(),...typeof s=="string"?{storageKey:s}:{}}),this.#_(),this.#f(),this.#S(!0),this.#C?.(),this.#G(),this.requestUpdate()}#W(){return this.storage==="off"?null:this.storage==="memory"?new as:ls()}#V(){const e=this.querySelector('script[type="application/json"]');if(!e?.textContent||e.textContent.trim().length===0)return console.warn(`[dev-process-kit] <${this.tagName.toLowerCase()}> has no base JSON; starting from an empty state.`),this.#u='no <script type="application/json"> child found',this.definition.emptyBase();try{return this.definition.parseBase(JSON.parse(e.textContent))}catch(s){return console.error("[dev-process-kit] invalid base data:",s),this.#u=s instanceof Error?s.message:String(s),this.definition.emptyBase()}}#G(){this.querySelector('script[type="application/json"]')||(this.#g=new MutationObserver(()=>{const e=this.querySelector('script[type="application/json"]');if(e){this.#g?.disconnect(),this.#g=void 0;try{this.controller.setBase(this.definition.parseBase(JSON.parse(e.textContent??"null")))}catch(s){console.error("[dev-process-kit] invalid base data:",s)}}}),this.#g.observe(this,{childList:!0,subtree:!0}))}#b(){const e=this.#P();for(const s of this.#h)s(e)}#J(){if(!this.isConnected){this.requestUpdate(),this.#b();return}this.#S(!0),Pr(this.#$,this.controller.actions),queueMicrotask(this.#f),this.requestUpdate(),this.#b(),this.dispatchEvent(new CustomEvent("dpk-change",{detail:this.#P(),bubbles:!0,composed:!0}))}#S(e){const s=this.#w();this.#d=s,Ql(s,e)}#M=()=>{this.#d=zr(),this.#S(!0),this.requestUpdate(),this.#b(),this.dispatchEvent(new CustomEvent("dpk-navigate",{detail:{navigation:this.#d},bubbles:!0,composed:!0}))};#f=()=>{this.#k?.disconnect(),this.#$=Zl(this,e=>{this.isConnected&&this.#k?.observe(e,{childList:!0,subtree:!0})}),this.#c&&(Pr(this.#$,this.#c.actions),this.#c.setComponentSnapshot(Vl(this.#$)))};#O=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!this.#c)return;const s=e.detail;typeof s!="object"||s===null||!("target"in s)||typeof s.target!="string"||(this.#f(),!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(r=>r.value===s.target))||this.requestComment(s.target)};#j=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!e.cancelable||!this.#c)return;const s=S(Ja,e.detail);if(!s.success)return;this.#f();const{target:n,body:r}=s.output;if(!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(a=>a.value===n))return;this.dispatch({type:P,target:n,payload:{body:r}}).ok&&e.preventDefault()};#I=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!e.cancelable||!this.#c)return;const s=S(ea,e.detail);if(!s.success)return;this.#f();const{type:n,target:r,payload:i}=s.output;if(!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(l=>l.value===r))return;this.dispatch({type:n,target:r,payload:i}).ok&&e.preventDefault()};#q=e=>{for(const s of e.composedPath()){if(!(s instanceof Element))continue;if(s===this||s.hasAttribute("data-template"))break;const n=s.getAttribute("data-dpk-navigate");if(n!==null){e.preventDefault(),this.navigate(Zt(n.includes("=")?n:`step=${n}`));return}const r=s.getAttribute("data-dpk-comment");if(r!==null){e.preventDefault(),this.requestComment(r);return}}};#Y(){const e=this.renderRoot.querySelector(".dpk-shell"),s=this.renderRoot.querySelector(".dpk-dock-actions");e&&(s?e.style.setProperty("--dpk-dock-space",`${s.offsetWidth+8}px`):e.style.removeProperty("--dpk-dock-space"))}#Q(){this.#i.route()}}export{Le as $,Xt as A,xa as B,P as C,Xn as D,Kt as E,q as F,Gn as G,Yn as H,Qt as I,Jn as J,Vn as K,vr as L,as as M,Zt as N,Ln as O,Do as P,Wt as Q,Uo as R,Dt as S,wc as T,Pn as U,M as V,os as W,tt as X,qt as Y,Ze as Z,er as _,Ut as a,Ke as a0,vi as a1,D as a2,m as a3,g as a4,Wn as a5,ti as a6,H as a7,wt as a8,$a as a9,V as aA,Za as aB,ns as aC,Wa as aD,it as aE,ce as aF,Jt as aG,Gt as aH,vn as aI,No as aJ,Io as aK,Ds as aL,kn as aM,bt as aN,Ws as aO,De as aP,Ue as aQ,mt as aR,Qn as aS,va as aT,ba as aU,xn as aV,Sa as aa,It as ab,ue as ac,_e as ad,Z as ae,k as af,Xe as ag,x as ah,w as ai,En as aj,Rn as ak,W as al,he as am,An as an,jt as ao,S as ap,C as aq,Cn as ar,Ot as as,wn as at,yn as au,Tn as av,qo as aw,es as ax,L as ay,Oe as az,bn as b,$r as c,Bt as d,Ho as e,Vt as f,On as g,Re as h,kr as i,$t as j,zn as k,Wo as l,Nt as m,ls as n,cs as o,Bo as p,La as q,Co as r,Ba as s,br as t,ie as u,Ko as v,fe as w,wa as x,ya as y,Yt as z};
|