dev-process-kit 0.2.0 → 0.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +178 -60
- package/dist/boards.js +1 -0
- package/dist/chunks/shared-B0QTGEwR.js +1844 -0
- package/dist/chunks/shared-BQqlFaPv.js +4928 -0
- package/dist/chunks/shared-BR7trWLo.js +3586 -0
- package/dist/chunks/shared-BpfuvyBP.js +1636 -0
- package/dist/chunks/shared-C1rWkW_W.js +705 -0
- package/dist/chunks/shared-C6hVLci2.js +574 -0
- package/dist/chunks/shared-CtoQ05tb.js +1 -0
- package/dist/chunks/{shared-DJruxrrR.js → shared-DW3QUBTw.js} +25 -56
- package/dist/chunks/shared-DXoggfKr.js +31 -0
- package/dist/chunks/shared-DbgUhOLb.js +686 -0
- package/dist/chunks/shared-Dj_D4ypT.js +2165 -0
- package/dist/chunks/shared-DuB4veji.js +904 -0
- package/dist/chunks/shared-TrlnHjrJ.js +1 -0
- package/dist/chunks/shared-bW1cft1H.js +2530 -0
- package/dist/chunks/shared-jVZVFFNq.js +602 -0
- package/dist/chunks/shared-xpAS9Ri4.js +6208 -0
- package/dist/chunks/shared-ztEUikTm.js +1 -0
- package/dist/components.js +1 -1
- package/dist/index.js +1 -1
- package/dist/views/delegation-poker.js +1 -0
- package/dist/views/plain.js +1 -0
- package/dist/views/prototype.js +1 -0
- package/dist/views/slides.js +1 -0
- package/dist/views/task-board.js +1 -0
- package/dist/views/usm.js +1 -0
- package/package.json +8 -10
- package/dist/chunks/shared-Ae8HmujL.js +0 -49
- package/dist/chunks/shared-B5lBiq5s.js +0 -1
- package/dist/chunks/shared-BCmqTEeQ.js +0 -1051
- package/dist/chunks/shared-BkM7jfZs.js +0 -1104
- package/dist/chunks/shared-Bo8OdTee.js +0 -4206
- package/dist/chunks/shared-C-7mxPbV.js +0 -301
- package/dist/chunks/shared-C-Os1zsf.js +0 -572
- package/dist/chunks/shared-C02b6b2m.js +0 -1
- package/dist/chunks/shared-DLdJfSN-.js +0 -1
- package/dist/chunks/shared-DYKbMmHn.js +0 -610
- package/dist/chunks/shared-DbBoZvUP.js +0 -1609
- package/dist/chunks/shared-DbnPOaXf.js +0 -4210
- package/dist/chunks/shared-DnJBtKmH.js +0 -3769
- package/dist/chunks/shared-v63w_5VP.js +0 -2774
- package/dist/templates/delegation-poker.js +0 -1
- package/dist/templates/event-storming.js +0 -1
- package/dist/templates/example-mapping.js +0 -1
- package/dist/templates/plain.js +0 -1
- package/dist/templates/prototype.js +0 -1
- package/dist/templates/slides.js +0 -1
- package/dist/templates/task-board.js +0 -1
- package/dist/templates/usm.js +0 -1
- package/dist/templates/whiteboard.js +0 -1
|
@@ -1,3769 +0,0 @@
|
|
|
1
|
-
const Ct=globalThis,Sn=Ct.ShadowRoot&&(Ct.ShadyCSS===void 0||Ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,An=Symbol(),Xs=new WeakMap;let er=class{constructor(e,n,s){if(this._$cssResult$=!0,s!==An)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(Sn&&e===void 0){const s=n!==void 0&&n.length===1;s&&(e=Xs.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Xs.set(n,e))}return e}toString(){return this.cssText}};const tr=t=>new er(typeof t=="string"?t:t+"",void 0,An),fe=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((s,r,i)=>s+(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 er(n,t,An)},Va=(t,e)=>{if(Sn)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const s=document.createElement("style"),r=Ct.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=n.cssText,t.appendChild(s)}},nr=Sn?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const s of e.cssRules)n+=s.cssText;return tr(n)})(t):t,{is:Ka,defineProperty:Qa,getOwnPropertyDescriptor:Za,getOwnPropertyNames:Ya,getOwnPropertySymbols:Ja,getPrototypeOf:Xa}=Object,Et=globalThis,sr=Et.trustedTypes,el=sr?sr.emptyScript:"",tl=Et.reactiveElementPolyfillSupport,tt=(t,e)=>t,Tn={toAttribute(t,e){switch(e){case Boolean:t=t?el:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},rr=(t,e)=>!Ka(t,e),ir={attribute:!0,type:String,converter:Tn,reflect:!1,useDefault:!1,hasChanged:rr};Symbol.metadata??=Symbol("metadata"),Et.litPropertyMetadata??=new WeakMap;let Be=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,n=ir){if(n.state&&(n.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((n=Object.create(n)).wrapped=!0),this.elementProperties.set(e,n),!n.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(e,s,n);r!==void 0&&Qa(this.prototype,e,r)}}static getPropertyDescriptor(e,n,s){const{get:r,set:i}=Za(this.prototype,e)??{get(){return this[n]},set(o){this[n]=o}};return{get:r,set(o){const a=r?.call(this);i?.call(this,o),this.requestUpdate(e,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ir}static _$Ei(){if(this.hasOwnProperty(tt("elementProperties")))return;const e=Xa(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(tt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(tt("properties"))){const n=this.properties,s=[...Ya(n),...Ja(n)];for(const r of s)this.createProperty(r,n[r])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[s,r]of n)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[n,s]of this.elementProperties){const r=this._$Eu(n,s);r!==void 0&&this._$Eh.set(r,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const r of s)n.unshift(nr(r))}else e!==void 0&&n.push(nr(e));return n}static _$Eu(e,n){const s=n.attribute;return s===!1?void 0:typeof s=="string"?s: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,n=this.constructor.elementProperties;for(const s of n.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Va(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,n,s){this._$AK(e,s)}_$ET(e,n){const s=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,s);if(r!==void 0&&s.reflect===!0){const i=(s.converter?.toAttribute!==void 0?s.converter:Tn).toAttribute(n,s.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,n){const s=this.constructor,r=s._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const i=s.getPropertyOptions(r),o=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Tn;this._$Em=r;const a=o.fromAttribute(n,i.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,n,s,r=!1,i){if(e!==void 0){const o=this.constructor;if(r===!1&&(i=this[e]),s??=o.getPropertyOptions(e),!((s.hasChanged??rr)(i,n)||s.useDefault&&s.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,s))))return;this.C(e,n,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,n,{useDefault:s,reflect:r,wrapped:i},o){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??n??this[e]),i!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(n=void 0),this._$AL.set(e,n)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}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 s=this.constructor.elementProperties;if(s.size>0)for(const[r,i]of s){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 n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(n)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(n)}willUpdate(e){}_$AE(e){this._$EO?.forEach(n=>n.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(n=>this._$ET(n,this[n])),this._$EM()}updated(e){}firstUpdated(e){}};Be.elementStyles=[],Be.shadowRootOptions={mode:"open"},Be[tt("elementProperties")]=new Map,Be[tt("finalized")]=new Map,tl?.({ReactiveElement:Be}),(Et.reactiveElementVersions??=[]).push("2.1.2");const Cn=globalThis,or=t=>t,Rt=Cn.trustedTypes,ar=Rt?Rt.createPolicy("lit-html",{createHTML:t=>t}):void 0,lr="$lit$",ge=`lit$${Math.random().toFixed(9).slice(2)}$`,cr="?"+ge,nl=`<${cr}>`,Se=document,nt=()=>Se.createComment(""),st=t=>t===null||typeof t!="object"&&typeof t!="function",En=Array.isArray,sl=t=>En(t)||typeof t?.[Symbol.iterator]=="function",Rn=`[
|
|
2
|
-
\f\r]`,rt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,dr=/-->/g,pr=/>/g,Ae=RegExp(`>|${Rn}(?:([^\\s"'>=/]+)(${Rn}*=${Rn}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),hr=/'/g,ur=/"/g,fr=/^(?:script|style|textarea|title)$/i,gr=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),m=gr(1),rl=gr(2),K=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),mr=new WeakMap,Te=Se.createTreeWalker(Se,129);function kr(t,e){if(!En(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return ar!==void 0?ar.createHTML(e):e}const il=(t,e)=>{const n=t.length-1,s=[];let r,i=e===2?"<svg>":e===3?"<math>":"",o=rt;for(let a=0;a<n;a++){const l=t[a];let d,c,p=-1,u=0;for(;u<l.length&&(o.lastIndex=u,c=o.exec(l),c!==null);)u=o.lastIndex,o===rt?c[1]==="!--"?o=dr:c[1]!==void 0?o=pr:c[2]!==void 0?(fr.test(c[2])&&(r=RegExp("</"+c[2],"g")),o=Ae):c[3]!==void 0&&(o=Ae):o===Ae?c[0]===">"?(o=r??rt,p=-1):c[1]===void 0?p=-2:(p=o.lastIndex-c[2].length,d=c[1],o=c[3]===void 0?Ae:c[3]==='"'?ur:hr):o===ur||o===hr?o=Ae:o===dr||o===pr?o=rt:(o=Ae,r=void 0);const h=o===Ae&&t[a+1].startsWith("/>")?" ":"";i+=o===rt?l+nl:p>=0?(s.push(d),l.slice(0,p)+lr+l.slice(p)+ge+h):l+ge+(p===-2?a:h)}return[kr(t,i+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};let _n=class Fa{constructor({strings:e,_$litType$:n},s){let r;this.parts=[];let i=0,o=0;const a=e.length-1,l=this.parts,[d,c]=il(e,n);if(this.el=Fa.createElement(d,s),Te.currentNode=this.el.content,n===2||n===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=Te.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const p of r.getAttributeNames())if(p.endsWith(lr)){const u=c[o++],h=r.getAttribute(p).split(ge),f=/([.?@])?(.*)/.exec(u);l.push({type:1,index:i,name:f[2],strings:h,ctor:f[1]==="."?al:f[1]==="?"?ll:f[1]==="@"?cl:Ot}),r.removeAttribute(p)}else p.startsWith(ge)&&(l.push({type:6,index:i}),r.removeAttribute(p));if(fr.test(r.tagName)){const p=r.textContent.split(ge),u=p.length-1;if(u>0){r.textContent=Rt?Rt.emptyScript:"";for(let h=0;h<u;h++)r.append(p[h],nt()),Te.nextNode(),l.push({type:2,index:++i});r.append(p[u],nt())}}}else if(r.nodeType===8)if(r.data===cr)l.push({type:2,index:i});else{let p=-1;for(;(p=r.data.indexOf(ge,p+1))!==-1;)l.push({type:7,index:i}),p+=ge.length-1}i++}}static createElement(e,n){const s=Se.createElement("template");return s.innerHTML=e,s}};function He(t,e,n=t,s){if(e===K)return e;let r=s!==void 0?n._$Co?.[s]:n._$Cl;const i=st(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,n,s)),s!==void 0?(n._$Co??=[])[s]=r:n._$Cl=r),r!==void 0&&(e=He(t,r._$AS(t,e.values),r,s)),e}let ol=class{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:n},parts:s}=this._$AD,r=(e?.creationScope??Se).importNode(n,!0);Te.currentNode=r;let i=Te.nextNode(),o=0,a=0,l=s[0];for(;l!==void 0;){if(o===l.index){let d;l.type===2?d=new _t(i,i.nextSibling,this,e):l.type===1?d=new l.ctor(i,l.name,l.strings,this,e):l.type===6&&(d=new dl(i,this,e)),this._$AV.push(d),l=s[++a]}o!==l?.index&&(i=Te.nextNode(),o++)}return Te.currentNode=Se,r}p(e){let n=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,n),n+=s.strings.length-2):s._$AI(e[n])),n++}},_t=class Wa{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,n,s,r){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&e?.nodeType===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=He(this,e,n),st(e)?e===k||e==null||e===""?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==K&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):sl(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!==k&&st(this._$AH)?this._$AA.nextSibling.data=e:this.T(Se.createTextNode(e)),this._$AH=e}$(e){const{values:n,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=_n.createElement(kr(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(n);else{const i=new ol(r,this),o=i.u(this.options);i.p(n),this.T(o),this._$AH=i}}_$AC(e){let n=mr.get(e.strings);return n===void 0&&mr.set(e.strings,n=new _n(e)),n}k(e){En(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let s,r=0;for(const i of e)r===n.length?n.push(s=new Wa(this.O(nt()),this.O(nt()),this,this.options)):s=n[r],s._$AI(i),r++;r<n.length&&(this._$AR(s&&s._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){for(this._$AP?.(!1,!0,n);e!==this._$AB;){const s=or(e).nextSibling;or(e).remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}};class Ot{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,s,r,i){this.type=1,this._$AH=k,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=k}_$AI(e,n=this,s,r){const i=this.strings;let o=!1;if(i===void 0)e=He(this,e,n,0),o=!st(e)||e!==this._$AH&&e!==K,o&&(this._$AH=e);else{const a=e;let l,d;for(e=i[0],l=0;l<i.length-1;l++)d=He(this,a[s+l],n,l),d===K&&(d=this._$AH[l]),o||=!st(d)||d!==this._$AH[l],d===k?e=k:e!==k&&(e+=(d??"")+i[l+1]),this._$AH[l]=d}o&&!r&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}let al=class extends Ot{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},ll=class extends Ot{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},cl=class extends Ot{constructor(e,n,s,r,i){super(e,n,s,r,i),this.type=5}_$AI(e,n=this){if((e=He(this,e,n,0)??k)===K)return;const s=this._$AH,r=e===k&&s!==k||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,i=e!==k&&(s===k||r);r&&this.element.removeEventListener(this.name,this,s),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 dl{constructor(e,n,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){He(this,e)}}const pl={I:_t},hl=Cn.litHtmlPolyfillSupport;hl?.(_n,_t),(Cn.litHtmlVersions??=[]).push("3.3.3");const ul=(t,e,n)=>{const s=n?.renderBefore??e;let r=s._$litPart$;if(r===void 0){const i=n?.renderBefore??null;s._$litPart$=r=new _t(e.insertBefore(nt(),i),i,void 0,n??{})}return r._$AI(t),r},On=globalThis;let me=class extends Be{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 n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ul(n,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return K}};me._$litElement$=!0,me.finalized=!0,On.litElementHydrateSupport?.({LitElement:me});const fl=On.litElementPolyfillSupport;fl?.({LitElement:me}),(On.litElementVersions??=[]).push("4.2.2");const ke={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},it=t=>(...e)=>({_$litDirective$:t,values:e});let Lt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,s){this._$Ct=e,this._$AM=n,this._$Ci=s}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}};const{I:gl}=pl,br=t=>t,ml=t=>t.strings===void 0,vr=()=>document.createComment(""),ot=(t,e,n)=>{const s=t._$AA.parentNode,r=e===void 0?t._$AB:e._$AA;if(n===void 0){const i=s.insertBefore(vr(),r),o=s.insertBefore(vr(),r);n=new gl(i,o,t,t.options)}else{const i=n._$AB.nextSibling,o=n._$AM,a=o!==t;if(a){let l;n._$AQ?.(t),n._$AM=t,n._$AP!==void 0&&(l=t._$AU)!==o._$AU&&n._$AP(l)}if(i!==r||a){let l=n._$AA;for(;l!==i;){const d=br(l).nextSibling;br(s).insertBefore(l,r),l=d}}}return n},Ce=(t,e,n=t)=>(t._$AI(e,n),t),kl={},Ln=(t,e=kl)=>t._$AH=e,bl=t=>t._$AH,Pn=t=>{t._$AR(),t._$AA.remove()},zn=it(class extends Lt{constructor(t){if(super(t),t.type!==ke.PROPERTY&&t.type!==ke.ATTRIBUTE&&t.type!==ke.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ml(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===K||e===k)return e;const n=t.element,s=t.name;if(t.type===ke.PROPERTY){if(e===n[s])return K}else if(t.type===ke.BOOLEAN_ATTRIBUTE){if(!!e===n.hasAttribute(s))return K}else if(t.type===ke.ATTRIBUTE&&n.getAttribute(s)===e+"")return K;return Ln(t),e}});class Pt extends Lt{constructor(e){if(super(e),this.it=k,e.type!==ke.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===k||e==null)return this._t=void 0,this.it=e;if(e===K)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 n=[e];return n.raw=n,this._t={_$litType$:this.constructor.resultType,strings:n,values:[]}}}Pt.directiveName="unsafeHTML",Pt.resultType=1;const xr=it(Pt),zt=t=>{let e=t;for(;e!==null;){if(e instanceof Element){const n=e.getAttribute("lang");if(n!==null)return n}e=e instanceof ShadowRoot?e.host:e.parentNode}return null},Mn=["en","ja"],yr="en",wr=t=>Mn.some(e=>e===t),Mt=t=>{const e=(t??"").split("-")[0]?.toLowerCase()??"";return wr(e)?e:yr},$r=t=>Mt(zt(t)),In="dpk-locale-change",Sr=t=>typeof t=="string"&&wr(t)?t:null,vl=t=>t.preference??t.authored,xl=(t,e)=>t===e?null:t,It=t=>e=>e==="ja"?t.ja:t.en;class Nn{#e;#t;#n=yr;constructor(e,n=()=>{}){this.#e=e,this.#t=n,e.addController(this)}get locale(){return this.#n}hostConnected(){this.#n=$r(this.#e),document.addEventListener(In,this.#r)}hostDisconnected(){document.removeEventListener(In,this.#r)}#r=()=>{const e=$r(this.#e);e!==this.#n&&(this.#n=e,this.#t(),this.#e.requestUpdate())}}const yl={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)"]},Ar=t=>tr(Object.entries(yl).map(([e,[n,s]])=>`--dpk-${e}: ${t(n,s)};`).join(`
|
|
4
|
-
`)),Nt=fe`
|
|
5
|
-
:host {
|
|
6
|
-
/* Browsers without light-dark() stay light. */
|
|
7
|
-
${Ar(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
|
-
${Ar((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
|
-
`,Dn=fe`
|
|
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
|
-
`,wl=fe`
|
|
332
|
-
.comment-pop {
|
|
333
|
-
box-sizing: border-box;
|
|
334
|
-
overflow: auto;
|
|
335
|
-
position: fixed;
|
|
336
|
-
inset: auto;
|
|
337
|
-
margin: 0;
|
|
338
|
-
display: grid;
|
|
339
|
-
/* One column as wide as the surface: a long label wraps or ellipsizes instead of widening it. */
|
|
340
|
-
grid-template-columns: minmax(0, 1fr);
|
|
341
|
-
gap: 10px;
|
|
342
|
-
padding: 14px;
|
|
343
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
344
|
-
border-radius: var(--dpk-radius-lg);
|
|
345
|
-
background: var(--dpk-paper-raised);
|
|
346
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
347
|
-
color: var(--dpk-ink);
|
|
348
|
-
font-size: 12.5px;
|
|
349
|
-
animation: dpk-pop-in 180ms var(--dpk-ease);
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
@keyframes dpk-pop-in {
|
|
353
|
-
from {
|
|
354
|
-
opacity: 0;
|
|
355
|
-
transform: translateY(4px) scale(0.98);
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
.comment-pop .comment-target {
|
|
360
|
-
overflow-wrap: anywhere;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.comment-pop .comment-list {
|
|
364
|
-
list-style: none;
|
|
365
|
-
margin: 0;
|
|
366
|
-
padding: 0;
|
|
367
|
-
display: grid;
|
|
368
|
-
gap: 6px;
|
|
369
|
-
max-height: 140px;
|
|
370
|
-
overflow: auto;
|
|
371
|
-
font-size: 12px;
|
|
372
|
-
color: var(--dpk-ink-soft);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.comment-pop .comment-list li {
|
|
376
|
-
padding: 6px 10px;
|
|
377
|
-
border-radius: var(--dpk-radius-xs);
|
|
378
|
-
background: var(--dpk-accent-soft);
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.comment-pop .dpk-textarea {
|
|
382
|
-
min-height: 54px;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
/* What kind of comment: a segmented control over native radios. */
|
|
386
|
-
.comment-kinds {
|
|
387
|
-
display: flex;
|
|
388
|
-
gap: 2px;
|
|
389
|
-
min-width: 0;
|
|
390
|
-
margin: 0;
|
|
391
|
-
padding: 2px;
|
|
392
|
-
border: 1px solid var(--dpk-rule);
|
|
393
|
-
border-radius: var(--dpk-radius-sm);
|
|
394
|
-
background: var(--dpk-paper-sunken);
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.comment-kinds legend {
|
|
398
|
-
position: absolute;
|
|
399
|
-
width: 1px;
|
|
400
|
-
height: 1px;
|
|
401
|
-
overflow: hidden;
|
|
402
|
-
clip-path: inset(50%);
|
|
403
|
-
white-space: nowrap;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
.comment-kind {
|
|
407
|
-
position: relative;
|
|
408
|
-
flex: 1;
|
|
409
|
-
display: grid;
|
|
410
|
-
place-items: center;
|
|
411
|
-
padding: 4px 8px;
|
|
412
|
-
border-radius: var(--dpk-radius-xs);
|
|
413
|
-
color: var(--dpk-ink-soft);
|
|
414
|
-
font-weight: 550;
|
|
415
|
-
cursor: pointer;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
.comment-kind input {
|
|
419
|
-
position: absolute;
|
|
420
|
-
inset: 0;
|
|
421
|
-
margin: 0;
|
|
422
|
-
opacity: 0;
|
|
423
|
-
cursor: pointer;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
.comment-kind:has(input:checked) {
|
|
427
|
-
background: var(--dpk-paper-raised);
|
|
428
|
-
color: var(--dpk-ink);
|
|
429
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
.comment-kind:has(input:focus-visible) {
|
|
433
|
-
outline: 2px solid var(--dpk-accent);
|
|
434
|
-
outline-offset: 1px;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.comment-kind-hint {
|
|
438
|
-
margin: -4px 0 0;
|
|
439
|
-
color: var(--dpk-ink-faint);
|
|
440
|
-
font-size: 11.5px;
|
|
441
|
-
line-height: 1.45;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
.pop-actions {
|
|
445
|
-
display: flex;
|
|
446
|
-
gap: 4px;
|
|
447
|
-
align-items: center;
|
|
448
|
-
justify-content: flex-end;
|
|
449
|
-
}
|
|
450
|
-
`,Tr=fe`
|
|
451
|
-
.dpk-prose {
|
|
452
|
-
overflow-wrap: anywhere;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
.dpk-prose > :first-child {
|
|
456
|
-
margin-top: 0;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
.dpk-prose > :last-child {
|
|
460
|
-
margin-bottom: 0;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
.dpk-prose :is(p, ul, ol, pre, blockquote, table) {
|
|
464
|
-
margin: 0 0 0.6em;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.dpk-prose :is(h1, h2, h3, h4, h5, h6) {
|
|
468
|
-
margin: 0.8em 0 0.3em;
|
|
469
|
-
font-size: 1em;
|
|
470
|
-
font-weight: 650;
|
|
471
|
-
line-height: 1.4;
|
|
472
|
-
color: var(--dpk-ink);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.dpk-prose :is(ul, ol) {
|
|
476
|
-
padding-left: 1.3em;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
.dpk-prose li + li {
|
|
480
|
-
margin-top: 0.15em;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
/* A task list item: its checkbox is the marker, so it has no bullet of its own. */
|
|
484
|
-
.dpk-prose li:has(> input[type='checkbox']:first-child) {
|
|
485
|
-
margin-left: -1.3em;
|
|
486
|
-
list-style: none;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
.dpk-prose li > input[type='checkbox']:first-child {
|
|
490
|
-
margin: 0 0.4em 0 0;
|
|
491
|
-
vertical-align: -0.1em;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
.dpk-prose strong {
|
|
495
|
-
font-weight: 650;
|
|
496
|
-
color: var(--dpk-ink);
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
.dpk-prose a {
|
|
500
|
-
color: var(--dpk-blue);
|
|
501
|
-
text-decoration: underline;
|
|
502
|
-
text-underline-offset: 2px;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
.dpk-prose code {
|
|
506
|
-
padding: 0.05em 0.3em;
|
|
507
|
-
border-radius: var(--dpk-radius-xs);
|
|
508
|
-
background: var(--dpk-paper-sunken);
|
|
509
|
-
font-family: var(--dpk-mono);
|
|
510
|
-
font-size: 0.9em;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
.dpk-prose pre {
|
|
514
|
-
padding: 8px 10px;
|
|
515
|
-
border-radius: var(--dpk-radius-xs);
|
|
516
|
-
background: var(--dpk-paper-sunken);
|
|
517
|
-
overflow: auto;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
.dpk-prose pre code {
|
|
521
|
-
padding: 0;
|
|
522
|
-
background: none;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
.dpk-prose blockquote {
|
|
526
|
-
padding: 0.5em 0.8em;
|
|
527
|
-
border-radius: var(--dpk-radius-sm);
|
|
528
|
-
background: var(--dpk-paper-sunken);
|
|
529
|
-
color: var(--dpk-ink-soft);
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
/* A table wider than its box scrolls on its own instead of being clipped by it. */
|
|
533
|
-
.dpk-prose table {
|
|
534
|
-
display: block;
|
|
535
|
-
max-width: 100%;
|
|
536
|
-
overflow-x: auto;
|
|
537
|
-
border-collapse: collapse;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
/* A cell breaks a word only once it runs out of room: the box's 'anywhere' would
|
|
541
|
-
let the table shrink a column to one letter rather than scroll. */
|
|
542
|
-
.dpk-prose :is(th, td) {
|
|
543
|
-
overflow-wrap: break-word;
|
|
544
|
-
padding: 2px 8px;
|
|
545
|
-
border: 1px solid var(--dpk-rule);
|
|
546
|
-
text-align: left;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
.dpk-prose hr {
|
|
550
|
-
border: none;
|
|
551
|
-
border-top: 1px solid var(--dpk-rule);
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
.dpk-prose img {
|
|
555
|
-
max-width: 100%;
|
|
556
|
-
}
|
|
557
|
-
`,Ee=(t,e)=>t instanceof e?t:null;function jn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Re=jn();function Cr(t){Re=t}var _e={exec:()=>null};function Ue(t){let e=[];return n=>{let s=Math.max(0,Math.min(3,n-1)),r=e[s];return r||(r=t(s),e[s]=r),r}}function w(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(N.caret,"$1"),n=n.replace(r,o),s},getRegex:()=>new RegExp(n,e)};return s}var $l=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),N={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:Ue(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ue(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ue(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ue(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Ue(t=>new RegExp(`^ {0,${t}}(?:</?(?:${lt})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Ue(t=>new RegExp(`^ {0,${t}}>`))},Sl=/^(?:[ \t]*(?:\n|$))+/,Al=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Tl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,at=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Cl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,qn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Er=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Rr=w(Er).replace(/bull/g,qn).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(),El=w(Er).replace(/bull/g,qn).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(),Bn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Rl=/^[^\n]+/,Hn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,_l=w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Hn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ol=w(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,qn).getRegex(),lt="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",Un=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ll=w("^ {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",Un).replace("tag",lt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_r=t=>w(Bn).replace("hr",at).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",lt).getRegex(),Pl=_r(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),zl=_r(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ml=w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",zl).getRegex(),Fn={blockquote:Ml,code:Al,def:_l,fences:Tl,heading:Cl,hr:at,html:Ll,lheading:Rr,list:Ol,newline:Sl,paragraph:Pl,table:_e,text:Rl},Or=w("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",at).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",lt).getRegex(),Il={...Fn,lheading:El,table:Or,paragraph:w(Bn).replace("hr",at).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Or).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",lt).getRegex()},Nl={...Fn,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Un).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:_e,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:w(Bn).replace("hr",at).replace("heading",` *#{1,6} *[^
|
|
558
|
-
]`).replace("lheading",Rr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Dl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Lr=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,ql=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ie=/[\p{P}\p{S}]/u,Fe=/[\s\p{P}\p{S}]/u,ct=/[^\s\p{P}\p{S}]/u,Bl=w(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fe).getRegex(),Hl=/[\p{Pi}\p{Ps}"']/u,Pr=/(?!~)[\p{P}\p{S}]/u,Ul=/(?!~)[\s\p{P}\p{S}]/u,Fl=/(?:[^\s\p{P}\p{S}]|~)/u,Wl=w(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",$l?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),zr=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Gl=w(zr,"u").replace(/punct/g,ie).getRegex(),Vl=w(zr,"u").replace(/punct/g,Pr).getRegex(),Kl=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Ql=w(Kl,"u").replace(/openQuote/g,Hl).replace(/punct/g,ie).getRegex(),Mr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Zl=w(Mr,"gu").replace(/notPunctSpace/g,ct).replace(/punctSpace/g,Fe).replace(/punct/g,ie).getRegex(),Yl=w(Mr,"gu").replace(/notPunctSpace/g,Fl).replace(/punctSpace/g,Ul).replace(/punct/g,Pr).getRegex(),Jl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Xl=w(Jl,"gu").replace(/notPunctSpace/g,ct).replace(/punctSpace/g,Fe).replace(/punct/g,ie).getRegex(),ec=w("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ct).replace(/punctSpace/g,Fe).replace(/punct/g,ie).getRegex(),tc="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",nc=w(tc,"gu").replace(/notPunctSpace/g,ct).replace(/punctSpace/g,Fe).replace(/punct/g,ie).getRegex(),sc=w(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ie).getRegex(),rc="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ic=w(rc,"gu").replace(/notPunctSpace/g,ct).replace(/punctSpace/g,Fe).replace(/punct/g,ie).getRegex(),oc=w(/\\(punct)/,"gu").replace(/punct/g,ie).getRegex(),ac=w(/^<(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(),lc=w(Un).replace("(?:-->|$)","-->").getRegex(),cc=w("^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",lc).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ir=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Dt=w(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Ir).getRegex(),dc=w(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Dt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pc=w(/^!?\[(label)\]\[(ref)\]/).replace("label",Dt).replace("ref",Hn).getRegex(),hc=w(/^!?\[(ref)\](?:\[\])?/).replace("ref",Hn).getRegex(),Nr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,uc=w(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Ir).getRegex(),fc=w("reflink|nolink(?!\\()","g").replace("reflink",w(/^!?\[(label)\]\[(ref)\]/).replace("label",uc).replace("ref",Nr).getRegex()).replace("nolink",w(/^!?\[(ref)\](?:\[\])?/).replace("ref",Nr).getRegex()).getRegex(),Dr=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,gc=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,mc=w(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,gc).getRegex(),Wn={_backpedal:_e,anyPunctuation:oc,autolink:ac,blockSkip:Wl,br:Lr,code:jl,del:_e,delLDelim:_e,delRDelim:_e,emStrongLDelim:Gl,emStrongRDelimAst:Zl,emStrongRDelimUnd:ec,escape:Dl,link:dc,nolink:hc,punctuation:Bl,reflink:pc,reflinkSearch:fc,tag:cc,text:ql,url:_e},kc={...Wn,emStrongLDelim:Ql,emStrongRDelimAst:Xl,emStrongRDelimUnd:nc,link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",Dt).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Dt).getRegex()},Gn={...Wn,emStrongRDelimAst:Yl,emStrongLDelim:Vl,delLDelim:sc,delRDelim:ic,url:w(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",mc).replace("protocol",Dr).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:w(/^(?:[^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",Dr).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},bc={...Gn,br:w(Lr).replace("{2,}","*").getRegex(),text:w(Gn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},jt={normal:Fn,gfm:Il,pedantic:Nl},dt={normal:Wn,gfm:Gn,breaks:bc,pedantic:kc},vc={"&":"&","<":"<",">":">",'"':""","'":"'"},jr=t=>vc[t];function W(t,e){if(e){if(N.escapeTest.test(t))return t.replace(N.escapeReplace,jr)}else if(N.escapeTestNoEncode.test(t))return t.replace(N.escapeReplaceNoEncode,jr);return t}function xc(t){return t.replace(N.numericCharacterReference,(e,n,s)=>{let r=n===void 0?Number.parseInt(s,16):Number.parseInt(n,10);return r===0||r>1114111||r>=55296&&r<=57343?"\uFFFD":String.fromCodePoint(r)})}function qr(t){try{t=encodeURI(t).replace(N.percentDecode,"%")}catch{return null}return t}function Br(t,e){let n=t.replace(N.findPipe,(i,o,a)=>{let l=!1,d=o;for(;--d>=0&&a[d]==="\\";)l=!l;return l?"|":" |"}),s=n.split(N.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(N.slashPipe,"|");return s}function be(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function Hr(t){let e=t.split(`
|
|
559
|
-
`),n=e.length-1;for(;n>=0&&N.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(`
|
|
560
|
-
`)}function qt(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function Ur(t,e){if(t.indexOf(e[0])===-1&&t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function Fr(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=r,n++;return s}function Wr(t,e,n,s,r){let i=e.href,o=e.title||null,a=t[1].replace(r.other.outputLinkReplace,"$1"),l=t[0].charAt(0)==="!";s.state.inLink=!0;let d=s.state.linkEmitted,c=s.state.inRawBlock;s.state.linkEmitted=!1;let p=s.inlineTokens(a),u=s.state.linkEmitted;if(s.state.linkEmitted=d,s.state.inLink=!1,!l){if(u){s.state.inRawBlock=c;return}s.state.linkEmitted=!0}return{type:l?"image":"link",raw:n,href:i,title:o,text:a,tokens:p}}function yc(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
|
|
561
|
-
`).map(i=>{let o=i.match(n.other.beginningSpace);if(o===null)return i;let[a]=o;return i.slice(Math.min(a.length,r.length))}).join(`
|
|
562
|
-
`)}function Gr(t,e,n,s){if(!e.includes("<"))return!1;for(let r=0;r<e.length;r++){if(e[r]==="\\"){r++;continue}if(e[r]==="`"){let a=s.inline.code.exec(e.slice(r));if(a){r+=a[0].length-1;continue}}if(e[r]!=="<")continue;let i=t.slice(n+r),o=s.inline.tag.exec(i)||s.inline.autolink.exec(i);if(o){if(o[0].length>e.length-r)return!0;r+=o[0].length-1}}return!1}var Bt=class{options;rules;lexer;constructor(t){this.options=t||Re}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 n=this.options.pedantic?e[0]:Hr(e[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],s=yc(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let s=be(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceTabChar.test(s))&&(n=s.trim())}return{type:"heading",raw:be(e[0],`
|
|
563
|
-
`),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:be(e[0],`
|
|
564
|
-
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=be(e[0],`
|
|
565
|
-
`).split(`
|
|
566
|
-
`),s="",r="",i=[];for(;n.length>0;){let o=!1,a=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))a.push(n[l]),o=!0;else if(!o)a.push(n[l]);else break;n=n.slice(l);let d=a.join(`
|
|
567
|
-
`),c=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
568
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
569
|
-
${d}`:d,r=r?`${r}
|
|
570
|
-
${c}`:c;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=p,n.length===0)break;let u=i.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let h=u,f=n.join(`
|
|
571
|
-
`),g=h.raw+`
|
|
572
|
-
`+f.replace(this.rules.other.blockquoteSetextReplace2,""),b=this.blockquote(g);i[i.length-1]=b;let x=g.substring(b.raw.length).replace(/^\n/,""),S=x?x.split(`
|
|
573
|
-
`).length:0,T=S?n.slice(0,-S):n;T.length>0&&(s=`${s}
|
|
574
|
-
${T.join(`
|
|
575
|
-
`)}`),r=r.substring(0,r.length-h.text.length)+b.text;break}else if(u?.type==="list"){let h=u,f=h.raw+`
|
|
576
|
-
`+n.join(`
|
|
577
|
-
`),g=this.list(f);i[i.length-1]=g,s=s.substring(0,s.length-u.raw.length)+g.raw,r=r.substring(0,r.length-h.raw.length)+g.raw,n=f.substring(i.at(-1).raw.length).split(`
|
|
578
|
-
`);continue}}return{type:"blockquote",raw:s,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let i=this.rules.other.listItemRegex(n),o=!1;for(;t;){let l=!1,d="",c="";if(!(e=i.exec(t))||this.rules.block.hr.test(t))break;d=e[0],t=t.substring(d.length);let p=e[2].split(`
|
|
579
|
-
`,1)[0],u=e[1].length,h=this.options.pedantic?Fr(p,u):p.replace(this.rules.other.leadingSpaceTab,x=>Fr(x,u)),f=t.split(`
|
|
580
|
-
`,1)[0],g=!h.trim(),b=0;if(this.options.pedantic?(b=2,c=h.trimStart()):g?b=u+1:(b=h.search(this.rules.other.nonSpaceChar),b=b>4?1:b,c=h.slice(b),b+=u),g&&this.rules.other.blankLine.test(f)&&(d+=f+`
|
|
581
|
-
`,t=t.substring(f.length+1),l=!0),!l){let x=this.rules.other.nextBulletRegex(b),S=this.rules.other.hrRegex(b),T=this.rules.other.fencesBeginRegex(b),_=this.rules.other.headingBeginRegex(b),H=this.rules.other.htmlBeginRegex(b),P=this.rules.other.blockquoteBeginRegex(b);for(;t;){let V=t.split(`
|
|
582
|
-
`,1)[0],q;if(f=V,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),q=f):q=f.replace(this.rules.other.leadingSpaceTab,re=>re.replace(this.rules.other.tabCharGlobal," ")),T.test(f)||_.test(f)||H.test(f)||P.test(f)||x.test(f)||S.test(f))break;if(q.search(this.rules.other.nonSpaceChar)>=b||!f.trim())c+=`
|
|
583
|
-
`+q.slice(b);else{if(g||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(h)||_.test(h)||S.test(h))break;c+=`
|
|
584
|
-
`+f}g=!f.trim(),d+=V+`
|
|
585
|
-
`,t=t.substring(V.length+1),h=q.slice(b)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(o=!0)),r.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),r.raw+=d}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 d=l.tokens.filter(p=>p.type==="space"),c=d.length>0&&d.some(p=>this.rules.other.anyLine.test(p.raw));r.loose=c}for(let l of r.items){let d=l.tokens[0];if(l.task&&(d?.type==="text"||d?.type==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),d.raw=d.raw.replace(this.rules.other.listReplaceTask,""),d.text=d.text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}let c=this.rules.other.listTaskCheckbox.exec(l.raw);if(c){let p={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};l.checked=p.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=p.raw+l.tokens[0].raw,l.tokens[0].text=p.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(p)):l.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):l.tokens.unshift(p)}}else l.task&&(l.task=!1)}if(r.loose)for(let l of r.items){l.loose=!0;for(let d of l.tokens)d.type==="text"&&(d.type="paragraph")}return r}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=Hr(e[0]);return{type:"html",block:!0,raw:n,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:n}}}def(t){let e=this.rules.block.def.exec(t);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&Ur(e[2],"()")!==-1)return;let n=qt(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=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:n,raw:be(e[0],`
|
|
586
|
-
`),href:s,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Br(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
587
|
-
`):[],i={type:"table",raw:be(e[0],`
|
|
588
|
-
`),header:[],align:[],rows:[]};if(n.length===s.length){for(let o of s)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<n.length;o++)i.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:i.align[o]});for(let o of r)i.rows.push(Br(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 n=e[1].trim();return{type:"heading",raw:be(e[0],`
|
|
589
|
-
`),depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
|
|
590
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}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 n=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Gr(t,e[1],n,this.rules))return;let s=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let o=be(s.slice(0,-1),"\\");if((s.length-o.length)%2===0)return}else{let o=Ur(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(s)?r=r.slice(1):r=r.slice(1,-1)),Wr(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 n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let s=n[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Gr(t,n[1],s,this.rules))return;let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[qt(r)];if(!i){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return Wr(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,o,a=r,l=0,d=s[0][0],c=n===d,p=d==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*t.length+r);(s=p.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(o=[...i].length,s[3]||s[4]){a+=o;continue}else if(s[5]||s[6]){if(r%3&&!((r+o)%3)){l+=o;continue}if(c)break}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let u=[...s[0]][0].length,h=t.slice(0,r+s.index+u+o);if(Math.min(r,o)%2){let g=h.slice(1,-1);return{type:"em",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}let f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,o,a=r,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*t.length+r);(s=l.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(o=[...i].length,o!==r))continue;if(s[3]||s[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let d=[...s[0]][0].length,c=t.slice(0,r+s.index+d+o),p=c.slice(r,-r);return{type:"del",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,s;return e[2]==="@"?(n=e[1],s="mailto:"+n):(n=e[1],s=n),{type:"link",raw:e[0],text:n,href:s,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:n?e[0]:xc(e[0]),escaped:n}}}},Y=class Ks{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Re,this.options.tokenizer=this.options.tokenizer||new Bt,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 n={other:N,block:jt.normal,inline:dt.normal};this.options.pedantic?(n.block=jt.pedantic,n.inline=dt.pedantic):this.options.gfm&&(n.block=jt.gfm,this.options.breaks?n.inline=dt.breaks:n.inline=dt.gfm),this.tokenizer.rules=n}static get rules(){return{block:jt,inline:dt}}static lex(e,n){return new Ks(n).lex(e)}static lexInline(e,n){return new Ks(n).inlineTokens(e)}lex(e){e=e.replace(N.carriageReturn,`
|
|
591
|
-
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(N.tabCharGlobal," ").replace(N.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,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let a=n.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
|
|
592
|
-
`:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
593
|
-
`)?"":`
|
|
594
|
-
`)+i.raw,a.text+=`
|
|
595
|
-
`+i.text,this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
596
|
-
`)?"":`
|
|
597
|
-
`)+i.raw,a.text+=`
|
|
598
|
-
`+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},n.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}let o=e;if(this.options.extensions?.startBlock){let a=1/0,l=e.slice(1),d;this.options.extensions.startBlock.forEach(c=>{d=c.call({lexer:this},l),typeof d=="number"&&d>=0&&(a=Math.min(a,d))}),a<1/0&&a>=0&&(o=e.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let a=n.at(-1);s&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
599
|
-
`)?"":`
|
|
600
|
-
`)+i.raw,a.text+=`
|
|
601
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i),s=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=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
602
|
-
`)?"":`
|
|
603
|
-
`)+i.raw,a.text+=`
|
|
604
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}linkInText(e){if(!e.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let s of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(s[0])&&e.charAt(s.index-1)!=="!")return!0;for(let s of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let r=s[0],i=r.lastIndexOf("[");if(!(r.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,qt(r.slice(i+1,-1))))&&!(i>1&&this.linkInText(r.slice(1,i-1))))return!0}return!1}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let s=this.state.linkParenPossible;this.state.linkParenPossible=s&&e.includes(")");try{return this.#e(e,n)}finally{this.state.linkParenPossible=s}}#e(e,n){let s=e;if(this.tokens.links&&e.includes("[")){let a=this.tokenizer.rules.inline.reflinkSearch,l=d=>{let c=d.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,qt(d.slice(c+1,-1))))return d;if(c>1&&d.charAt(0)!=="!"){let p=d.slice(1,c-1);if(this.linkInText(p))return"["+p.replace(a,l)+"]["+"a".repeat(d.length-c-2)+"]"}return"["+"a".repeat(d.length-2)+"]"};s=s.replace(a,l)}s=s.replace(this.tokenizer.rules.inline.anyPunctuation,a=>"+".repeat(a.length)),s=s.replace(this.tokenizer.rules.inline.blockSkip,(a,l,d)=>{let c=d?d.length:0;return a.slice(0,c)+"["+"a".repeat(a.length-c-2)+"]"}),s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;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(d=>(a=d.call({lexer:this},e,n))?(e=e.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let d=n.at(-1);a.type==="text"&&d?.type==="text"?(d.raw+=a.raw,d.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(e,s,i)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(e,s,i)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),n.push(a);continue}let l=e;if(this.options.extensions?.startInline){let d=1/0,c=e.slice(1),p;this.options.extensions.startInline.forEach(u=>{p=u.call({lexer:this},c),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(l=e.substring(0,d+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 d=n.at(-1);d?.type==="text"?(d.raw+=a.raw,d.text+=a.text):n.push(a);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}infiniteLoopError(e){let n="Infinite loop on byte: "+e;if(this.options.silent)console.error(n);else throw new Error(n)}},Ht=class{options;parser;constructor(t){this.options=t||Re}space(t){return""}code({text:t,lang:e,escaped:n}){let s=(e||"").match(N.notSpaceStart)?.[0],r=t?t.replace(N.endingNewline,"")+`
|
|
605
|
-
`:"";return s?'<pre><code class="language-'+W(s)+'">'+(n?r:W(r,!0))+`</code></pre>
|
|
606
|
-
`:"<pre><code>"+(n?r:W(r,!0))+`</code></pre>
|
|
607
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
608
|
-
${this.parser.parse(t)}</blockquote>
|
|
609
|
-
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
610
|
-
`}hr(t){return`<hr>
|
|
611
|
-
`}list(t){let e=t.ordered,n=t.start,s="";for(let o=0;o<t.items.length;o++){let a=t.items[o];s+=this.listitem(a)}let r=e?"ol":"ul",i=e&&n!==1?' start="'+n+'"':"";return"<"+r+i+`>
|
|
612
|
-
`+s+"</"+r+`>
|
|
613
|
-
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
614
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
615
|
-
`}table(t){let e="",n="";for(let r=0;r<t.header.length;r++)n+=this.tablecell(t.header[r]);e+=this.tablerow({text:n});let s="";for(let r=0;r<t.rows.length;r++){let i=t.rows[r];n="";for(let o=0;o<i.length;o++)n+=this.tablecell(i[o]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
616
|
-
<thead>
|
|
617
|
-
`+e+`</thead>
|
|
618
|
-
`+s+`</table>
|
|
619
|
-
`}tablerow({text:t}){return`<tr>
|
|
620
|
-
${t}</tr>
|
|
621
|
-
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
|
|
622
|
-
`}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>${W(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:n,tokens:s,autolink:r}){let i=r?W(n,!0):this.parser.parseInline(s),o=qr(t);if(o===null)return i;t=W(o,r);let a='<a href="'+t+'"';return e&&(a+=' title="'+W(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=qr(t);if(r===null)return W(n);t=r;let i=`<img src="${W(t)}" alt="${W(n)}"`;return e&&(i+=` title="${W(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:W(t.text)}},Vn=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 Qs{options;renderer;textRenderer;constructor(e){this.options=e||Re,this.options.renderer=this.options.renderer||new Ht,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Vn}static parse(e,n){return new Qs(n).parse(e)}static parseInline(e,n){return new Qs(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let r=e[s];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)){n+=a||"";continue}}let i=r;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=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 n}parseInline(e,n=this.renderer){this.renderer.parser=this;let s="";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)){s+=a||"";continue}}let o=i;switch(o.type){case"escape":{s+=n.text(o);break}case"html":{s+=n.html(o);break}case"link":{s+=n.link(o);break}case"image":{s+=n.image(o);break}case"checkbox":{s+=n.checkbox(o);break}case"strong":{s+=n.strong(o);break}case"em":{s+=n.em(o);break}case"codespan":{s+=n.codespan(o);break}case"br":{s+=n.br(o);break}case"del":{s+=n.del(o);break}case"text":{s+=n.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 s}},pt=class{options;block;constructor(t){this.options=t||Re}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?Y.lex:Y.lexInline}provideParser(t=this.block){return t?J.parse:J.parseInline}},Vr=class{defaults=jn();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=J;Renderer=Ht;TextRenderer=Vn;Lexer=Y;Tokenizer=Bt;Hooks=pt;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let s of t)switch(n=n.concat(e.call(this,s)),s.type){case"table":{let r=s;for(let i of r.header)n=n.concat(this.walkTokens(i.tokens,e));for(let i of r.rows)for(let o of i)n=n.concat(this.walkTokens(o.tokens,e));break}case"list":{let r=s;n=n.concat(this.walkTokens(r.items,e));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let o=r[i].flat(1/0);n=n.concat(this.walkTokens(o,e))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.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)}),s.extensions=e),n.renderer){let r=this.defaults.renderer||new Ht(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,a=n.renderer[o],l=r[o];r[o]=(...d)=>{let c=a.apply(r,d);return c===!1&&(c=l.apply(r,d)),c||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Bt(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,a=n.tokenizer[o],l=r[o];r[o]=(...d)=>{let c=a.apply(r,d);return c===!1&&(c=l.apply(r,d)),c}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new pt;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,a=n.hooks[o],l=r[o];pt.passThroughHooks.has(i)?r[o]=d=>{if(this.defaults.async&&pt.passThroughHooksRespectAsync.has(i))return(async()=>{let p=await a.call(r,d);return l.call(r,p)})();let c=a.call(r,d);return l.call(r,c)}:r[o]=(...d)=>{if(this.defaults.async)return(async()=>{let p=await a.apply(r,d);return p===!1&&(p=await l.apply(r,d)),p})();let c=a.apply(r,d);return c===!1&&(c=l.apply(r,d)),c}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.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,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Y.lex(t,e??this.defaults)}parser(t,e){return J.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.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?Y.lex:Y.lexInline)(o,r),l=r.hooks?await r.hooks.processAllTokens(a):a;r.walkTokens&&await Promise.all(this.walkTokens(l,r.walkTokens));let d=await(r.hooks?await r.hooks.provideParser(t):t?J.parse:J.parseInline)(l,r);return r.hooks?await r.hooks.postprocess(d):d})().catch(i);try{r.hooks&&(e=r.hooks.preprocess(e));let o=(r.hooks?r.hooks.provideLexer(t):t?Y.lex:Y.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 n=>{if(n.message+=`
|
|
623
|
-
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+W(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},Oe=new Vr;function E(t,e){return Oe.parse(t,e)}E.options=E.setOptions=function(t){return Oe.setOptions(t),E.defaults=Oe.defaults,Cr(E.defaults),E},E.getDefaults=jn,E.defaults=Re;function wc(...t){return Oe.use(...t),E.defaults=Oe.defaults,Cr(E.defaults),E}E.use=wc,E.walkTokens=function(t,e){return Oe.walkTokens(t,e)},E.parseInline=Oe.parseInline,E.Parser=J,E.parser=J.parse,E.Renderer=Ht,E.TextRenderer=Vn,E.Lexer=Y,E.lexer=Y.lex,E.Tokenizer=Bt,E.Hooks=pt,E.parse=E,E.options,E.setOptions,E.walkTokens,E.parseInline,J.parse,Y.lex;const $c={"&":"&","<":"<",">":">",'"':""","'":"'"},Le=t=>t.replace(/[&<>"']/g,e=>$c[e]??e),Sc=new Set(["http","https","mailto"]),Kr=t=>{const e=t.replace(/[\u0000- \u007f]/g,""),n=/^([a-z][a-z0-9+.-]*):/i.exec(e)?.[1];return n===void 0||Sc.has(n.toLowerCase())},Ac=t=>/^https?:/i.test(t.trim()),Tc=new Vr({gfm:!0,breaks:!0,renderer:{html({text:t}){return Le(t)},link({href:t,title:e,tokens:n}){const s=this.parser.parseInline(n);if(!Kr(t))return s;const r=e?` title="${Le(e)}"`:"",i=Ac(t)?' target="_blank" rel="noopener noreferrer"':"";return`<a href="${Le(t)}"${r}${i}>${s}</a>`},image({href:t,title:e,text:n}){if(!Kr(t))return Le(n);const s=e?` title="${Le(e)}"`:"";return`<img src="${Le(t)}" alt="${Le(n)}"${s}>`}}}),Qr=t=>Tc.parse(t,{async:!1}),Cc=It({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 Zr extends me{static{this.styles=[Nt,Tr,fe`
|
|
624
|
-
/* One atomic box in both states, so the text can be edited where it sits:
|
|
625
|
-
while editing, the text stays (hidden) underneath and keeps sizing the
|
|
626
|
-
box, and the field lies over it. Starting an edit moves nothing; the
|
|
627
|
-
box grows only as the draft does. */
|
|
628
|
-
:host {
|
|
629
|
-
display: inline-block;
|
|
630
|
-
max-width: 100%;
|
|
631
|
-
vertical-align: baseline;
|
|
632
|
-
/* Inherit the surrounding type scale instead of forcing the chrome size:
|
|
633
|
-
an inline edit inside a 17px heading must look like a 17px heading.
|
|
634
|
-
Color comes along too, so an edit on a colored card stays legible. */
|
|
635
|
-
font-family: inherit;
|
|
636
|
-
font-size: inherit;
|
|
637
|
-
font-weight: inherit;
|
|
638
|
-
line-height: inherit;
|
|
639
|
-
color: inherit;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
.box {
|
|
643
|
-
position: relative;
|
|
644
|
-
display: block;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
/* No vertical padding or border: the box is exactly the lines of text.
|
|
648
|
-
The underline and ring are shadows, which never move the layout. */
|
|
649
|
-
.view {
|
|
650
|
-
display: block;
|
|
651
|
-
padding: 0 4px;
|
|
652
|
-
border-radius: var(--dpk-radius-xs);
|
|
653
|
-
white-space: pre-wrap;
|
|
654
|
-
overflow-wrap: anywhere;
|
|
655
|
-
cursor: text;
|
|
656
|
-
transition:
|
|
657
|
-
background 140ms var(--dpk-ease),
|
|
658
|
-
box-shadow 140ms var(--dpk-ease);
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
.view:hover {
|
|
662
|
-
background: var(--dpk-blue-soft);
|
|
663
|
-
box-shadow:
|
|
664
|
-
inset 0 -1px 0 var(--dpk-blue),
|
|
665
|
-
inset 0 0 0 1px color-mix(in srgb, var(--dpk-blue) 22%, transparent);
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
/* Formatted text keeps its own line breaks: a break in the source is a <br>. */
|
|
669
|
-
.view.dpk-prose {
|
|
670
|
-
white-space: normal;
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
.view[data-empty='true'] {
|
|
674
|
-
box-shadow: inset 0 -1px 0 var(--dpk-rule-strong);
|
|
675
|
-
color: var(--dpk-ink-faint);
|
|
676
|
-
font-style: italic;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
.view[data-empty='true']:hover {
|
|
680
|
-
box-shadow: inset 0 -1px 0 var(--dpk-blue);
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
.view[aria-hidden='true'] {
|
|
684
|
-
visibility: hidden;
|
|
685
|
-
transition: none;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
.field {
|
|
689
|
-
position: absolute;
|
|
690
|
-
inset: 0;
|
|
691
|
-
box-sizing: border-box;
|
|
692
|
-
width: 100%;
|
|
693
|
-
height: 100%;
|
|
694
|
-
min-width: 0;
|
|
695
|
-
margin: 0;
|
|
696
|
-
padding: 0 4px;
|
|
697
|
-
border: none;
|
|
698
|
-
border-radius: var(--dpk-radius-xs);
|
|
699
|
-
outline: none;
|
|
700
|
-
background: var(--dpk-paper-raised);
|
|
701
|
-
box-shadow:
|
|
702
|
-
inset 0 0 0 1px var(--dpk-blue),
|
|
703
|
-
var(--dpk-focus);
|
|
704
|
-
font: inherit;
|
|
705
|
-
line-height: inherit;
|
|
706
|
-
letter-spacing: inherit;
|
|
707
|
-
color: inherit;
|
|
708
|
-
white-space: pre-wrap;
|
|
709
|
-
overflow-wrap: anywhere;
|
|
710
|
-
overflow: hidden;
|
|
711
|
-
resize: none;
|
|
712
|
-
animation: dpk-inline-edit-in 140ms var(--dpk-ease) backwards;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
.field::placeholder {
|
|
716
|
-
color: var(--dpk-ink-faint);
|
|
717
|
-
font-style: italic;
|
|
718
|
-
opacity: 1;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
@keyframes dpk-inline-edit-in {
|
|
722
|
-
from {
|
|
723
|
-
opacity: 0;
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
:host([truncate]) .view {
|
|
728
|
-
overflow: hidden;
|
|
729
|
-
text-overflow: ellipsis;
|
|
730
|
-
white-space: pre;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
/* Wrapped, it keeps --dpk-inline-edit-lines lines; the hidden text under a
|
|
734
|
-
field still sizes the box to the whole draft. */
|
|
735
|
-
:host([truncate][wrap]) .view:not([aria-hidden='true']) {
|
|
736
|
-
display: -webkit-box;
|
|
737
|
-
-webkit-box-orient: vertical;
|
|
738
|
-
-webkit-line-clamp: var(--dpk-inline-edit-lines, 3);
|
|
739
|
-
white-space: pre-wrap;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
/* seamless: no field chrome at all — the text is edited where it sits. */
|
|
743
|
-
:host([seamless]) .view,
|
|
744
|
-
:host([seamless]) .field {
|
|
745
|
-
padding: 0;
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
:host([seamless]) .field {
|
|
749
|
-
border-radius: 0;
|
|
750
|
-
background: transparent;
|
|
751
|
-
box-shadow: none;
|
|
752
|
-
}
|
|
753
|
-
`]}static{this.properties={value:{type:String},placeholder:{type:String},multiline:{type:Boolean},wrap:{type:Boolean,reflect:!0},truncate:{type:Boolean,reflect:!0},seamless:{type:Boolean,reflect:!0},markdown:{type:Boolean},label:{type:String},editing:{state:!0}}}#e="";#t=0;#n=new Nn(this);connectedCallback(){super.connectedCallback(),this.#t+=1}constructor(){super(),this.value="",this.placeholder="",this.multiline=!1,this.wrap=!1,this.truncate=!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"),n=this.renderRoot,s=n instanceof ShadowRoot?n.activeElement:document.activeElement;e&&s!==e&&(e.focus(),e.setSelectionRange(0,e.value.length,"backward"),e.scrollLeft=0,e.scrollTop=0)}render(){const e=Cc(this.#n.locale),n=this.placeholder||e.unset,{editing:s}=this,r=s?this.#e:this.value,i=r===""?n:s&&r.endsWith(`
|
|
754
|
-
`)?`${r}\u200B`:r;return this.markdown&&!s&&r!==""?m`<span class="box"
|
|
755
|
-
><div
|
|
756
|
-
class="view dpk-prose"
|
|
757
|
-
data-empty="false"
|
|
758
|
-
role="button"
|
|
759
|
-
tabindex="0"
|
|
760
|
-
title=${e.clickToEdit}
|
|
761
|
-
@click=${this.#s}
|
|
762
|
-
@keydown=${this.#i}
|
|
763
|
-
>
|
|
764
|
-
${xr(Qr(r))}
|
|
765
|
-
</div></span
|
|
766
|
-
>`:m`<span class="box"
|
|
767
|
-
><span
|
|
768
|
-
class="view"
|
|
769
|
-
data-empty=${String(r==="")}
|
|
770
|
-
aria-hidden=${s?"true":k}
|
|
771
|
-
role=${s?k:"button"}
|
|
772
|
-
tabindex=${s?k:"0"}
|
|
773
|
-
title=${s?k:this.truncate&&r!==""?r:e.clickToEdit}
|
|
774
|
-
@click=${this.#s}
|
|
775
|
-
@keydown=${this.#i}
|
|
776
|
-
>${i}</span
|
|
777
|
-
>${s?this.#r(this.label||this.placeholder||e.edit,n):k}</span
|
|
778
|
-
>`}#r(e,n){return this.multiline||this.wrap?m`<textarea
|
|
779
|
-
class="field"
|
|
780
|
-
rows="1"
|
|
781
|
-
.value=${zn(this.#e)}
|
|
782
|
-
placeholder=${n}
|
|
783
|
-
aria-label=${e}
|
|
784
|
-
@input=${this.#o}
|
|
785
|
-
@keydown=${this.#a}
|
|
786
|
-
@blur=${this.#l}
|
|
787
|
-
></textarea>`:m`<input
|
|
788
|
-
class="field"
|
|
789
|
-
.value=${zn(this.#e)}
|
|
790
|
-
placeholder=${n}
|
|
791
|
-
aria-label=${e}
|
|
792
|
-
@input=${this.#o}
|
|
793
|
-
@keydown=${this.#a}
|
|
794
|
-
@blur=${this.#l}
|
|
795
|
-
/>`}#s=e=>{e.composedPath().some(n=>n instanceof HTMLAnchorElement)||(e.stopPropagation(),!this.editing&&(this.#e=this.value,this.editing=!0))};#i=e=>{e.isComposing||this.editing||e.target instanceof HTMLAnchorElement||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.editing=!0)};#o=e=>{const n=Ee(e.target,HTMLInputElement)??Ee(e.target,HTMLTextAreaElement);n!==null&&(this.#e=n.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.#d())}};#l=e=>{const n=e.currentTarget;if(!(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement))return;const s=this.#t,{selectionStart:r,selectionEnd:i}=n;queueMicrotask(()=>{!this.isConnected||!this.editing||(s!==this.#t?(n.focus(),n.setSelectionRange(r,i)):this.#d())})};#d=()=>{if(!this.editing)return;this.editing=!1;const n=(this.wrap?this.#e.replace(/\r?\n/g," "):this.#e).trim();n!==this.value&&this.dispatchEvent(new CustomEvent("dpk-commit",{detail:{value:n},bubbles:!0,composed:!0}))}}const Ec=()=>{customElements.get("dpk-component-inline-edit")||customElements.define("dpk-component-inline-edit",Zr)},Rc={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Kn(t){return Rc}let _c;function Oc(t){return _c?.get(t)}let Lc;function Pc(t){return Lc?.get(t)}let zc;function Mc(t,e){return zc?.get(t)?.get(e)}function We(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 R(t,e,n,s,r){const i=r&&"input"in r?r.input:n.value,o=r?.expected??t.expects??null,a=r?.received??We(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:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},d=t.kind==="schema",c=r?.message??t.message??Mc(t.reference,l.lang)??(d?Pc(l.lang):null)??s.message??Oc(l.lang);c!==void 0&&(l.message=typeof c=="function"?c(l):c),d&&(n.typed=!1),n.issues?n.issues.push(l):n.issues=[l]}function Ic(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function Nc(t,e){return Object.prototype.hasOwnProperty.call(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Qn(t,e){const n=[...new Set(t)];return n.length>1?`(${n.join(` ${e} `)})`:n[0]??"never"}function M(t){return t["~standard"]={version:1,vendor:"valibot",validate:e=>t["~run"]({value:e},Kn())},t}function Dc(t){if(t.path){let e="";for(const n of t.path)if(typeof n.key=="string"||typeof n.key=="number")e?e+=`.${n.key}`:e+=n.key;else return null;return e}return null}var jc=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};const qc=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])$/u,Bc=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])[T ](?:0\d|1\d|2[0-3])(?::[0-5]\d){2}(?:\.\d{1,9})?(?:Z| ?[+-](?:0\d|1\d|2[0-3])(?::?[0-5]\d)?)$/u;function Yr(t,e){return{kind:"validation",type:"check",reference:Yr,async:!1,expects:null,requirement:t,message:e,"~run"(n,s){return n.typed&&!this.requirement(n.value)&&R(this,"input",n,s),n}}}function Jr(t){return{kind:"validation",type:"finite",reference:Jr,async:!1,expects:null,requirement:Number.isFinite,message:t,"~run"(e,n){return e.typed&&!this.requirement(e.value)&&R(this,"finite",e,n),e}}}function Xr(t,e){const n=We(t);return{kind:"validation",type:"includes",reference:Xr,async:!1,expects:n,requirement:t,message:e,"~run"(s,r){return s.typed&&!s.value.includes(this.requirement)&&R(this,"content",s,r,{received:`!${n}`}),s}}}function ei(t){return{kind:"validation",type:"integer",reference:ei,async:!1,expects:null,requirement:Number.isInteger,message:t,"~run"(e,n){return e.typed&&!this.requirement(e.value)&&R(this,"integer",e,n),e}}}function ti(t){return{kind:"validation",type:"iso_date",reference:ti,async:!1,expects:null,requirement:qc,message:t,"~run"(e,n){return e.typed&&!this.requirement.test(e.value)&&R(this,"date",e,n),e}}}function ni(t){return{kind:"validation",type:"iso_timestamp",reference:ni,async:!1,expects:null,requirement:Bc,message:t,"~run"(e,n){return e.typed&&!this.requirement.test(e.value)&&R(this,"timestamp",e,n),e}}}function $(t,e){return{kind:"validation",type:"min_length",reference:$,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(n,s){return n.typed&&n.value.length<this.requirement&&R(this,"length",n,s,{received:`${n.value.length}`}),n}}}function si(t,e){return{kind:"validation",type:"min_value",reference:si,async:!1,expects:`>=${t instanceof Date?t.toJSON():We(t)}`,requirement:t,message:e,"~run"(n,s){return n.typed&&!(n.value>=this.requirement)&&R(this,"value",n,s,{received:n.value instanceof Date?n.value.toJSON():We(n.value)}),n}}}function oe(t,e){return{kind:"validation",type:"regex",reference:oe,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(n,s){return n.typed&&!this.requirement.test(n.value)&&R(this,"format",n,s),n}}}function Zn(){return{kind:"transformation",type:"trim",reference:Zn,async:!1,"~run"(t){return t.value=t.value.trim(),t}}}function ri(t){return{kind:"validation",type:"url",reference:ri,async:!1,expects:null,requirement(e){try{return URL.canParse?URL.canParse(e):(new URL(e),!0)}catch{return!1}},message:t,"~run"(e,n){return e.typed&&!this.requirement(e.value)&&R(this,"URL",e,n),e}}}const ii={abortEarly:!0};function oi(t,e,n){return typeof t.fallback=="function"?t.fallback(e,n):t.fallback}function Ut(t,e,n){return typeof t.default=="function"?t.default(e,n):t.default}function Hc(t,e){return!t["~run"]({value:e},ii).issues}function ai(){return M({kind:"schema",type:"any",reference:ai,expects:"any",async:!1,"~run"(t){return t.typed=!0,t}})}function j(t,e){return M({kind:"schema",type:"array",reference:j,expects:"Array",async:!1,item:t,message:e,"~run"(n,s){const r=n.value;if(Array.isArray(r)){n.typed=!0,n.value=[];for(let i=0;i<r.length;i++){const o=r[i],a=this.item["~run"]({value:o},s);if(a.issues){const l={type:"array",origin:"value",input:r,key:i,value:o};for(const d of a.issues)d.path?d.path.unshift(l):d.path=[l],n.issues?.push(d);if(n.issues||(n.issues=a.issues),s.abortEarly){n.typed=!1;break}}a.typed||(n.typed=!1),n.value.push(a.value)}}else R(this,"type",n,s);return n}})}function Yn(t){return M({kind:"schema",type:"boolean",reference:Yn,expects:"boolean",async:!1,message:t,"~run"(e,n){return typeof e.value=="boolean"?e.typed=!0:R(this,"type",e,n),e}})}function U(t,e){return M({kind:"schema",type:"exact_optional",reference:U,expects:t.expects,async:!1,wrapped:t,default:e,"~run"(n,s){return this.wrapped["~run"](n,s)}})}function li(t){return M({kind:"schema",type:"lazy",reference:li,expects:"unknown",async:!1,getter:t,"~run"(e,n){return this.getter(e.value)["~run"](e,n)}})}function G(t,e){return M({kind:"schema",type:"literal",reference:G,expects:We(t),async:!1,literal:t,message:e,"~run"(n,s){return Ic(n.value,this.literal)?n.typed=!0:R(this,"type",n,s),n}})}function ci(t,e){return M({kind:"schema",type:"nullable",reference:ci,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,"~run"(n,s){return n.value===null&&(this.default!==void 0&&(n.value=Ut(this,n,s)),n.value===null)?(n.typed=!0,n):this.wrapped["~run"](n,s)}})}function di(t){return M({kind:"schema",type:"number",reference:di,expects:"number",async:!1,message:t,"~run"(e,n){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:R(this,"type",e,n),e}})}function O(t,e){return M({kind:"schema",type:"object",reference:O,expects:"Object",async:!1,entries:t,message:e,"~run"(n,s){const r=n.value;if(r&&typeof r=="object"){n.typed=!0,n.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]:Ut(o),l=o["~run"]({value:a},s);if(l.issues){const d={type:"object",origin:"value",input:r,key:i,value:a};for(const c of l.issues)c.path?c.path.unshift(d):c.path=[d],n.issues?.push(c);if(n.issues||(n.issues=l.issues),s.abortEarly){n.typed=!1;break}}l.typed||(n.typed=!1),n.value[i]=l.value}else if(o.fallback!==void 0)n.value[i]=oi(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(R(this,"key",n,s,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]}),s.abortEarly))break}}else R(this,"type",n,s);return n}})}function D(t,e){return M({kind:"schema",type:"optional",reference:D,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,"~run"(n,s){return n.value===void 0&&(this.default!==void 0&&(n.value=Ut(this,n,s)),n.value===void 0)?(n.typed=!0,n):this.wrapped["~run"](n,s)}})}function Ft(t,e){return M({kind:"schema",type:"picklist",reference:Ft,expects:Qn(t.map(We),"|"),async:!1,options:t,message:e,"~run"(n,s){return this.options.includes(n.value)?n.typed=!0:R(this,"type",n,s),n}})}function Ge(t,e,n){return M({kind:"schema",type:"record",reference:Ge,expects:"Object",async:!1,key:t,value:e,message:n,"~run"(s,r){const i=s.value;if(i&&typeof i=="object"){s.typed=!0,s.value={};for(const o in i)if(Nc(i,o)){const a=i[o],l=this.key["~run"]({value:o},r);if(l.issues){const c={type:"object",origin:"key",input:i,key:o,value:a};for(const p of l.issues)p.path=[c],s.issues?.push(p);if(s.issues||(s.issues=l.issues),r.abortEarly){s.typed=!1;break}}const d=this.value["~run"]({value:a},r);if(d.issues){const c={type:"object",origin:"value",input:i,key:o,value:a};for(const p of d.issues)p.path?p.path.unshift(c):p.path=[c],s.issues?.push(p);if(s.issues||(s.issues=d.issues),r.abortEarly){s.typed=!1;break}}(!l.typed||!d.typed)&&(s.typed=!1),l.typed&&(s.value[l.value]=d.value)}}else R(this,"type",s,r);return s}})}function z(t,e){return M({kind:"schema",type:"strict_object",reference:z,expects:"Object",async:!1,entries:t,message:e,"~run"(n,s){const r=n.value;if(r&&typeof r=="object"){n.typed=!0,n.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]:Ut(o),l=o["~run"]({value:a},s);if(l.issues){const d={type:"object",origin:"value",input:r,key:i,value:a};for(const c of l.issues)c.path?c.path.unshift(d):c.path=[d],n.issues?.push(c);if(n.issues||(n.issues=l.issues),s.abortEarly){n.typed=!1;break}}l.typed||(n.typed=!1),n.value[i]=l.value}else if(o.fallback!==void 0)n.value[i]=oi(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(R(this,"key",n,s,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]}),s.abortEarly))break}if(!n.issues||!s.abortEarly){for(const i in r)if(!Object.prototype.hasOwnProperty.call(this.entries,i)){R(this,"key",n,s,{input:i,expected:"never",path:[{type:"object",origin:"key",input:r,key:i,value:r[i]}]});break}}}else R(this,"type",n,s);return n}})}function v(t){return M({kind:"schema",type:"string",reference:v,expects:"string",async:!1,message:t,"~run"(e,n){return typeof e.value=="string"?e.typed=!0:R(this,"type",e,n),e}})}function pi(t){let e;if(t)for(const n of t)if(e)for(const s of n.issues)e.push(s);else e=n.issues;return e}function Jn(t,e){return M({kind:"schema",type:"union",reference:Jn,expects:Qn(t.map(n=>n.expects),"|"),async:!1,options:t,message:e,"~run"(n,s){let r,i,o;for(const a of this.options){const l=a["~run"]({value:n.value},s);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];R(this,"type",n,s,{issues:pi(i)}),n.typed=!0}else{if(o?.length===1)return o[0];R(this,"type",n,s,{issues:pi(o)})}return n}})}function ve(){return M({kind:"schema",type:"unknown",reference:ve,expects:"unknown",async:!1,"~run"(t){return t.typed=!0,t}})}function Wt(t,e,n){return M({kind:"schema",type:"variant",reference:Wt,expects:"Object",async:!1,key:t,options:e,message:n,"~run"(s,r){const i=s.value;if(i&&typeof i=="object"){let o,a=0,l=this.key,d=[];const c=(p,u)=>{for(const h of p.options){if(h.type==="variant")c(h,new Set(u).add(h.key));else{let f=!0,g=0;for(const b of u){const x=h.entries[b];if(b in i?x["~run"]({typed:!1,value:i[b]},ii).issues:x.type!=="exact_optional"&&x.type!=="optional"&&x.type!=="nullish"){f=!1,l!==b&&(a<g||a===g&&b in i&&!(l in i))&&(a=g,l=b,d=[]),l===b&&d.push(h.entries[b].expects);break}g++}if(f){const b=h["~run"]({value:i},r);(!o||!o.typed&&b.typed)&&(o=b)}}if(o&&!o.issues)break}};if(c(this,new Set([this.key])),o)return o;R(this,"type",s,r,{input:i[l],expected:Qn(d,"|"),path:[{type:"object",origin:"value",input:i,key:l,value:i[l]}]})}else R(this,"type",s,r);return s}})}function Gt(t,e,n){const s=t["~run"]({value:e},Kn());if(s.issues)throw new jc(s.issues);return s.value}function y(...t){return M({...t[0],pipe:t,"~run"(e,n){for(const s of t)if(s.kind!=="metadata"){if(e.issues&&(s.kind==="schema"||s.kind==="transformation")){e.typed=!1;break}(!e.issues||!n.abortEarly&&!n.abortPipeEarly)&&(e=s["~run"](e,n))}return e}})}function C(t,e,n){const s=t["~run"]({value:e},Kn());return{typed:s.typed,success:!s.issues,output:s.value,issues:s.issues}}function Uc(t){let e="";for(const n of t){e&&(e+=`
|
|
796
|
-
`),e+=`\xD7 ${n.message}`;const s=Dc(n);s&&(e+=`
|
|
797
|
-
\u2192 at ${s}`)}return e}const Vt=O({type:y(v(),$(1)),id:y(v(),$(1))}),Kt=y(v(),$(1),oe(/^[A-Za-z0-9_-]+$/,'ids may only contain letters, digits, "_" and "-" (a "." builds a path)')),Fc=(t,e)=>{if(e===1)return t.includes(".")?null:[t];const n=t.split(".");return n.length===e&&n.every(s=>s.length>0)?n:null},Pe=O({id:y(v(),$(1)),type:y(v(),$(1)),target:Vt,payload:ve(),note:U(v()),createdAt:y(v(),$(1))}),Wc=(t,e,n,s={})=>{const r=O({id:y(v(),$(1)),type:G(t),target:Vt,payload:n,note:U(v()),createdAt:y(v(),$(1))}),i=o=>{const a=C(Pe,o);if(!a.success||a.output.type!==t)return null;const l=C(n,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:s.mode??"patch",targetType:e,actionType:t,payloadSchema:n,parse:i,...s.dedupeKey?{dedupeKey:s.dedupeKey}:{}}},Gc=(t,e)=>{const n=ht(t,e.type);if(n===void 0)return null;const s=n.parse(e);return s===null?null:s},Vc=(t,e)=>{const n=C(t.payloadSchema,e.payload);if(!n.success)throw new Error(`invalid payload for action "${e.type}"`);return n.output},ht=(t,e)=>Object.hasOwn(t,e)?t[e]:void 0,Kc=t=>{throw new Error(`unhandled action: ${JSON.stringify(t)}`)},Qc=O({id:y(v(),$(1))}),Zc=t=>{const e=C(Qc,t.payload);return`${t.type}|${e.success?e.output.id:JSON.stringify(t.payload)}`},I=t=>`${t.type}:${t.id}`,ut=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"?ut(t.includes(":")?t:`${e}:${t}`):{type:t.type,id:t.id},Yc=(t,e)=>t.type===e.type&&t.id===e.id,hi=t=>{const e=t.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return e.length>0?e:"item"},Jc=(t,e)=>{const n=hi(t),s=new Set(e);if(!s.has(n))return n;for(let r=2;r<1e3;r+=1){const i=`${n}-${r}`;if(!s.has(i))return i}return`${n}-${Math.random().toString(36).slice(2,8)}`},ui=()=>{const t=globalThis.crypto;return t?.randomUUID?t.randomUUID():`a-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`},B="comment",ze=t=>{const[e]=t;return{path:e?.path?.map(n=>String(n.key)).join(".")??"",message:e?.message??"invalid action"}},fi=O({type:y(v(),$(1)),target:Jn([y(v(),$(1)),Vt]),payload:D(ve()),note:U(v()),id:U(y(v(),$(1))),createdAt:U(y(v(),$(1)))}),Xc=(t,e)=>{const n=C(fi,t);if(!n.success)return{ok:!1,issue:ze(n.issues)};const s=n.output,r=Qt(s.target,e.targetType),i={id:s.id??ui(),type:s.type,target:r,payload:s.payload??{},...s.note===void 0?{}:{note:s.note},createdAt:s.createdAt??new Date().toISOString()},o=C(e.schema,i);if(!o.success)return{ok:!1,issue:ze(o.issues)};const a=C(Pe,o.output);return a.success?{ok:!0,action:a.output}:{ok:!1,issue:ze(a.issues)}},Xn=(t,e)=>e.dedupeKey?e.dedupeKey(t):e.mode!=="patch"?null:`${t.type}|${I(t.target)}`,gi=(t,e,n)=>{const s=Xn(e,n);if(s===null)return[...t,e];const r=t.at(-1);return!r||Xn(r,n)!==s||!ed(r,e)?[...t,e]:[...t.slice(0,-1),e]},ed=(t,e)=>Yc(t.target,e.target),es=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),mi=O({id:y(v(),$(1)),type:G(B),target:O({type:y(v(),$(1)),id:y(v(),$(1))}),payload:O({body:y(v(),$(1))}),note:U(v()),createdAt:y(v(),$(1))}),ts={schema:mi,mode:"append",targetType:"page"},td=O({body:v()}),ft=t=>{const e=C(td,t.payload);return e.success?e.output.body:""},ns="element",ki=y(v(),oe(/^[A-Z][A-Z0-9_]*$/,"component action types are CONSTANT_CASE")),bi=Ge(v(),ve()),nd=O({type:G(ns),id:y(v(),oe(/^[^/]+\/.+/,"component references start with a provider id"))}),sd=O({id:y(v(),$(1)),type:ki,target:nd,payload:bi,note:U(v()),createdAt:y(v(),$(1))}),rd={schema:sd,mode:"sequence",targetType:ns},id=z({type:ki,target:y(v(),oe(/^element:[^/]+\/.+/)),payload:D(bi,{})}),vi=z({id:y(v(),$(1)),title:y(v(),$(1)),summary:U(v()),tone:U(Ft(["create","update","delete","move","meta"])),stale:U(Ft(["unsupported-action-type","target-missing","constraint-violated"]))}),ss=t=>{if(t.type!==ns)return null;const e=t.id.indexOf("/");if(e<=0)return null;try{return decodeURIComponent(t.id.slice(0,e))}catch{return null}},te=t=>t.type!==B&&ss(t.target)!==null,od=(t,e)=>t.filter(n=>te(n)&&ss(n.target)===e),xi=(t,e)=>{const n=new Map(t.flatMap(s=>te(s)?[[s.id,ss(s.target)]]:[]));return new Map(e.flatMap(s=>s.results.flatMap(r=>n.get(r.id)===s.id?[[r.id,r]]:[])))},yi="data-dpk-grill",ae="grill",Zt="answer",rs="data-grill-questions",Ve={questions:[],rounds:[]},ad=z({id:Kt,label:y(v(),$(1))}),wi=z({id:Kt,ref:D(y(v(),$(1))),title:y(v(),$(1)),description:D(v()),note:D(v()),options:D(j(ad),[]),freeText:D(Yn(),!0)}),$i=Wt("kind",[z({kind:G("option"),optionId:y(v(),$(1))}),z({kind:G("free"),text:v()})]),Si=Wt("kind",[...$i.options,z({kind:G("clear")})]),ld=z({...wi.entries,answer:D($i)}),cd=z({label:D(y(v(),$(1))),questions:j(ld)}),dd=z({questions:j(wi),history:D(j(cd),[])}),Ai=t=>{const e=new Set;return t.map((n,s)=>{if(e.has(n.id))throw new Error(`duplicate question id: ${n.id}`);e.add(n.id);const r=new Set;for(const i of n.options){if(r.has(i.id))throw new Error(`duplicate option id: ${i.id} in question ${n.id}`);r.add(i.id)}return{...n,ref:n.ref??`Q${s+1}`,description:n.description??null,note:n.note??null}})},Ti=t=>({id:t.id,ref:t.ref,title:t.title,description:t.description,note:t.note,options:t.options,freeText:t.freeText}),pd=t=>{const e=t.answer??null;if(e?.kind==="option"&&!t.options.some(n=>n.id===e.optionId))throw new Error(`unknown option id: ${e.optionId} in question ${t.id}`);return{...Ti(t),answer:e}},hd=t=>{const e=Gt(dd,t);return{questions:Ai(e.questions).map(Ti),rounds:e.history.map((n,s)=>({label:n.label??`v${s+1}`,questions:Ai(n.questions).map(pd)}))}},Ke=(t,e)=>t.questions.find(n=>n.id===e),is=(t,e)=>{const n=Ke(t,e);return n?`${n.ref} \xB7 ${n.title}`:e},Yt=(t,e)=>e?e.kind==="option"?t.options.find(n=>n.id===e.optionId)?.label??"":e.text.trim():"",Jt=(t,e)=>Yt(t,e)!=="",ud=t=>{let e="";for(let n=t+1;n>0;n=Math.floor((n-1)/26))e=String.fromCharCode(97+(n-1)%26)+e;return e},Ci=(t,e)=>({total:t.questions.length,answered:t.questions.filter(n=>Jt(n,e[n.id])).length}),fd=(t,e,n)=>{const s=t.questions,r=s.findIndex(o=>o.id===n);return(r===-1?s:[...s.slice(r+1),...s.slice(0,r)]).find(o=>!Jt(o,e[o.id]))?.id??null},gd=O({id:y(v(),$(1)),type:G(Zt),target:O({type:G(ae),id:Kt}),payload:Si,note:U(v()),createdAt:y(v(),$(1))}),md={schema:gd,mode:"patch",targetType:ae},Q=t=>t.type===Zt&&t.target.type===ae,kd=(t,e)=>({type:Zt,target:{type:ae,id:t},payload:e}),Ei=t=>{const e=C(Si,t.payload);return e.success?e.output:null},bd=(t,e)=>[...t.filter(n=>!(Q(n)&&n.target.id===e.target.id)),e],Ri=(t,e,n)=>{const s=Ke(t,n.target.id),r=Ei(n);if(!s||!r)return null;const i=e[s.id];if(r.kind==="clear"){if(i===void 0)return e;const o={...e};return delete o[s.id],o}return r.kind==="option"&&!s.options.some(o=>o.id===r.optionId)||r.kind==="free"&&!s.freeText?null:i?.kind==="option"&&r.kind==="option"&&i.optionId===r.optionId||i?.kind==="free"&&r.kind==="free"&&i.text===r.text?e:{...e,[s.id]:r}},gt=Object.freeze({}),Xt=t=>{const e=t.startsWith("#")?t.slice(1):t;if(e.length===0)return gt;const n=new URLSearchParams(e.startsWith("?")?e.slice(1):e),s={};for(const[r,i]of n)r.length>0&&i.length>0&&(s[r]=i);return s},Qe=t=>{const e=new URLSearchParams;for(const s of Object.keys(t).sort((r,i)=>r<i?-1:r>i?1:0)){const r=t[s];r!=null&&r!==""&&e.set(s,r)}const n=e.toString();return n.length===0?"":`#${n}`},en=(t,e,n=[])=>{const s={...t},r=Object.keys(e).map(i=>n.indexOf(i)).filter(i=>i>=0);if(r.length>0)for(const i of n.slice(Math.min(...r)+1))Object.hasOwn(e,i)||delete s[i];for(const[i,o]of Object.entries(e))o==null||o===""?delete s[i]:s[i]=o;return s},vd=(t,e="json")=>`\`\`\`${e}
|
|
798
|
-
${t}
|
|
799
|
-
\`\`\``,xd=t=>JSON.stringify({type:t.type,target:t.target,payload:t.payload,...t.note===void 0?{}:{note:t.note}},null,2),tn=(t,e,n)=>{const{actions:s,state:r}=t,i=new Set(t.stale.map(p=>p.action.id)),o=s.filter(p=>!i.has(p.id)),a=o.filter(p=>p.type===B),l=o.filter(p=>p.type!==B&&!Q(p)),d=t.grill.questions.filter(p=>Jt(p,t.answers[p.id])),c=[];if(c.push(`# Review draft \u2014 ${e.label}`),c.push(""),c.push(`- template: \`${e.name}\``),c.push(`- framework: \`dev-process-kit@${n}\``),c.push(`- navigation: \`${Qe(t.navigation)||"(none)"}\``),c.push(`- pending: ${l.length} change(s), ${a.length} comment(s)`+(d.length>0?`, ${d.length} answer(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(te)&&(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,u]of a.entries()){const h=e.describe(u,r,t.base);c.push(`${p+1}. **${h.targetLabel}** \u2014 \`${I(u.target)}\``),c.push(` > ${ft(u).replace(/\n/g,`
|
|
800
|
-
> `)}`)}c.push("")}if(d.length>0){c.push(`## Answers (${d.length})`),c.push(""),c.push("The reader answered these questions from the `data-dpk-grill` block. Settle them in the page; when you ask the next round, move them into `history` with the answer as recorded."),c.push("");for(const[p,u]of d.entries()){const h=t.answers[u.id],f=h?.kind==="option"?` (option \`${h.optionId}\`)`:"";c.push(`${p+1}. **${is(t.grill,u.id)}** \u2014 \`grill:${u.id}\``),c.push(` > ${Yt(u,h).replace(/\n/g,`
|
|
801
|
-
> `)}${f}`)}c.push("")}if(l.length>0){c.push(`## Requested changes (${l.length})`),c.push("");for(const[p,u]of l.entries()){const h=e.describe(u,r,t.base),f=h.summary?` \u2014 ${h.summary}`:"";c.push(`${p+1}. **${h.title}**${f}`),c.push(` target: \`${I(u.target)}\` (${u.target.type})`),c.push(` \`\`\`json
|
|
802
|
-
${xd(u).replace(/\n/g,`
|
|
803
|
-
`)}
|
|
804
|
-
\`\`\``)}c.push("")}if(l.length===0&&a.length===0&&d.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:u,reason:h}]of t.stale.entries()){const f=e.describe(u,r,t.base),g=u.type===B?ft(u):f.title;c.push(`${p+1}. \`${u.type}\` on \`${I(u.target)}\` (${h}) \u2014 ${g}`)}c.push("")}return c.push("## Canonical draft (JSON)"),c.push(""),c.push(vd(es(s))),c.push(""),c.join(`
|
|
805
|
-
`)},X="0.2.0",os=async t=>{try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const e=document.activeElement,n=document.createElement("textarea");try{return n.value=t,n.setAttribute("readonly",""),n.style.position="fixed",n.style.opacity="0",document.body.append(n),n.select(),document.execCommand("copy")}catch{return!1}finally{n.remove(),e instanceof HTMLElement&&e.focus()}},_i=It({en:{heading:"Review notes",rejected:"Action rejected.",commentLabel:"Review comment",commentPlaceholder:"What the agent should fix, or what you noticed (handed to the agent as a review comment)",detach:"Detach",attachTo:t=>`Attach to this ${t}`,addNote:"Add to review",changesHeading:"Changes",commentsHeading:"Review comments",empty:"No draft actions yet.",emptyHint:"Comments and structural patches both land here, and survive reload via LocalStorage.",emptyChanges:"No changes yet.",emptyChangesHint:"What you edit, add or move on the page lands here and reaches the agent as a change.",emptyComments:"No review comments yet.",emptyCommentsHint:"Write what the agent should fix. Comments reach the agent with the changes and are not kept on the page.",sendToClaude:"Send to Claude",copy:"Copy changes & comments",copyTitle:"Copy the review to paste it to the agent",clear:"Clear all",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 close",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:"Agent \u306B\u76F4\u3057\u3066\u307B\u3057\u3044\u3053\u3068 / \u6C17\u3065\u304D\u3092\u66F8\u304F\uFF08\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8\u3068\u3057\u3066\u6E21\u308B\uFF09",detach:"\u7D10\u3065\u3051\u3092\u89E3\u9664",attachTo:t=>`\u3053\u306E ${t} \u306B\u7D10\u3065\u3051\u308B`,addNote:"\u30EC\u30D3\u30E5\u30FC\u306B\u8FFD\u52A0",changesHeading:"\u5909\u66F4",commentsHeading:"\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8",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",emptyChanges:"\u5909\u66F4\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",emptyChangesHint:"\u30DA\u30FC\u30B8\u4E0A\u3067\u7DE8\u96C6\u30FB\u8FFD\u52A0\u30FB\u79FB\u52D5\u3057\u305F\u5185\u5BB9\u304C\u3053\u3053\u306B\u96C6\u307E\u308A\u3001\u5909\u66F4\u3068\u3057\u3066 Agent \u306B\u6E21\u308A\u307E\u3059\u3002",emptyComments:"\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",emptyCommentsHint:"Agent \u306B\u76F4\u3057\u3066\u307B\u3057\u3044\u3053\u3068\u3092\u66F8\u304D\u307E\u3059\u3002\u5909\u66F4\u3068\u4E00\u7DD2\u306B Agent \u306B\u6E21\u308A\u3001\u30DA\u30FC\u30B8\u306B\u306F\u6B8B\u308A\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:"\u3059\u3079\u3066\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\u9589\u3058\u308B",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"}}),yd=()=>({body:"",editing:null,attachment:{kind:"page"},copy:{kind:"idle"},copyRequest:0,send:{kind:"idle"},sendRequest:0}),Oi=t=>t.kind==="explicit"?{kind:t.resume}:t,Li=(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:Oi(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:Oi(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}}}},wd=(t,e)=>{const n=t.body.trim();return n===""?null:{target:e,body:n}},$d=t=>{if(!t.editing)return null;const e=t.editing.body.trim();return e===""?null:{id:t.editing.id,body:e}},Sd={en:"English",ja:"\u65E5\u672C\u8A9E"},L=It({en:{review:"Review",reviewChanges:"Activity log",reviewComments:"Review comments",settings:"Settings",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",supplements:"Supplements",openSupplements:"Open supplements",closeSupplements:"Close supplements",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",changes:"Updates",changesUnread:t=>`Updates (${t} new)`,changesTitle:"Changes by version",changesCurrent:"This version",changesReadAll:"Mark all as read",changesNew:"New",changesShow:"Show",changesDismiss:"Dismiss",changesWaiting:t=>`${t} more`,changesSeeAll:"See all",changesError:"Could not read the change log",grill:"Questions",grillError:"Could not read the questions",grillGroup:"Question",grillProgress:(t,e)=>`${t} of ${e} answered`,grillAnswer:"Answer",grillAnswerFree:"Answer in your own words",grillAnswerClear:"Clear answer",grillQuoted:t=>`\u2192 \u201C${t}\u201D`,grillOpen:t=>`Open question ${t}`,grillFreeText:"Your own answer",grillFreeTextOf:t=>`Your own answer to ${t}`,grillFreeTextPlaceholder:"Type an answer\u2026 (\u2318/Ctrl+Enter for next)",grillRoundSelect:"Question round",grillCurrentRound:"Current questions",grillRoundOption:(t,e)=>`${t} (${e})`,grillPastRound:t=>`${t}: earlier questions, read-only`,grillUnanswered:"Not answered",grillNoQuestions:"No questions in this round."},ja:{review:"\u30EC\u30D3\u30E5\u30FC",reviewChanges:"\u64CD\u4F5C\u30ED\u30B0",reviewComments:"\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8",settings:"\u8A2D\u5B9A",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",supplements:"\u88DC\u8DB3\u60C5\u5831",openSupplements:"\u88DC\u8DB3\u60C5\u5831\u3092\u958B\u304F",closeSupplements:"\u88DC\u8DB3\u60C5\u5831\u3092\u9589\u3058\u308B",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",changes:"\u66F4\u65B0\u306E\u304A\u77E5\u3089\u305B",changesUnread:t=>`\u66F4\u65B0\u306E\u304A\u77E5\u3089\u305B\uFF08\u65B0\u7740 ${t} \u4EF6\uFF09`,changesTitle:"\u7248\u3054\u3068\u306E\u5909\u66F4",changesCurrent:"\u3053\u306E\u7248",changesReadAll:"\u3059\u3079\u3066\u65E2\u8AAD\u306B\u3059\u308B",changesNew:"\u65B0\u7740",changesShow:"\u898B\u308B",changesDismiss:"\u9589\u3058\u308B",changesWaiting:t=>`\u307B\u304B ${t} \u4EF6`,changesSeeAll:"\u3059\u3079\u3066\u898B\u308B",changesError:"\u5909\u66F4\u306E\u4E00\u89A7\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F",grill:"\u8CEA\u554F",grillError:"\u8CEA\u554F\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F",grillGroup:"\u8CEA\u554F",grillProgress:(t,e)=>`\u56DE\u7B54\u6E08\u307F ${t} / ${e}`,grillAnswer:"\u56DE\u7B54",grillAnswerFree:"\u81EA\u7531\u8A18\u8FF0\u3067\u56DE\u7B54",grillAnswerClear:"\u56DE\u7B54\u3092\u30AF\u30EA\u30A2",grillQuoted:t=>`\u2192 \u300C${t}\u300D`,grillOpen:t=>`\u8CEA\u554F ${t} \u3092\u3072\u3089\u304F`,grillFreeText:"\u81EA\u7531\u8A18\u8FF0",grillFreeTextOf:t=>`${t} \u306E\u81EA\u7531\u8A18\u8FF0`,grillFreeTextPlaceholder:"\u56DE\u7B54\u3092\u5165\u529B\u2026\uFF08\u2318/Ctrl+Enter \u3067\u6B21\u3078\uFF09",grillRoundSelect:"\u8CEA\u554F\u306E\u30E9\u30A6\u30F3\u30C9",grillCurrentRound:"\u73FE\u5728\u306E\u8CEA\u554F",grillRoundOption:(t,e)=>`${t}\uFF08${e} \u554F\uFF09`,grillPastRound:t=>`${t}: \u904E\u53BB\u306E\u8CEA\u554F\uFF08\u95B2\u89A7\u306E\u307F\uFF09`,grillUnanswered:"\u672A\u56DE\u7B54",grillNoQuestions:"\u3053\u306E\u30E9\u30A6\u30F3\u30C9\u306B\u8CEA\u554F\u306F\u3042\u308A\u307E\u305B\u3093\u3002"}}),Ad=4096,Td="reviews",Pi="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.",Cd=t=>new TextEncoder().encode(t).length,Ed=t=>t.replace(/[\u0000-\u0008\u000B-\u001F\u007F]/g,""),Rd=t=>{const e=`${Pi}
|
|
806
|
-
|
|
807
|
-
${Ed(t)}`;return Cd(e)<=Ad?e:null},_d=t=>`${Pi}
|
|
808
|
-
|
|
809
|
-
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).`,Od={consent_required:"consent",forbidden:"forbidden",not_granted:"forbidden",capability_disabled:"forbidden",capability_removed:"forbidden",claude_unavailable:"claude_unavailable",rate_limited:"rate_limited"},Ld=t=>{const e=typeof t=="object"&&t!==null&&"code"in t?t.code:void 0;return(typeof e=="string"?Od[e]:void 0)??"error"},Pd={too_large:"handoffTooLarge",consent:"handoffConsent",forbidden:"handoffForbidden",claude_unavailable:"handoffClaudeUnavailable",rate_limited:"handoffRateLimited",storage:"handoffStorage",error:"handoffError"},zi=(t,e)=>L(e)[Pd[t]],Mi=t=>t.group?`${t.group} \xB7 ${t.label}`:t.label,Ii=(t,e)=>{const{definition:n,state:s,navigation:r,derivation:i}=t,o=_i(t.locale),a=n.currentTarget?.(s,r)??null,l=e.attachment,d=l.kind==="explicit"?n.commentTargets(s,r).find(g=>g.value===l.ref):null,c=l.kind==="explicit"?{ref:l.ref,label:d?Mi(d):l.ref}:l.kind==="current"&&a?{ref:a.value,label:Mi(a)}:{ref:`page:${n.name}`,label:o.wholePage},p=new Map(i.stale.map(g=>[g.action.id,g.reason])),u=t.section??"all",f=i.actions.filter(g=>!Q(g)||p.has(g.id)).map(g=>{const b=n.describe(g,s,i.base),x=g.type===B;return{kind:x?"comments":"changes",id:g.id,title:x?o.comment:b.title,targetLabel:b.targetLabel,tone:x?"comment":b.tone,text:{kind:x?"comment":"summary",body:x?ft(g):b.summary??""},code:x?null:n.serialize(g),stale:p.get(g.id)??null,edit:!x||t.editable!==!0?{kind:"none"}:e.editing?.id===g.id?{kind:"editing",body:e.editing.body,canSave:e.editing.body.trim().length>0}:{kind:"available"}}});return{body:e.body,target:c,attachment:l.kind==="explicit"?{kind:"explicit"}:a?{kind:"checkbox",checked:l.kind==="current",group:a.group??""}:{kind:"none"},canSubmit:e.body.trim().length>0,section:u,composer:u!=="changes",groups:["comments","changes"].filter(g=>u==="all"||u===g).map(g=>({kind:g,items:f.filter(b=>b.kind===g)})),hasDraft:i.actions.length>0,issues:t.issues.map(g=>`${g.path?`${g.path}: `:""}${g.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"?zi(e.send.reason,t.locale):e.copy.kind==="copied"?o.copied:e.copy.kind==="failed"?o.copyFailed:""}},zd=[Nt,Dn,fe`
|
|
810
|
-
:host {
|
|
811
|
-
display: flex;
|
|
812
|
-
flex-direction: column;
|
|
813
|
-
min-height: 0;
|
|
814
|
-
min-width: 0;
|
|
815
|
-
width: 100%;
|
|
816
|
-
background: var(--dpk-paper-raised);
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
header {
|
|
820
|
-
position: relative;
|
|
821
|
-
z-index: 1;
|
|
822
|
-
display: flex;
|
|
823
|
-
align-items: center;
|
|
824
|
-
justify-content: space-between;
|
|
825
|
-
gap: 8px;
|
|
826
|
-
padding: 14px 16px 12px;
|
|
827
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
828
|
-
background: var(--dpk-glass);
|
|
829
|
-
backdrop-filter: blur(12px);
|
|
830
|
-
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
header h2 {
|
|
834
|
-
font-size: 13.5px;
|
|
835
|
-
font-weight: 660;
|
|
836
|
-
letter-spacing: -0.015em;
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
.composer {
|
|
840
|
-
display: grid;
|
|
841
|
-
gap: 10px;
|
|
842
|
-
padding: 14px 16px 14px;
|
|
843
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
844
|
-
background: var(--dpk-paper-sunken);
|
|
845
|
-
box-shadow: inset 0 1px 3px var(--dpk-shade-1);
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
.composer textarea {
|
|
849
|
-
min-height: 62px;
|
|
850
|
-
background: var(--dpk-paper-raised);
|
|
851
|
-
border-radius: var(--dpk-radius);
|
|
852
|
-
box-shadow:
|
|
853
|
-
var(--dpk-bevel),
|
|
854
|
-
inset 0 1px 2px var(--dpk-shade-1);
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
/* Wraps on a narrow rail rather than pushing the add button out of it. */
|
|
858
|
-
.composer .row {
|
|
859
|
-
display: flex;
|
|
860
|
-
flex-wrap: wrap;
|
|
861
|
-
align-items: center;
|
|
862
|
-
gap: 8px;
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
.composer .attach {
|
|
866
|
-
display: inline-flex;
|
|
867
|
-
align-items: center;
|
|
868
|
-
gap: 7px;
|
|
869
|
-
font-size: 12px;
|
|
870
|
-
color: var(--dpk-ink-soft);
|
|
871
|
-
cursor: pointer;
|
|
872
|
-
transition: color 140ms var(--dpk-ease);
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
.composer .attach:hover {
|
|
876
|
-
color: var(--dpk-ink);
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
.composer .attach input {
|
|
880
|
-
width: 14px;
|
|
881
|
-
height: 14px;
|
|
882
|
-
margin: 0;
|
|
883
|
-
accent-color: var(--dpk-accent);
|
|
884
|
-
cursor: pointer;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
.composer .chip {
|
|
888
|
-
display: inline-flex;
|
|
889
|
-
align-items: center;
|
|
890
|
-
gap: 6px;
|
|
891
|
-
padding: 3px 10px;
|
|
892
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
893
|
-
border-radius: 999px;
|
|
894
|
-
background: var(--dpk-paper-raised);
|
|
895
|
-
box-shadow: var(--dpk-shadow-xs);
|
|
896
|
-
font-size: 11.5px;
|
|
897
|
-
cursor: pointer;
|
|
898
|
-
transition:
|
|
899
|
-
border-color 140ms var(--dpk-ease),
|
|
900
|
-
box-shadow 140ms var(--dpk-ease),
|
|
901
|
-
transform 140ms var(--dpk-ease);
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
.composer .chip svg {
|
|
905
|
-
flex: none;
|
|
906
|
-
width: 12px;
|
|
907
|
-
height: 12px;
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
.composer .chip:hover {
|
|
911
|
-
border-color: color-mix(in srgb, var(--dpk-accent) 45%, var(--dpk-rule-strong));
|
|
912
|
-
box-shadow: var(--dpk-shadow-sm);
|
|
913
|
-
transform: translateY(-1px);
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
.target-line {
|
|
917
|
-
min-width: 0;
|
|
918
|
-
margin-right: auto;
|
|
919
|
-
overflow-wrap: anywhere;
|
|
920
|
-
padding: 3px 9px;
|
|
921
|
-
border-radius: 999px;
|
|
922
|
-
background: var(--dpk-paper-inset);
|
|
923
|
-
font-family: var(--dpk-mono);
|
|
924
|
-
font-size: 10px;
|
|
925
|
-
letter-spacing: 0.03em;
|
|
926
|
-
color: var(--dpk-ink-faint);
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
.groups {
|
|
930
|
-
/* The page's hand-off dock may float over the bottom of the list. */
|
|
931
|
-
padding: 10px 12px calc(10px + var(--dpk-dock-clearance, 0px));
|
|
932
|
-
overflow: auto;
|
|
933
|
-
flex: 1;
|
|
934
|
-
min-height: 0;
|
|
935
|
-
display: grid;
|
|
936
|
-
grid-template-columns: minmax(0, 1fr);
|
|
937
|
-
gap: 14px;
|
|
938
|
-
align-content: start;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
.group {
|
|
942
|
-
display: grid;
|
|
943
|
-
grid-template-columns: minmax(0, 1fr);
|
|
944
|
-
gap: 8px;
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
.group-head {
|
|
948
|
-
display: flex;
|
|
949
|
-
align-items: center;
|
|
950
|
-
gap: 6px;
|
|
951
|
-
margin: 0;
|
|
952
|
-
padding: 0 2px;
|
|
953
|
-
font-size: 11px;
|
|
954
|
-
font-weight: 650;
|
|
955
|
-
letter-spacing: 0.02em;
|
|
956
|
-
color: var(--dpk-ink-soft);
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
.group-count {
|
|
960
|
-
padding: 0 6px;
|
|
961
|
-
border-radius: 999px;
|
|
962
|
-
background: var(--dpk-paper-inset);
|
|
963
|
-
font-family: var(--dpk-mono);
|
|
964
|
-
font-size: 10px;
|
|
965
|
-
color: var(--dpk-ink-faint);
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
.list {
|
|
969
|
-
list-style: none;
|
|
970
|
-
margin: 0;
|
|
971
|
-
padding: 0;
|
|
972
|
-
display: grid;
|
|
973
|
-
/* One unbroken comment must not widen the column every item shares. */
|
|
974
|
-
grid-template-columns: minmax(0, 1fr);
|
|
975
|
-
gap: 8px;
|
|
976
|
-
align-content: start;
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
.item {
|
|
980
|
-
position: relative;
|
|
981
|
-
display: grid;
|
|
982
|
-
grid-template-columns: minmax(0, 1fr);
|
|
983
|
-
gap: 5px;
|
|
984
|
-
padding: 10px 12px 11px;
|
|
985
|
-
border: 1px solid var(--dpk-rule);
|
|
986
|
-
border-radius: var(--dpk-radius);
|
|
987
|
-
background: var(--dpk-paper-raised);
|
|
988
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
989
|
-
transition:
|
|
990
|
-
box-shadow 160ms var(--dpk-ease),
|
|
991
|
-
border-color 160ms var(--dpk-ease),
|
|
992
|
-
transform 160ms var(--dpk-ease);
|
|
993
|
-
animation: dpk-item-in 200ms var(--dpk-ease) backwards;
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
@keyframes dpk-item-in {
|
|
997
|
-
from {
|
|
998
|
-
opacity: 0;
|
|
999
|
-
transform: translateY(3px);
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
.item:hover {
|
|
1004
|
-
border-color: var(--dpk-rule-hover);
|
|
1005
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
1006
|
-
transform: translateY(-1px);
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
.item[data-tone='comment'] {
|
|
1010
|
-
--tone: var(--dpk-accent);
|
|
1011
|
-
background: linear-gradient(var(--dpk-accent-soft), var(--dpk-accent-soft)), var(--dpk-paper-raised);
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
.item[data-tone='create'] {
|
|
1015
|
-
--tone: var(--dpk-green);
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
.item[data-tone='update'] {
|
|
1019
|
-
--tone: var(--dpk-blue);
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
.item[data-tone='delete'] {
|
|
1023
|
-
--tone: var(--dpk-accent);
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
.item[data-tone='move'] {
|
|
1027
|
-
--tone: var(--dpk-violet);
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
.item[data-stale='true'] {
|
|
1031
|
-
opacity: 0.62;
|
|
1032
|
-
border-style: dashed;
|
|
1033
|
-
box-shadow: none;
|
|
1034
|
-
transform: none;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
.item-head {
|
|
1038
|
-
display: flex;
|
|
1039
|
-
align-items: center;
|
|
1040
|
-
gap: 7px;
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
.item-icon {
|
|
1044
|
-
display: inline-flex;
|
|
1045
|
-
flex: none;
|
|
1046
|
-
align-items: center;
|
|
1047
|
-
justify-content: center;
|
|
1048
|
-
width: 18px;
|
|
1049
|
-
height: 18px;
|
|
1050
|
-
border-radius: var(--dpk-radius-xs);
|
|
1051
|
-
background: color-mix(in srgb, var(--tone, var(--dpk-ink-faint)) 16%, transparent);
|
|
1052
|
-
color: var(--tone, var(--dpk-ink-faint));
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
.item-icon svg {
|
|
1056
|
-
display: block;
|
|
1057
|
-
width: 11px;
|
|
1058
|
-
height: 11px;
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
.item-title {
|
|
1062
|
-
font-size: 12.5px;
|
|
1063
|
-
font-weight: 600;
|
|
1064
|
-
letter-spacing: -0.005em;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
.stale-badge {
|
|
1068
|
-
padding: 1px 7px;
|
|
1069
|
-
border: 1px solid color-mix(in srgb, var(--dpk-amber) 40%, transparent);
|
|
1070
|
-
border-radius: 999px;
|
|
1071
|
-
background: var(--dpk-amber-soft);
|
|
1072
|
-
font-family: var(--dpk-mono);
|
|
1073
|
-
font-size: 9px;
|
|
1074
|
-
letter-spacing: 0.06em;
|
|
1075
|
-
text-transform: uppercase;
|
|
1076
|
-
color: var(--dpk-amber);
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
.item-head .dpk-icon-btn {
|
|
1080
|
-
margin-left: auto;
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
/* Edit and delete sit together at the end of the row. */
|
|
1084
|
-
.item-head .item-edit + .dpk-icon-btn {
|
|
1085
|
-
margin-left: -4px;
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
.item-target {
|
|
1089
|
-
display: inline-flex;
|
|
1090
|
-
align-items: center;
|
|
1091
|
-
width: fit-content;
|
|
1092
|
-
padding: 1px 7px;
|
|
1093
|
-
border-radius: var(--dpk-radius-xs);
|
|
1094
|
-
background: var(--dpk-paper-sunken);
|
|
1095
|
-
font-family: var(--dpk-mono);
|
|
1096
|
-
font-size: 10px;
|
|
1097
|
-
color: var(--dpk-ink-faint);
|
|
1098
|
-
overflow-wrap: anywhere;
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
.item-summary {
|
|
1102
|
-
font-size: 12px;
|
|
1103
|
-
color: var(--dpk-ink-soft);
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
.item-body {
|
|
1107
|
-
margin: 2px 0 0;
|
|
1108
|
-
font-size: 12.5px;
|
|
1109
|
-
white-space: pre-wrap;
|
|
1110
|
-
overflow-wrap: anywhere;
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
.item-editor {
|
|
1114
|
-
display: grid;
|
|
1115
|
-
gap: 8px;
|
|
1116
|
-
margin-top: 2px;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
.item-editor textarea {
|
|
1120
|
-
min-height: 62px;
|
|
1121
|
-
background: var(--dpk-paper-raised);
|
|
1122
|
-
border-radius: var(--dpk-radius);
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
.item-editor-actions {
|
|
1126
|
-
display: flex;
|
|
1127
|
-
justify-content: flex-end;
|
|
1128
|
-
gap: 6px;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
.item-code {
|
|
1132
|
-
margin-top: 2px;
|
|
1133
|
-
padding: 5px 7px;
|
|
1134
|
-
border-radius: var(--dpk-radius-xs);
|
|
1135
|
-
background: var(--dpk-paper-sunken);
|
|
1136
|
-
font-family: var(--dpk-mono);
|
|
1137
|
-
font-size: 10px;
|
|
1138
|
-
color: var(--dpk-ink-faint);
|
|
1139
|
-
overflow-wrap: anywhere;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
.empty {
|
|
1143
|
-
flex: 1;
|
|
1144
|
-
min-height: 0;
|
|
1145
|
-
overflow: auto;
|
|
1146
|
-
padding: 14px 16px calc(14px + var(--dpk-dock-clearance, 0px));
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
.empty-box {
|
|
1150
|
-
display: grid;
|
|
1151
|
-
justify-items: center;
|
|
1152
|
-
gap: 6px;
|
|
1153
|
-
padding: 26px 16px;
|
|
1154
|
-
border: 1px dashed var(--dpk-rule-strong);
|
|
1155
|
-
border-radius: var(--dpk-radius-lg);
|
|
1156
|
-
background: var(--dpk-paper-sunken);
|
|
1157
|
-
text-align: center;
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
.empty-box svg {
|
|
1161
|
-
width: 20px;
|
|
1162
|
-
height: 20px;
|
|
1163
|
-
color: var(--dpk-ink-faint);
|
|
1164
|
-
opacity: 0.7;
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
.empty-box p {
|
|
1168
|
-
margin: 0;
|
|
1169
|
-
font-size: 12px;
|
|
1170
|
-
line-height: 1.6;
|
|
1171
|
-
color: var(--dpk-ink-soft);
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
.empty-box .empty-hint {
|
|
1175
|
-
max-width: 30ch;
|
|
1176
|
-
color: var(--dpk-ink-faint);
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
.issues {
|
|
1180
|
-
margin: 10px 12px 0;
|
|
1181
|
-
padding: 9px 11px 9px 13px;
|
|
1182
|
-
border: 1px solid color-mix(in srgb, var(--dpk-danger) 35%, transparent);
|
|
1183
|
-
border-radius: var(--dpk-radius-sm);
|
|
1184
|
-
background: linear-gradient(90deg, var(--dpk-danger) 0 3px, transparent 3px), var(--dpk-danger-soft);
|
|
1185
|
-
font-size: 11.5px;
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
.issues strong {
|
|
1189
|
-
color: var(--dpk-danger);
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
.issues ul {
|
|
1193
|
-
margin: 4px 0 0;
|
|
1194
|
-
padding-left: 16px;
|
|
1195
|
-
color: var(--dpk-ink-soft);
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
footer {
|
|
1199
|
-
display: flex;
|
|
1200
|
-
flex-wrap: wrap;
|
|
1201
|
-
align-items: center;
|
|
1202
|
-
gap: 8px;
|
|
1203
|
-
padding: 12px 16px;
|
|
1204
|
-
border-top: 1px solid var(--dpk-rule);
|
|
1205
|
-
background: var(--dpk-glass);
|
|
1206
|
-
backdrop-filter: blur(12px);
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
.footer-actions {
|
|
1210
|
-
display: flex;
|
|
1211
|
-
align-items: center;
|
|
1212
|
-
gap: 6px;
|
|
1213
|
-
flex-wrap: wrap;
|
|
1214
|
-
margin-left: auto;
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
.flash {
|
|
1218
|
-
font-family: var(--dpk-mono);
|
|
1219
|
-
font-size: 10px;
|
|
1220
|
-
letter-spacing: 0.04em;
|
|
1221
|
-
color: var(--dpk-green);
|
|
1222
|
-
}
|
|
1223
|
-
`],Ni=(t,e,n)=>{const s=new Map;for(let r=e;r<=n;r++)s.set(t[r],r);return s},Me=it(class extends Lt{constructor(t){if(super(t),t.type!==ke.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,n){let s;n===void 0?n=e:e!==void 0&&(s=e);const r=[],i=[];let o=0;for(const a of t)r[o]=s?s(a,o):o,i[o]=n(a,o),o++;return{values:i,keys:r}}render(t,e,n){return this.dt(t,e,n).values}update(t,[e,n,s]){const r=bl(t),{values:i,keys:o}=this.dt(e,n,s);if(!Array.isArray(r))return this.ut=o,i;const a=this.ut??=[],l=[];let d,c,p=0,u=r.length-1,h=0,f=i.length-1;for(;p<=u&&h<=f;)if(r[p]===null)p++;else if(r[u]===null)u--;else if(a[p]===o[h])l[h]=Ce(r[p],i[h]),p++,h++;else if(a[u]===o[f])l[f]=Ce(r[u],i[f]),u--,f--;else if(a[p]===o[f])l[f]=Ce(r[p],i[f]),ot(t,l[f+1],r[p]),p++,f--;else if(a[u]===o[h])l[h]=Ce(r[u],i[h]),ot(t,r[p],r[u]),u--,h++;else if(d===void 0&&(d=Ni(o,h,f),c=Ni(a,p,u)),d.has(a[p]))if(d.has(a[u])){const g=c.get(o[h]),b=g!==void 0?r[g]:null;if(b===null){const x=ot(t,r[p]);Ce(x,i[h]),l[h]=x}else l[h]=Ce(b,i[h]),ot(t,r[p],b),r[g]=null;h++}else Pn(r[u]),u--;else Pn(r[p]),p++;for(;h<=f;){const g=ot(t,l[f+1]);Ce(g,i[h]),l[h++]=g}for(;p<=u;){const g=r[p++];g!==null&&Pn(g)}return this.ut=o,Ln(t,l),K}});class as extends Pt{}as.directiveName="unsafeSVG",as.resultType=2;const Md=it(as),Di=[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]],ji=[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]],qi=[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]],Bi=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]],Id=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"}]],Nd=[["path",{d:"M20 6 9 17l-5-5"}]],Hi=[["path",{d:"m6 9 6 6 6-6"}]],Dd=[["path",{d:"m15 18-6-6 6-6"}]],jd=[["path",{d:"m9 18 6-6-6-6"}]],Ui=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}],["path",{d:"M12 17h.01"}]],qd=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]],Bd=[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z"}]],Hd=[["circle",{cx:"9",cy:"12",r:"1"}],["circle",{cx:"9",cy:"5",r:"1"}],["circle",{cx:"9",cy:"19",r:"1"}],["circle",{cx:"15",cy:"12",r:"1"}],["circle",{cx:"15",cy:"5",r:"1"}],["circle",{cx:"15",cy:"19",r:"1"}]],Ud=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor"}]],Fd=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]],Wd=[["path",{d:"M15 3h6v6"}],["path",{d:"m21 3-7 7"}],["path",{d:"m3 21 7-7"}],["path",{d:"M9 21H3v-6"}]],Gd=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}],["path",{d:"M7 11h10"}],["path",{d:"M7 15h6"}],["path",{d:"M7 7h8"}]],Vd=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]],Kd=[["path",{d:"m14 10 7-7"}],["path",{d:"M20 10h-6V4"}],["path",{d:"m3 21 7-7"}],["path",{d:"M4 14h6v6"}]],Qd=[["path",{d:"M5 12h14"}]],Zd=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"}]],Yd=[["path",{d:"M12 2v20"}],["path",{d:"m15 19-3 3-3-3"}],["path",{d:"m19 9 3 3-3 3"}],["path",{d:"M2 12h20"}],["path",{d:"m5 9-3 3 3 3"}],["path",{d:"m9 5 3-3 3 3"}]],Jd=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]],Xd=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]],ep=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}],["path",{d:"M12 7v5l4 2"}]],tp=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]],np=[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2"}],["path",{d:"M12 20v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"m17.66 17.66 1.41 1.41"}],["path",{d:"M2 12h2"}],["path",{d:"M20 12h2"}],["path",{d:"m6.34 17.66-1.41 1.41"}],["path",{d:"m19.07 4.93-1.41 1.41"}]],sp=[["path",{d:"M3 9h18"}],["path",{d:"M9 3v18"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}]],rp=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],ip=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],op=t=>t.replaceAll("&","&").replaceAll('"',"""),ap=t=>t.map(([e,n])=>`<${e}${Object.entries(n).map(([s,r])=>` ${s}="${op(String(r))}"`).join("")}></${e}>`).join(""),A=t=>{const e=ap(t);return()=>m`<svg
|
|
1224
|
-
viewBox="0 0 24 24"
|
|
1225
|
-
fill="none"
|
|
1226
|
-
stroke="currentColor"
|
|
1227
|
-
stroke-width="2"
|
|
1228
|
-
stroke-linecap="round"
|
|
1229
|
-
stroke-linejoin="round"
|
|
1230
|
-
aria-hidden="true"
|
|
1231
|
-
focusable="false"
|
|
1232
|
-
>
|
|
1233
|
-
${Md(e)}
|
|
1234
|
-
</svg>`},nn=A(ip),Fi=A(rp),ls=A(Jd),sn=A(Vd),lp=A(Gd),cp=A(ep),dp=A(Ui),pp=A(tp),Wi=A(Fd),hp=A(qd),Gi=A(Nd),Vi=A(Xd),up=A(Qd),fp=A(Hd),Ki=A(Yd),gp=A(Bi),mp=A(Di);A(ji),A(qi);const Qi=A(Dd),mt=A(jd),kp=A(Hi),bp=A(Wd),vp=A(Kd),xp=A(np),yp=A(Zd),Zi=A(Id),wp=A(Ud),$p=A(Bd),Sp=A(sp),Ap=t=>{switch(t){case"comment":return sn();case"create":return Vi();case"update":return ls();case"delete":return Fi();case"move":return Ki();default:return Wi()}},Tp=(t,e,n,s=!1)=>m`
|
|
1235
|
-
${s?k:m`<header><h2>${Cp(t,e.section)}</h2></header>`}
|
|
1236
|
-
${e.issues.length>0?m`<div class="issues" role="alert">
|
|
1237
|
-
<strong>${t.rejected}</strong>
|
|
1238
|
-
<ul>
|
|
1239
|
-
${e.issues.map(r=>m`<li>${r}</li>`)}
|
|
1240
|
-
</ul>
|
|
1241
|
-
</div>`:k}
|
|
1242
|
-
${e.composer?Ep(t,e,n):k} ${Rp(t,e,n)}
|
|
1243
|
-
<footer>
|
|
1244
|
-
${s||e.send==="hidden"?k:m`<button
|
|
1245
|
-
class="dpk-btn dpk-btn--accent"
|
|
1246
|
-
type="button"
|
|
1247
|
-
?disabled=${e.send==="disabled"}
|
|
1248
|
-
@click=${()=>n({kind:"send"})}
|
|
1249
|
-
>
|
|
1250
|
-
${t.sendToClaude}
|
|
1251
|
-
</button>`}
|
|
1252
|
-
<div class="footer-actions">
|
|
1253
|
-
${s?k:m`<button
|
|
1254
|
-
class=${e.send==="hidden"?"dpk-btn dpk-btn--accent":"dpk-btn"}
|
|
1255
|
-
type="button"
|
|
1256
|
-
title=${t.copyTitle}
|
|
1257
|
-
?disabled=${!e.hasDraft}
|
|
1258
|
-
@click=${()=>n({kind:"copy"})}
|
|
1259
|
-
>
|
|
1260
|
-
${t.copy}
|
|
1261
|
-
</button>`}
|
|
1262
|
-
<button
|
|
1263
|
-
class="dpk-btn dpk-btn--ghost"
|
|
1264
|
-
type="button"
|
|
1265
|
-
?disabled=${!e.hasDraft}
|
|
1266
|
-
@click=${()=>n({kind:"clear"})}
|
|
1267
|
-
>
|
|
1268
|
-
${t.clear}
|
|
1269
|
-
</button>
|
|
1270
|
-
</div>
|
|
1271
|
-
${e.flash?m`<span class="flash" role="status">${e.flash}</span>`:k}
|
|
1272
|
-
</footer>
|
|
1273
|
-
`,Cp=(t,e)=>e==="changes"?t.changesHeading:e==="comments"?t.commentsHeading:t.heading,Ep=(t,e,n)=>m`
|
|
1274
|
-
<div class="composer">
|
|
1275
|
-
<textarea
|
|
1276
|
-
class="dpk-textarea"
|
|
1277
|
-
aria-label=${t.commentLabel}
|
|
1278
|
-
placeholder=${t.commentPlaceholder}
|
|
1279
|
-
.value=${e.body}
|
|
1280
|
-
@input=${s=>{s.currentTarget instanceof HTMLTextAreaElement&&n({kind:"input",body:s.currentTarget.value})}}
|
|
1281
|
-
@keydown=${s=>{!s.isComposing&&s.key==="Enter"&&(s.metaKey||s.ctrlKey)&&(s.preventDefault(),n({kind:"submit"}))}}
|
|
1282
|
-
></textarea>
|
|
1283
|
-
${e.attachment.kind==="explicit"?m`<div class="row">
|
|
1284
|
-
<button class="chip" type="button" aria-label=${t.detach} @click=${()=>n({kind:"clear-target"})}>
|
|
1285
|
-
${e.target.label} ${nn()}
|
|
1286
|
-
</button>
|
|
1287
|
-
</div>`:e.attachment.kind==="checkbox"?m`<div class="row">
|
|
1288
|
-
<label class="attach">
|
|
1289
|
-
<input
|
|
1290
|
-
type="checkbox"
|
|
1291
|
-
.checked=${e.attachment.checked}
|
|
1292
|
-
@change=${s=>{s.currentTarget instanceof HTMLInputElement&&n({kind:"attach",current:s.currentTarget.checked})}}
|
|
1293
|
-
/>
|
|
1294
|
-
<span>${t.attachTo(e.attachment.group)}</span>
|
|
1295
|
-
</label>
|
|
1296
|
-
</div>`:k}
|
|
1297
|
-
<div class="row">
|
|
1298
|
-
<span class="target-line">→ ${e.target.label}</span>
|
|
1299
|
-
<button
|
|
1300
|
-
class="dpk-btn dpk-btn--accent"
|
|
1301
|
-
type="button"
|
|
1302
|
-
?disabled=${!e.canSubmit}
|
|
1303
|
-
@click=${()=>n({kind:"submit"})}
|
|
1304
|
-
>
|
|
1305
|
-
${t.addNote}
|
|
1306
|
-
</button>
|
|
1307
|
-
</div>
|
|
1308
|
-
</div>
|
|
1309
|
-
`,cs=(t,e)=>m`<div class="empty">
|
|
1310
|
-
<div class="empty-box">
|
|
1311
|
-
${sn()}
|
|
1312
|
-
<p>${t}</p>
|
|
1313
|
-
<p class="empty-hint">${e}</p>
|
|
1314
|
-
</div>
|
|
1315
|
-
</div>`,Yi=(t,e,n)=>m`<ul
|
|
1316
|
-
class="list"
|
|
1317
|
-
>
|
|
1318
|
-
${Me(e,s=>s.id,s=>_p(t,s,n))}
|
|
1319
|
-
</ul>`,Rp=(t,e,n)=>{const[s]=e.groups;return e.groups.length===1&&s?s.items.length>0?m`<div class="groups">${Yi(t,s.items,n)}</div>`:s.kind==="changes"?cs(t.emptyChanges,t.emptyChangesHint):cs(t.emptyComments,t.emptyCommentsHint):e.groups.every(r=>r.items.length===0)?cs(t.empty,t.emptyHint):m`<div class="groups">
|
|
1320
|
-
${e.groups.filter(r=>r.items.length>0).map(r=>m`<section class="group" data-kind=${r.kind}>
|
|
1321
|
-
<h3 class="group-head">
|
|
1322
|
-
${r.kind==="changes"?t.changesHeading:t.commentsHeading}
|
|
1323
|
-
<span class="group-count">${r.items.length}</span>
|
|
1324
|
-
</h3>
|
|
1325
|
-
${Yi(t,r.items,n)}
|
|
1326
|
-
</section>`)}
|
|
1327
|
-
</div>`},_p=(t,e,n)=>m`
|
|
1328
|
-
<li class="item" data-tone=${e.tone} data-stale=${String(e.stale!==null)} data-id=${e.id}>
|
|
1329
|
-
<div class="item-head">
|
|
1330
|
-
<span class="item-icon">${Ap(e.tone)}</span>
|
|
1331
|
-
<span class="item-title">${e.title}</span>
|
|
1332
|
-
${e.stale?m`<span class="stale-badge">${e.stale}</span>`:k}
|
|
1333
|
-
${e.edit.kind==="available"?m`<button
|
|
1334
|
-
class="dpk-icon-btn item-edit"
|
|
1335
|
-
type="button"
|
|
1336
|
-
aria-label=${t.editComment}
|
|
1337
|
-
title=${t.editComment}
|
|
1338
|
-
@click=${()=>n({kind:"edit-start",id:e.id,body:e.text.body})}
|
|
1339
|
-
>
|
|
1340
|
-
${ls()}
|
|
1341
|
-
</button>`:k}
|
|
1342
|
-
<button
|
|
1343
|
-
class="dpk-icon-btn"
|
|
1344
|
-
type="button"
|
|
1345
|
-
aria-label=${t.deleteAction}
|
|
1346
|
-
@click=${()=>n({kind:"delete",id:e.id})}
|
|
1347
|
-
>
|
|
1348
|
-
${nn()}
|
|
1349
|
-
</button>
|
|
1350
|
-
</div>
|
|
1351
|
-
<div class="item-target">${e.targetLabel}</div>
|
|
1352
|
-
${e.edit.kind==="editing"?Op(t,e.edit,n):e.text.kind==="comment"?m`<p class="item-body">${e.text.body}</p>`:e.text.body?m`<div class="item-summary">${e.text.body}</div>`:k}
|
|
1353
|
-
${e.code===null?k:m`<code class="item-code">${e.code}</code>`}
|
|
1354
|
-
</li>
|
|
1355
|
-
`,Op=(t,e,n)=>m`
|
|
1356
|
-
<div class="item-editor">
|
|
1357
|
-
<textarea
|
|
1358
|
-
class="dpk-textarea"
|
|
1359
|
-
aria-label=${t.editLabel}
|
|
1360
|
-
title=${t.editHint}
|
|
1361
|
-
.value=${e.body}
|
|
1362
|
-
@input=${s=>{s.currentTarget instanceof HTMLTextAreaElement&&n({kind:"edit-input",body:s.currentTarget.value})}}
|
|
1363
|
-
@keydown=${s=>{s.isComposing||(s.key==="Enter"&&(s.metaKey||s.ctrlKey)?(s.preventDefault(),n({kind:"edit-save"})):s.key==="Escape"&&(s.preventDefault(),s.stopPropagation(),n({kind:"edit-cancel"})))}}
|
|
1364
|
-
></textarea>
|
|
1365
|
-
<div class="row item-editor-actions">
|
|
1366
|
-
<button
|
|
1367
|
-
class="dpk-btn dpk-btn--ghost"
|
|
1368
|
-
type="button"
|
|
1369
|
-
data-dpk-text-discard
|
|
1370
|
-
@click=${()=>n({kind:"edit-cancel"})}
|
|
1371
|
-
>
|
|
1372
|
-
${t.cancelEdit}
|
|
1373
|
-
</button>
|
|
1374
|
-
<button
|
|
1375
|
-
class="dpk-btn dpk-btn--accent"
|
|
1376
|
-
type="button"
|
|
1377
|
-
?disabled=${!e.canSave}
|
|
1378
|
-
@click=${()=>n({kind:"edit-save"})}
|
|
1379
|
-
>
|
|
1380
|
-
${t.saveEdit}
|
|
1381
|
-
</button>
|
|
1382
|
-
</div>
|
|
1383
|
-
</div>
|
|
1384
|
-
`,Lp=t=>t==="changes"||t==="comments"?t:"all";class Ji extends me{static{this.styles=zd}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},section:{type:String}}}#e=yd();#t=null;#n=new Nn(this);constructor(){super(),this.embedded=!1,this.definition=null,this.state=void 0,this.navigation={},this.derivation=null,this.issues=[],this.pendingTarget=null,this.section=null}willUpdate(e){e.has("pendingTarget")&&this.pendingTarget&&(this.#e=Li(this.#e,{kind:"target-requested",ref:this.pendingTarget}))}updated(e){e.has("pendingTarget")&&this.pendingTarget&&this.isConnected&&this.renderRoot.querySelector("textarea")?.focus();const n=this.#t;n&&(this.#t=null,[...this.renderRoot.querySelectorAll(".item")].find(r=>r.dataset.id===n.id)?.querySelector(n.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,section:Lp(this.section)}}render(){const e=this.#r();return e?Tp(_i(this.#n.locale),Ii(e,this.#e),this.#i,this.embedded):k}#s(e){this.#e=Li(this.#e,e),this.requestUpdate()}#i=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.#t={kind:"editor",id:e.id},this.#s(e);return;case"edit-cancel":{const n=this.#e.editing;n&&(this.#t={kind:"edit-button",id:n.id}),this.#s(e);return}case"edit-save":{const n=$d(this.#e);if(!n||!this.onEditComment||!this.onEditComment(n.id,n.body).ok)return;this.#t={kind:"edit-button",id:n.id},this.#s({kind:"edited"});return}case"submit":{const n=this.#r();if(!n||!this.onComment)return;const s=wd(this.#e,Ii(n,this.#e).target.ref);if(!s||!this.onComment(s.target,s.body).ok)return;this.#s({kind:"submitted"});return}default:this.#s(e)}};async#o(){const e=this.sendToClaude;if(!e||this.#e.send.kind==="pending")return;this.#s({kind:"send-started"});const n=this.#e.sendRequest,s=await e().catch(()=>({ok:!1,reason:"error"}));this.isConnected&&this.#s({kind:"send-finished",request:n,outcome:s})}async#a(){const e=this.#r();if(!e)return;this.#s({kind:"copy-started"});const n=this.#e.copyRequest;try{const s=this.exportBrief?.()??tn({...e.derivation,navigation:e.navigation,issues:e.issues},e.definition,X),r=await os(s);this.isConnected&&this.#s({kind:"copy-finished",request:n,ok:r})}catch{this.isConnected&&this.#s({kind:"copy-finished",request:n,ok:!1})}}}const Pp=()=>{customElements.get("dpk-component-comment-panel")||customElements.define("dpk-component-comment-panel",Ji)},Ze=Math.min,le=Math.max,rn=Math.round,on=Math.floor,ce=t=>({x:t,y:t}),zp={left:"right",right:"left",bottom:"top",top:"bottom"};function Mp(t,e,n){return le(t,Ze(e,n))}function kt(t,e){return typeof t=="function"?t(e):t}function Ie(t){return t.split("-")[0]}function bt(t){return t.split("-")[1]}function Xi(t){return t==="x"?"y":"x"}function eo(t){return t==="y"?"height":"width"}function de(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function to(t){return Xi(de(t))}function Ip(t,e,n){n===void 0&&(n=!1);const s=bt(t),r=to(t),i=eo(r);let o=r==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=an(o)),[o,an(o)]}function Np(t){const e=an(t);return[ds(t),e,ds(e)]}function ds(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const no=["left","right"],so=["right","left"],Dp=["top","bottom"],jp=["bottom","top"];function qp(t,e,n){switch(t){case"top":case"bottom":return n?e?so:no:e?no:so;case"left":case"right":return e?Dp:jp;default:return[]}}function Bp(t,e,n,s){const r=bt(t);let i=qp(Ie(t),n==="start",s);return r&&(i=i.map(o=>o+"-"+r),e&&(i=i.concat(i.map(ds)))),i}function an(t){const e=Ie(t);return zp[e]+t.slice(e.length)}function Hp(t){var e,n,s,r;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(s=t.bottom)!=null?s:0,left:(r=t.left)!=null?r:0}}function Up(t){return typeof t!="number"?Hp(t):{top:t,right:t,bottom:t,left:t}}function ln(t){const{x:e,y:n,width:s,height:r}=t;return{width:s,height:r,top:n,left:e,right:e+s,bottom:n+r,x:e,y:n}}function ro(t,e,n){let{reference:s,floating:r}=t;const i=de(e),o=to(e),a=eo(o),l=Ie(e),d=i==="y",c=s.x+s.width/2-r.width/2,p=s.y+s.height/2-r.height/2,u=s[a]/2-r[a]/2;let h;switch(l){case"top":h={x:c,y:s.y-r.height};break;case"bottom":h={x:c,y:s.y+s.height};break;case"right":h={x:s.x+s.width,y:p};break;case"left":h={x:s.x-r.width,y:p};break;default:h={x:s.x,y:s.y}}const f=bt(e);return f&&(h[o]+=u*(f==="end"?1:-1)*(n&&d?-1:1)),h}async function Fp(t,e){var n;e===void 0&&(e={});const{x:s,y:r,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:u=!1,padding:h=0}=kt(e,t),f=Up(h),b=a[u?p==="floating"?"reference":"floating":p],x=ln(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),S=p==="floating"?{x:s,y:r,width:o.floating.width,height:o.floating.height}:o.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(T))&&await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1},H=ln(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:T,strategy:l}):S);return{top:(x.top-H.top+f.top)/_.y,bottom:(H.bottom-x.bottom+f.bottom)/_.y,left:(x.left-H.left+f.left)/_.x,right:(H.right-x.right+f.right)/_.x}}const Wp=50,Gp=async(t,e,n)=>{const{placement:s="bottom",strategy:r="absolute",middleware:i=[],platform:o}=n,a=o.detectOverflow?o:{...o,detectOverflow:Fp},l=await(o.isRTL==null?void 0:o.isRTL(e));let d=await o.getElementRects({reference:t,floating:e,strategy:r}),{x:c,y:p}=ro(d,s,l),u=s,h=0;const f={};for(let g=0;g<i.length;g++){const b=i[g];if(!b)continue;const{name:x,fn:S}=b,{x:T,y:_,data:H,reset:P}=await S({x:c,y:p,initialPlacement:s,placement:u,strategy:r,middlewareData:f,rects:d,platform:a,elements:{reference:t,floating:e}});c=T??c,p=_??p,f[x]={...f[x],...H},P&&h<Wp&&(h++,typeof P=="object"&&(P.placement&&(u=P.placement),P.rects&&(d=P.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:r}):P.rects),{x:c,y:p}=ro(d,u,l)),g=-1)}return{x:c,y:p,placement:u,strategy:r,middlewareData:f}},Vp=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,s;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:d}=e,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...b}=kt(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Ie(r),S=de(a),T=Ie(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(d.floating)),H=u||(T||!g?[an(a)]:Np(a)),P=f!=="none";!u&&P&&H.push(...Bp(a,g,f,_));const V=[a,...H],q=await l.detectOverflow(e,b),re=[];let ee=((s=i.flip)==null?void 0:s.overflows)||[];if(c&&re.push(q[x]),p){const we=Ip(r,o,_);re.push(q[we[0]],q[we[1]])}if(ee=[...ee,{placement:r,overflows:re}],!re.every(we=>we<=0)){var Zs,Ys;const we=(((Zs=i.flip)==null?void 0:Zs.index)||0)+1,$n=V[we];if($n&&(!(p==="alignment"?S!==de($n):!1)||ee.every(Z=>de(Z.placement)===S?Z.overflows[0]>0:!0)))return{data:{index:we,overflows:ee},reset:{placement:$n}};let et=(Ys=ee.filter($e=>$e.overflows[0]<=0).sort(($e,Z)=>$e.overflows[1]-Z.overflows[1])[0])==null?void 0:Ys.placement;if(!et)switch(h){case"bestFit":{var Js;const $e=(Js=ee.filter(Z=>{if(P){const ue=de(Z.placement);return ue===S||ue==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(ue=>ue>0).reduce((ue,Ga)=>ue+Ga,0)]).sort((Z,ue)=>Z[1]-ue[1])[0])==null?void 0:Js[0];$e&&(et=$e);break}case"initialPlacement":et=a;break}if(r!==et)return{reset:{placement:et}}}return{}}}},Kp=new Set(["left","top"]);async function Qp(t,e){const{placement:n,platform:s,elements:r}=t,i=await(s.isRTL==null?void 0:s.isRTL(r.floating)),o=Ie(n),a=bt(n),l=de(n)==="y",d=Kp.has(o)?-1:1,c=i&&l?-1:1,p=kt(e,t);let{mainAxis:u,crossAxis:h,alignmentAxis:f}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof f=="number"&&(h=a==="end"?f*-1:f),l?{x:h*c,y:u*d}:{x:u*d,y:h*c}}const Zp=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,s;const{x:r,y:i,placement:o,middlewareData:a}=e,l=await Qp(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(s=a.arrow)!=null&&s.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:o}}}}},Yp=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:s,placement:r,platform:i}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:S=>{let{x:T,y:_}=S;return{x:T,y:_}}},...d}=kt(t,e),c={x:n,y:s},p=await i.detectOverflow(e,d),u=de(r),h=Xi(u);let f=c[h],g=c[u];const b=(S,T)=>Mp(T+p[S==="y"?"top":"left"],T,T-p[S==="y"?"bottom":"right"]);o&&(f=b(h,f)),a&&(g=b(u,g));const x=l.fn({...e,[h]:f,[u]:g});return{...x,data:{x:x.x-n,y:x.y-s,enabled:{[h]:o,[u]:a}}}}}},Jp=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:s,platform:r,elements:i}=e,{apply:o=()=>{},...a}=kt(t,e),l=await r.detectOverflow(e,a),d=Ie(n),c=bt(n),p=de(n)==="y",{width:u,height:h}=s.floating;let f,g;d==="top"||d==="bottom"?(f=d,g=c===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(g=d,f=c==="end"?"top":"bottom");const b=h-l.top-l.bottom,x=u-l.left-l.right,S=Ze(h-l[f],b),T=Ze(u-l[g],x),_=e.middlewareData.shift,H=!_;let P=S,V=T;_!=null&&_.enabled.x&&(V=x),_!=null&&_.enabled.y&&(P=b),H&&!c&&(p?V=u-2*le(l.left,l.right):P=h-2*le(l.top,l.bottom)),await o({...e,availableWidth:V,availableHeight:P});const q=await r.getDimensions(i.floating);return u!==q.width||h!==q.height?{reset:{rects:!0}}:{}}}};function cn(){return typeof window<"u"}function Ye(t){return io(t)?(t.nodeName||"").toLowerCase():"#document"}function F(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pe(t){var e;return(e=(io(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function io(t){return cn()?t instanceof Node||t instanceof F(t).Node:!1}function ne(t){return cn()?t instanceof Element||t instanceof F(t).Element:!1}function xe(t){return cn()?t instanceof HTMLElement||t instanceof F(t).HTMLElement:!1}function oo(t){return!cn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof F(t).ShadowRoot}function dn(t){const{overflow:e,overflowX:n,overflowY:s,display:r}=se(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&r!=="inline"&&r!=="contents"}function Xp(t){return/^(table|td|th)$/.test(Ye(t))}function pn(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const eh=/transform|translate|scale|rotate|perspective|filter/,th=/paint|layout|strict|content/,Ne=t=>!!t&&t!=="none";let ps;function hs(t){const e=ne(t)?se(t):t;return Ne(e.transform)||Ne(e.translate)||Ne(e.scale)||Ne(e.rotate)||Ne(e.perspective)||!us()&&(Ne(e.backdropFilter)||Ne(e.filter))||eh.test(e.willChange||"")||th.test(e.contain||"")}function nh(t){let e=De(t);for(;xe(e)&&!vt(e);){if(hs(e))return e;if(pn(e))return null;e=De(e)}return null}function us(){return ps==null&&(ps=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ps}function vt(t){return/^(html|body|#document)$/.test(Ye(t))}function se(t){return F(t).getComputedStyle(t)}function hn(t){return ne(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function De(t){if(Ye(t)==="html")return t;const e=t.assignedSlot||t.parentNode||oo(t)&&t.host||pe(t);return oo(e)?e.host:e}function ao(t){const e=De(t);return vt(e)?(t.ownerDocument||t).body:xe(e)&&dn(e)?e:ao(e)}function xt(t,e,n){var s;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=ao(t),i=r===((s=t.ownerDocument)==null?void 0:s.body),o=F(r);if(i){const a=fs(o);return e.concat(o,o.visualViewport||[],dn(r)?r:[],a&&n?xt(a):[])}else return e.concat(r,xt(r,[],n))}function fs(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function lo(t){const e=se(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const r=xe(t),i=r?t.offsetWidth:n,o=r?t.offsetHeight:s,a=rn(n)!==i||rn(s)!==o;return a&&(n=i,s=o),{width:n,height:s,$:a}}function gs(t){return ne(t)?t:t.contextElement}function Je(t){const e=gs(t);if(!xe(e))return ce(1);const n=e.getBoundingClientRect(),{width:s,height:r,$:i}=lo(e);let o=(i?rn(n.width):n.width)/s,a=(i?rn(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const sh=ce(0);function co(t){const e=F(t);return!us()||!e.visualViewport?sh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function rh(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===F(t)}function je(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=gs(t);let o=ce(1);e&&(s?ne(s)&&(o=Je(s)):o=Je(t));const a=rh(i,n,s)?co(i):ce(0);let l=(r.left+a.x)/o.x,d=(r.top+a.y)/o.y,c=r.width/o.x,p=r.height/o.y;if(i&&s){const u=F(i),h=ne(s)?F(s):s;let f=u,g=fs(f);for(;g&&h!==f;){const b=Je(g),x=g.getBoundingClientRect(),S=se(g),T=x.left+(g.clientLeft+parseFloat(S.paddingLeft))*b.x,_=x.top+(g.clientTop+parseFloat(S.paddingTop))*b.y;l*=b.x,d*=b.y,c*=b.x,p*=b.y,l+=T,d+=_,f=F(g),g=fs(f)}}return ln({width:c,height:p,x:l,y:d})}function un(t,e){const n=hn(t).scrollLeft;return e?e.left+n:je(pe(t)).left+n}function po(t,e){const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-un(t,n),r=n.top+e.scrollTop;return{x:s,y:r}}function ih(t){let{elements:e,rect:n,offsetParent:s,strategy:r}=t;const i=r==="fixed",o=pe(s),a=e?pn(e.floating):!1;if(s===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},d=ce(1);const c=ce(0),p=xe(s);if((p||!i)&&((Ye(s)!=="body"||dn(o))&&(l=hn(s)),p)){const h=je(s);d=Je(s),c.x=h.x+s.clientLeft,c.y=h.y+s.clientTop}const u=o&&!p&&!i?po(o,l):ce(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+c.x+u.x,y:n.y*d.y-l.scrollTop*d.y+c.y+u.y}}function oh(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function ah(t){const e=hn(t),n=t.ownerDocument.body,s=le(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=le(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+un(t);const o=-e.scrollTop;return se(n).direction==="rtl"&&(i+=le(t.clientWidth,n.clientWidth)-s),{width:s,height:r,x:i,y:o}}const lh=25;function ch(t,e,n){n===void 0&&(n="viewport");const s=n==="layoutViewport",r=F(t),i=pe(t),o=r.visualViewport;let a=i.clientWidth,l=i.clientHeight,d=0,c=0;if(o){const u=!us()||e==="fixed";s?u||(d=-o.offsetLeft,c=-o.offsetTop):(a=o.width,l=o.height,u&&(d=o.offsetLeft,c=o.offsetTop))}if(un(i)<=0){const u=i.ownerDocument,h=u.body,f=getComputedStyle(h),g=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,b=Math.abs(i.clientWidth-h.clientWidth-g),x=getComputedStyle(i).scrollbarGutter==="stable both-edges"?b/2:b;x<=lh&&(a-=x)}return{width:a,height:l,x:d,y:c}}function dh(t,e){const n=je(t,!0,e==="fixed"),s=n.top+t.clientTop,r=n.left+t.clientLeft,i=Je(t),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=r*i.x,d=s*i.y;return{width:o,height:a,x:l,y:d}}function ho(t,e,n){let s;if(e==="viewport"||e==="layoutViewport")s=ch(t,n,e);else if(e==="document")s=ah(pe(t));else if(ne(e))s=dh(e,n);else{const r=co(t);s={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ln(s)}function ph(t,e){const n=e.get(t);if(n)return n;let s=xt(t,[],!1).filter(a=>ne(a)&&Ye(a)!=="body"),r=null;const i=se(t).position==="fixed";let o=i?De(t):t;for(;ne(o)&&!vt(o);){const a=se(o),l=hs(o),d=r?r.position:i?"fixed":"";!l&&(d==="fixed"||d==="absolute"&&a.position==="static")?s=s.filter(p=>p!==o):r=a,o=De(o)}return e.set(t,s),s}function hh(t){let{element:e,boundary:n,rootBoundary:s,strategy:r}=t;const o=[...n==="clippingAncestors"?pn(e)?[]:ph(e,this._c):[].concat(n),s],a=ho(e,o[0],r);let l=a.top,d=a.right,c=a.bottom,p=a.left;for(let u=1;u<o.length;u++){const h=ho(e,o[u],r);l=le(h.top,l),d=Ze(h.right,d),c=Ze(h.bottom,c),p=le(h.left,p)}return{width:d-p,height:c-l,x:p,y:l}}function uh(t){const{width:e,height:n}=lo(t);return{width:e,height:n}}function fh(t,e,n){const s=xe(e),r=pe(e),i=n==="fixed",o=je(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=ce(0);if((s||!i)&&((Ye(e)!=="body"||dn(r))&&(a=hn(e)),s)){const u=je(e,!0,i,e);l.x=u.x+e.clientLeft,l.y=u.y+e.clientTop}!s&&r&&(l.x=un(r));const d=r&&!s&&!i?po(r,a):ce(0),c=o.left+a.scrollLeft-l.x-d.x,p=o.top+a.scrollTop-l.y-d.y;return{x:c,y:p,width:o.width,height:o.height}}function ms(t){return se(t).position==="static"}function uo(t,e){if(!xe(t)||se(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return pe(t)===n&&(n=n.ownerDocument.body),n}function fo(t,e){const n=F(t);if(pn(t))return n;if(!xe(t)){let r=De(t);for(;r&&!vt(r);){if(ne(r)&&!ms(r))return r;r=De(r)}return n}let s=uo(t,e);for(;s&&Xp(s)&&ms(s);)s=uo(s,e);return s&&vt(s)&&ms(s)&&!hs(s)?n:s||nh(t)||n}const gh=async function(t){const e=this.getOffsetParent||fo,n=this.getDimensions,s=await n(t.floating);return{reference:fh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function mh(t){return se(t).direction==="rtl"}const kh={convertOffsetParentRelativeRectToViewportRelativeRect:ih,getDocumentElement:pe,getClippingRect:hh,getOffsetParent:fo,getElementRects:gh,getClientRects:oh,getDimensions:uh,getScale:Je,isElement:ne,isRTL:mh};function go(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function bh(t,e,n){let s=null,r;const i=pe(t);function o(){var c;clearTimeout(r),(c=s)==null||c.disconnect(),s=null}function a(c,p){c===void 0&&(c=!1),p===void 0&&(p=1),o();const u=t.getBoundingClientRect(),{left:h,top:f,width:g,height:b}=u;if(c||e(),!g||!b)return;const x=on(f),S=on(i.clientWidth-(h+g)),T=on(i.clientHeight-(f+b)),_=on(h),P={rootMargin:-x+"px "+-S+"px "+-T+"px "+-_+"px",threshold:le(0,Ze(1,p))||1};let V=!0;function q(re){const ee=re[0].intersectionRatio;if(!go(u,t.getBoundingClientRect()))return a();if(ee!==p){if(!V)return a();ee?a(!1,ee):r=setTimeout(()=>{a(!1,1e-7)},1e3)}V=!1}try{s=new IntersectionObserver(q,{...P,root:i.ownerDocument})}catch{s=new IntersectionObserver(q,P)}s.observe(t)}const l=F(t),d=()=>a(n);return l.addEventListener("resize",d),a(!0),()=>{l.removeEventListener("resize",d),o()}}function vh(t,e,n,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,d=gs(t),c=r||i?[...d?xt(d):[],...e?xt(e):[]]:[];c.forEach(x=>{r&&x.addEventListener("scroll",n),i&&x.addEventListener("resize",n)});const p=d&&a?bh(d,n,i):null;let u=-1,h=null;o&&(h=new ResizeObserver(x=>{let[S]=x;S&&S.target===d&&h&&e&&(h.unobserve(e),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var T;(T=h)==null||T.observe(e)})),n()}),d&&!l&&h.observe(d),e&&h.observe(e));let f,g=l?je(t):null;l&&b();function b(){const x=je(t);g&&!go(g,x)&&n(),g=x,f=requestAnimationFrame(b)}return n(),()=>{var x;c.forEach(S=>{r&&S.removeEventListener("scroll",n),i&&S.removeEventListener("resize",n)}),p?.(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const xh=Zp,yh=Yp,wh=Vp,$h=Jp,Sh=(t,e,n)=>{const s=new Map,r=n??{},i={...kh,...r.platform,_c:s};return Gp(t,e,{...r,platform:i})},Ah=(t,e)=>({top:e,bottom:e,right:t}),mo=(t,e,n,s={})=>{if(typeof t.showPopover!="function")return()=>{};try{t.showPopover()}catch{return()=>{}}let r=!0,i=0;const o=e instanceof Element?e:{getBoundingClientRect:()=>({x:e.right,y:e.top,left:e.right,right:e.right,top:e.top,bottom:e.bottom,width:0,height:e.bottom-e.top})};t.style.width=`${n.width}px`,t.style.maxHeight=`${n.height}px`;const l=vh(o,t,()=>{const d=++i;Sh(o,t,{strategy:"fixed",placement:s.placement??"bottom-end",middleware:[xh(8),wh({padding:8,fallbackAxisSideDirection:"end"}),yh({padding:8}),$h({padding:8,apply:({availableWidth:c,availableHeight:p})=>{!r||d!==i||(t.style.width=`${Math.max(0,Math.min(n.width,c))}px`,t.style.maxHeight=`${Math.max(0,Math.min(n.height,p))}px`)}})]}).then(({x:c,y:p})=>{!r||d!==i||!t.isConnected||(t.style.left=`${c}px`,t.style.top=`${p}px`)}).catch(()=>{})},{animationFrame:s.trackTransform??!1,elementResize:typeof ResizeObserver<"u",layoutShift:typeof IntersectionObserver<"u"});return()=>{r=!1,l()}},ko=t=>{if(!(!t||typeof t.hidePopover!="function"))try{t.hidePopover()}catch{}};class bo{#e;#t=new Map;constructor(e){this.#e=e,e.addController(this)}hostConnected(){this.#e.requestUpdate()}hostUpdated(){for(const[e,n]of this.#t)e.isConnected||(n(),this.#t.delete(e))}hostDisconnected(){for(const e of this.#t.values())e();this.#t.clear()}open(e,n,s,r){this.#t.get(e)?.(),this.#t.set(e,mo(e,n,s,r))}}function ks(t,e,n){return n==null?Math.min(t,e):Math.min(Math.max(t,e),n)}class vo{#e;constructor(e,n){this.#e=n,e.addController(this)}hostConnected(){document.addEventListener("pointerdown",this.#t,!0),document.addEventListener("keydown",this.#n)}hostDisconnected(){document.removeEventListener("pointerdown",this.#t,!0),document.removeEventListener("keydown",this.#n)}#t=e=>{e.button!==0||!this.#e.open()||this.#e.closesOn(e.composedPath())&&this.#e.dismiss()};#n=e=>{e.key!=="Escape"||e.isComposing||e.defaultPrevented||!this.#e.open()||this.#e.ownsEscape(e.composedPath())&&(e.preventDefault(),this.#e.dismiss())}}const xo=(t,e,n)=>n.top<e.top?t+n.top-e.top:n.bottom<=e.bottom?t:t+Math.min(n.bottom-e.bottom,n.top-e.top),yo=(t,e,n)=>{const s=Math.min(n,e/4);return{top:t+s,bottom:t+e-s}},bs=(t,e,n=0)=>{const s=t.getBoundingClientRect();t.scrollTop=xo(t.scrollTop,yo(s.top+t.clientTop,t.clientHeight,n),e.getBoundingClientRect())},wo=(t,e,n=0)=>{const s=t.getBoundingClientRect(),r=e.getBoundingClientRect();t.scrollLeft=xo(t.scrollLeft,yo(s.left+t.clientLeft,t.clientWidth,n),{top:r.left,bottom:r.right})},$o=(t,e,n)=>{typeof window>"u"||Object.assign(window,{devProcessKit:{version:t,templates:e,versionParam:n}})},yt="dpk-version",So="version",Th=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,fn=t=>Th.test(t),Ch="https://cdn.jsdelivr.net/npm/dev-process-kit@",Ao="https://data.jsdelivr.com/v1/packages/npm/dev-process-kit",vs=t=>{const e=new URLSearchParams(t),n=e.get(yt)??e.get(So);return n!==null&&fn(n)?n:null},Eh=(t,e)=>{const n=vs(t);return n===null||n===e?null:n},Rh=(t,e)=>{if(!fn(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`${Ch}${t}/dist/${e}`},_h=(t,e)=>{const n=new URL(t);return n.searchParams.delete(So),e===null?n.searchParams.delete(yt):n.searchParams.set(yt,e),n.href},Oh=O({tags:D(Ge(v(),ve()),{}),versions:j(O({version:v()}))}),Lh=t=>{const e=Gt(Oh,t),n=e.tags.latest;return{latest:typeof n=="string"&&fn(n)?n:null,versions:e.versions.map(s=>s.version).filter(fn)}},To=t=>{const e=t.published?.versions??[],n=e.includes(t.current)?e:[t.current,...e],s=t.published?.latest??null;return{value:t.current,options:[...t.requested?[{value:"",label:t.text.pinned}]:[],...n.map(r=>({value:r,label:r===s&&r!==t.current?t.text.latest(r):r}))]}};let gn;const Co=()=>(gn??=fetch(Ao).then(async t=>{if(!t.ok)throw new Error(`${Ao} answered ${t.status}`);return Lh(await t.json())}),gn.catch(()=>{gn=void 0}),gn),Eo=t=>{location.assign(_h(location.href,t))},Ph=t=>import(t),zh=({entry:t,templates:e,register:n,importModule:s=Ph})=>{const r=()=>{n(),$o(X,e,yt)},i=typeof location>"u"?null:Eh(location.search,X);if(i===null){r();return}s(Rh(i,t)).then(()=>{Mh()||Nh(i)},o=>{console.error(`dev-process-kit@${i} could not be loaded; running ${X}`,o),r()})},Mh=()=>{const t=Reflect.get(window,"devProcessKit");return typeof t=="object"&&t!==null&&"versionParam"in t},xs="dpk-version-fallback",Ih=`
|
|
1385
|
-
.${xs} {
|
|
1386
|
-
flex: none;
|
|
1387
|
-
height: 24px;
|
|
1388
|
-
margin-left: auto;
|
|
1389
|
-
padding: 0 22px 0 10px;
|
|
1390
|
-
border: 1px solid var(--dpk-rule, #8884);
|
|
1391
|
-
border-radius: 999px;
|
|
1392
|
-
background: var(--dpk-paper-sunken, transparent)
|
|
1393
|
-
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>")
|
|
1394
|
-
no-repeat right 8px center;
|
|
1395
|
-
appearance: none;
|
|
1396
|
-
field-sizing: content;
|
|
1397
|
-
color: var(--dpk-ink-soft, inherit);
|
|
1398
|
-
font-family: var(--dpk-mono, ui-monospace, monospace);
|
|
1399
|
-
font-size: 10px;
|
|
1400
|
-
letter-spacing: 0.02em;
|
|
1401
|
-
cursor: pointer;
|
|
1402
|
-
}
|
|
1403
|
-
`,Nh=t=>{const e=[...document.body.querySelectorAll("*")].filter(n=>n.localName.startsWith("dpk-template-")&&!n.querySelector(`:scope > .${xs}`));if(e.length!==0){document.head.append(Object.assign(document.createElement("style"),{textContent:Ih}));for(const n of e)n.append(Dh(n,t))}},Dh=(t,e)=>{const n=L(Mt(zt(t))),s=document.createElement("select");s.className=xs,s.slot="header",s.setAttribute("aria-label",n.versionLabel),s.title=n.versionLabel;const r=o=>{const a=To({current:e,requested:vs(location.search)!==null,published:o,text:{pinned:n.versionPinned,latest:n.versionLatest}});s.replaceChildren(...a.options.map(l=>Object.assign(document.createElement("option"),{value:l.value,textContent:l.label}))),s.value=a.value},i=()=>{Co().then(r,o=>console.warn(o))};return s.addEventListener("pointerenter",i,{once:!0}),s.addEventListener("focus",i,{once:!0}),s.addEventListener("change",()=>Eo(s.value===""?null:s.value)),r(null),s},jh=O({value:v()}),qh=t=>e=>{if(!(e instanceof CustomEvent))return;const n=C(jh,e.detail);n.success&&t(n.output.value)},ys=t=>e=>{const n=Ee(e.target,HTMLSelectElement);n!==null&&t(n.value)},Bh=t=>e=>{const n=Ee(e.target,HTMLInputElement);n!==null&&t(n.value,n)},Hh=t=>e=>{const n=Ee(e.target,HTMLInputElement);n!==null&&t(n.checked)},Ro="data-dpk-changes",Uh=/^[^:\s]+:\S+$/,Fh=z({id:D(y(v(),$(1))),title:y(v(),$(1)),body:D(v()),target:D(y(v(),oe(Uh,'target must be written "type:id"'))),navigate:D(y(v(),Xr("=",'navigate must be written "key=value"')))}),Wh=j(Fh),Gh=y(v(),$(1)),_o=z({revision:Gh,changes:Wh}),Vh=z({revisions:y(j(_o),$(1,"list at least one version"))}),Kh=(t,e)=>JSON.stringify([t,e]),wt=t=>[...t.earlier,t.latest],Qh=t=>{const e=t.changes.map((s,r)=>{const i=s.id??String(r);return{key:Kh(t.revision,i),id:i,revision:t.revision,title:s.title,body:s.body??null,target:s.target??null,navigate:s.navigate??null}});return new Set(e.map(s=>s.id)).size!==e.length?`change ids must be unique within version "${t.revision}"`:{revision:t.revision,entries:e}},Zh=t=>{const e=typeof t=="object"&&t!==null&&"revisions"in t,n=C(e?Vh:_o,t);if(!n.success)return{ok:!1,error:Uc(n.issues)};const s=n.output,r="revisions"in s?s.revisions:[s],i=[];for(const a of r){if(i.some(d=>d.revision===a.revision))return{ok:!1,error:`version "${a.revision}" is listed twice`};const l=Qh(a);if(typeof l=="string")return{ok:!1,error:l};i.push(l)}const o=i.pop();return o?{ok:!0,log:{earlier:i,latest:o}}:{ok:!1,error:"list at least one version"}},Yh=z({v:G(1),revision:v(),seen:j(v())}),Jh=z({v:G(2),since:v(),seen:Ge(v(),j(v()))}),Oo=t=>{const e=C(Jh,t);if(e.success)return e.output;const n=C(Yh,t);return n.success?{v:2,since:n.output.revision,seen:{[n.output.revision]:n.output.seen}}:null},ws={open:!1,fresh:new Set},Lo=t=>e=>t.told.has(e.revision)&&!t.seen.has(e.key),$s=(t,e)=>wt(t).flatMap(n=>n.entries.filter(Lo(e))),Po=t=>t.target!==null||t.navigate!==null,Xh=(t,e)=>{const n=wt(t),s=e===null?-1:n.findIndex(o=>o.revision===e.since),r=e===null?[t.latest]:n.slice(Math.max(0,s)),i=new Set(r.flatMap(o=>{const a=new Set(e?.seen[o.revision]??[]);return o.entries.filter(l=>a.has(l.id)).map(l=>l.key)}));return{told:new Set(r.map(o=>o.revision)),seen:i,toasts:t.latest.entries.filter(o=>!i.has(o.key)).map(o=>o.key),list:ws}},Ss=(t,e)=>new Set([...t.seen,...e]),eu=(t,e,n)=>{switch(n.kind){case"open-list":{const s=$s(t,e),r=new Set(s.map(o=>o.key)),i=s.filter(o=>!Po(o)).map(o=>o.key);return{...e,seen:Ss(e,i),toasts:[],list:{open:!0,fresh:r}}}case"close-list":return{...e,list:ws};case"close-toast":return{...e,toasts:e.toasts.filter(s=>s!==n.key)};case"jump":return{...e,seen:Ss(e,[n.key]),toasts:e.toasts.filter(s=>s!==n.key),list:ws};case"read-all":return{...e,seen:Ss(e,$s(t,e).map(s=>s.key)),toasts:[],list:{open:e.list.open,fresh:new Set}}}},tu=(t,e)=>$s(t,e).length,nu=(t,e)=>{const n=wt(t),s=n.findIndex(o=>e.told.has(o.revision)&&o.entries.some(Lo(e))),r=s===-1?n.length-1:s,i=n.slice(r).flatMap(o=>{const a=o.entries.filter(l=>e.seen.has(l.key)).map(l=>l.id);return a.length>0?[[o.revision,a]]:[]});return{v:2,since:n[r]?.revision??t.latest.revision,seen:Object.fromEntries(i)}},su=(t,e)=>t.target===null&&t.navigate===null?null:{navigate:t.navigate!==null?Xt(t.navigate):t.target!==null?e(ut(t.target)):null,target:t.target},zo=3,ru=t=>e=>({key:e.key,id:e.id,revision:e.revision,title:e.title,body:e.body,jumpable:Po(e),fresh:t.list.fresh.has(e.key)}),iu=(t,e)=>{const n=wt(t).map(i=>({revision:i.revision,latest:i===t.latest,cards:i.entries.map(ru(e))})).reverse(),s=new Map(n.flatMap(i=>i.cards.map(o=>[o.key,o]))),r=e.toasts.flatMap(i=>{const o=s.get(i);return o?[o]:[]});return{unread:tu(t,e),open:e.list.open,groups:n,toasts:r.slice(0,zo),waiting:Math.max(0,r.length-zo)}},$t=t=>t==="light"||t==="dark"?t:null,Mo=t=>t.authored??t.environment,Io=t=>t.preference??Mo(t),ou=t=>{const e=Io(t)==="dark"?"light":"dark";return e===Mo(t)?null:e},No=j(z({value:y(v(),oe(/^element:.+/)),label:y(v(),$(1)),group:U(v())})),au=O({targets:No,providers:j(O({id:y(v(),$(1)),results:j(vi)}))}),lu=z({target:y(v(),oe(/^element:.+/)),body:y(v(),Zn(),$(1))}),Do=t=>t.group?`${t.group} \xB7 ${t.label}`:t.label,cu=(t,e,n)=>{const s=new Map(e.map(r=>[r.value,r]));return{...t,hasTarget:(r,i)=>t.hasTarget(r,i)||s.has(I(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(te(r)){const d=n.get(r.id),c=s.get(I(r.target));return{title:d?.title??r.type,...d?.summary===void 0?{}:{summary:d.summary},tone:d?.tone??"update",targetLabel:c?Do(c):r.target.id}}const a=t.describe(r,i,o),l=r.type==="comment"&&!t.hasTarget(i,r.target)?s.get(I(r.target)):void 0;return l===void 0?a:{...a,targetLabel:Do(l)}},serialize:r=>te(r)?`${r.type} ${I(r.target)} ${JSON.stringify(r.payload)}`:t.serialize(r)}},jo=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function qo(t){return typeof jo.Buffer<"u"&&jo.Buffer.isBuffer(t)}function Bo(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 Ho(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Uo(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const du="[object RegExp]",pu="[object String]",hu="[object Number]",uu="[object Boolean]",fu="[object Symbol]",gu="[object Date]",mu="[object Map]",ku="[object Set]",bu="[object Array]",vu="[object Function]",xu="[object ArrayBuffer]",As="[object Object]",yu="[object Error]",wu="[object DataView]",$u="[object Uint8Array]",Su="[object Uint8ClampedArray]",Au="[object Uint16Array]",Tu="[object Uint32Array]",Cu="[object BigUint64Array]",Eu="[object Int8Array]",Ru="[object Int16Array]",_u="[object Int32Array]",Ou="[object BigInt64Array]",Lu="[object Float32Array]",Pu="[object Float64Array]";function zu(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function Mu(t,e,n){return St(t,e,void 0,void 0,void 0,void 0,n)}function St(t,e,n,s,r,i,o){const a=o(t,e,n,s,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 At(t,e,i,o)}return At(t,e,i,o)}function At(t,e,n,s){if(Object.is(t,e))return!0;let r=Uo(t),i=Uo(e);if(r==="[object Arguments]"&&(r=As),i==="[object Arguments]"&&(i=As),r!==i)return!1;switch(r){case pu:return t.toString()===e.toString();case hu:return zu(t.valueOf(),e.valueOf());case uu:case gu:case fu:return Object.is(t.valueOf(),e.valueOf());case du:return t.source===e.source&&t.flags===e.flags;case vu:return t===e}n=n??new Map;const o=n.get(t),a=n.get(e);if(o!=null&&a!=null)return o===e;n.set(t,e),n.set(e,t);try{switch(r){case mu:if(t.size!==e.size)return!1;for(const[l,d]of t.entries())if(!e.has(l)||!St(d,e.get(l),l,t,e,n,s))return!1;return!0;case ku:{if(t.size!==e.size)return!1;const l=Array.from(t.values()),d=Array.from(e.values());for(let c=0;c<l.length;c++){const p=l[c],u=d.findIndex(h=>St(p,h,void 0,t,e,n,s));if(u===-1)return!1;d.splice(u,1)}return!0}case bu:case $u:case Su:case Au:case Tu:case Cu:case Eu:case Ru:case _u:case Ou:case Lu:case Pu:if(qo(t)!==qo(e)||t.length!==e.length)return!1;for(let l=0;l<t.length;l++)if(!St(t[l],e[l],l,t,e,n,s))return!1;return!0;case xu:return t.byteLength!==e.byteLength?!1:At(new Uint8Array(t),new Uint8Array(e),n,s);case wu:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:At(new Uint8Array(t),new Uint8Array(e),n,s);case yu:return t.name===e.name&&t.message===e.message;case As:{if(!(At(t.constructor,e.constructor,n,s)||Bo(t)&&Bo(e)))return!1;const l=[...Object.keys(t),...Ho(t)],d=[...Object.keys(e),...Ho(e)];if(l.length!==d.length)return!1;for(let c=0;c<l.length;c++){const p=l[c],u=t[p];if(!Object.hasOwn(e,p))return!1;const h=e[p];if(!St(u,h,p,t,e,n,s))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function Iu(){}function mn(t,e){return Mu(t,e,Iu)}const Ts="page",Fo=t=>I(t),Wo=(t,e,n,s=new Map,r=Ve)=>{let i=e,o={};const a=[],l=[],d=[],c=[],p=new Map;for(const h of n){if(h.type===B)continue;if(te(h)){const b=s.get(h.id);b===void 0||b.stale!==void 0?l.push({action:h,reason:b?.stale??"target-missing"}):a.push(h);continue}if(Q(h)){const b=Ri(r,o,h);b===null?l.push({action:h,reason:Ke(r,h.target.id)?"constraint-violated":"target-missing"}):b===o?d.push(h):(o=b,a.push(h));continue}const f=ht(t.actions,h.type);if(!f){l.push({action:h,reason:"unsupported-action-type"});continue}const g=t.apply(i,h);if(g===null){l.push({action:h,reason:t.hasTarget(i,h.target)?"constraint-violated":"target-missing"});continue}if(f.mode!=="append"&&Cs(t,i,g)){d.push(h);continue}i=g,a.push(h)}for(const h of n){if(h.type!==B)continue;if(!(h.target.type===Ts?t.pageTargetExists?.(i,h.target)??!0:t.hasTarget(i,h.target))){l.push({action:h,reason:"target-missing"});continue}c.push(h);const g=Fo(h.target);p.set(g,[...p.get(g)??[],h])}const u=new Map(n.map((h,f)=>[h.id,f]));return l.sort((h,f)=>(u.get(h.action.id)??0)-(u.get(f.action.id)??0)),{base:e,state:i,actions:n,applied:a,stale:l,obsolete:d,comments:c,commentsByTarget:p,grill:r,answers:o}},Cs=(t,e,n)=>e===n?!0:t.canonicalState===void 0?mn(e,n):mn(t.canonicalState(e),t.canonicalState(n)),Go=t=>{const e=new Set(t.obsolete.map(n=>n.id));return t.actions.filter(n=>!e.has(n.id))},Nu=(t,e,n,s)=>{let r=e;const i=s??Vo(r).map(o=>o.id);for(const o of[...i].reverse())r=Du(t,r,n,o,s!==void 0)??r;return r},Vo=t=>t.applied.filter(e=>!te(e)&&!Q(e)),Du=(t,e,n,s,r)=>{const i=Vo(e),o=i.findIndex(u=>u.id===s),a=i[o];if(a===void 0)return null;const l=i.slice(0,o),d=[...r?ju(t,e.base,i,o):[],...qu(t,l,a)],c=new Set,p=d.filter(u=>{const h=u.join(" ");return c.has(h)?!1:(c.add(h),!0)}).sort((u,h)=>h.length-u.length);for(const u of p){const h=Bu(t,e,n,u);if(h!==null)return h}return null},ju=(t,e,n,s)=>{const r=[];let i=e;for(const o of n.slice(0,s+1))r.push(i),i=t.apply(i,o)??i;return r.flatMap((o,a)=>Cs(t,o,i)?[n.slice(a,s+1).map(l=>l.id)]:[])},qu=(t,e,n)=>{const s=Ko(n),r=e.filter(l=>Ko(l).some(d=>s.includes(d))),i=Qo(t,n),o=r.filter(l=>Qo(t,l)===i),a=l=>l.map((d,c)=>[...l.slice(c).map(p=>p.id),n.id]);return[...a(r),...a(o),...r.map(l=>[l.id,n.id]),...r.map(l=>[l.id])]},Ko=t=>{const e=t.target.type===Ts?[]:t.target.id.split("."),n=typeof t.payload=="object"&&t.payload!==null?Object.values(t.payload).filter(s=>typeof s=="string"&&s!==""):[];return[...e,...n]},Qo=(t,e)=>ht(t.actions,e.type)?.mode,Bu=(t,e,n,s)=>{const r=new Set(e.stale.map(o=>o.action.id)),i=new Set(s);for(;;){const o=n(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 Cs(t,o.state,e.state)?o:null;if(a.some(l=>l.type===B||te(l)||Q(l)))return null;for(const l of a)i.add(l.id)}},Hu=(t,e,n)=>{const s=Ei(n);if(s===null)return{title:n.type,tone:"meta"};if(s.kind==="clear")return{title:t.grillAnswerClear,tone:"delete"};if(s.kind==="option"){const r=Ke(e,n.target.id)?.options.find(i=>i.id===s.optionId);return{title:t.grillAnswer,tone:"update",summary:t.grillQuoted(r?.label??s.optionId)}}return{title:t.grillAnswerFree,tone:"update",summary:t.grillQuoted(s.text.slice(0,120))}},Uu=(t,e)=>{const{grill:n}=e,s=L(e.locale);return{...t,hasTarget:(r,i)=>i.type===ae?Ke(n,i.id)!==void 0:t.hasTarget(r,i),commentTargets:(r,i)=>[...t.commentTargets(r,i),...n.questions.map(o=>({value:I({type:ae,id:o.id}),label:is(n,o.id),group:s.grillGroup}))],describe:(r,i,o)=>{const a=is(n,r.target.id);if(Q(r)){const{title:d,summary:c,tone:p}=Hu(s,n,r);return{title:d,tone:p,targetLabel:a,...c===void 0?{}:{summary:c}}}const l=t.describe(r,i,o);return r.target.type===ae?{...l,targetLabel:a}:l},serialize:r=>Q(r)?`${r.type} ${I(r.target)} ${JSON.stringify(r.payload)}`:t.serialize(r)}},Fu=O({v:G(1),template:y(v(),$(1)),actions:j(ve())});class Es{constructor(e){this.storage=e}load(e,n){try{const s=this.storage.getItem(e);if(s===null)return[];const r=C(Fu,JSON.parse(s));return!r.success||r.output.template!==n?[]:r.output.actions.flatMap(i=>{const o=C(Pe,i);return o.success?[o.output]:[]})}catch{return[]}}save(e,n,s){const r={v:1,template:n,actions:s};try{this.storage.setItem(e,JSON.stringify(r))}catch{}}clear(e){try{this.storage.removeItem(e)}catch{}}}class Rs{constructor(){this.store=new Map}load(e,n){return new Es({getItem:s=>this.store.get(s)??null,setItem:(s,r)=>{this.store.set(s,r)},removeItem:s=>{this.store.delete(s)}}).load(e,n)}save(e,n,s){this.store.set(e,JSON.stringify({v:1,template:n,actions:s}))}clear(e){this.store.delete(e)}}const _s=()=>{try{if(typeof localStorage<"u")return new Es(localStorage)}catch{}return new Rs},kn=t=>`dev-process-kit:draft:${typeof location>"u"?"local":`${location.pathname}${location.search}`}:${t}`,Wu=j(ve());class Zo{#e;#t;#n={targets:[],providers:[]};#r;#s=new Map;#i;#o;#a;#l;#d;#p=new Set;#m=[];#y=0;constructor(e){this.#e=e.definition,this.#r=e.grill??{grill:Ve,locale:"en"},this.#t=this.#v(),this.#i=e.base,this.#d=e.storageKey??kn(e.definition.name),this.#l=e.storage===void 0?_s():e.storage;const n=e.initialActions??this.#l?.load(this.#d,this.definition.name)??[];this.#o=Xo(this.definition,n),this.#a=this.#h(this.#o),this.#u()&&this.#E()}get definition(){return this.#t}setComponentSnapshot(e){const n=Gt(au,e);if(!mn(n,this.#n)){this.#n=n,this.#k(),this.#a=this.#h(this.#o);for(const s of this.#p)s()}}setTemplate(e){this.#e=e,this.#k(),this.#a=this.#h(this.#o);for(const n of this.#p)n()}setGrill(e){this.#r=e,this.#k(),this.#a=this.#h(this.#o);for(const n of this.#p)n()}#k(){this.#s=xi(this.#o,this.#n.providers),this.#t=this.#v()}#v(){return Uu(cu(this.#e,this.#n.targets,this.#s),this.#r)}#h(e){return Wo(this.definition,this.#i,e,xi(e,this.#n.providers),this.#r.grill)}get base(){return this.#i}get actions(){return this.#o}get derivation(){return this.#a}get lastIssues(){return this.#m}get prunedCount(){return this.#y}descriptorFor(e,n){return Yo(this.definition,e,n)}dispatch(e){const n=this.#A(e,this.#a.state);if(!n.ok)return this.#g([n.issue]);const s=this.descriptorFor(n.action.type,n.action.target);return s?(this.#b(Jo(this.#o,n.action,s),[n.action.id]),{ok:!0,id:n.action.id}):this.#g([{path:"type",message:"unknown action type"}])}dispatchBatch(e){const n=C(Wu,e);if(!n.success)return this.#g([ze(n.issues)]);const s=n.output;if(s.length===0)return{ok:!0,ids:[]};let r=this.#o,i=this.#a.state,o=this.#a.answers;const a=[];for(const l of s){const d=this.#A(l,i);if(!d.ok)return this.#g([d.issue]);const c=d.action,p=this.descriptorFor(c.type,c.target);if(!p)return this.#g([{path:"type",message:"unknown action type"}]);if((Q(c)?Ri(this.#r.grill,o,c)===null?null:i:c.type==="comment"||te(c)?c.target.type==="page"||this.definition.hasTarget(i,c.target)?i:null:this.definition.apply(i,c))===null)return this.#g([{path:"target",message:"batch action is not applicable"}]);r=Jo(r,c,p);const h=this.#h(r);i=h.state,o=h.answers,a.push(c.id)}return this.#b(r,a),{ok:!0,ids:a}}#A(e,n){const s=C(fi,e);if(!s.success)return{ok:!1,issue:ze(s.issues)};const r=this.descriptorFor(s.output.type,typeof s.output.target=="string"?Qt(s.output.target,"page"):s.output.target);if(!r)return{ok:!1,issue:{path:"type",message:`unknown action type "${s.output.type}"`}};const i=Xc(s.output,r);if(!i.ok)return i;const o=this.definition.canonicalTarget?.(n,i.action.target)??i.action.target;return{ok:!0,action:{...i.action,target:o}}}#g(e){return this.#m=e,{ok:!1,issues:e}}editComment(e,n){const s=this.#o.find(a=>a.id===e);if(s?.type!==B)return this.#g([{path:"id",message:`no comment "${e}" in the draft`}]);if(ft(s)===n)return{ok:!0,id:e};const r=C(ts.schema,{...s,payload:{body:n}});if(!r.success)return this.#g([ze(r.issues)]);const i=C(Pe,r.output);if(!i.success)return this.#g([ze(i.issues)]);const o=i.output;return this.#b(this.#o.map(a=>a===s?o:a),[]),{ok:!0,id:e}}removeAction(e){const n=this.#o.filter(s=>s.id!==e);n.length!==this.#o.length&&this.#b(n)}clearActions(){this.#o.length>0&&this.#b([])}replaceActions(e){this.#b(Xo(this.definition,e))}setBase(e){this.#i=e,this.#b(this.#o)}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.#o}}#b(e,n){this.#m=[],this.#o=e,this.#k(),this.#a=this.#h(this.#o),this.#u(n),this.#E();for(const s of this.#p)s()}#u(e){const n=this.#w(),s=Nu(this.definition,this.#a,r=>this.#h(r),e);return s===this.#a?n:(this.#y+=this.#o.length-s.actions.length,this.#o=[...s.actions],this.#k(),this.#a=this.#h(this.#o),this.#w(),!0)}#w(){return this.#a.obsolete.length===0?!1:(this.#y+=this.#a.obsolete.length,this.#o=Go(this.#a),this.#k(),this.#a=this.#h(this.#o),!0)}#E(){this.#l?.save(this.#d,this.definition.name,this.#o)}}const Yo=(t,e,n)=>e==="comment"?ts:e===Zt?md:n!==void 0&&te({type:e,target:n})?rd:t.actionFor?t.actionFor(e,n):ht(t.actions,e),Jo=(t,e,n)=>Q(e)?bd(t,e):gi(t,e,n),Xo=(t,e)=>e.flatMap(n=>{const s=C(Pe,n);if(!s.success)return[];const r=s.output,i=Yo(t,r.type,r.target);if(!i)return[];const o=C(i.schema,r);if(!o.success)return[];const a=C(Pe,o.output);return a.success?[a.output]:[]}),Gu=()=>({status:{kind:"idle"},request:0}),Vu=(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}},Ku=(t,e)=>{if(t.actions===0||t.railOpen)return null;const n=L(t.locale),s=e.status;return{send:t.sendable?{label:s.kind==="sending"?n.handoffSending:s.kind==="sent"?n.handoffSent:n.handoffSend,disabled:s.kind==="sending"}:null,copy:s.kind==="copied"?{label:n.handoffCopied,status:"copied"}:s.kind==="copy-failed"?{label:n.handoffCopyFailed,status:"failed"}:{label:n.handoffCopy,status:"idle"},note:s.kind==="send-failed"?zi(s.reason,t.locale):null}},Os="@",Ls=Object.freeze({type:Ts,id:"page"}),Ps=/^[A-Za-z0-9_-]+$/,ea=t=>t.type===Ls.type&&t.id===Ls.id,ta=t=>{const e=t.id.lastIndexOf(Os);if(e<0)return null;const n=t.id.slice(e+1);return Ps.test(n)?{board:n,target:{type:t.type,id:t.id.slice(0,e)}}:null},na=(t,e)=>({type:t.type,id:`${t.id}${Os}${e}`}),Qu=(t,e,n)=>{if(ea(t))return t;const s=ta(t);return s!==null&&n.has(s.board)?t:na(t,e)},Zu=(t,e)=>`${t}${Os}${e}`,Yu="dpk-page",sa="board",ra="data-dpk-draft-board",zs=Symbol.for("dev-process-kit.board-host"),ia=t=>{if(t.parentElement?.localName!==Yu)return null;const e=t.getAttribute(sa);return e!==null&&Ps.test(e)?e:null},Ju=t=>{const e=t.parentElement;if(e===null||!(zs in e))return null;const n=e[zs];return Xu(n)?n:null},Xu=t=>typeof t=="object"&&t!==null&&"dispatch"in t&&"navigation"in t,oa="board",bn=t=>`${t}.`,Ms=(t,e)=>{const n=bn(e),s={};for(const[r,i]of Object.entries(t))r.startsWith(n)&&(s[r.slice(n.length)]=i);return s},ef=(t,e)=>Object.fromEntries(Object.entries(e).map(([n,s])=>[`${bn(t)}${n}`,s])),tf=(t,e,n,s,r=[])=>{const i={},o={};for(const[c,p]of Object.entries(n)){const u=c.indexOf(".");c===oa||u>0&&s.has(c.slice(0,u))?i[c]=p:o[c]=p}if(Object.keys(o).length===0)return i;const a=Ms(t,e),l=en(a,o,r),d={...i};for(const c of Object.keys(a))Object.hasOwn(l,c)||(d[`${bn(e)}${c}`]=null);for(const[c,p]of Object.entries(l))d[`${bn(e)}${c}`]=p;return d},aa=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(),grill:e.grill,answers:e.answers}},nf=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:n=>{const s=typeof n=="string"?n:I(n);return e.commentsByTarget.get(s)?.length??0},dispatch:n=>t.dispatch(n),dispatchBatch:n=>t.dispatchBatch(n),navigate:(n,s)=>t.navigate(n,s),hashFor:n=>t.hashFor(n),requestComment:n=>t.requestComment(n)}},sf=(t,e)=>{const n=()=>aa(t);return{version:X,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:s=>t.dispatch(s),dispatchBatch:s=>t.dispatchBatch(s),comment:(s,r)=>t.dispatch({type:B,target:s,payload:{body:r}}),editComment:(s,r)=>t.editComment(s,r),removeAction:s=>t.removeAction(s),clearActions:()=>t.clearActions(),importDraft:s=>t.controller().replaceActions(s),navigate:(s,r)=>t.navigate(s,r),hashFor:s=>t.hashFor(s),snapshot:n,exportDraft:()=>t.controller().exportDraft(X),exportBrief:()=>t.brief?.(n())??tn(n(),t.controller().definition,X),subscribe:s=>t.subscribe(s)}},Is=(t,e)=>({read(n){try{const s=t.getItem(n);return s===null?null:e(JSON.parse(s))}catch{return null}},write(n,s){try{return t.setItem(n,JSON.stringify(s)),!0}catch{return!1}},remove(n){try{t.removeItem(n)}catch{}}}),he=t=>{const e=new Map;return Is({getItem:n=>e.get(n)??null,setItem:(n,s)=>{e.set(n,s)},removeItem:n=>{e.delete(n)}},t)},Xe=t=>{try{if(typeof localStorage<"u")return Is(localStorage,t)}catch{}return he(t)},rf=t=>{try{if(typeof sessionStorage<"u")return Is(sessionStorage,t)}catch{}return he(t)},of=8e3,af=t=>t.localName==="script"&&t.getAttribute("type")==="application/json"&&t.hasAttribute(Ro);class lf{#e;#t;#n=null;#r=null;#s=null;#i=null;#o="";#a=null;#l=new Map;#d=new Set;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}get view(){return this.#n&&this.#s?iu(this.#n,this.#s):null}get error(){return this.#r}hostConnected(){!this.#m()&&!this.#y()&&this.#h(),document.addEventListener("pointerdown",this.#u,!0),document.addEventListener("keydown",this.#w)}hostUpdate(){!this.#m()&&this.#y()&&this.#A()}hostDisconnected(){this.#A(),document.removeEventListener("pointerdown",this.#u,!0),document.removeEventListener("keydown",this.#w);for(const e of this.#l.values())e.handle!==null&&clearTimeout(e.handle);this.#l.clear()}send(e){!this.#n||!this.#s||(this.#s=eu(this.#n,this.#s,e),this.#k(),this.#g(),this.#e.requestUpdate())}toggleList(){this.send({kind:this.#s?.list.open?"close-list":"open-list"})}show(e){const n=this.#n?wt(this.#n).flatMap(s=>s.entries).find(s=>s.key===e):void 0;n&&(this.send({kind:"jump",key:e}),this.#t.show(n))}pause(e){const n=this.#d.size>0;if(this.#d.add(e),n)return;const s=Date.now();for(const r of this.#l.values())r.handle!==null&&clearTimeout(r.handle),r.handle=null,r.remaining=Math.max(0,r.deadline-s)}resume(e){if(!(!this.#d.delete(e)||this.#d.size>0))for(const[n,s]of this.#l)this.#b(n,s)}#p(){return`${this.#t.storageKey()}:seen-changes`}#m(){return this.#n!==null||this.#r!==null}#y(){const e=[...this.#e.children].find(af);if(!e)return!1;let n;try{n=JSON.parse(e.textContent??"")}catch(r){return this.#v(r instanceof Error?r.message:String(r))}const s=Zh(n);return s.ok?(this.#n=s.log,this.#i=this.#t.persist()?Xe(Oo):he(Oo),this.#s=Xh(s.log,this.#i.read(this.#p())),this.#k(),this.#g(),this.#e.requestUpdate(),!0):this.#v(s.error)}#k(){if(!this.#n||!this.#s)return;const e=nu(this.#n,this.#s),n=JSON.stringify(e);n!==this.#o&&(this.#o=n,this.#i?.write(this.#p(),e))}#v(e){return console.error("[dev-process-kit] invalid change log:",e),this.#r=e,this.#e.requestUpdate(),!0}#h(){this.#a=new MutationObserver(()=>{(this.#m()||this.#y())&&this.#A()}),this.#a.observe(this.#e,{childList:!0})}#A(){this.#a?.disconnect(),this.#a=null}#g(){const e=new Set(this.view?.toasts.map(n=>n.key)??[]);for(const[n,s]of this.#l)e.has(n)||(s.handle!==null&&clearTimeout(s.handle),this.#l.delete(n));for(const n of e){if(this.#l.has(n))continue;const s={handle:null,deadline:0,remaining:of};this.#l.set(n,s),this.#d.size===0&&this.#b(n,s)}}#b(e,n){n.deadline=Date.now()+n.remaining,n.handle=setTimeout(()=>{n.handle=null,this.send({kind:"close-toast",key:e})},n.remaining)}#u=e=>{!this.#s?.list.open||this.#t.inside(e.composedPath())||this.send({kind:"close-list"})};#w=e=>{e.key!=="Escape"||!this.#s?.list.open||this.send({kind:"close-list"})}}const vn="dpk-changes",cf=(t,e,n)=>{const s=t.unread>0?e.changesUnread(t.unread):e.changes;return m`<button
|
|
1404
|
-
class="dpk-bell"
|
|
1405
|
-
type="button"
|
|
1406
|
-
aria-controls=${vn}
|
|
1407
|
-
aria-expanded=${t.open?"true":"false"}
|
|
1408
|
-
aria-label=${s}
|
|
1409
|
-
title=${s}
|
|
1410
|
-
@click=${n.toggleList}
|
|
1411
|
-
>
|
|
1412
|
-
${Zi()} ${t.unread>0?m`<span class="dpk-bell-badge" aria-hidden="true">${t.unread}</span>`:k}
|
|
1413
|
-
</button>`},la=(t,e,n)=>t.jumpable?m`<button class="dpk-btn dpk-btn--accent dpk-notice-show" type="button" @click=${()=>n.show(t.key)}>
|
|
1414
|
-
${e.changesShow}
|
|
1415
|
-
</button>`:k,ca=(t,e,n,s)=>s==="list"||t.unread>0?m`<button
|
|
1416
|
-
class=${s==="list"?"dpk-btn dpk-changes-read-all":"dpk-toast-more dpk-changes-read-all"}
|
|
1417
|
-
type="button"
|
|
1418
|
-
aria-disabled=${t.unread>0?"false":"true"}
|
|
1419
|
-
@click=${n.readAll}
|
|
1420
|
-
>
|
|
1421
|
-
${e.changesReadAll}
|
|
1422
|
-
</button>`:k,df=(t,e,n)=>m`<section class="dpk-changes-group" data-revision=${t.revision}>
|
|
1423
|
-
<h3 class="dpk-changes-revision">
|
|
1424
|
-
<span>${t.revision}</span>
|
|
1425
|
-
${t.latest?m`<span class="dpk-changes-current">${e.changesCurrent}</span>`:k}
|
|
1426
|
-
</h3>
|
|
1427
|
-
<ol class="dpk-changes-list">
|
|
1428
|
-
${Me(t.cards,s=>s.key,s=>m`<li
|
|
1429
|
-
class="dpk-change"
|
|
1430
|
-
data-key=${s.id}
|
|
1431
|
-
data-revision=${s.revision}
|
|
1432
|
-
?data-fresh=${s.fresh}
|
|
1433
|
-
>
|
|
1434
|
-
<p class="dpk-change-title">
|
|
1435
|
-
${s.fresh?m`<span class="dpk-change-new">${e.changesNew}</span>`:k} ${s.title}
|
|
1436
|
-
</p>
|
|
1437
|
-
${s.body===null?k:m`<p class="dpk-change-body">${s.body}</p>`} ${la(s,e,n)}
|
|
1438
|
-
</li>`)}
|
|
1439
|
-
</ol>
|
|
1440
|
-
</section>`,pf=(t,e,n)=>t.open?m`<div id=${vn} class="dpk-changes" popover="manual" role="dialog" aria-label=${e.changesTitle}>
|
|
1441
|
-
<div class="dpk-changes-head">
|
|
1442
|
-
<h2 class="dpk-changes-title">${e.changesTitle}</h2>
|
|
1443
|
-
${ca(t,e,n,"list")}
|
|
1444
|
-
</div>
|
|
1445
|
-
${Me(t.groups,s=>s.revision,s=>df(s,e,n))}
|
|
1446
|
-
</div>`:k,hf=(t,e,n)=>m`<section
|
|
1447
|
-
class="dpk-toasts"
|
|
1448
|
-
aria-live="polite"
|
|
1449
|
-
aria-label=${e.changes}
|
|
1450
|
-
@pointerenter=${()=>n.pause("pointer")}
|
|
1451
|
-
@pointerleave=${()=>n.resume("pointer")}
|
|
1452
|
-
@focusin=${()=>n.pause("focus")}
|
|
1453
|
-
@focusout=${()=>n.resume("focus")}
|
|
1454
|
-
>
|
|
1455
|
-
${Me(t.toasts,s=>s.key,s=>m`<div class="dpk-toast" data-key=${s.id}>
|
|
1456
|
-
<span class="dpk-toast-icon" aria-hidden="true">${Zi()}</span>
|
|
1457
|
-
<div class="dpk-toast-text">
|
|
1458
|
-
<p class="dpk-change-title">${s.title}</p>
|
|
1459
|
-
${s.body===null?k:m`<p class="dpk-change-body">${s.body}</p>`}
|
|
1460
|
-
</div>
|
|
1461
|
-
${la(s,e,n)}
|
|
1462
|
-
<button
|
|
1463
|
-
class="dpk-toast-close"
|
|
1464
|
-
type="button"
|
|
1465
|
-
aria-label=${e.changesDismiss}
|
|
1466
|
-
title=${e.changesDismiss}
|
|
1467
|
-
@click=${()=>n.dismiss(s.key)}
|
|
1468
|
-
>
|
|
1469
|
-
${nn()}
|
|
1470
|
-
</button>
|
|
1471
|
-
</div>`)}
|
|
1472
|
-
${t.toasts.length+t.waiting>1?m`<div class="dpk-toast-actions">
|
|
1473
|
-
${t.waiting>0?m`<button class="dpk-toast-more" type="button" @click=${n.openList}>
|
|
1474
|
-
${e.changesWaiting(t.waiting)} · ${e.changesSeeAll}
|
|
1475
|
-
</button>`:k}
|
|
1476
|
-
${ca(t,e,n,"toasts")}
|
|
1477
|
-
</div>`:k}
|
|
1478
|
-
</section>`,Ns=(t,e)=>typeof t=="object"&&t!==null&&e.every(n=>typeof Reflect.get(t,n)=="function"),uf=t=>Ns(t,["use"]),ff=t=>Ns(t,["anchorFor","canSendToClaude","sendToClaude"]),gf=t=>Ns(t,["collection"]),da=async(t,e)=>{try{return await t.use(e)}catch{return null}},mf=(t,e)=>({async canSend(){try{return await t.canSendToClaude()==="available"}catch{return!1}},async send({brief:n,draft:s,anchor:r}){let i=Rd(n);if(i===null){if(e===null)return{ok:!1,reason:"too_large"};try{const o=e.collection(Td).doc();await o.set({brief:n,draft:s,createdAt:new Date().toISOString()}),i=_d(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:Ld(o)}}}}),kf=async t=>{if(!uf(t))return null;const[e,n]=await Promise.all([da(t,"comments"),da(t,"db")]);return ff(e)?mf(e,gf(n)?n:null):null},bf=()=>Reflect.get(globalThis,"claude");class vf{#e;#t;#n=null;#r=!1;constructor(e,n=bf){this.#e=e,this.#t=n,e.addController(this)}get available(){return this.#r}hostConnected(){this.#n??=kf(this.#t()),this.#s(),window.addEventListener("focus",this.#s)}hostDisconnected(){window.removeEventListener("focus",this.#s)}async send(e){const n=await this.#n;if(!n)return{ok:!1,reason:"forbidden"};const s=await n.send(e);return this.#s(),s}#s=async()=>{const e=await this.#n,n=e?await e.canSend():!1;n!==this.#r&&(this.#r=n,this.#e.requestUpdate())}}const Ds="dev-process-kit:color-scheme",xf="(prefers-color-scheme: dark)",pa=()=>typeof matchMedia=="function"?matchMedia(xf):null,ha=()=>$t(document.documentElement.dataset.theme)??(pa()?.matches===!0?"dark":"light");class yf{#e;#t;#n=null;#r=null;#s="light";#i=null;#o=null;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}hostConnected(){this.#n===null&&(this.#n=this.#t()?Xe($t):he($t),this.#r=this.#n.read(Ds)),this.#s=ha(),this.#i=pa(),this.#i?.addEventListener("change",this.#l),this.#o=new MutationObserver(this.#l),this.#o.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}hostDisconnected(){this.#i?.removeEventListener("change",this.#l),this.#i=null,this.#o?.disconnect(),this.#o=null}resolve(e){return Io(this.#a(e))}toggle(e){this.#r=ou(this.#a(e)),this.#r===null?this.#n?.remove(Ds):this.#n?.write(Ds,this.#r),this.#e.requestUpdate()}#a(e){return{preference:this.#r,authored:e,environment:this.#s}}#l=()=>{const e=ha();e!==this.#s&&(this.#s=e,this.#e.requestUpdate())}}const wf=(t,e)=>{const n=[],s=r=>{(r===t||r instanceof ShadowRoot)&&e?.(r);for(const i of r.children)i.hasAttribute("data-template")||(("commentTargets"in i||"elementActions"in i)&&n.push(i),s(i),i.shadowRoot&&s(i.shadowRoot))};return s(t),n},ua=(t,e)=>{const n=new Map;for(const s of t)n.set(e(s),(n.get(e(s))??0)+1);return t.filter(s=>n.get(e(s))===1)},fa=t=>ua(t.filter(e=>"elementActions"in e&&e.id.length>0),e=>e.id),ga=(t,e)=>{for(const n of fa(t)){const s=od(e,n.id),r=Reflect.get(n,"elementActions");Array.isArray(r)&&r.length===s.length&&s.every((o,a)=>{const l=r[a];return typeof l=="object"&&l!==null&&"id"in l&&l.id===o.id})||Reflect.set(n,"elementActions",s)}},$f=t=>{const e=Reflect.get(t,"elementActionResults");return Array.isArray(e)?e.flatMap(n=>{const s=C(vi,n);return s.success?[s.output]:[]}):[]},Sf=t=>{const e=[];for(const n of t){if(!("commentTargets"in n))continue;const s=C(No,n.commentTargets);s.success&&e.push(...s.output)}return{targets:ua(e,n=>n.value),providers:fa(t).map(n=>({id:n.id,results:$f(n)}))}};function ma(t){return t===null?1:t===void 0?2:0}function ka(t,e){const n=ma(t),s=ma(e);return n<s?-1:n>s?1:n!==0?0:t<e?-1:t>e?1:0}function Af(t,e,n){return n==="asc"?ka(t,e):ka(e,t)}function Tf(t,e,n){return t.slice().sort((s,r)=>{const i=n.length;for(let o=0;o<e.length;o++){const a=i>o?n[o]:n[i-1],l=e[o],d=typeof l=="function",c=Af(d?l(s):s[l],d?l(r):r[l],a);if(c!==0)return c}return 0})}function ba(t,e){return Tf(t,e,["asc"])}const Cf=5,js=4,va=8,Ef=(t,e)=>{const n=e.badgeHeight,s=t.target.right+va,r=t.target.left-va,i=[];let o=0,a=s;for(let l=t.widths.length-1;l>=0;l-=1){const d=t.widths[l]??0;a!==s&&a-d<r&&(o+=1,a=s),i[l]={x:a-d,y:t.target.top-n/2-o*(n+js)},a-=d+Cf}return i},xa=(t,e)=>{const n=t.map(()=>[]),s=ba(t.map((i,o)=>({group:i,index:o})).filter(({group:i})=>i.gutter),[({group:i})=>i.target.top]);let r=Number.NEGATIVE_INFINITY;for(const{group:i,index:o}of s){let a=Math.max(i.target.top,r);n[o]=i.widths.map(l=>{const d={x:e.width-l,y:a};return a+=e.badgeHeight+js,d}),r=a}return{points:n,bottom:r-js}},Rf=(t,e)=>Math.max(0,xa(t,e).bottom),_f=(t,e)=>{const n=xa(t,e),s=Math.max(e.height,n.bottom);return t.map((r,i)=>(r.gutter?n.points[i]??[]:Ef(r,e)).map((o,a)=>({x:ks(o.x,0,Math.max(0,e.width-(r.widths[a]??0))),y:ks(o.y,0,Math.max(0,s-e.badgeHeight))})))},Of=t=>{const e=[t];for(const n of t.querySelectorAll("*"))n.shadowRoot&&e.push(n.shadowRoot);return e},Lf=(t,e,n,s)=>{if(e.questions.length===0)return[];const r=new Map(e.questions.map(o=>[o.ref,o])),i=[];for(const o of Of(t))for(const a of o.querySelectorAll(`[${rs}]`)){const l=a.getAttribute(rs)??"";for(const d of l.split(/\s+/)){const c=r.get(d);c&&i.push({index:i.length,target:a,questionId:c.id,ref:c.ref,title:c.title,answered:Jt(c,n[c.id]),open:c.id===s})}}return i},Pf=(t,e)=>{const n=t.getRootNode(),s=n instanceof ShadowRoot?n.host:null,r=s?.shadowRoot?.querySelector(".diagram-canvas")??null;return r instanceof Element?r.getBoundingClientRect():s instanceof Element?s.getBoundingClientRect():e.getBoundingClientRect()},zf=(t,e)=>{const n=t.getBoundingClientRect(),s=t.getRootNode(),r=s instanceof ShadowRoot?s.host:null,i=new Map;for(const u of e){const h=t.querySelector(`[data-badge="${u.index}"]`);if(!h)continue;const f=i.get(u.target)??[];f.push(h),i.set(u.target,f)}const o=[];for(const[u,h]of i){const f=u.getBoundingClientRect(),g=Pf(u,t),b=(f.width>0||f.height>0)&&f.bottom>n.top&&f.top<n.bottom&&f.right>n.left&&f.left<n.right&&f.bottom>g.top&&f.top<g.bottom;for(const x of h)x.dataset.visible=String(b);b&&o.push({buttons:h,group:{target:{left:f.left-n.left,top:f.top-n.top,right:f.right-n.left,bottom:f.bottom-n.top},widths:h.map(x=>x.offsetWidth),gutter:r?.contains(u)===!0}})}const a=o[0]?.buttons[0]?.offsetHeight??0,l=o.map(({group:u})=>u),d={width:t.clientWidth,height:t.clientHeight,badgeHeight:a},c=Rf(l,d);t.parentElement&&(t.parentElement.style.minHeight=c>0?`${Math.ceil(c)}px`:"");const p=_f(l,{...d,height:Math.max(d.height,c)});o.forEach(({buttons:u},h)=>{u.forEach((f,g)=>{const b=p[h]?.[g];b&&(f.style.transform=`translate(${b.x}px, ${b.y}px)`)})})},ya={childList:!0,subtree:!0,attributes:!0,attributeFilter:[rs]};class Mf{#e;#t;#n=null;#r=!1;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}hostConnected(){document.addEventListener("scroll",this.#s,!0),window.addEventListener("resize",this.#s),this.#e.addEventListener("dpk-diagram-view",this.#s)}hostDisconnected(){document.removeEventListener("scroll",this.#s,!0),window.removeEventListener("resize",this.#s),this.#e.removeEventListener("dpk-diagram-view",this.#s),this.#n?.disconnect(),this.#n=null}hostUpdated(){if(this.#n?.disconnect(),!!this.#t.active()){this.#n??=new MutationObserver(()=>{this.#e.requestUpdate(),this.#s()}),this.#n.observe(this.#e,ya);for(const e of this.#e.querySelectorAll("*"))e.shadowRoot&&this.#n.observe(e.shadowRoot,ya);this.#s()}}#s=()=>{this.#r||!this.#t.active()||(this.#r=!0,requestAnimationFrame(()=>{this.#r=!1;const e=this.#t.layer();e&&zf(e,this.#t.bindings())}))}}const qs=(t,e)=>e!==null&&Ke(t,e)?e:t.questions[0]?.id??null,If=(t,e)=>e!=="current"&&t.rounds[e]!==void 0?e:"current",wa=(t,e)=>t.options.map((n,s)=>({id:n.id,letter:ud(s),label:n.label,checked:e?.kind==="option"&&e.optionId===n.id})),Nf=(t,e,n)=>{if(e.rounds.length===0)return[];const s=e.rounds.map((r,i)=>({value:String(i),label:t.grillRoundOption(r.label,r.questions.length),selected:n===i}));return[{value:"current",label:t.grillRoundOption(t.grillCurrentRound,e.questions.length),selected:n==="current"},...s.reverse()]},Df=(t,e,n,s)=>{const r=Ci(e,n),i=If(e,s.round),o=Nf(t,e,i),a=t.grillProgress(r.answered,r.total),l=i==="current"?void 0:e.rounds[i];if(l!==void 0)return{progress:a,rounds:o,view:{kind:"past",note:t.grillPastRound(l.label),questions:l.questions.map(c=>{const p=Yt(c,c.answer);return{id:c.id,ref:c.ref,title:c.title,description:c.description,note:c.note,answered:p!=="",summary:p===""?t.grillUnanswered:p,choices:wa(c,c.answer),freeText:c.answer?.kind==="free"?c.answer.text:null}})}};const d=qs(e,s.open);return{progress:a,rounds:o,view:{kind:"current",questions:e.questions.map(c=>{const p=n[c.id],u=Yt(c,p);return{id:c.id,ref:c.ref,title:c.title,description:c.description,note:c.note,open:c.id===d,answered:u!=="",summary:u,choices:wa(c,p),draft:p?.kind==="free"?p.text:"",freeSelected:p?.kind==="free",allowFreeText:c.freeText}})}}},jf=(t,e,n,s)=>m`
|
|
1479
|
-
<div class="dpk-grill">
|
|
1480
|
-
<header class="dpk-grill-head">
|
|
1481
|
-
<h2>${t.grill}</h2>
|
|
1482
|
-
<span class="dpk-grill-progress">${e.progress}</span>
|
|
1483
|
-
</header>
|
|
1484
|
-
${e.rounds.length===0?k:m`<div class="dpk-grill-rounds">
|
|
1485
|
-
<select
|
|
1486
|
-
class="dpk-grill-round"
|
|
1487
|
-
aria-label=${t.grillRoundSelect}
|
|
1488
|
-
@change=${r=>{const i=r.currentTarget;i instanceof HTMLSelectElement&&n.pickRound(i.value==="current"?"current":Number(i.value))}}
|
|
1489
|
-
>
|
|
1490
|
-
${e.rounds.map(r=>m`<option value=${r.value} ?selected=${r.selected}>${r.label}</option>`)}
|
|
1491
|
-
</select>
|
|
1492
|
-
</div>`}
|
|
1493
|
-
<div class="dpk-grill-list">
|
|
1494
|
-
${e.view.kind==="past"?m`<p class="dpk-grill-round-note">${e.view.note}</p>`:k}
|
|
1495
|
-
${e.view.questions.length===0?m`<p class="dpk-grill-empty">${t.grillNoQuestions}</p>`:e.view.kind==="current"?Me(e.view.questions,r=>r.id,r=>qf(t,r,n)):Me(e.view.questions,r=>r.id,Hf)}
|
|
1496
|
-
</div>
|
|
1497
|
-
${s}
|
|
1498
|
-
</div>
|
|
1499
|
-
`,qf=(t,e,n)=>m`
|
|
1500
|
-
<section
|
|
1501
|
-
class="dpk-grill-question"
|
|
1502
|
-
data-question=${e.id}
|
|
1503
|
-
data-answered=${String(e.answered)}
|
|
1504
|
-
data-dpk-target=${I({type:ae,id:e.id})}
|
|
1505
|
-
>
|
|
1506
|
-
<button
|
|
1507
|
-
class="dpk-grill-heading"
|
|
1508
|
-
type="button"
|
|
1509
|
-
aria-expanded=${e.open?"true":"false"}
|
|
1510
|
-
aria-controls=${`dpk-grill-body-${e.id}`}
|
|
1511
|
-
@click=${()=>n.open(e.id)}
|
|
1512
|
-
>
|
|
1513
|
-
<span class="dpk-grill-ref">${e.ref}</span>
|
|
1514
|
-
<span class="dpk-grill-heading-text">
|
|
1515
|
-
<strong>${e.title}</strong>
|
|
1516
|
-
${!e.open&&e.answered?m`<span class="dpk-grill-summary">${e.summary}</span>`:k}
|
|
1517
|
-
</span>
|
|
1518
|
-
<span class="dpk-grill-chevron" aria-hidden="true">${mt()}</span>
|
|
1519
|
-
</button>
|
|
1520
|
-
${e.open?m`<div class="dpk-grill-body" id=${`dpk-grill-body-${e.id}`}>
|
|
1521
|
-
${e.description?m`<p class="dpk-grill-description">${e.description}</p>`:k}
|
|
1522
|
-
${e.note?m`<p class="dpk-grill-note">${e.note}</p>`:k}
|
|
1523
|
-
<div class="dpk-grill-choices" role="radiogroup" aria-label=${e.title}>
|
|
1524
|
-
${e.choices.map(s=>Bf(e.id,s,n))}
|
|
1525
|
-
${e.allowFreeText?m`<label class="dpk-grill-choice" data-free=${String(e.freeSelected)}>
|
|
1526
|
-
<input
|
|
1527
|
-
type="radio"
|
|
1528
|
-
name=${`dpk-grill-${e.id}`}
|
|
1529
|
-
value="__free"
|
|
1530
|
-
.checked=${e.freeSelected}
|
|
1531
|
-
@change=${()=>n.answer(e.id,{kind:"free",text:""})}
|
|
1532
|
-
/>
|
|
1533
|
-
<span class="dpk-grill-choice-text">${t.grillFreeText}</span>
|
|
1534
|
-
</label>`:k}
|
|
1535
|
-
</div>
|
|
1536
|
-
${e.allowFreeText?m`<textarea
|
|
1537
|
-
class="dpk-textarea dpk-grill-free"
|
|
1538
|
-
data-free-text=${e.id}
|
|
1539
|
-
aria-label=${t.grillFreeTextOf(e.ref)}
|
|
1540
|
-
placeholder=${t.grillFreeTextPlaceholder}
|
|
1541
|
-
.value=${e.draft}
|
|
1542
|
-
?hidden=${!e.freeSelected}
|
|
1543
|
-
@input=${s=>{const r=s.currentTarget;r instanceof HTMLTextAreaElement&&n.answer(e.id,{kind:"free",text:r.value})}}
|
|
1544
|
-
@keydown=${s=>{s.isComposing||!(s.metaKey||s.ctrlKey)||s.key!=="Enter"||(s.preventDefault(),n.next(e.id))}}
|
|
1545
|
-
></textarea>`:k}
|
|
1546
|
-
${e.answered||e.freeSelected?m`<button
|
|
1547
|
-
type="button"
|
|
1548
|
-
class="dpk-grill-clear"
|
|
1549
|
-
@click=${()=>n.answer(e.id,{kind:"clear"})}
|
|
1550
|
-
>
|
|
1551
|
-
${t.grillAnswerClear}
|
|
1552
|
-
</button>`:k}
|
|
1553
|
-
</div>`:k}
|
|
1554
|
-
</section>
|
|
1555
|
-
`,Bf=(t,e,n)=>m`
|
|
1556
|
-
<label class="dpk-grill-choice" data-choice=${e.id}>
|
|
1557
|
-
<input
|
|
1558
|
-
type="radio"
|
|
1559
|
-
name=${`dpk-grill-${t}`}
|
|
1560
|
-
value=${e.id}
|
|
1561
|
-
.checked=${e.checked}
|
|
1562
|
-
@change=${()=>n.answer(t,{kind:"option",optionId:e.id})}
|
|
1563
|
-
/>
|
|
1564
|
-
<span class="dpk-grill-choice-text">
|
|
1565
|
-
<span class="dpk-grill-letter">(${e.letter})</span>
|
|
1566
|
-
<span>${e.label}</span>
|
|
1567
|
-
</span>
|
|
1568
|
-
</label>
|
|
1569
|
-
`,Hf=t=>m`
|
|
1570
|
-
<details class="dpk-grill-question" data-past data-question=${t.id} data-answered=${String(t.answered)}>
|
|
1571
|
-
<summary class="dpk-grill-heading">
|
|
1572
|
-
<span class="dpk-grill-ref">${t.ref}</span>
|
|
1573
|
-
<span class="dpk-grill-heading-text">
|
|
1574
|
-
<strong>${t.title}</strong>
|
|
1575
|
-
<span class="dpk-grill-summary">${t.summary}</span>
|
|
1576
|
-
</span>
|
|
1577
|
-
<span class="dpk-grill-chevron" aria-hidden="true">${mt()}</span>
|
|
1578
|
-
</summary>
|
|
1579
|
-
<div class="dpk-grill-body">
|
|
1580
|
-
${t.description?m`<p class="dpk-grill-description">${t.description}</p>`:k}
|
|
1581
|
-
${t.note?m`<p class="dpk-grill-note">${t.note}</p>`:k}
|
|
1582
|
-
${t.choices.length===0?k:m`<ul class="dpk-grill-past-choices">
|
|
1583
|
-
${t.choices.map(e=>m`<li class="dpk-grill-past-choice" data-checked=${String(e.checked)}>
|
|
1584
|
-
<span class="dpk-grill-letter">(${e.letter})</span>
|
|
1585
|
-
<span>${e.label}</span>
|
|
1586
|
-
</li>`)}
|
|
1587
|
-
</ul>`}
|
|
1588
|
-
${t.freeText===null?k:m`<p class="dpk-grill-past-choice" data-checked="true">${t.freeText}</p>`}
|
|
1589
|
-
</div>
|
|
1590
|
-
</details>
|
|
1591
|
-
`,Uf=2400;class Ff{#e=Gu();#t=null;#n;constructor(e){this.#n=e,e.addController(this)}get state(){return this.#e}hostDisconnected(){this.#i()}async copy(e){this.#r({kind:"copy-started"});const n=this.#e.request,s=await os(e()).catch(()=>!1);this.#r({kind:"copy-finished",request:n,ok:s}),this.#s(n)}async send(e){if(this.#e.status.kind==="sending")return;this.#r({kind:"send-started"});const n=this.#e.request,s=await e().catch(()=>({ok:!1,reason:"error"}));this.#r({kind:"send-finished",request:n,outcome:s}),s.ok&&this.#s(n)}#r(e){(e.kind==="copy-started"||e.kind==="send-started")&&this.#i(),this.#e=Vu(this.#e,e),this.#n.requestUpdate()}#s(e){e===this.#e.request&&(this.#i(),this.#t=setTimeout(()=>{this.#t=null,this.#r({kind:"settled",request:e})},Uf))}#i(){this.#t!==null&&clearTimeout(this.#t),this.#t=null}}const Bs="dev-process-kit:locale";class Wf{#e;#t;#n;#r=null;#s=null;#i;#o;constructor(e,n,s){this.#e=e,this.#t=n,this.#n=s,e.addController(this)}get authored(){if(this.#i===void 0)return Mt(zt(this.#e));const e=this.#e.parentNode;return Mt(this.#i??(e===null?null:zt(e)))}get locale(){return this.#o??this.#a()}#a(){return vl({preference:this.#s,authored:this.authored})}hostConnected(){this.#r===null&&(this.#r=this.#t()?Xe(Sr):he(Sr),this.#s=this.#r.read(Bs)),this.#i??=this.#e.getAttribute("lang"),this.#l()}pick(e){this.#s=xl(e,this.authored),this.#s===null?this.#r?.remove(Bs):this.#r?.write(Bs,this.#s),this.#l(),this.#e.requestUpdate()}#l(){const e=this.#s??this.#i??null;e===null?this.#e.removeAttribute("lang"):this.#e.getAttribute("lang")!==e&&this.#e.setAttribute("lang",e);const n=this.#a();if(n===this.#o)return;const s=this.#o===void 0;this.#o=n,this.#n(),(!s||this.#s!==null)&&document.dispatchEvent(new Event(In))}}const Gf="(max-width: 760px)",Vf=()=>typeof matchMedia=="function"?matchMedia(Gf):null;class Kf{#e;#t=null;#n=!1;constructor(e){this.#e=e,e.addController(this)}hostConnected(){this.#t=Vf(),this.#n=this.#t?.matches===!0,this.#t?.addEventListener("change",this.#r)}hostDisconnected(){this.#t?.removeEventListener("change",this.#r),this.#t=null}get narrow(){return this.#n}#r=e=>{this.#n=e.matches,this.#e.requestUpdate()}}const $a=()=>Xt(typeof location>"u"?"":location.hash),Qf=(t,e)=>{if(typeof history>"u")return;const n=`${location.pathname}${location.search}${Qe(t)}`;`${location.pathname}${location.search}${location.hash}`!==n&&(e?history.replaceState(null,"",n):history.pushState(null,"",n))};class Zf{#e;#t=null;#n=0;constructor(e){this.#e=e}get orphans(){return this.#n}route(){const e=this.#e.renderRoot,n=Ee(e.querySelector('slot[name="preview"]'),HTMLSlotElement);if(n===null)return;this.#t!==n&&(this.#t=n,n.addEventListener("slotchange",this.#r));const s=new Set(Array.from(e.querySelectorAll("slot")).map(i=>i.getAttribute("name")??"")),r=n.assignedElements();for(const i of r){const o=i.getAttribute("data-preview-id");if(!o)continue;const a=`preview:${o}`;i.getAttribute("slot")!==a&&s.has(a)&&i.setAttribute("slot",a)}r.length!==this.#n&&(this.#n=r.length,queueMicrotask(()=>this.#e.requestUpdate()))}#r=()=>{queueMicrotask(()=>this.route())}}const Sa=(t,e)=>{const n=[],s=r=>{for(const i of r.querySelectorAll("*"))i.matches(e)&&n.push(i),i.shadowRoot&&s(i.shadowRoot)};return s(t),t instanceof Element&&t.shadowRoot&&s(t.shadowRoot),n},Yf=(t,e)=>{const n=[];let s=t;for(;s;){const r=s instanceof Element&&s.assignedSlot?s.assignedSlot:s.parentNode;if(s=r instanceof ShadowRoot?r.host:r,!(s instanceof Element)||s===e)break;n.push(s)}return n},Aa="data-dpk-target",Jf=2800,Ta=48,Xf=t=>t.getClientRects().length>0,Ca=(t,e)=>{const n=Sa(t,`[${Aa}]`).filter(i=>(i.getAttribute(Aa)??"").split(/\s+/).includes(e)),s=Sa(t,"[data-dpk-comment]").filter(i=>i.getAttribute("data-dpk-comment")===e),r=[...n,...s];return r.find(Xf)??r[0]??null},Ea=(t,e)=>{const n=getComputedStyle(t),s=e==="y"?n.overflowY:n.overflowX;return s!=="auto"&&s!=="scroll"?!1:e==="y"?t.scrollHeight>t.clientHeight:t.scrollWidth>t.clientWidth},eg=(t,e)=>{for(const n of Yf(e,t))Ea(n,"y")&&bs(n,e,Ta),Ea(n,"x")&&wo(n,e,Ta)},Ra="color-mix(in srgb, var(--dpk-accent) 45%, transparent)",qe={outline:"2px solid var(--dpk-accent)",outlineOffset:"3px"},_a={outline:"2px solid transparent",outlineOffset:"3px"},tg=t=>t?[{...qe},{...qe,offset:.85},{..._a}]:[{...qe,boxShadow:`0 0 0 0 ${Ra}`},{...qe,boxShadow:"0 0 0 14px transparent",offset:.3},{...qe,boxShadow:`0 0 0 0 ${Ra}`,offset:.31},{...qe,boxShadow:"0 0 0 14px transparent",offset:.6},{...qe,offset:.85},{..._a}],Tt={filter:"drop-shadow(0 0 3px var(--dpk-accent)) drop-shadow(0 0 3px var(--dpk-accent))"},xn={filter:"drop-shadow(0 0 3px transparent) drop-shadow(0 0 3px transparent)"},ng=t=>t?[{...Tt},{...Tt,offset:.85},{...xn}]:[{...Tt},{...xn,offset:.3},{...Tt,offset:.31},{...xn,offset:.6},{...Tt,offset:.61},{...xn}],sg=t=>{if(typeof t.animate!="function")return;const e=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches,n=t instanceof SVGElement&&!(t instanceof SVGSVGElement);t.animate(n?ng(e):tg(e),{duration:Jf,easing:"ease-out"})},rg=440,ig=16;class og{#e;#t=null;constructor(e,n){this.#e=n,e.addController(this)}hostConnected(){window.addEventListener("keydown",this.#r)}hostUpdated(){const e=this.#e.surface(),n=this.#e.open()&&e!==null;if(n!==(this.#t!==null)){if(n){const s=this.#e.anchor()??{top:0,bottom:0,right:window.innerWidth},r=s instanceof Element?s.getBoundingClientRect().bottom:s.bottom,i=Math.max(0,window.innerHeight-r-ig);this.#t=mo(e,s,{width:rg,height:i},{placement:"bottom-end"});return}this.#n(),ko(e)}}hostDisconnected(){window.removeEventListener("keydown",this.#r),this.#n()}#n(){this.#t?.(),this.#t=null}#r=e=>{e.key!=="Escape"||e.defaultPrevented||e.isComposing||!this.#e.open()||this.#e.close()}}const yn="dpk-settings",Oa="dpk-settings-anchor",La={width:320,height:420},Pa=(t,e,n)=>m`<button
|
|
1592
|
-
class="dpk-header-action dpk-settings-trigger"
|
|
1593
|
-
type="button"
|
|
1594
|
-
aria-controls=${yn}
|
|
1595
|
-
aria-haspopup="menu"
|
|
1596
|
-
aria-expanded=${t?"true":"false"}
|
|
1597
|
-
aria-label=${e.settings}
|
|
1598
|
-
data-tooltip=${e.settings}
|
|
1599
|
-
@click=${n.toggle}
|
|
1600
|
-
>
|
|
1601
|
-
${pp()}
|
|
1602
|
-
</button>`,za=(t,e,n)=>m`<div id=${yn} class="dpk-settings" popover="manual" role="menu" aria-label=${e.settings}>
|
|
1603
|
-
${t.items.map(s=>ag(s,n))}
|
|
1604
|
-
${t.note===void 0?k:m`<p class="dpk-settings-note">${t.note}</p>`}
|
|
1605
|
-
</div>`,ag=(t,e)=>m`<button
|
|
1606
|
-
class="dpk-settings-option"
|
|
1607
|
-
type="button"
|
|
1608
|
-
role="menuitemcheckbox"
|
|
1609
|
-
data-setting=${t.key}
|
|
1610
|
-
aria-checked=${t.on?"true":"false"}
|
|
1611
|
-
@click=${()=>e.flip(t.toggle)}
|
|
1612
|
-
>
|
|
1613
|
-
<span class="dpk-settings-check" aria-hidden="true">${t.on?Gi():k}</span>
|
|
1614
|
-
<span class="dpk-settings-text">
|
|
1615
|
-
<span class="dpk-settings-name">${t.label}</span>
|
|
1616
|
-
${t.hint===void 0?k:m`<span class="dpk-settings-hint">${t.hint}</span>`}
|
|
1617
|
-
</span>
|
|
1618
|
-
</button>`,ye={min:180,max:560,step:16,largeStep:64},lg={side:"left",defaultWidth:260},wn=t=>Math.round(Math.min(ye.max,Math.max(ye.min,t))),Ma=t=>typeof t=="number"&&Number.isFinite(t)?wn(t):null,Hs=(t,e)=>t==="left"?e:-e,cg=(t,e)=>wn(t.startWidth+Hs(t.side,e-t.startX)),dg=(t,e,{key:n,shiftKey:s})=>{const r=s?ye.largeStep:ye.step;switch(n){case"ArrowLeft":return wn(t+Hs(e,-r));case"ArrowRight":return wn(t+Hs(e,r));case"Home":return ye.min;case"End":return ye.max;default:return null}},Ia=t=>typeof t=="boolean"?t:null,pg=t=>t==="left"?"right":"left",hg=(t,e)=>e?{action:"expand",points:pg(t)}:{action:"collapse",points:t},ug=t=>`dev-process-kit:sidebar-collapsed:${t}`;class fg{#e;#t;#n=null;#r="";#s=!1;#i=!1;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}hostConnected(){this.#n===null&&(this.#n=this.#t.persist()?Xe(Ia):he(Ia),this.#r=ug(this.#t.template()),this.#s=this.#n.read(this.#r)??!1)}get collapsed(){return this.#s}get drawerOpen(){return this.#i}toggleDrawer(){this.#i=!this.#i,this.#e.requestUpdate()}closeDrawer(){this.#i&&(this.#i=!1,this.#e.requestUpdate())}toggle(){this.#s=!this.#s,this.#s?this.#n?.write(this.#r,!0):this.#n?.remove(this.#r),this.#e.requestUpdate()}}const gg=t=>`dev-process-kit:sidebar-width:${t}`,Us={kind:"idle"};class mg{constructor(e,n){this.#n=null,this.#r="",this.#s=null,this.#i=Us,this.handlers={pointerdown:s=>{s.button===0&&(s.preventDefault(),s.currentTarget instanceof Element&&s.currentTarget.setPointerCapture(s.pointerId),this.#i={kind:"dragging",pointerId:s.pointerId,side:this.#t.layout().side,startX:s.clientX,startWidth:this.width},this.#e.requestUpdate())},pointermove:s=>{const r=this.#i;r.kind!=="dragging"||r.pointerId!==s.pointerId||this.#a(cg(r,s.clientX))},pointerup:s=>this.#o(s),pointercancel:s=>this.#o(s),keydown:s=>{const r=dg(this.width,this.#t.layout().side,s);r!==null&&(s.preventDefault(),this.#a(r),this.#l())},dblclick:()=>{this.#a(this.#t.layout().defaultWidth),this.#l()}},this.#e=e,this.#t=n,e.addController(this)}#e;#t;#n;#r;#s;#i;hostConnected(){this.#n===null&&(this.#n=this.#t.persist()?Xe(Ma):he(Ma),this.#r=gg(this.#t.template()),this.#s=this.#n.read(this.#r))}hostDisconnected(){this.#i=Us}get width(){return this.#s??this.#t.layout().defaultWidth}get dragging(){return this.#i.kind==="dragging"}#o(e){const n=this.#i;n.kind!=="dragging"||n.pointerId!==e.pointerId||(this.#i=Us,this.#l(),this.#e.requestUpdate())}#a(e){const n=e===this.#t.layout().defaultWidth?null:e;n!==this.#s&&(this.#s=n,this.#e.requestUpdate())}#l(){this.#s===null?this.#n?.remove(this.#r):this.#n?.write(this.#r,this.#s)}}const Na=[Nt,Dn,fe`
|
|
1619
|
-
:host {
|
|
1620
|
-
display: block;
|
|
1621
|
-
min-height: 100%;
|
|
1622
|
-
background: var(--dpk-paper);
|
|
1623
|
-
color-scheme: light;
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
/* The element stamps its resolved scheme; nested components inherit it. */
|
|
1627
|
-
:host([data-theme='dark']) {
|
|
1628
|
-
color-scheme: dark;
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
/* An inactive board of a page stays mounted, out of sight. */
|
|
1632
|
-
:host([hidden]) {
|
|
1633
|
-
display: none;
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
.dpk-shell {
|
|
1637
|
-
display: grid;
|
|
1638
|
-
/* One column no wider than the host: a truncated title must not widen
|
|
1639
|
-
the page past a phone screen. */
|
|
1640
|
-
grid-template-columns: minmax(0, 1fr);
|
|
1641
|
-
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
1642
|
-
min-height: 100%;
|
|
1643
|
-
max-height: 100%;
|
|
1644
|
-
/*
|
|
1645
|
-
* The fallback when the page gives the host no height: the viewport, less
|
|
1646
|
-
* the safe-area insets a Claude Artifact pads its root by. Without it the
|
|
1647
|
-
* shell grows with its content, leaving the page's own ground below a
|
|
1648
|
-
* short page and scrolling the header and the supplements away on a long one.
|
|
1649
|
-
* A host with a height still wins: the min/max-height above pin the shell
|
|
1650
|
-
* to it.
|
|
1651
|
-
*/
|
|
1652
|
-
height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
/* A board fills the page's main column; the viewport is the page's. */
|
|
1656
|
-
.dpk-shell[data-board] {
|
|
1657
|
-
height: 100%;
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
.dpk-shell[data-board] > .dpk-board-bar {
|
|
1661
|
-
grid-row: 1;
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
.dpk-shell[data-board] > .dpk-body {
|
|
1665
|
-
grid-row: 2;
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
.dpk-shell[data-board] > .dpk-footer {
|
|
1669
|
-
grid-row: 3;
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
.dpk-board-bar {
|
|
1673
|
-
display: flex;
|
|
1674
|
-
flex-wrap: wrap;
|
|
1675
|
-
align-items: center;
|
|
1676
|
-
gap: 8px 14px;
|
|
1677
|
-
min-height: 40px;
|
|
1678
|
-
padding: 4px 16px;
|
|
1679
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
1680
|
-
background: var(--dpk-glass);
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
.dpk-board-bar[hidden] {
|
|
1684
|
-
display: none;
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
/* ------------------------------------------------------------- header */
|
|
1688
|
-
|
|
1689
|
-
.dpk-header {
|
|
1690
|
-
position: relative;
|
|
1691
|
-
z-index: 20;
|
|
1692
|
-
display: flex;
|
|
1693
|
-
flex-wrap: wrap;
|
|
1694
|
-
align-items: center;
|
|
1695
|
-
gap: 8px 14px;
|
|
1696
|
-
min-height: 44px;
|
|
1697
|
-
/* Right padding keeps the header content clear of the fixed review toggles. */
|
|
1698
|
-
padding: 6px 100px 6px 16px;
|
|
1699
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
1700
|
-
background: var(--dpk-glass);
|
|
1701
|
-
backdrop-filter: saturate(1.6) blur(14px);
|
|
1702
|
-
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1705
|
-
/* A hairline of the accent along the bottom edge, fading out to the right. */
|
|
1706
|
-
.dpk-header::after {
|
|
1707
|
-
content: '';
|
|
1708
|
-
position: absolute;
|
|
1709
|
-
left: 0;
|
|
1710
|
-
right: 0;
|
|
1711
|
-
bottom: -1px;
|
|
1712
|
-
height: 1px;
|
|
1713
|
-
background: linear-gradient(
|
|
1714
|
-
90deg,
|
|
1715
|
-
color-mix(in srgb, var(--dpk-accent) 70%, transparent),
|
|
1716
|
-
color-mix(in srgb, var(--dpk-accent) 0%, transparent) 38%
|
|
1717
|
-
);
|
|
1718
|
-
pointer-events: none;
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
/* Kit mark: a stack of pages, the single HTML page the agent wrote. */
|
|
1722
|
-
.dpk-brand {
|
|
1723
|
-
position: relative;
|
|
1724
|
-
flex: none;
|
|
1725
|
-
width: 32px;
|
|
1726
|
-
height: 32px;
|
|
1727
|
-
border-radius: 9px;
|
|
1728
|
-
background:
|
|
1729
|
-
radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 60%),
|
|
1730
|
-
linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
1731
|
-
box-shadow:
|
|
1732
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.3),
|
|
1733
|
-
inset 0 -1px 0 rgba(0, 0, 0, 0.12),
|
|
1734
|
-
0 4px 12px -4px color-mix(in srgb, var(--dpk-accent) 70%, transparent);
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
.dpk-brand::before,
|
|
1738
|
-
.dpk-brand::after {
|
|
1739
|
-
content: '';
|
|
1740
|
-
position: absolute;
|
|
1741
|
-
width: 12px;
|
|
1742
|
-
height: 15px;
|
|
1743
|
-
border-radius: 3px;
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
|
-
.dpk-brand::before {
|
|
1747
|
-
left: 12px;
|
|
1748
|
-
top: 7px;
|
|
1749
|
-
background: rgba(255, 255, 255, 0.4);
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
.dpk-brand::after {
|
|
1753
|
-
left: 8px;
|
|
1754
|
-
top: 10px;
|
|
1755
|
-
background:
|
|
1756
|
-
linear-gradient(var(--dpk-accent), var(--dpk-accent)) 3px 4px / 6px 1.5px no-repeat,
|
|
1757
|
-
linear-gradient(var(--dpk-accent), var(--dpk-accent)) 3px 7.5px / 4px 1.5px no-repeat,
|
|
1758
|
-
#fff;
|
|
1759
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
|
|
1760
|
-
}
|
|
1761
|
-
|
|
1762
|
-
/* The title takes what the header has left: the template's header content
|
|
1763
|
-
keeps its own width, and only a title too long for the rest ellipsizes.
|
|
1764
|
-
Header content with no room beside the title wraps to a row of its own
|
|
1765
|
-
rather than being squeezed. */
|
|
1766
|
-
.dpk-title {
|
|
1767
|
-
flex: 1 1 0%;
|
|
1768
|
-
display: flex;
|
|
1769
|
-
flex-direction: column;
|
|
1770
|
-
gap: 3px;
|
|
1771
|
-
min-width: min(160px, 100%);
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
.dpk-title h1 {
|
|
1775
|
-
font-size: 16px;
|
|
1776
|
-
font-weight: 680;
|
|
1777
|
-
letter-spacing: -0.02em;
|
|
1778
|
-
white-space: nowrap;
|
|
1779
|
-
overflow: hidden;
|
|
1780
|
-
text-overflow: ellipsis;
|
|
1781
|
-
}
|
|
1782
|
-
|
|
1783
|
-
.dpk-template-mark {
|
|
1784
|
-
align-self: flex-start;
|
|
1785
|
-
font-family: var(--dpk-mono);
|
|
1786
|
-
font-size: 9.5px;
|
|
1787
|
-
font-weight: 600;
|
|
1788
|
-
letter-spacing: 0.14em;
|
|
1789
|
-
line-height: 1;
|
|
1790
|
-
text-transform: uppercase;
|
|
1791
|
-
color: var(--dpk-accent);
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
.dpk-header-slot {
|
|
1795
|
-
flex: 0 1 auto;
|
|
1796
|
-
min-width: 0;
|
|
1797
|
-
display: flex;
|
|
1798
|
-
align-items: center;
|
|
1799
|
-
gap: 10px;
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
.dpk-header-meta {
|
|
1803
|
-
display: flex;
|
|
1804
|
-
align-items: center;
|
|
1805
|
-
gap: 0;
|
|
1806
|
-
margin-left: auto;
|
|
1807
|
-
padding: 3px;
|
|
1808
|
-
border-radius: 999px;
|
|
1809
|
-
border: 1px solid var(--dpk-rule);
|
|
1810
|
-
background: var(--dpk-paper-sunken);
|
|
1811
|
-
font-family: var(--dpk-mono);
|
|
1812
|
-
font-size: 10px;
|
|
1813
|
-
letter-spacing: 0.02em;
|
|
1814
|
-
color: var(--dpk-ink-faint);
|
|
1815
|
-
white-space: nowrap;
|
|
1816
|
-
}
|
|
1817
|
-
|
|
1818
|
-
.dpk-header-meta span {
|
|
1819
|
-
padding: 3px 9px;
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
.dpk-header-meta span + span {
|
|
1823
|
-
border-left: 1px solid var(--dpk-rule);
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
|
-
.dpk-version-select {
|
|
1827
|
-
margin: -3px 0;
|
|
1828
|
-
padding: 3px 14px 3px 0;
|
|
1829
|
-
border: 0;
|
|
1830
|
-
border-radius: 4px;
|
|
1831
|
-
background: transparent
|
|
1832
|
-
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>")
|
|
1833
|
-
no-repeat right 2px center;
|
|
1834
|
-
appearance: none;
|
|
1835
|
-
/* As wide as the version shown, not the longest prerelease in the list. */
|
|
1836
|
-
field-sizing: content;
|
|
1837
|
-
color: inherit;
|
|
1838
|
-
font: inherit;
|
|
1839
|
-
letter-spacing: inherit;
|
|
1840
|
-
cursor: pointer;
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
.dpk-version-select:hover {
|
|
1844
|
-
color: var(--dpk-ink-soft);
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
.dpk-version-select:focus-visible {
|
|
1848
|
-
outline: none;
|
|
1849
|
-
box-shadow: var(--dpk-focus);
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
.dpk-header-tools {
|
|
1853
|
-
display: flex;
|
|
1854
|
-
flex: none;
|
|
1855
|
-
align-items: center;
|
|
1856
|
-
gap: 2px;
|
|
1857
|
-
padding: 2px;
|
|
1858
|
-
border: 1px solid var(--dpk-rule);
|
|
1859
|
-
border-radius: 999px;
|
|
1860
|
-
background: var(--dpk-paper-sunken);
|
|
1861
|
-
}
|
|
1862
|
-
|
|
1863
|
-
.dpk-lang-select {
|
|
1864
|
-
flex: none;
|
|
1865
|
-
height: 26px;
|
|
1866
|
-
padding: 0 24px 0 10px;
|
|
1867
|
-
border: 0;
|
|
1868
|
-
border-radius: 999px;
|
|
1869
|
-
background: transparent
|
|
1870
|
-
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>")
|
|
1871
|
-
no-repeat right 8px center;
|
|
1872
|
-
appearance: none;
|
|
1873
|
-
color: var(--dpk-ink-soft);
|
|
1874
|
-
font: inherit;
|
|
1875
|
-
font-size: 12px;
|
|
1876
|
-
font-weight: 520;
|
|
1877
|
-
cursor: pointer;
|
|
1878
|
-
transition:
|
|
1879
|
-
color 160ms var(--dpk-ease),
|
|
1880
|
-
background-color 160ms var(--dpk-ease);
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
.dpk-lang-select:hover {
|
|
1884
|
-
color: var(--dpk-ink);
|
|
1885
|
-
background-color: var(--dpk-paper-raised);
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
.dpk-lang-select:focus-visible {
|
|
1889
|
-
outline: none;
|
|
1890
|
-
box-shadow: var(--dpk-focus);
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
.dpk-theme-toggle {
|
|
1894
|
-
display: inline-flex;
|
|
1895
|
-
flex: none;
|
|
1896
|
-
align-items: center;
|
|
1897
|
-
justify-content: center;
|
|
1898
|
-
width: 26px;
|
|
1899
|
-
height: 26px;
|
|
1900
|
-
padding: 0;
|
|
1901
|
-
border: 0;
|
|
1902
|
-
border-radius: 999px;
|
|
1903
|
-
background: transparent;
|
|
1904
|
-
color: var(--dpk-ink-soft);
|
|
1905
|
-
cursor: pointer;
|
|
1906
|
-
transition:
|
|
1907
|
-
color 160ms var(--dpk-ease),
|
|
1908
|
-
background 160ms var(--dpk-ease),
|
|
1909
|
-
transform 300ms var(--dpk-ease-spring);
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
|
-
.dpk-theme-toggle svg {
|
|
1913
|
-
width: 14px;
|
|
1914
|
-
height: 14px;
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
.dpk-theme-toggle:hover {
|
|
1918
|
-
color: var(--dpk-ink);
|
|
1919
|
-
background: var(--dpk-paper-raised);
|
|
1920
|
-
transform: rotate(-18deg);
|
|
1921
|
-
}
|
|
1922
|
-
|
|
1923
|
-
.dpk-theme-toggle:focus-visible {
|
|
1924
|
-
outline: none;
|
|
1925
|
-
box-shadow: var(--dpk-focus);
|
|
1926
|
-
}
|
|
1927
|
-
|
|
1928
|
-
/* ------------------------------------------------------------ changes */
|
|
1929
|
-
|
|
1930
|
-
.dpk-bell {
|
|
1931
|
-
position: relative;
|
|
1932
|
-
display: inline-flex;
|
|
1933
|
-
flex: none;
|
|
1934
|
-
align-items: center;
|
|
1935
|
-
justify-content: center;
|
|
1936
|
-
width: 26px;
|
|
1937
|
-
height: 26px;
|
|
1938
|
-
padding: 0;
|
|
1939
|
-
border: 0;
|
|
1940
|
-
border-radius: 999px;
|
|
1941
|
-
background: transparent;
|
|
1942
|
-
color: var(--dpk-ink-soft);
|
|
1943
|
-
cursor: pointer;
|
|
1944
|
-
transition:
|
|
1945
|
-
color 160ms var(--dpk-ease),
|
|
1946
|
-
background 160ms var(--dpk-ease);
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
.dpk-bell svg {
|
|
1950
|
-
width: 14px;
|
|
1951
|
-
height: 14px;
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
.dpk-bell:hover,
|
|
1955
|
-
.dpk-bell[aria-expanded='true'] {
|
|
1956
|
-
color: var(--dpk-ink);
|
|
1957
|
-
background: var(--dpk-paper-raised);
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
.dpk-bell:focus-visible {
|
|
1961
|
-
outline: none;
|
|
1962
|
-
box-shadow: var(--dpk-focus);
|
|
1963
|
-
}
|
|
1964
|
-
|
|
1965
|
-
.dpk-bell-badge {
|
|
1966
|
-
position: absolute;
|
|
1967
|
-
top: -5px;
|
|
1968
|
-
right: -5px;
|
|
1969
|
-
min-width: 16px;
|
|
1970
|
-
height: 16px;
|
|
1971
|
-
padding: 0 3px;
|
|
1972
|
-
border: 2px solid var(--dpk-paper);
|
|
1973
|
-
border-radius: 999px;
|
|
1974
|
-
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
1975
|
-
color: var(--dpk-accent-ink);
|
|
1976
|
-
font-family: var(--dpk-mono);
|
|
1977
|
-
font-size: 9px;
|
|
1978
|
-
font-weight: 650;
|
|
1979
|
-
font-variant-numeric: tabular-nums;
|
|
1980
|
-
line-height: 12px;
|
|
1981
|
-
text-align: center;
|
|
1982
|
-
animation: dpk-pop 260ms var(--dpk-ease-spring);
|
|
1983
|
-
}
|
|
1984
|
-
|
|
1985
|
-
.dpk-changes {
|
|
1986
|
-
box-sizing: border-box;
|
|
1987
|
-
overflow: auto;
|
|
1988
|
-
position: fixed;
|
|
1989
|
-
inset: auto;
|
|
1990
|
-
margin: 0;
|
|
1991
|
-
padding: 12px;
|
|
1992
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
1993
|
-
border-radius: var(--dpk-radius-lg);
|
|
1994
|
-
background: var(--dpk-paper-raised);
|
|
1995
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
1996
|
-
color: var(--dpk-ink);
|
|
1997
|
-
font-size: 12.5px;
|
|
1998
|
-
animation: dpk-notice-in 180ms var(--dpk-ease);
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
.dpk-changes-head {
|
|
2002
|
-
display: flex;
|
|
2003
|
-
align-items: baseline;
|
|
2004
|
-
justify-content: space-between;
|
|
2005
|
-
gap: 8px;
|
|
2006
|
-
margin: 0 2px 10px;
|
|
2007
|
-
}
|
|
2008
|
-
|
|
2009
|
-
.dpk-changes-head {
|
|
2010
|
-
align-items: center;
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
.dpk-changes-title {
|
|
2014
|
-
margin: 0;
|
|
2015
|
-
font-size: inherit;
|
|
2016
|
-
font-weight: 650;
|
|
2017
|
-
}
|
|
2018
|
-
|
|
2019
|
-
.dpk-changes-read-all.dpk-btn {
|
|
2020
|
-
flex: none;
|
|
2021
|
-
font-size: 11.5px;
|
|
2022
|
-
}
|
|
2023
|
-
|
|
2024
|
-
.dpk-changes-read-all[aria-disabled='true'] {
|
|
2025
|
-
opacity: 0.5;
|
|
2026
|
-
cursor: default;
|
|
2027
|
-
pointer-events: none;
|
|
2028
|
-
}
|
|
2029
|
-
|
|
2030
|
-
.dpk-changes-group + .dpk-changes-group {
|
|
2031
|
-
margin-top: 14px;
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
.dpk-changes-revision {
|
|
2035
|
-
display: flex;
|
|
2036
|
-
align-items: center;
|
|
2037
|
-
gap: 6px;
|
|
2038
|
-
margin: 0 2px 6px;
|
|
2039
|
-
color: var(--dpk-ink-faint);
|
|
2040
|
-
font-family: var(--dpk-mono);
|
|
2041
|
-
font-size: 11px;
|
|
2042
|
-
font-weight: 500;
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
.dpk-changes-revision span:first-child {
|
|
2046
|
-
overflow: hidden;
|
|
2047
|
-
text-overflow: ellipsis;
|
|
2048
|
-
white-space: nowrap;
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
|
-
.dpk-changes-current {
|
|
2052
|
-
flex: none;
|
|
2053
|
-
padding: 1px 6px;
|
|
2054
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2055
|
-
border-radius: 999px;
|
|
2056
|
-
color: var(--dpk-ink-soft);
|
|
2057
|
-
font-family: var(--dpk-body);
|
|
2058
|
-
font-size: 10px;
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
|
-
.dpk-changes-list {
|
|
2062
|
-
display: grid;
|
|
2063
|
-
gap: 6px;
|
|
2064
|
-
margin: 0;
|
|
2065
|
-
padding: 0;
|
|
2066
|
-
list-style: none;
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
.dpk-change {
|
|
2070
|
-
display: grid;
|
|
2071
|
-
gap: 4px;
|
|
2072
|
-
padding: 9px 10px;
|
|
2073
|
-
border: 1px solid var(--dpk-rule);
|
|
2074
|
-
border-radius: var(--dpk-radius);
|
|
2075
|
-
background: var(--dpk-paper);
|
|
2076
|
-
}
|
|
2077
|
-
|
|
2078
|
-
.dpk-change[data-fresh] {
|
|
2079
|
-
border-color: color-mix(in srgb, var(--dpk-accent) 35%, transparent);
|
|
2080
|
-
background: var(--dpk-accent-soft);
|
|
2081
|
-
}
|
|
2082
|
-
|
|
2083
|
-
.dpk-change .dpk-notice-show {
|
|
2084
|
-
justify-self: end;
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
|
-
.dpk-change-title {
|
|
2088
|
-
margin: 0;
|
|
2089
|
-
font-weight: 600;
|
|
2090
|
-
line-height: 1.4;
|
|
2091
|
-
overflow-wrap: anywhere;
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
.dpk-change-new {
|
|
2095
|
-
margin-right: 4px;
|
|
2096
|
-
padding: 1px 6px;
|
|
2097
|
-
border-radius: 999px;
|
|
2098
|
-
background: var(--dpk-accent);
|
|
2099
|
-
color: var(--dpk-accent-ink);
|
|
2100
|
-
font-size: 10px;
|
|
2101
|
-
font-weight: 650;
|
|
2102
|
-
vertical-align: 1px;
|
|
2103
|
-
}
|
|
2104
|
-
|
|
2105
|
-
.dpk-change-body {
|
|
2106
|
-
margin: 0;
|
|
2107
|
-
color: var(--dpk-ink-soft);
|
|
2108
|
-
line-height: 1.5;
|
|
2109
|
-
white-space: pre-line;
|
|
2110
|
-
overflow-wrap: anywhere;
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
|
-
/* Below the review button, at the top right where the bell is. */
|
|
2114
|
-
.dpk-toasts {
|
|
2115
|
-
position: fixed;
|
|
2116
|
-
top: 64px;
|
|
2117
|
-
right: 16px;
|
|
2118
|
-
z-index: 70;
|
|
2119
|
-
display: grid;
|
|
2120
|
-
justify-items: end;
|
|
2121
|
-
gap: 8px;
|
|
2122
|
-
width: min(360px, calc(100vw - 32px));
|
|
2123
|
-
pointer-events: none;
|
|
2124
|
-
}
|
|
2125
|
-
|
|
2126
|
-
.dpk-toast {
|
|
2127
|
-
box-sizing: border-box;
|
|
2128
|
-
display: grid;
|
|
2129
|
-
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
|
2130
|
-
align-items: start;
|
|
2131
|
-
gap: 10px;
|
|
2132
|
-
width: 100%;
|
|
2133
|
-
padding: 10px 8px 10px 12px;
|
|
2134
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2135
|
-
border-radius: var(--dpk-radius-lg);
|
|
2136
|
-
background: var(--dpk-paper-raised);
|
|
2137
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2138
|
-
color: var(--dpk-ink);
|
|
2139
|
-
font-size: 12.5px;
|
|
2140
|
-
pointer-events: auto;
|
|
2141
|
-
animation: dpk-notice-in 260ms var(--dpk-ease);
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
.dpk-toast-icon {
|
|
2145
|
-
display: inline-flex;
|
|
2146
|
-
padding-top: 2px;
|
|
2147
|
-
color: var(--dpk-accent);
|
|
2148
|
-
}
|
|
2149
|
-
|
|
2150
|
-
.dpk-toast-icon svg {
|
|
2151
|
-
width: 14px;
|
|
2152
|
-
height: 14px;
|
|
2153
|
-
}
|
|
2154
|
-
|
|
2155
|
-
.dpk-toast-text {
|
|
2156
|
-
display: grid;
|
|
2157
|
-
gap: 2px;
|
|
2158
|
-
}
|
|
2159
|
-
|
|
2160
|
-
.dpk-toast .dpk-change-body {
|
|
2161
|
-
display: -webkit-box;
|
|
2162
|
-
overflow: hidden;
|
|
2163
|
-
-webkit-box-orient: vertical;
|
|
2164
|
-
-webkit-line-clamp: 2;
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
.dpk-toast-close {
|
|
2168
|
-
display: inline-flex;
|
|
2169
|
-
align-items: center;
|
|
2170
|
-
justify-content: center;
|
|
2171
|
-
width: 22px;
|
|
2172
|
-
height: 22px;
|
|
2173
|
-
padding: 0;
|
|
2174
|
-
border: 0;
|
|
2175
|
-
border-radius: 999px;
|
|
2176
|
-
background: transparent;
|
|
2177
|
-
color: var(--dpk-ink-faint);
|
|
2178
|
-
cursor: pointer;
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
|
-
.dpk-toast-close svg {
|
|
2182
|
-
width: 12px;
|
|
2183
|
-
height: 12px;
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
|
-
.dpk-toast-close:hover {
|
|
2187
|
-
color: var(--dpk-ink);
|
|
2188
|
-
background: var(--dpk-paper-sunken);
|
|
2189
|
-
}
|
|
2190
|
-
|
|
2191
|
-
.dpk-toast-close:focus-visible {
|
|
2192
|
-
outline: none;
|
|
2193
|
-
box-shadow: var(--dpk-focus);
|
|
2194
|
-
}
|
|
2195
|
-
|
|
2196
|
-
.dpk-toast-actions {
|
|
2197
|
-
display: flex;
|
|
2198
|
-
flex-wrap: wrap;
|
|
2199
|
-
justify-content: end;
|
|
2200
|
-
gap: 6px;
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
.dpk-toast-more {
|
|
2204
|
-
padding: 4px 10px;
|
|
2205
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2206
|
-
border-radius: 999px;
|
|
2207
|
-
background: var(--dpk-paper-raised);
|
|
2208
|
-
color: var(--dpk-ink-soft);
|
|
2209
|
-
font: inherit;
|
|
2210
|
-
font-size: 11.5px;
|
|
2211
|
-
cursor: pointer;
|
|
2212
|
-
pointer-events: auto;
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2215
|
-
.dpk-toast-more:hover {
|
|
2216
|
-
color: var(--dpk-ink);
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
|
-
.dpk-toast-more:focus-visible {
|
|
2220
|
-
outline: none;
|
|
2221
|
-
box-shadow: var(--dpk-focus);
|
|
2222
|
-
}
|
|
2223
|
-
|
|
2224
|
-
@keyframes dpk-notice-in {
|
|
2225
|
-
from {
|
|
2226
|
-
opacity: 0;
|
|
2227
|
-
transform: translateY(-6px) scale(0.98);
|
|
2228
|
-
}
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
|
-
/* --------------------------------------------------------------- body */
|
|
2232
|
-
|
|
2233
|
-
/* Positioned: the sidebar drawer and a narrow screen's review open over it. */
|
|
2234
|
-
.dpk-body {
|
|
2235
|
-
position: relative;
|
|
2236
|
-
display: flex;
|
|
2237
|
-
min-height: 0;
|
|
2238
|
-
}
|
|
2239
|
-
|
|
2240
|
-
.dpk-sidebar {
|
|
2241
|
-
/* The element sets the template's or the reader's width; on a narrow
|
|
2242
|
-
screen a wide one still leaves the main column some room. */
|
|
2243
|
-
width: var(--dpk-sidebar-width);
|
|
2244
|
-
max-width: calc(100% - 120px);
|
|
2245
|
-
flex: 0 0 auto;
|
|
2246
|
-
border-right: 1px solid var(--dpk-rule);
|
|
2247
|
-
background: var(--dpk-paper-sunken);
|
|
2248
|
-
overflow: auto;
|
|
2249
|
-
padding: 18px 14px;
|
|
2250
|
-
scrollbar-width: thin;
|
|
2251
|
-
}
|
|
2252
|
-
|
|
2253
|
-
.dpk-sidebar[hidden] {
|
|
2254
|
-
display: none;
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
/*
|
|
2258
|
-
* A right-hand sidebar: a rail beside the main column rather than a list
|
|
2259
|
-
* before it. \`:where\` keeps these as weak as the rules above, so a
|
|
2260
|
-
* template can still restyle the rail (stacking it on a phone, say).
|
|
2261
|
-
*/
|
|
2262
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-main {
|
|
2263
|
-
order: 1;
|
|
2264
|
-
}
|
|
2265
|
-
|
|
2266
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar,
|
|
2267
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-resizer,
|
|
2268
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-toggle,
|
|
2269
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-strip {
|
|
2270
|
-
order: 2;
|
|
2271
|
-
}
|
|
2272
|
-
|
|
2273
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar,
|
|
2274
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-strip {
|
|
2275
|
-
border-right: 0;
|
|
2276
|
-
border-left: 1px solid var(--dpk-rule);
|
|
2277
|
-
}
|
|
2278
|
-
|
|
2279
|
-
/*
|
|
2280
|
-
* The fold button. Expanded, it sits on the sidebar's border near the top
|
|
2281
|
-
* and, like the resizer, takes no room of its own; folded, it is the only
|
|
2282
|
-
* thing left in a narrow strip where the sidebar was.
|
|
2283
|
-
*/
|
|
2284
|
-
.dpk-sidebar-toggle {
|
|
2285
|
-
position: relative;
|
|
2286
|
-
z-index: 7;
|
|
2287
|
-
display: inline-flex;
|
|
2288
|
-
flex: none;
|
|
2289
|
-
align-self: flex-start;
|
|
2290
|
-
align-items: center;
|
|
2291
|
-
justify-content: center;
|
|
2292
|
-
width: 22px;
|
|
2293
|
-
height: 22px;
|
|
2294
|
-
margin: 14px -11px 0;
|
|
2295
|
-
padding: 0;
|
|
2296
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2297
|
-
border-radius: 999px;
|
|
2298
|
-
background: var(--dpk-paper-raised);
|
|
2299
|
-
color: var(--dpk-ink-soft);
|
|
2300
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
2301
|
-
cursor: pointer;
|
|
2302
|
-
transition:
|
|
2303
|
-
color 160ms var(--dpk-ease),
|
|
2304
|
-
border-color 160ms var(--dpk-ease),
|
|
2305
|
-
background 160ms var(--dpk-ease);
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
.dpk-sidebar-toggle svg {
|
|
2309
|
-
width: 13px;
|
|
2310
|
-
height: 13px;
|
|
2311
|
-
}
|
|
2312
|
-
|
|
2313
|
-
.dpk-sidebar-toggle:hover {
|
|
2314
|
-
color: var(--dpk-accent);
|
|
2315
|
-
border-color: color-mix(in srgb, var(--dpk-accent) 45%, transparent);
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
.dpk-sidebar-toggle:focus-visible {
|
|
2319
|
-
outline: none;
|
|
2320
|
-
box-shadow: var(--dpk-focus);
|
|
2321
|
-
}
|
|
2322
|
-
|
|
2323
|
-
.dpk-sidebar-strip {
|
|
2324
|
-
display: flex;
|
|
2325
|
-
flex: none;
|
|
2326
|
-
justify-content: center;
|
|
2327
|
-
width: 36px;
|
|
2328
|
-
padding-top: 14px;
|
|
2329
|
-
border-right: 1px solid var(--dpk-rule);
|
|
2330
|
-
background: var(--dpk-paper-sunken);
|
|
2331
|
-
}
|
|
2332
|
-
|
|
2333
|
-
.dpk-sidebar-strip .dpk-sidebar-toggle {
|
|
2334
|
-
margin: 0;
|
|
2335
|
-
}
|
|
2336
|
-
|
|
2337
|
-
/*
|
|
2338
|
-
* The sidebar's resizable edge: a hit area straddling its border that takes
|
|
2339
|
-
* no room of its own, with an accent line while hovered, focused or dragged.
|
|
2340
|
-
*/
|
|
2341
|
-
.dpk-sidebar-resizer {
|
|
2342
|
-
position: relative;
|
|
2343
|
-
z-index: 6;
|
|
2344
|
-
flex: none;
|
|
2345
|
-
width: 9px;
|
|
2346
|
-
/* Centred on the sidebar's border, whichever side that is. */
|
|
2347
|
-
margin: 0 -5px 0 -4px;
|
|
2348
|
-
cursor: col-resize;
|
|
2349
|
-
touch-action: none;
|
|
2350
|
-
}
|
|
2351
|
-
|
|
2352
|
-
.dpk-sidebar-resizer::after {
|
|
2353
|
-
content: '';
|
|
2354
|
-
position: absolute;
|
|
2355
|
-
top: 0;
|
|
2356
|
-
bottom: 0;
|
|
2357
|
-
left: 3px;
|
|
2358
|
-
width: 2px;
|
|
2359
|
-
border-radius: 1px;
|
|
2360
|
-
background: var(--dpk-accent);
|
|
2361
|
-
opacity: 0;
|
|
2362
|
-
transition: opacity 160ms var(--dpk-ease);
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
.dpk-sidebar-resizer:hover::after,
|
|
2366
|
-
.dpk-sidebar-resizer:focus-visible::after,
|
|
2367
|
-
.dpk-shell[data-resizing] .dpk-sidebar-resizer::after {
|
|
2368
|
-
opacity: 1;
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
.dpk-sidebar-resizer:focus-visible {
|
|
2372
|
-
outline: none;
|
|
2373
|
-
}
|
|
2374
|
-
|
|
2375
|
-
/*
|
|
2376
|
-
* A phone-width screen has no room for a column beside the main one: the
|
|
2377
|
-
* sidebar is a drawer that the strip's button slides over the main column,
|
|
2378
|
-
* leaving a sliver of it to tap the drawer shut.
|
|
2379
|
-
*/
|
|
2380
|
-
.dpk-body[data-sidebar-drawer] > .dpk-sidebar {
|
|
2381
|
-
position: absolute;
|
|
2382
|
-
top: 0;
|
|
2383
|
-
bottom: 0;
|
|
2384
|
-
left: 36px;
|
|
2385
|
-
z-index: 25;
|
|
2386
|
-
width: min(var(--dpk-sidebar-width), calc(100% - 36px - 48px));
|
|
2387
|
-
max-width: none;
|
|
2388
|
-
box-shadow: var(--dpk-shadow-lg);
|
|
2389
|
-
}
|
|
2390
|
-
|
|
2391
|
-
.dpk-body[data-sidebar-drawer][data-sidebar-side='right'] > .dpk-sidebar {
|
|
2392
|
-
left: auto;
|
|
2393
|
-
right: 36px;
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
.dpk-sidebar-scrim {
|
|
2397
|
-
position: absolute;
|
|
2398
|
-
inset: 0;
|
|
2399
|
-
z-index: 24;
|
|
2400
|
-
background: color-mix(in srgb, var(--dpk-ink) 16%, transparent);
|
|
2401
|
-
}
|
|
2402
|
-
|
|
2403
|
-
/* While dragging, the cursor stays put and nothing underneath (text, preview frames) reacts. */
|
|
2404
|
-
.dpk-shell[data-resizing] {
|
|
2405
|
-
cursor: col-resize;
|
|
2406
|
-
user-select: none;
|
|
2407
|
-
}
|
|
2408
|
-
|
|
2409
|
-
.dpk-shell[data-resizing] .dpk-main {
|
|
2410
|
-
pointer-events: none;
|
|
2411
|
-
}
|
|
2412
|
-
|
|
2413
|
-
.dpk-main {
|
|
2414
|
-
flex: 1 1 0%;
|
|
2415
|
-
display: flex;
|
|
2416
|
-
flex-direction: column;
|
|
2417
|
-
min-width: 0;
|
|
2418
|
-
overflow: auto;
|
|
2419
|
-
/* A faint wash of the accent from the top left corner gives the ground some depth. */
|
|
2420
|
-
background:
|
|
2421
|
-
radial-gradient(
|
|
2422
|
-
ellipse 900px 360px at 0% 0%,
|
|
2423
|
-
color-mix(in srgb, var(--dpk-accent) 5%, transparent),
|
|
2424
|
-
transparent 70%
|
|
2425
|
-
),
|
|
2426
|
-
radial-gradient(
|
|
2427
|
-
ellipse 700px 320px at 100% 0%,
|
|
2428
|
-
color-mix(in srgb, var(--dpk-blue) 4%, transparent),
|
|
2429
|
-
transparent 70%
|
|
2430
|
-
),
|
|
2431
|
-
var(--dpk-paper);
|
|
2432
|
-
background-attachment: local;
|
|
2433
|
-
}
|
|
2434
|
-
|
|
2435
|
-
.dpk-main-body {
|
|
2436
|
-
flex: 1 0 auto;
|
|
2437
|
-
display: grid;
|
|
2438
|
-
/* The column is as wide as the page, not as its widest unbreakable line. */
|
|
2439
|
-
grid-template-columns: minmax(0, 1fr);
|
|
2440
|
-
align-content: start;
|
|
2441
|
-
gap: 16px;
|
|
2442
|
-
min-width: 0;
|
|
2443
|
-
padding: 24px;
|
|
2444
|
-
animation: dpk-rise 420ms var(--dpk-ease) backwards;
|
|
2445
|
-
}
|
|
2446
|
-
|
|
2447
|
-
/*
|
|
2448
|
-
* Scrolled to the end, the last of the content clears the hand-off dock
|
|
2449
|
-
* floating over the bottom right. \`--dpk-dock-clearance\` is how far up
|
|
2450
|
-
* that is; it reaches into components too, and a template's own floating
|
|
2451
|
-
* controls rise by it. \`:where\` lets a full-bleed template keep no padding.
|
|
2452
|
-
*/
|
|
2453
|
-
.dpk-shell:has(> .dpk-dock) {
|
|
2454
|
-
--dpk-dock-clearance: 64px;
|
|
2455
|
-
}
|
|
2456
|
-
|
|
2457
|
-
:where(.dpk-shell:has(> .dpk-dock)) .dpk-main-body {
|
|
2458
|
-
padding-bottom: calc(24px + var(--dpk-dock-clearance));
|
|
2459
|
-
}
|
|
2460
|
-
|
|
2461
|
-
:where(.dpk-shell:has(> .dpk-dock)) .dpk-sidebar {
|
|
2462
|
-
padding-bottom: calc(18px + var(--dpk-dock-clearance));
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
@keyframes dpk-rise {
|
|
2466
|
-
from {
|
|
2467
|
-
opacity: 0;
|
|
2468
|
-
transform: translateY(6px);
|
|
2469
|
-
}
|
|
2470
|
-
}
|
|
2471
|
-
|
|
2472
|
-
/*
|
|
2473
|
-
* Supplements. They sit at the end of the main column and stick to the
|
|
2474
|
-
* bottom of the scrollport as a bar the full width of the column, edge to
|
|
2475
|
-
* edge: always in reach and never stealing height from the preview. The bar
|
|
2476
|
-
* names each supplement; the one opened grows upward over the content and
|
|
2477
|
-
* shows whole; only one taller than the window scrolls, so its top stays
|
|
2478
|
-
* reachable.
|
|
2479
|
-
*/
|
|
2480
|
-
.dpk-supplements {
|
|
2481
|
-
position: sticky;
|
|
2482
|
-
bottom: 0;
|
|
2483
|
-
z-index: 5;
|
|
2484
|
-
margin-top: auto;
|
|
2485
|
-
/* A faint amber wash over the whole bar marks it as the author's aside. */
|
|
2486
|
-
border-top: 1px solid color-mix(in srgb, var(--dpk-amber) 28%, var(--dpk-rule-strong));
|
|
2487
|
-
background: color-mix(in srgb, color-mix(in srgb, var(--dpk-amber) 7%, var(--dpk-paper-raised)) 94%, transparent);
|
|
2488
|
-
backdrop-filter: blur(12px);
|
|
2489
|
-
box-shadow: 0 -8px 24px -18px color-mix(in srgb, var(--dpk-ink) 40%, transparent);
|
|
2490
|
-
}
|
|
2491
|
-
|
|
2492
|
-
.dpk-supplements[hidden] {
|
|
2493
|
-
display: none;
|
|
2494
|
-
}
|
|
2495
|
-
|
|
2496
|
-
.dpk-supplements-bar {
|
|
2497
|
-
display: flex;
|
|
2498
|
-
flex-wrap: wrap;
|
|
2499
|
-
align-items: center;
|
|
2500
|
-
gap: 2px;
|
|
2501
|
-
/* Clear of the hand-off dock at the bottom right while it is shown. */
|
|
2502
|
-
padding: 5px calc(16px + var(--dpk-dock-space, 0px)) 5px 10px;
|
|
2503
|
-
color: var(--dpk-ink-soft);
|
|
2504
|
-
}
|
|
2505
|
-
|
|
2506
|
-
.dpk-supplements-toggle {
|
|
2507
|
-
flex: none;
|
|
2508
|
-
display: grid;
|
|
2509
|
-
place-items: center;
|
|
2510
|
-
width: 24px;
|
|
2511
|
-
height: 24px;
|
|
2512
|
-
margin-right: 2px;
|
|
2513
|
-
border: 0;
|
|
2514
|
-
border-radius: 7px;
|
|
2515
|
-
padding: 0;
|
|
2516
|
-
background: transparent;
|
|
2517
|
-
color: inherit;
|
|
2518
|
-
cursor: pointer;
|
|
2519
|
-
}
|
|
2520
|
-
|
|
2521
|
-
.dpk-supplements-toggle:hover {
|
|
2522
|
-
color: var(--dpk-ink);
|
|
2523
|
-
background: color-mix(in srgb, var(--dpk-amber) 10%, transparent);
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
.dpk-supplements-toggle:focus-visible {
|
|
2527
|
-
outline: none;
|
|
2528
|
-
box-shadow: var(--dpk-focus);
|
|
2529
|
-
}
|
|
2530
|
-
|
|
2531
|
-
.dpk-supplements-toggle svg {
|
|
2532
|
-
width: 14px;
|
|
2533
|
-
height: 14px;
|
|
2534
|
-
transition: transform 160ms var(--dpk-ease);
|
|
2535
|
-
}
|
|
2536
|
-
|
|
2537
|
-
.dpk-supplements[data-open] .dpk-supplements-toggle svg {
|
|
2538
|
-
transform: rotate(90deg);
|
|
2539
|
-
}
|
|
2540
|
-
|
|
2541
|
-
.dpk-supplement-tab {
|
|
2542
|
-
position: relative;
|
|
2543
|
-
border: 0;
|
|
2544
|
-
border-radius: 7px;
|
|
2545
|
-
padding: 4px 10px;
|
|
2546
|
-
background: transparent;
|
|
2547
|
-
font: inherit;
|
|
2548
|
-
font-size: 12.5px;
|
|
2549
|
-
font-weight: 600;
|
|
2550
|
-
color: inherit;
|
|
2551
|
-
cursor: pointer;
|
|
2552
|
-
user-select: none;
|
|
2553
|
-
}
|
|
2554
|
-
|
|
2555
|
-
/* A rule between neighbours reads the names as one row: ERD | Checklist | Sequence. */
|
|
2556
|
-
.dpk-supplement-tab + .dpk-supplement-tab::before {
|
|
2557
|
-
content: '';
|
|
2558
|
-
position: absolute;
|
|
2559
|
-
top: 25%;
|
|
2560
|
-
bottom: 25%;
|
|
2561
|
-
left: -1px;
|
|
2562
|
-
width: 1px;
|
|
2563
|
-
background: var(--dpk-rule-strong);
|
|
2564
|
-
}
|
|
2565
|
-
|
|
2566
|
-
.dpk-supplement-tab:hover {
|
|
2567
|
-
color: var(--dpk-ink);
|
|
2568
|
-
background: color-mix(in srgb, var(--dpk-amber) 10%, transparent);
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
|
-
.dpk-supplement-tab[aria-expanded='true'] {
|
|
2572
|
-
color: var(--dpk-ink);
|
|
2573
|
-
background: color-mix(in srgb, var(--dpk-amber) 18%, transparent);
|
|
2574
|
-
}
|
|
2575
|
-
|
|
2576
|
-
.dpk-supplement-tab:hover::before,
|
|
2577
|
-
.dpk-supplement-tab[aria-expanded='true']::before,
|
|
2578
|
-
.dpk-supplement-tab:hover + .dpk-supplement-tab::before,
|
|
2579
|
-
.dpk-supplement-tab[aria-expanded='true'] + .dpk-supplement-tab::before {
|
|
2580
|
-
visibility: hidden;
|
|
2581
|
-
}
|
|
2582
|
-
|
|
2583
|
-
.dpk-supplement-tab:focus-visible {
|
|
2584
|
-
outline: none;
|
|
2585
|
-
box-shadow: var(--dpk-focus);
|
|
2586
|
-
}
|
|
2587
|
-
|
|
2588
|
-
.dpk-supplements-body {
|
|
2589
|
-
max-height: calc(100dvh - 120px);
|
|
2590
|
-
overflow: auto;
|
|
2591
|
-
overscroll-behavior: contain;
|
|
2592
|
-
padding: 4px 16px 16px;
|
|
2593
|
-
/*
|
|
2594
|
-
* The dock floats over the bottom of what is open; showing it must not
|
|
2595
|
-
* resize that. Components lift the controls along their bottom edge by
|
|
2596
|
-
* this much instead.
|
|
2597
|
-
*/
|
|
2598
|
-
--dpk-dock-overlap: var(--dpk-dock-clearance, 0px);
|
|
2599
|
-
font-size: 12.5px;
|
|
2600
|
-
line-height: 1.7;
|
|
2601
|
-
color: var(--dpk-ink-soft);
|
|
2602
|
-
}
|
|
2603
|
-
|
|
2604
|
-
.dpk-supplements-body[hidden] {
|
|
2605
|
-
display: none;
|
|
2606
|
-
}
|
|
2607
|
-
|
|
2608
|
-
.dpk-supplements ::slotted(*) {
|
|
2609
|
-
display: block;
|
|
2610
|
-
max-width: 100%;
|
|
2611
|
-
}
|
|
2612
|
-
|
|
2613
|
-
.dpk-orphans {
|
|
2614
|
-
margin-top: 16px;
|
|
2615
|
-
border: 1px dashed var(--dpk-rule-strong);
|
|
2616
|
-
border-radius: var(--dpk-radius);
|
|
2617
|
-
padding: 12px;
|
|
2618
|
-
}
|
|
2619
|
-
|
|
2620
|
-
.dpk-banner {
|
|
2621
|
-
display: grid;
|
|
2622
|
-
gap: 4px;
|
|
2623
|
-
margin-bottom: 14px;
|
|
2624
|
-
border: 1px solid color-mix(in srgb, var(--dpk-danger) 35%, transparent);
|
|
2625
|
-
border-radius: var(--dpk-radius);
|
|
2626
|
-
background: linear-gradient(90deg, var(--dpk-danger) 0 3px, transparent 3px), var(--dpk-danger-soft);
|
|
2627
|
-
padding: 12px 14px 12px 17px;
|
|
2628
|
-
max-width: 900px;
|
|
2629
|
-
}
|
|
2630
|
-
|
|
2631
|
-
.dpk-banner strong {
|
|
2632
|
-
font-size: 13px;
|
|
2633
|
-
color: var(--dpk-danger);
|
|
2634
|
-
}
|
|
2635
|
-
|
|
2636
|
-
.dpk-banner code {
|
|
2637
|
-
font-family: var(--dpk-mono);
|
|
2638
|
-
font-size: 11px;
|
|
2639
|
-
color: var(--dpk-ink-soft);
|
|
2640
|
-
overflow-wrap: anywhere;
|
|
2641
|
-
}
|
|
2642
|
-
|
|
2643
|
-
/* ------------------------------------------------------------- footer */
|
|
2644
|
-
|
|
2645
|
-
.dpk-footer {
|
|
2646
|
-
border-top: 1px solid var(--dpk-rule);
|
|
2647
|
-
padding: 10px 20px;
|
|
2648
|
-
display: flex;
|
|
2649
|
-
gap: 12px;
|
|
2650
|
-
align-items: center;
|
|
2651
|
-
background: var(--dpk-glass);
|
|
2652
|
-
backdrop-filter: blur(12px);
|
|
2653
|
-
font-size: 12px;
|
|
2654
|
-
color: var(--dpk-ink-faint);
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
|
-
/* --------------------------------------------------- floating review */
|
|
2658
|
-
|
|
2659
|
-
/* The review floats over the page from its toggles, as tall as the screen
|
|
2660
|
-
allows: the main column keeps its whole width while it is open. The
|
|
2661
|
-
popover positions it; this only shapes the surface. */
|
|
2662
|
-
.dpk-review {
|
|
2663
|
-
box-sizing: border-box;
|
|
2664
|
-
position: fixed;
|
|
2665
|
-
inset: auto;
|
|
2666
|
-
margin: 0;
|
|
2667
|
-
padding: 0;
|
|
2668
|
-
height: 100dvh;
|
|
2669
|
-
overflow: hidden;
|
|
2670
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2671
|
-
border-radius: var(--dpk-radius-lg);
|
|
2672
|
-
background: var(--dpk-paper-raised);
|
|
2673
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2674
|
-
color: var(--dpk-ink);
|
|
2675
|
-
}
|
|
2676
|
-
|
|
2677
|
-
.dpk-review:popover-open {
|
|
2678
|
-
display: flex;
|
|
2679
|
-
animation: dpk-review-in 180ms var(--dpk-ease);
|
|
2680
|
-
}
|
|
2681
|
-
|
|
2682
|
-
@keyframes dpk-review-in {
|
|
2683
|
-
from {
|
|
2684
|
-
opacity: 0;
|
|
2685
|
-
transform: translateY(-6px);
|
|
2686
|
-
}
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
|
-
.dpk-review > dpk-component-comment-panel {
|
|
2690
|
-
flex: 1 1 auto;
|
|
2691
|
-
}
|
|
2692
|
-
|
|
2693
|
-
/* Review toggles: the changes and the review comments of the draft, each
|
|
2694
|
-
opening its own part of the review. Pinned to the top right corner, always
|
|
2695
|
-
in the same place. */
|
|
2696
|
-
.dpk-header-actions {
|
|
2697
|
-
position: fixed;
|
|
2698
|
-
top: 6px;
|
|
2699
|
-
right: 16px;
|
|
2700
|
-
z-index: 60;
|
|
2701
|
-
display: flex;
|
|
2702
|
-
gap: 6px;
|
|
2703
|
-
}
|
|
2704
|
-
|
|
2705
|
-
.dpk-review-toggles {
|
|
2706
|
-
display: flex;
|
|
2707
|
-
gap: 6px;
|
|
2708
|
-
}
|
|
2709
|
-
|
|
2710
|
-
/* Each further button (the questions, the settings gear) widens what the header keeps clear of. */
|
|
2711
|
-
.dpk-shell:is(:has(.dpk-settings-trigger), :has(.dpk-review-toggles > :nth-child(3))) .dpk-header {
|
|
2712
|
-
padding-right: 138px;
|
|
2713
|
-
}
|
|
2714
|
-
|
|
2715
|
-
.dpk-shell:has(.dpk-settings-trigger):has(.dpk-review-toggles > :nth-child(3)) .dpk-header {
|
|
2716
|
-
padding-right: 176px;
|
|
2717
|
-
}
|
|
2718
|
-
|
|
2719
|
-
.dpk-header-action {
|
|
2720
|
-
position: relative;
|
|
2721
|
-
display: inline-flex;
|
|
2722
|
-
align-items: center;
|
|
2723
|
-
justify-content: center;
|
|
2724
|
-
width: 32px;
|
|
2725
|
-
height: 32px;
|
|
2726
|
-
padding: 0;
|
|
2727
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2728
|
-
border-radius: 10px;
|
|
2729
|
-
background: var(--dpk-paper-raised);
|
|
2730
|
-
color: var(--dpk-ink-soft);
|
|
2731
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
2732
|
-
cursor: pointer;
|
|
2733
|
-
transition:
|
|
2734
|
-
color 180ms var(--dpk-ease),
|
|
2735
|
-
background 180ms var(--dpk-ease),
|
|
2736
|
-
border-color 180ms var(--dpk-ease),
|
|
2737
|
-
box-shadow 180ms var(--dpk-ease),
|
|
2738
|
-
transform 220ms var(--dpk-ease-spring);
|
|
2739
|
-
}
|
|
2740
|
-
|
|
2741
|
-
.dpk-header-action svg {
|
|
2742
|
-
width: 16px;
|
|
2743
|
-
height: 16px;
|
|
2744
|
-
}
|
|
2745
|
-
|
|
2746
|
-
.dpk-header-action:hover {
|
|
2747
|
-
color: var(--dpk-ink);
|
|
2748
|
-
border-color: var(--dpk-rule-hover);
|
|
2749
|
-
transform: translateY(-1px);
|
|
2750
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow);
|
|
2751
|
-
}
|
|
2752
|
-
|
|
2753
|
-
.dpk-header-action:active {
|
|
2754
|
-
transform: translateY(0) scale(0.95);
|
|
2755
|
-
box-shadow: var(--dpk-shadow-xs);
|
|
2756
|
-
}
|
|
2757
|
-
|
|
2758
|
-
.dpk-header-action:focus-visible {
|
|
2759
|
-
outline: none;
|
|
2760
|
-
box-shadow: var(--dpk-focus);
|
|
2761
|
-
}
|
|
2762
|
-
|
|
2763
|
-
.dpk-header-action[aria-pressed='true'],
|
|
2764
|
-
.dpk-header-action[aria-expanded='true'] {
|
|
2765
|
-
color: var(--dpk-accent-ink);
|
|
2766
|
-
border-color: color-mix(in srgb, var(--dpk-accent-strong) 70%, transparent);
|
|
2767
|
-
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
2768
|
-
box-shadow:
|
|
2769
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
2770
|
-
0 6px 16px -6px color-mix(in srgb, var(--dpk-accent) 70%, transparent);
|
|
2771
|
-
}
|
|
2772
|
-
|
|
2773
|
-
.dpk-header-action[aria-pressed='true']:hover,
|
|
2774
|
-
.dpk-header-action[aria-expanded='true']:hover {
|
|
2775
|
-
box-shadow:
|
|
2776
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
2777
|
-
0 10px 22px -8px color-mix(in srgb, var(--dpk-accent) 80%, transparent);
|
|
2778
|
-
}
|
|
2779
|
-
|
|
2780
|
-
.dpk-review-badge {
|
|
2781
|
-
position: absolute;
|
|
2782
|
-
top: -6px;
|
|
2783
|
-
right: -6px;
|
|
2784
|
-
min-width: 18px;
|
|
2785
|
-
height: 18px;
|
|
2786
|
-
padding: 0 4px;
|
|
2787
|
-
border: 2px solid var(--dpk-paper);
|
|
2788
|
-
border-radius: 999px;
|
|
2789
|
-
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
2790
|
-
color: var(--dpk-accent-ink);
|
|
2791
|
-
font-family: var(--dpk-mono);
|
|
2792
|
-
font-size: 9.5px;
|
|
2793
|
-
font-weight: 650;
|
|
2794
|
-
font-variant-numeric: tabular-nums;
|
|
2795
|
-
line-height: 14px;
|
|
2796
|
-
text-align: center;
|
|
2797
|
-
white-space: nowrap;
|
|
2798
|
-
box-shadow: 0 3px 8px -2px color-mix(in srgb, var(--dpk-accent) 60%, transparent);
|
|
2799
|
-
animation: dpk-pop 260ms var(--dpk-ease-spring);
|
|
2800
|
-
}
|
|
2801
|
-
|
|
2802
|
-
@keyframes dpk-pop {
|
|
2803
|
-
from {
|
|
2804
|
-
transform: scale(0.4);
|
|
2805
|
-
opacity: 0;
|
|
2806
|
-
}
|
|
2807
|
-
}
|
|
2808
|
-
|
|
2809
|
-
/* What an icon button does, named below it on hover or keyboard focus. */
|
|
2810
|
-
.dpk-header-action[data-tooltip]::after {
|
|
2811
|
-
content: attr(data-tooltip);
|
|
2812
|
-
position: absolute;
|
|
2813
|
-
top: calc(100% + 8px);
|
|
2814
|
-
right: 0;
|
|
2815
|
-
padding: 4px 8px;
|
|
2816
|
-
border-radius: var(--dpk-radius-sm);
|
|
2817
|
-
background: var(--dpk-ink);
|
|
2818
|
-
color: var(--dpk-paper);
|
|
2819
|
-
font-size: 11.5px;
|
|
2820
|
-
font-weight: 600;
|
|
2821
|
-
line-height: 1.4;
|
|
2822
|
-
white-space: nowrap;
|
|
2823
|
-
box-shadow: var(--dpk-shadow-sm);
|
|
2824
|
-
pointer-events: none;
|
|
2825
|
-
opacity: 0;
|
|
2826
|
-
transform: translateY(-2px);
|
|
2827
|
-
transition:
|
|
2828
|
-
opacity 120ms var(--dpk-ease),
|
|
2829
|
-
transform 120ms var(--dpk-ease);
|
|
2830
|
-
}
|
|
2831
|
-
|
|
2832
|
-
.dpk-header-action[data-tooltip]:hover::after,
|
|
2833
|
-
.dpk-header-action[data-tooltip]:focus-visible::after {
|
|
2834
|
-
opacity: 1;
|
|
2835
|
-
transform: none;
|
|
2836
|
-
transition-delay: 250ms;
|
|
2837
|
-
}
|
|
2838
|
-
|
|
2839
|
-
/* An open popover hangs where the labels would show, and names itself. */
|
|
2840
|
-
.dpk-header-actions:has([aria-pressed='true'], [aria-expanded='true']) .dpk-header-action::after {
|
|
2841
|
-
display: none;
|
|
2842
|
-
}
|
|
2843
|
-
|
|
2844
|
-
/* ----------------------------------------------------------- settings */
|
|
2845
|
-
|
|
2846
|
-
.dpk-settings {
|
|
2847
|
-
box-sizing: border-box;
|
|
2848
|
-
overflow: auto;
|
|
2849
|
-
position: fixed;
|
|
2850
|
-
inset: auto;
|
|
2851
|
-
margin: 0;
|
|
2852
|
-
padding: 6px;
|
|
2853
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2854
|
-
border-radius: var(--dpk-radius-lg);
|
|
2855
|
-
background: var(--dpk-paper-raised);
|
|
2856
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2857
|
-
color: var(--dpk-ink);
|
|
2858
|
-
}
|
|
2859
|
-
|
|
2860
|
-
.dpk-settings:popover-open {
|
|
2861
|
-
display: grid;
|
|
2862
|
-
align-content: start;
|
|
2863
|
-
gap: 2px;
|
|
2864
|
-
animation: dpk-review-in 180ms var(--dpk-ease);
|
|
2865
|
-
}
|
|
2866
|
-
|
|
2867
|
-
.dpk-settings-option {
|
|
2868
|
-
display: flex;
|
|
2869
|
-
align-items: flex-start;
|
|
2870
|
-
gap: 10px;
|
|
2871
|
-
width: 100%;
|
|
2872
|
-
padding: 8px;
|
|
2873
|
-
border: 0;
|
|
2874
|
-
border-radius: var(--dpk-radius-sm);
|
|
2875
|
-
background: none;
|
|
2876
|
-
color: var(--dpk-ink);
|
|
2877
|
-
font: inherit;
|
|
2878
|
-
text-align: left;
|
|
2879
|
-
cursor: pointer;
|
|
2880
|
-
}
|
|
2881
|
-
|
|
2882
|
-
.dpk-settings-option:hover,
|
|
2883
|
-
.dpk-settings-option:focus-visible {
|
|
2884
|
-
outline: none;
|
|
2885
|
-
background: var(--dpk-paper-sunken);
|
|
2886
|
-
}
|
|
2887
|
-
|
|
2888
|
-
.dpk-settings-check {
|
|
2889
|
-
flex: none;
|
|
2890
|
-
display: inline-grid;
|
|
2891
|
-
place-items: center;
|
|
2892
|
-
width: 16px;
|
|
2893
|
-
height: 16px;
|
|
2894
|
-
margin-top: 1px;
|
|
2895
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2896
|
-
border-radius: 4px;
|
|
2897
|
-
background: var(--dpk-paper-raised);
|
|
2898
|
-
}
|
|
2899
|
-
|
|
2900
|
-
.dpk-settings-option[aria-checked='true'] .dpk-settings-check {
|
|
2901
|
-
border-color: var(--dpk-accent-strong);
|
|
2902
|
-
background: var(--dpk-accent-strong);
|
|
2903
|
-
color: var(--dpk-accent-ink);
|
|
2904
|
-
}
|
|
2905
|
-
|
|
2906
|
-
.dpk-settings-check svg {
|
|
2907
|
-
width: 12px;
|
|
2908
|
-
height: 12px;
|
|
2909
|
-
stroke-width: 3;
|
|
2910
|
-
}
|
|
2911
|
-
|
|
2912
|
-
.dpk-settings-text {
|
|
2913
|
-
display: grid;
|
|
2914
|
-
gap: 2px;
|
|
2915
|
-
min-width: 0;
|
|
2916
|
-
}
|
|
2917
|
-
|
|
2918
|
-
.dpk-settings-name {
|
|
2919
|
-
font-size: 13px;
|
|
2920
|
-
font-weight: 650;
|
|
2921
|
-
}
|
|
2922
|
-
|
|
2923
|
-
.dpk-settings-hint {
|
|
2924
|
-
color: var(--dpk-ink-soft);
|
|
2925
|
-
font-size: 11.5px;
|
|
2926
|
-
line-height: 1.45;
|
|
2927
|
-
}
|
|
2928
|
-
|
|
2929
|
-
.dpk-settings-note {
|
|
2930
|
-
margin: 4px 8px;
|
|
2931
|
-
padding-top: 8px;
|
|
2932
|
-
border-top: 1px solid var(--dpk-rule);
|
|
2933
|
-
color: var(--dpk-ink-faint);
|
|
2934
|
-
font-size: 11px;
|
|
2935
|
-
line-height: 1.45;
|
|
2936
|
-
}
|
|
2937
|
-
|
|
2938
|
-
/* ------------------------------------------------------ hand-off dock */
|
|
2939
|
-
|
|
2940
|
-
.dpk-dock {
|
|
2941
|
-
position: fixed;
|
|
2942
|
-
right: 16px;
|
|
2943
|
-
bottom: 16px;
|
|
2944
|
-
z-index: 60;
|
|
2945
|
-
display: flex;
|
|
2946
|
-
flex-direction: column;
|
|
2947
|
-
align-items: flex-end;
|
|
2948
|
-
gap: 8px;
|
|
2949
|
-
max-width: calc(100vw - 32px);
|
|
2950
|
-
animation: dpk-dock-in 260ms var(--dpk-ease) backwards;
|
|
2951
|
-
}
|
|
2952
|
-
|
|
2953
|
-
@keyframes dpk-dock-in {
|
|
2954
|
-
from {
|
|
2955
|
-
transform: translateY(8px);
|
|
2956
|
-
opacity: 0;
|
|
2957
|
-
}
|
|
2958
|
-
}
|
|
2959
|
-
|
|
2960
|
-
.dpk-dock-actions {
|
|
2961
|
-
display: flex;
|
|
2962
|
-
gap: 6px;
|
|
2963
|
-
padding: 6px;
|
|
2964
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2965
|
-
border-radius: var(--dpk-radius-lg);
|
|
2966
|
-
background: var(--dpk-glass);
|
|
2967
|
-
backdrop-filter: blur(12px);
|
|
2968
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2969
|
-
}
|
|
2970
|
-
|
|
2971
|
-
.dpk-dock-note {
|
|
2972
|
-
max-width: 320px;
|
|
2973
|
-
margin: 0;
|
|
2974
|
-
padding: 8px 12px;
|
|
2975
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2976
|
-
border-radius: var(--dpk-radius);
|
|
2977
|
-
background: var(--dpk-paper-raised);
|
|
2978
|
-
box-shadow: var(--dpk-shadow);
|
|
2979
|
-
color: var(--dpk-ink-soft);
|
|
2980
|
-
font-size: 12px;
|
|
2981
|
-
line-height: 1.6;
|
|
2982
|
-
}
|
|
2983
|
-
|
|
2984
|
-
/* ---------------------------------------------------------- questions */
|
|
2985
|
-
|
|
2986
|
-
/* The questions the page asks, in the review popover beside the changes and
|
|
2987
|
-
the review comments. The comment panel stays mounted (it holds the
|
|
2988
|
-
composer's unsent text) but steps aside. */
|
|
2989
|
-
.dpk-review[data-section='questions'] > dpk-component-comment-panel {
|
|
2990
|
-
display: none;
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
|
-
.dpk-grill {
|
|
2994
|
-
display: flex;
|
|
2995
|
-
flex-direction: column;
|
|
2996
|
-
flex: 1 1 auto;
|
|
2997
|
-
min-width: 0;
|
|
2998
|
-
min-height: 0;
|
|
2999
|
-
}
|
|
3000
|
-
|
|
3001
|
-
.dpk-grill-head {
|
|
3002
|
-
display: flex;
|
|
3003
|
-
align-items: center;
|
|
3004
|
-
justify-content: space-between;
|
|
3005
|
-
gap: 8px;
|
|
3006
|
-
padding: 14px 16px 12px;
|
|
3007
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
3008
|
-
background: var(--dpk-glass);
|
|
3009
|
-
backdrop-filter: blur(12px);
|
|
3010
|
-
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
3011
|
-
}
|
|
3012
|
-
|
|
3013
|
-
.dpk-grill-head h2 {
|
|
3014
|
-
margin: 0;
|
|
3015
|
-
font-size: 13.5px;
|
|
3016
|
-
font-weight: 660;
|
|
3017
|
-
letter-spacing: -0.015em;
|
|
3018
|
-
}
|
|
3019
|
-
|
|
3020
|
-
.dpk-grill-progress {
|
|
3021
|
-
font-family: var(--dpk-mono);
|
|
3022
|
-
font-size: 11px;
|
|
3023
|
-
font-variant-numeric: tabular-nums;
|
|
3024
|
-
color: var(--dpk-ink-faint);
|
|
3025
|
-
}
|
|
3026
|
-
|
|
3027
|
-
/* With earlier rounds, a select of rounds: the current one first. */
|
|
3028
|
-
.dpk-grill-rounds {
|
|
3029
|
-
flex-shrink: 0;
|
|
3030
|
-
padding: 10px 10px 0;
|
|
3031
|
-
}
|
|
3032
|
-
|
|
3033
|
-
.dpk-grill-round {
|
|
3034
|
-
width: 100%;
|
|
3035
|
-
padding: 6px 24px 6px 9px;
|
|
3036
|
-
border: 1px solid var(--dpk-rule);
|
|
3037
|
-
border-radius: var(--dpk-radius-sm);
|
|
3038
|
-
appearance: none;
|
|
3039
|
-
background-color: var(--dpk-paper-sunken);
|
|
3040
|
-
background-image:
|
|
3041
|
-
linear-gradient(45deg, transparent 50%, currentColor 50%),
|
|
3042
|
-
linear-gradient(135deg, currentColor 50%, transparent 50%);
|
|
3043
|
-
background-position:
|
|
3044
|
-
calc(100% - 13px) 52%,
|
|
3045
|
-
calc(100% - 9px) 52%;
|
|
3046
|
-
background-size: 4px 4px;
|
|
3047
|
-
background-repeat: no-repeat;
|
|
3048
|
-
color: var(--dpk-ink);
|
|
3049
|
-
font: inherit;
|
|
3050
|
-
font-size: 11.5px;
|
|
3051
|
-
cursor: pointer;
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
|
-
.dpk-grill-round:focus-visible {
|
|
3055
|
-
outline: none;
|
|
3056
|
-
box-shadow: var(--dpk-focus);
|
|
3057
|
-
}
|
|
3058
|
-
|
|
3059
|
-
.dpk-grill-round option {
|
|
3060
|
-
color: var(--dpk-ink);
|
|
3061
|
-
background: var(--dpk-paper-raised);
|
|
3062
|
-
}
|
|
3063
|
-
|
|
3064
|
-
.dpk-grill-round-note {
|
|
3065
|
-
margin: 4px 0 2px;
|
|
3066
|
-
padding: 0 8px;
|
|
3067
|
-
font-size: 10.5px;
|
|
3068
|
-
line-height: 1.6;
|
|
3069
|
-
color: var(--dpk-ink-faint);
|
|
3070
|
-
}
|
|
3071
|
-
|
|
3072
|
-
.dpk-grill-list {
|
|
3073
|
-
flex: 1;
|
|
3074
|
-
min-height: 0;
|
|
3075
|
-
overflow: auto;
|
|
3076
|
-
overscroll-behavior: contain;
|
|
3077
|
-
padding: 2px 10px 12px;
|
|
3078
|
-
}
|
|
3079
|
-
|
|
3080
|
-
.dpk-grill-empty {
|
|
3081
|
-
margin: 0;
|
|
3082
|
-
padding: 22px 8px;
|
|
3083
|
-
text-align: center;
|
|
3084
|
-
font-size: 12px;
|
|
3085
|
-
color: var(--dpk-ink-faint);
|
|
3086
|
-
}
|
|
3087
|
-
|
|
3088
|
-
.dpk-grill-question {
|
|
3089
|
-
margin: 6px 0;
|
|
3090
|
-
border: 1px solid transparent;
|
|
3091
|
-
border-radius: var(--dpk-radius);
|
|
3092
|
-
transition:
|
|
3093
|
-
background 140ms var(--dpk-ease),
|
|
3094
|
-
border-color 140ms var(--dpk-ease);
|
|
3095
|
-
}
|
|
3096
|
-
|
|
3097
|
-
.dpk-grill-question:has(.dpk-grill-heading[aria-expanded='true']) {
|
|
3098
|
-
border-color: var(--dpk-rule);
|
|
3099
|
-
background: var(--dpk-paper-raised);
|
|
3100
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
3101
|
-
}
|
|
3102
|
-
|
|
3103
|
-
.dpk-grill-heading {
|
|
3104
|
-
display: flex;
|
|
3105
|
-
align-items: flex-start;
|
|
3106
|
-
gap: 9px;
|
|
3107
|
-
width: 100%;
|
|
3108
|
-
padding: 10px 8px;
|
|
3109
|
-
border: 0;
|
|
3110
|
-
border-radius: var(--dpk-radius-sm);
|
|
3111
|
-
background: none;
|
|
3112
|
-
text-align: left;
|
|
3113
|
-
cursor: pointer;
|
|
3114
|
-
}
|
|
3115
|
-
|
|
3116
|
-
.dpk-grill-heading:hover {
|
|
3117
|
-
background: var(--dpk-paper-sunken);
|
|
3118
|
-
}
|
|
3119
|
-
|
|
3120
|
-
.dpk-grill-question:has(.dpk-grill-heading[aria-expanded='true']) .dpk-grill-heading:hover {
|
|
3121
|
-
background: none;
|
|
3122
|
-
}
|
|
3123
|
-
|
|
3124
|
-
.dpk-grill-ref {
|
|
3125
|
-
flex: 0 0 auto;
|
|
3126
|
-
display: grid;
|
|
3127
|
-
place-items: center;
|
|
3128
|
-
min-width: 30px;
|
|
3129
|
-
height: 22px;
|
|
3130
|
-
padding: 0 6px;
|
|
3131
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
3132
|
-
border-radius: 999px;
|
|
3133
|
-
background: var(--dpk-paper-sunken);
|
|
3134
|
-
font-family: var(--dpk-mono);
|
|
3135
|
-
font-size: 10px;
|
|
3136
|
-
font-weight: 600;
|
|
3137
|
-
font-variant-numeric: tabular-nums;
|
|
3138
|
-
color: var(--dpk-ink-faint);
|
|
3139
|
-
box-shadow: inset 0 1px 2px var(--dpk-shade-1);
|
|
3140
|
-
transition:
|
|
3141
|
-
background 140ms var(--dpk-ease),
|
|
3142
|
-
color 140ms var(--dpk-ease),
|
|
3143
|
-
border-color 140ms var(--dpk-ease),
|
|
3144
|
-
box-shadow 140ms var(--dpk-ease);
|
|
3145
|
-
}
|
|
3146
|
-
|
|
3147
|
-
.dpk-grill-question[data-answered='true'] .dpk-grill-ref {
|
|
3148
|
-
border-color: transparent;
|
|
3149
|
-
background: linear-gradient(180deg, var(--dpk-green-soft), color-mix(in srgb, var(--dpk-green) 16%, transparent));
|
|
3150
|
-
color: var(--dpk-green);
|
|
3151
|
-
box-shadow: var(--dpk-bevel);
|
|
3152
|
-
}
|
|
3153
|
-
|
|
3154
|
-
.dpk-grill-question:has(.dpk-grill-heading[aria-expanded='true']) .dpk-grill-ref {
|
|
3155
|
-
border-color: transparent;
|
|
3156
|
-
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
3157
|
-
color: var(--dpk-accent-ink);
|
|
3158
|
-
box-shadow:
|
|
3159
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.24),
|
|
3160
|
-
0 2px 6px -2px color-mix(in srgb, var(--dpk-accent) 55%, transparent);
|
|
3161
|
-
}
|
|
3162
|
-
|
|
3163
|
-
.dpk-grill-heading-text {
|
|
3164
|
-
flex: 1;
|
|
3165
|
-
min-width: 0;
|
|
3166
|
-
}
|
|
3167
|
-
|
|
3168
|
-
.dpk-grill-heading-text strong {
|
|
3169
|
-
display: block;
|
|
3170
|
-
font-size: 12.5px;
|
|
3171
|
-
font-weight: 620;
|
|
3172
|
-
line-height: 1.6;
|
|
3173
|
-
letter-spacing: -0.005em;
|
|
3174
|
-
}
|
|
3175
|
-
|
|
3176
|
-
.dpk-grill-summary {
|
|
3177
|
-
display: block;
|
|
3178
|
-
margin-top: 4px;
|
|
3179
|
-
font-size: 10.5px;
|
|
3180
|
-
line-height: 1.6;
|
|
3181
|
-
color: var(--dpk-green);
|
|
3182
|
-
white-space: nowrap;
|
|
3183
|
-
overflow: hidden;
|
|
3184
|
-
text-overflow: ellipsis;
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
.dpk-grill-chevron {
|
|
3188
|
-
flex: 0 0 auto;
|
|
3189
|
-
width: 16px;
|
|
3190
|
-
color: var(--dpk-ink-faint);
|
|
3191
|
-
line-height: 22px;
|
|
3192
|
-
text-align: center;
|
|
3193
|
-
}
|
|
3194
|
-
|
|
3195
|
-
.dpk-grill-chevron svg {
|
|
3196
|
-
display: block;
|
|
3197
|
-
width: 13px;
|
|
3198
|
-
height: 13px;
|
|
3199
|
-
margin: 4.5px auto 0;
|
|
3200
|
-
transition: transform 180ms var(--dpk-ease);
|
|
3201
|
-
}
|
|
3202
|
-
|
|
3203
|
-
.dpk-grill-heading[aria-expanded='true'] .dpk-grill-chevron svg {
|
|
3204
|
-
transform: rotate(90deg);
|
|
3205
|
-
color: var(--dpk-accent);
|
|
3206
|
-
}
|
|
3207
|
-
|
|
3208
|
-
.dpk-grill-body {
|
|
3209
|
-
padding: 2px 8px 14px 47px;
|
|
3210
|
-
animation: dpk-grill-open 180ms var(--dpk-ease) backwards;
|
|
3211
|
-
}
|
|
3212
|
-
|
|
3213
|
-
@keyframes dpk-grill-open {
|
|
3214
|
-
from {
|
|
3215
|
-
opacity: 0;
|
|
3216
|
-
transform: translateY(-4px);
|
|
3217
|
-
}
|
|
3218
|
-
}
|
|
3219
|
-
|
|
3220
|
-
.dpk-grill-description {
|
|
3221
|
-
margin: 0 0 8px;
|
|
3222
|
-
font-size: 11.5px;
|
|
3223
|
-
line-height: 1.85;
|
|
3224
|
-
color: var(--dpk-ink-soft);
|
|
3225
|
-
}
|
|
3226
|
-
|
|
3227
|
-
.dpk-grill-note {
|
|
3228
|
-
margin: 0 0 10px;
|
|
3229
|
-
padding: 7px 10px;
|
|
3230
|
-
border: 1px solid color-mix(in srgb, var(--dpk-amber) 30%, transparent);
|
|
3231
|
-
border-radius: var(--dpk-radius-sm);
|
|
3232
|
-
background: var(--dpk-amber-soft);
|
|
3233
|
-
font-size: 11px;
|
|
3234
|
-
line-height: 1.7;
|
|
3235
|
-
color: var(--dpk-ink-soft);
|
|
3236
|
-
}
|
|
3237
|
-
|
|
3238
|
-
.dpk-grill-choices {
|
|
3239
|
-
display: grid;
|
|
3240
|
-
gap: 6px;
|
|
3241
|
-
}
|
|
3242
|
-
|
|
3243
|
-
.dpk-grill-choice {
|
|
3244
|
-
position: relative;
|
|
3245
|
-
display: flex;
|
|
3246
|
-
align-items: flex-start;
|
|
3247
|
-
gap: 8px;
|
|
3248
|
-
padding: 8px 9px;
|
|
3249
|
-
border: 1px solid var(--dpk-rule);
|
|
3250
|
-
border-radius: var(--dpk-radius-sm);
|
|
3251
|
-
background: var(--dpk-paper);
|
|
3252
|
-
font-size: 11.5px;
|
|
3253
|
-
line-height: 1.7;
|
|
3254
|
-
cursor: pointer;
|
|
3255
|
-
overflow: hidden;
|
|
3256
|
-
transition:
|
|
3257
|
-
border-color 140ms var(--dpk-ease),
|
|
3258
|
-
background 140ms var(--dpk-ease),
|
|
3259
|
-
box-shadow 140ms var(--dpk-ease),
|
|
3260
|
-
transform 140ms var(--dpk-ease);
|
|
3261
|
-
}
|
|
3262
|
-
|
|
3263
|
-
.dpk-grill-choice:hover {
|
|
3264
|
-
border-color: var(--dpk-rule-hover);
|
|
3265
|
-
background: var(--dpk-paper-inset);
|
|
3266
|
-
}
|
|
3267
|
-
|
|
3268
|
-
.dpk-grill-choice:has(input:checked) {
|
|
3269
|
-
border-color: color-mix(in srgb, var(--dpk-green) 45%, transparent);
|
|
3270
|
-
background: var(--dpk-green-soft);
|
|
3271
|
-
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dpk-green) 30%, transparent);
|
|
3272
|
-
}
|
|
3273
|
-
|
|
3274
|
-
.dpk-grill-choice[data-free] {
|
|
3275
|
-
border-style: dashed;
|
|
3276
|
-
}
|
|
3277
|
-
|
|
3278
|
-
.dpk-grill-choice[data-free='true'] {
|
|
3279
|
-
border-style: solid;
|
|
3280
|
-
}
|
|
3281
|
-
|
|
3282
|
-
.dpk-grill-choice input {
|
|
3283
|
-
flex: 0 0 auto;
|
|
3284
|
-
margin: 3px 0 0;
|
|
3285
|
-
accent-color: var(--dpk-green);
|
|
3286
|
-
}
|
|
3287
|
-
|
|
3288
|
-
.dpk-grill-choice-text {
|
|
3289
|
-
display: flex;
|
|
3290
|
-
gap: 7px;
|
|
3291
|
-
min-width: 0;
|
|
3292
|
-
}
|
|
3293
|
-
|
|
3294
|
-
.dpk-grill-letter {
|
|
3295
|
-
flex: 0 0 auto;
|
|
3296
|
-
font-family: var(--dpk-mono);
|
|
3297
|
-
font-size: 10px;
|
|
3298
|
-
font-weight: 600;
|
|
3299
|
-
line-height: 1.9;
|
|
3300
|
-
color: var(--dpk-green);
|
|
3301
|
-
}
|
|
3302
|
-
|
|
3303
|
-
/* An earlier round: a disclosure per question, nothing to answer with. */
|
|
3304
|
-
.dpk-grill-question[data-past] > summary {
|
|
3305
|
-
list-style: none;
|
|
3306
|
-
}
|
|
3307
|
-
|
|
3308
|
-
.dpk-grill-question[data-past] > summary::-webkit-details-marker {
|
|
3309
|
-
display: none;
|
|
3310
|
-
}
|
|
3311
|
-
|
|
3312
|
-
.dpk-grill-question[data-past][open] {
|
|
3313
|
-
border-color: var(--dpk-rule);
|
|
3314
|
-
background: var(--dpk-paper-raised);
|
|
3315
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
3316
|
-
}
|
|
3317
|
-
|
|
3318
|
-
.dpk-grill-question[data-past][open] .dpk-grill-heading:hover {
|
|
3319
|
-
background: none;
|
|
3320
|
-
}
|
|
3321
|
-
|
|
3322
|
-
.dpk-grill-question[data-past][open] .dpk-grill-chevron svg {
|
|
3323
|
-
transform: rotate(90deg);
|
|
3324
|
-
}
|
|
3325
|
-
|
|
3326
|
-
.dpk-grill-question[data-past][open] .dpk-grill-summary {
|
|
3327
|
-
display: none;
|
|
3328
|
-
}
|
|
3329
|
-
|
|
3330
|
-
.dpk-grill-question[data-past][data-answered='false'] .dpk-grill-summary {
|
|
3331
|
-
color: var(--dpk-ink-faint);
|
|
3332
|
-
}
|
|
3333
|
-
|
|
3334
|
-
.dpk-grill-past-choices {
|
|
3335
|
-
display: grid;
|
|
3336
|
-
gap: 6px;
|
|
3337
|
-
margin: 0;
|
|
3338
|
-
padding: 0;
|
|
3339
|
-
list-style: none;
|
|
3340
|
-
}
|
|
3341
|
-
|
|
3342
|
-
.dpk-grill-past-choice {
|
|
3343
|
-
display: flex;
|
|
3344
|
-
gap: 7px;
|
|
3345
|
-
margin: 0;
|
|
3346
|
-
padding: 7px 9px;
|
|
3347
|
-
border: 1px solid var(--dpk-rule);
|
|
3348
|
-
border-radius: var(--dpk-radius-sm);
|
|
3349
|
-
font-size: 11.5px;
|
|
3350
|
-
line-height: 1.7;
|
|
3351
|
-
color: var(--dpk-ink-faint);
|
|
3352
|
-
}
|
|
3353
|
-
|
|
3354
|
-
.dpk-grill-past-choice[data-checked='true'] {
|
|
3355
|
-
border-color: color-mix(in srgb, var(--dpk-green) 45%, transparent);
|
|
3356
|
-
background: var(--dpk-green-soft);
|
|
3357
|
-
color: var(--dpk-ink);
|
|
3358
|
-
}
|
|
3359
|
-
|
|
3360
|
-
.dpk-grill-past-free {
|
|
3361
|
-
margin-top: 6px;
|
|
3362
|
-
white-space: pre-wrap;
|
|
3363
|
-
}
|
|
3364
|
-
|
|
3365
|
-
.dpk-grill-free {
|
|
3366
|
-
margin-top: 7px;
|
|
3367
|
-
min-height: 76px;
|
|
3368
|
-
max-height: 240px;
|
|
3369
|
-
}
|
|
3370
|
-
|
|
3371
|
-
.dpk-grill-clear {
|
|
3372
|
-
margin-top: 10px;
|
|
3373
|
-
padding: 0;
|
|
3374
|
-
border: 0;
|
|
3375
|
-
background: none;
|
|
3376
|
-
color: var(--dpk-ink-faint);
|
|
3377
|
-
font-size: 10.5px;
|
|
3378
|
-
text-decoration: underline;
|
|
3379
|
-
text-underline-offset: 3px;
|
|
3380
|
-
cursor: pointer;
|
|
3381
|
-
}
|
|
3382
|
-
|
|
3383
|
-
.dpk-grill-clear:hover {
|
|
3384
|
-
color: var(--dpk-ink);
|
|
3385
|
-
}
|
|
3386
|
-
|
|
3387
|
-
/* The hand-off at the foot of the questions: the comment panel's own is hidden. */
|
|
3388
|
-
.dpk-grill-footer {
|
|
3389
|
-
flex-shrink: 0;
|
|
3390
|
-
display: grid;
|
|
3391
|
-
gap: 8px;
|
|
3392
|
-
padding: 10px 12px;
|
|
3393
|
-
border-top: 1px solid var(--dpk-rule);
|
|
3394
|
-
background: var(--dpk-paper-raised);
|
|
3395
|
-
box-shadow: 0 -6px 12px -10px var(--dpk-shade-2);
|
|
3396
|
-
}
|
|
3397
|
-
|
|
3398
|
-
.dpk-grill-footer .dpk-dock-actions {
|
|
3399
|
-
padding: 0;
|
|
3400
|
-
border: 0;
|
|
3401
|
-
background: none;
|
|
3402
|
-
backdrop-filter: none;
|
|
3403
|
-
box-shadow: none;
|
|
3404
|
-
}
|
|
3405
|
-
|
|
3406
|
-
.dpk-grill-footer .dpk-dock-actions > .dpk-btn {
|
|
3407
|
-
flex: 1;
|
|
3408
|
-
min-width: 0;
|
|
3409
|
-
}
|
|
3410
|
-
|
|
3411
|
-
.dpk-grill-footer .dpk-dock-note {
|
|
3412
|
-
max-width: none;
|
|
3413
|
-
box-shadow: none;
|
|
3414
|
-
}
|
|
3415
|
-
|
|
3416
|
-
/* --------------------------------------------------------- Q badges */
|
|
3417
|
-
|
|
3418
|
-
/* The badges are laid over the main column; the page marks what a question
|
|
3419
|
-
is about with \`data-grill-questions\`. */
|
|
3420
|
-
.dpk-main-body {
|
|
3421
|
-
position: relative;
|
|
3422
|
-
}
|
|
3423
|
-
|
|
3424
|
-
/* Badges on the author's own markup stand in a column of their own on the
|
|
3425
|
-
right, beside the line they mark, so they never cover its words. */
|
|
3426
|
-
.dpk-main-body[data-grill-gutter] {
|
|
3427
|
-
padding-right: 56px;
|
|
3428
|
-
}
|
|
3429
|
-
|
|
3430
|
-
.dpk-grill-badges {
|
|
3431
|
-
position: absolute;
|
|
3432
|
-
inset: 0;
|
|
3433
|
-
z-index: 3;
|
|
3434
|
-
overflow: hidden;
|
|
3435
|
-
pointer-events: none;
|
|
3436
|
-
}
|
|
3437
|
-
|
|
3438
|
-
.dpk-grill-badge {
|
|
3439
|
-
position: absolute;
|
|
3440
|
-
display: inline-flex;
|
|
3441
|
-
align-items: center;
|
|
3442
|
-
justify-content: center;
|
|
3443
|
-
min-width: 30px;
|
|
3444
|
-
height: 22px;
|
|
3445
|
-
padding: 0 7px;
|
|
3446
|
-
border: 2px solid var(--dpk-paper-raised);
|
|
3447
|
-
border-radius: 999px;
|
|
3448
|
-
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
3449
|
-
color: var(--dpk-accent-ink);
|
|
3450
|
-
font-family: var(--dpk-mono);
|
|
3451
|
-
font-size: 10px;
|
|
3452
|
-
font-weight: 650;
|
|
3453
|
-
font-variant-numeric: tabular-nums;
|
|
3454
|
-
box-shadow:
|
|
3455
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.28),
|
|
3456
|
-
0 2px 6px -2px color-mix(in srgb, var(--dpk-accent) 55%, transparent);
|
|
3457
|
-
cursor: pointer;
|
|
3458
|
-
pointer-events: auto;
|
|
3459
|
-
transition:
|
|
3460
|
-
transform 160ms var(--dpk-ease-spring),
|
|
3461
|
-
box-shadow 160ms var(--dpk-ease),
|
|
3462
|
-
background 160ms var(--dpk-ease);
|
|
3463
|
-
}
|
|
3464
|
-
|
|
3465
|
-
.dpk-grill-badge[data-visible='false'] {
|
|
3466
|
-
visibility: hidden;
|
|
3467
|
-
}
|
|
3468
|
-
|
|
3469
|
-
.dpk-grill-badge:hover {
|
|
3470
|
-
transform: translateY(-1px) scale(1.06);
|
|
3471
|
-
box-shadow:
|
|
3472
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.3),
|
|
3473
|
-
0 4px 10px -2px color-mix(in srgb, var(--dpk-accent) 60%, transparent);
|
|
3474
|
-
}
|
|
3475
|
-
|
|
3476
|
-
.dpk-grill-badge[data-answered='true'] {
|
|
3477
|
-
background: linear-gradient(180deg, color-mix(in srgb, var(--dpk-green) 85%, white), var(--dpk-green));
|
|
3478
|
-
}
|
|
3479
|
-
|
|
3480
|
-
.dpk-grill-badge[aria-pressed='true'] {
|
|
3481
|
-
box-shadow:
|
|
3482
|
-
0 0 0 2px color-mix(in srgb, var(--dpk-accent) 45%, transparent),
|
|
3483
|
-
var(--dpk-shadow-sm);
|
|
3484
|
-
}
|
|
3485
|
-
|
|
3486
|
-
.dpk-grill-badge:focus-visible {
|
|
3487
|
-
outline: none;
|
|
3488
|
-
box-shadow: var(--dpk-focus);
|
|
3489
|
-
}
|
|
3490
|
-
|
|
3491
|
-
/* The template's name repeats the mark above the title; the title needs the room more. */
|
|
3492
|
-
@media (max-width: 1100px) {
|
|
3493
|
-
.dpk-header-meta > .dpk-meta-name {
|
|
3494
|
-
display: none;
|
|
3495
|
-
}
|
|
3496
|
-
}
|
|
3497
|
-
|
|
3498
|
-
@media (max-width: 720px) {
|
|
3499
|
-
/* The version select stays: it is the reader's only way to switch versions. */
|
|
3500
|
-
.dpk-header-meta > :not(.dpk-version) {
|
|
3501
|
-
display: none;
|
|
3502
|
-
}
|
|
3503
|
-
|
|
3504
|
-
/* On a phone the row may be narrower than the select: it gives up its width. */
|
|
3505
|
-
.dpk-header-meta {
|
|
3506
|
-
min-width: 0;
|
|
3507
|
-
max-width: 100%;
|
|
3508
|
-
}
|
|
3509
|
-
|
|
3510
|
-
.dpk-header-meta > .dpk-version {
|
|
3511
|
-
display: flex;
|
|
3512
|
-
min-width: 0;
|
|
3513
|
-
}
|
|
3514
|
-
|
|
3515
|
-
.dpk-header-meta .dpk-version-select {
|
|
3516
|
-
width: 100%;
|
|
3517
|
-
min-width: 0;
|
|
3518
|
-
text-overflow: ellipsis;
|
|
3519
|
-
}
|
|
3520
|
-
|
|
3521
|
-
/* The title takes the first row whole; the version select and tools wrap below it. */
|
|
3522
|
-
.dpk-title {
|
|
3523
|
-
flex: 1 0 100%;
|
|
3524
|
-
}
|
|
3525
|
-
|
|
3526
|
-
.dpk-brand {
|
|
3527
|
-
display: none;
|
|
3528
|
-
}
|
|
3529
|
-
|
|
3530
|
-
/* The page's own content goes last, so a long one cannot push the version
|
|
3531
|
-
select and tools below it. */
|
|
3532
|
-
.dpk-header-slot {
|
|
3533
|
-
order: 1;
|
|
3534
|
-
}
|
|
3535
|
-
}
|
|
3536
|
-
`],Fs="supplement",Da="memo",kg=(t,e)=>[...t.children].filter(n=>n.getAttribute("slot")===Fs).map(n=>{const s=n.getAttribute("data-name")?.trim()??"";return{name:s===""?e:s,element:n}}),bg=(t,e)=>`.dpk-supplements-body ::slotted(:not(:nth-child(${[...t.children].indexOf(e.element)+1}))) { display: none !important; }`,vg={selected:null,open:!1},xg=(t,e)=>t.open?e.find(n=>n.element===t.selected)??null:null,yg=(t,e)=>({selected:e,open:!(t.open&&t.selected===e)}),wg=(t,e)=>t.open?{...t,open:!1}:{selected:e.some(s=>s.element===t.selected)?t.selected:e[0]?.element??null,open:!0},$g=30,Sg=Ge(v(),O({base:v(),value:v()})),ja=t=>{const e=C(Sg,t);return e.success?e.output:null},Ag=t=>t.key===void 0?JSON.stringify(["field",t.hosts,t.name,t.base]):JSON.stringify(["key",t.key,t.name]),Tg=(t,e,n)=>{const{[e]:s,...r}=t;if(n.value===n.base)return r;const i=Object.entries({...r,[e]:n});return Object.fromEntries(i.slice(Math.max(0,i.length-$g)))},Cg=(t,e)=>{if(!(e in t))return t;const{[e]:n,...s}=t;return s},Eg=(t,e,n)=>{const s=t[e];return s===void 0||s.base!==n||s.value===n?null:s.value},Rg=new Set(["text","search","url","email","tel"]),qa=t=>t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&Rg.has(t.type)?t:null,_g=(t,e)=>{const n=[];let s=e.getRootNode();for(;s instanceof ShadowRoot;){if(s.host===t)return n;n.unshift(s.host.localName),s=s.host.getRootNode()}return null},Og=t=>{let e=t;for(;e!==null;){const n=e.getAttribute("data-dpk-text-key");if(n!==null&&n!=="")return n;const s=e.getRootNode();e=e.parentElement??(s instanceof ShadowRoot?s.host:null)}},Lg=t=>t.composedPath().find(e=>e instanceof Element&&e.hasAttribute("data-dpk-text-discard"))??null,Pg=(t,e)=>{const n=[...e];for(let s=t.parentElement;s!==null;s=s.parentElement){const r=n.filter(i=>s.contains(i));if(r.length>0)return r}return[]},zg=t=>t.getAttribute("aria-label")??(t.placeholder||t.name||t.localName),Ws=t=>typeof t=="string"?[t]:Array.isArray(t)?t.flatMap(Ws):typeof t=="object"&&t!==null?Object.values(t).flatMap(Ws):[],Ba=t=>t.replace(/\s+/g," ").trim();class Mg{#e;#t;#n=null;#r="";#s=new WeakMap;#i=new Set;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}hostConnected(){this.#n===null&&(this.#n=this.#t.persist()?rf(ja):he(ja),this.#r=this.#t.storageKey()),this.#e.addEventListener("focusin",this.#l),this.#e.addEventListener("input",this.#d),this.#e.addEventListener("click",this.#a,!0)}hostDisconnected(){this.#e.removeEventListener("focusin",this.#l),this.#e.removeEventListener("input",this.#d),this.#e.removeEventListener("click",this.#a,!0)}settle(e){const n=new Set(e.flatMap(Ws).map(Ba));this.#o([...this.#i].filter(s=>n.has(Ba(s.value))))}#o(e){for(const n of e){this.#i.delete(n);const s=this.#s.get(n);s!==void 0&&this.#m(Cg(this.#p(),s.id))}}#a=e=>{const n=Lg(e);n!==null&&this.#o(Pg(n,this.#i))};#l=e=>{const n=qa(e.composedPath()[0]);if(n===null||this.#i.has(n))return;const s=_g(this.#e,n);if(s===null)return;const r=Og(n),i=n.value,o=Ag({...r===void 0?{}:{key:r},hosts:s,name:zg(n),base:i});this.#s.set(n,{id:o,base:i});const a=Eg(this.#p(),o,i);a!==null&&queueMicrotask(()=>{if(n.value===i){n.value=a;try{n.setSelectionRange(a.length,a.length)}catch{}this.#i.add(n),n.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}})};#d=e=>{const n=qa(e.composedPath()[0]),s=n===null?void 0:this.#s.get(n);if(!(n===null||s===void 0)){for(const r of this.#i)r.isConnected||this.#i.delete(r);this.#i.add(n),this.#m(Tg(this.#p(),s.id,{base:s.base,value:n.value}))}};#p(){return this.#n?.read(this.#r)??{}}#m(e){Object.keys(e).length===0?this.#n?.remove(this.#r):this.#n?.write(this.#r,e)}}class Ig{#e;#t;#n;#r=null;#s=!1;constructor(e,n={}){this.#e=e,this.#t=n.fetchVersions??Co,this.#n=n.switchTo??Eo,e.addController(this)}hostConnected(){}load(){this.#s||this.#r!==null||(this.#s=!0,this.#t().then(e=>{this.#r=e,this.#s=!1,this.#e.requestUpdate()},e=>{this.#s=!1,console.warn("dev-process-kit: could not list the published versions",e)}))}pick(e){e!==X&&this.#n(e===""?null:e)}render(e){const n=L(e),s=To({current:X,requested:vs(location.search)!==null,published:this.#r,text:{pinned:n.versionPinned,latest:n.versionLatest}}),r=()=>this.load();return m`<span class="dpk-version"
|
|
3537
|
-
>dev-process-kit@<select
|
|
3538
|
-
class="dpk-version-select"
|
|
3539
|
-
aria-label=${n.versionLabel}
|
|
3540
|
-
title=${n.versionLabel}
|
|
3541
|
-
@pointerenter=${r}
|
|
3542
|
-
@focus=${r}
|
|
3543
|
-
@change=${ys(i=>this.pick(i))}
|
|
3544
|
-
>
|
|
3545
|
-
${s.options.map(i=>m`<option value=${i.value} ?selected=${i.value===s.value}>${i.label}</option>`)}
|
|
3546
|
-
</select></span
|
|
3547
|
-
>`}}const Gs=`script[type="application/json"]:not([${Ro}]):not([${yi}])`,Ng=`script[type="application/json"][${yi}]`,Dg=30,Ha={width:360,height:480},Vs="dpk-review",Ua=t=>{try{return t.matches(":popover-open")}catch{return!1}},jg=()=>new Promise(t=>requestAnimationFrame(()=>t()));class qg extends me{static{this.styles=Na}static{this.properties={storageKey:{type:String,attribute:"storage-key"},storage:{type:String},notes:{type:String},theme:{type:String},notesOpen:{state:!0},settingsOpen:{state:!0},reviewSection:{state:!0}}}#e=Ve;#t=null;#n=null;#r="current";#s=null;#i=null;#o=[];#a={open:e=>this.#B(e),answer:(e,n)=>this.#$e(e,n),next:e=>this.#ee(e),pickRound:e=>{this.#r=e,this.#i=null,this.requestUpdate()}};#l=!1;#d=new Zf(this);#p=vg;#m=new yf(this,()=>this.storage!=="off"&&this.storage!=="memory");#y=new vf(this);#k=new Ff(this);#v=new mg(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",template:()=>this.#U,layout:()=>this.sidebarLayout});#h=new fg(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",template:()=>this.#U});#A=new Kf(this);#g=new Mg(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",storageKey:()=>`${this.storageKey??kn(this.#U)}:unsent-text`});#b=null;#u=new lf(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",storageKey:()=>this.storageKey??kn(this.definition.name),inside:e=>e.some(n=>n instanceof Element&&(n.id===vn||n.classList.contains("dpk-bell"))),show:e=>{this.#Re(e)}});#w={toggleList:()=>this.#u.toggleList(),openList:()=>this.#u.send({kind:"open-list"}),show:e=>this.#u.show(e),dismiss:e=>this.#u.send({kind:"close-toast",key:e}),readAll:()=>this.#u.send({kind:"read-all"}),pause:e=>this.#u.pause(e),resume:e=>this.#u.resume(e)};#E=new bo(this);#G={toggle:()=>{this.settingsOpen=!this.settingsOpen},flip:e=>{this.dispatch(e)}};constructor(){super(),this.settingsOpen=!1,new og(this,{surface:()=>this.renderRoot.querySelector(`#${Vs}`),anchor:()=>this.renderRoot.querySelector(".dpk-header-actions"),open:()=>this.notesOpen,close:()=>{this.notesOpen=!1}}),new Mf(this,{active:()=>this.#e.questions.length>0,layer:()=>this.renderRoot.querySelector(".dpk-grill-badges"),bindings:()=>this.#o}),new vo(this,{open:()=>this.settingsOpen,closesOn:e=>!e.some(n=>n instanceof Element&&(n.id===yn||n.matches(".dpk-settings-trigger"))),ownsEscape:()=>!0,dismiss:()=>{this.settingsOpen=!1}})}#M=!1;#ge=new Ig(this);#V=new Wf(this,()=>this.storage!=="off"&&this.storage!=="memory",()=>{this.#f?.setTemplate(this.definition),this.#f?.setGrill({grill:this.#e,locale:this.locale})});#I;#f;#$=gt;#N=null;#D=new Set;#O=null;#K;#R;#L;#P=[];#Q;#me=new Promise(e=>{this.#Q=e});#Z;#c=null;#j;get locale(){return this.#x()?.locale()??this.#V.locale}get definition(){const e=this.locale;return this.#I?.locale!==e&&(this.#I={locale:e,value:this.definitionFor(e)}),this.#I.value}connectedCallback(){this.#c=ia(this),super.connectedCallback(),this.dataset.template=this.definition.name,this.#l||(this.#l=!0,this.notesOpen=this.notes==="on"||this.notes==="open"||this.notes==="comments"||this.notes==="changes"||this.notes==="questions",this.reviewSection=this.notes==="changes"||this.notes==="questions"?this.notes:"comments"),this.#q(),this.#c===null&&window.addEventListener("hashchange",this.#de),this.addEventListener("click",this.#fe),this.addEventListener("dpk-comment-targets-change",this.#S),this.addEventListener("dpk-comment-request",this.#pe),this.addEventListener("dpk-comment-submit",this.#he),this.addEventListener("dpk-element-action",this.#ue),this.#L??=new MutationObserver(this.#S),this.#S()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("hashchange",this.#de),this.removeEventListener("click",this.#fe),this.#R?.disconnect(),this.#L?.disconnect(),this.removeEventListener("dpk-comment-targets-change",this.#S),this.removeEventListener("dpk-comment-request",this.#pe),this.removeEventListener("dpk-comment-submit",this.#he),this.removeEventListener("dpk-element-action",this.#ue)}#q(e=0){if(this.#f){this.#Y();return}if(this.childNodes.length===0&&e<2){queueMicrotask(()=>this.#q(e+1));return}const n=this.pendingStart();if(n!==null){n.then(()=>this.#q(e));return}this.#Ne()}#Y(){this.#K||(this.#K=this.#f?.subscribe(()=>this.#He()))}willUpdate(){const e=this.#x();this.dataset.theme=e?.theme()??this.#m.resolve($t(this.theme)),e!==null&&this.#f&&this.#j!==e.locale()&&(this.#j=e.locale(),this.#f.setTemplate(this.definition))}updated(){this.#We(),this.#Fe(),this.#Ee(),this.#ve(),this.#Se(),this.#M&&(this.#M=!1,this.renderRoot.querySelector(".dpk-sidebar-toggle")?.focus())}get api(){return this.#Z??=this.#Ie(),this.#Z}get controller(){if(!this.#f)throw new Error(`<${this.tagName.toLowerCase()}> is not initialized yet`);return this.#f}get derivation(){return this.controller.derivation}get navigation(){return this.#c===null?this.#$:this.#C()}get board(){return this.#c}dispatch(e){if(this.#c!==null)return this.#F(s=>s.dispatch(this.#ie(e)));const n=this.controller.dispatch(e);return n.ok&&this.#g.settle([e.payload,e.note]),n.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:n.issues},bubbles:!0,composed:!0})),this.#T()),n}dispatchBatch(e){if(this.#c!==null)return this.#F(s=>s.dispatchBatch(e.map(r=>this.#ie(r))));const n=this.controller.dispatchBatch(e);return n.ok&&this.#g.settle(e.flatMap(s=>[s.payload,s.note])),n.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:n.issues},bubbles:!0,composed:!0})),this.#T()),n}editComment(e,n){if(this.#c!==null)return this.#F(r=>r.editComment(e,n));const s=this.controller.editComment(e,n);return s.ok&&this.#g.settle([n]),s.ok||(this.requestUpdate(),this.dispatchEvent(new CustomEvent("dpk-error",{detail:{issues:s.issues},bubbles:!0,composed:!0})),this.#T()),s}removeAction(e){this.#c!==null?this.#x()?.removeAction(e):this.controller.removeAction(e)}clearActions(){if(this.#c===null){this.controller.clearActions();return}const e=this.#x();for(const n of this.controller.actions)e?.removeAction(n.id)}navigate(e,n={}){if(this.#c!==null){this.#x()?.navigate(this.#oe(e),n);return}const s=Qe(this.#C());this.#$=en(this.#$,e,this.definition.navigationHierarchy),this.#z(n.replace??!1);const r=Qe(this.#C());this.requestUpdate(),s!==r&&(this.#T(),this.dispatchEvent(new CustomEvent("dpk-navigate",{detail:{navigation:this.#$},bubbles:!0,composed:!0})))}hashFor(e){const n=this.#x();if(n!==null)return n.hashFor(this.#oe(e));const s=this.#C();return Qe(this.definition.resolveNavigation(this.derivation.state,en(s,e,this.definition.navigationHierarchy)))}requestComment(e){if(this.#c!==null){this.#x()?.requestComment(I(this.#re(e,"page")));return}this.#N=typeof e=="string"?e:I(e),this.notesOpen=!0,this.reviewSection="comments",this.requestUpdate()}get canSendToClaude(){return this.#y.available}sendToClaude(){return this.#y.send({brief:this.api.exportBrief(),draft:es(this.derivation.actions),anchor:this})}renderReviewPanel(e){return m`<dpk-component-comment-panel
|
|
3548
|
-
.definition=${this.controller.definition}
|
|
3549
|
-
.state=${e.state}
|
|
3550
|
-
.navigation=${e.navigation}
|
|
3551
|
-
.derivation=${this.derivation}
|
|
3552
|
-
.issues=${this.controller.lastIssues}
|
|
3553
|
-
.exportBrief=${()=>this.api.exportBrief()}
|
|
3554
|
-
.sendToClaude=${this.canSendToClaude?()=>this.sendToClaude():void 0}
|
|
3555
|
-
.pendingTarget=${this.#N}
|
|
3556
|
-
.section=${this.#_==="questions"?null:this.#_}
|
|
3557
|
-
.onDelete=${n=>this.removeAction(n)}
|
|
3558
|
-
.onEditComment=${(n,s)=>this.editComment(n,s)}
|
|
3559
|
-
.onClear=${()=>this.clearActions()}
|
|
3560
|
-
.onComment=${(n,s)=>{const r=this.dispatch({type:B,target:n,payload:{body:s}});return r.ok&&(this.#N=null),r}}
|
|
3561
|
-
></dpk-component-comment-panel>`}renderChrome(e,n){if(this.#c!==null)return this.#ke(n);const s=e.actions.length,r=e.actions.filter(d=>d.type===B).length,i=new Set(this.derivation.stale.map(d=>d.action.id)),o=e.actions.filter(d=>Q(d)&&!i.has(d.id)).length,a=s-r-o;this.#o=Lf(this,this.#e,this.derivation.answers,this.notesOpen&&this.reviewSection==="questions"?qs(this.#e,this.#n):null);const l=this.definition.title(e.state);return m`
|
|
3562
|
-
<div class="dpk-shell" ?data-resizing=${this.#v.dragging}>
|
|
3563
|
-
<header class="dpk-header">
|
|
3564
|
-
<span class="dpk-brand" aria-hidden="true"></span>
|
|
3565
|
-
<div class="dpk-title">
|
|
3566
|
-
<span class="dpk-template-mark">${this.templateIdentity().label}</span>
|
|
3567
|
-
<h1 title=${l}>${l}</h1>
|
|
3568
|
-
</div>
|
|
3569
|
-
<div class="dpk-header-slot">
|
|
3570
|
-
${n.header??k}
|
|
3571
|
-
<slot name="header"></slot>
|
|
3572
|
-
</div>
|
|
3573
|
-
<div class="dpk-header-meta">
|
|
3574
|
-
${this.#ge.render(this.locale)}
|
|
3575
|
-
<span class="dpk-meta-name">${this.templateIdentity().name}</span>
|
|
3576
|
-
</div>
|
|
3577
|
-
<div class="dpk-header-tools">
|
|
3578
|
-
${this.#Te()} ${this.#Oe()} ${this.#Le()}
|
|
3579
|
-
</div>
|
|
3580
|
-
</header>
|
|
3581
|
-
${this.#J(n)} ${this.#X(n)}
|
|
3582
|
-
${this.#be(e,a,r)} ${this.#ye(e)}
|
|
3583
|
-
${this.#_e(s)} ${this.#Ce()}
|
|
3584
|
-
</div>
|
|
3585
|
-
`}#ke(e){this.#o=[];const n=e.header!==void 0&&e.header!==k||this.querySelector(':scope > [slot="header"]')!==null;return m`
|
|
3586
|
-
<div class="dpk-shell" data-board ?data-resizing=${this.#v.dragging}>
|
|
3587
|
-
<div class="dpk-board-bar" ?hidden=${!n}>
|
|
3588
|
-
<div class="dpk-header-slot">
|
|
3589
|
-
${e.header??k}
|
|
3590
|
-
<slot name="header"></slot>
|
|
3591
|
-
</div>
|
|
3592
|
-
</div>
|
|
3593
|
-
${this.#J(e)} ${this.#X(e)}
|
|
3594
|
-
</div>
|
|
3595
|
-
`}#J(e){const n=L(this.locale),s=e.sidebarHidden===!0||!e.sidebar&&!this.hasSidebarContent(),r=this.sidebarLayout.side,i=this.#Pe,o=!s&&this.#H&&(i?!this.#h.drawerOpen:this.#h.collapsed),a=s?k:this.#ze(o,i);return m`<div class="dpk-body" data-sidebar-side=${r} ?data-sidebar-drawer=${i}>
|
|
3596
|
-
${r==="right"?a:k}
|
|
3597
|
-
<aside
|
|
3598
|
-
id="dpk-sidebar"
|
|
3599
|
-
class="dpk-sidebar"
|
|
3600
|
-
?hidden=${s||o}
|
|
3601
|
-
style=${`--dpk-sidebar-width: ${this.#v.width}px`}
|
|
3602
|
-
>
|
|
3603
|
-
${e.sidebar??k}
|
|
3604
|
-
<slot name="sidebar"></slot>
|
|
3605
|
-
</aside>
|
|
3606
|
-
${r==="left"?a:k}
|
|
3607
|
-
${i&&!o&&!s?m`<div class="dpk-sidebar-scrim" @click=${()=>this.#h.closeDrawer()}></div>`:k}
|
|
3608
|
-
<main class="dpk-main">
|
|
3609
|
-
<div class="dpk-main-body" ?data-grill-gutter=${this.#o.some(l=>this.contains(l.target))}>
|
|
3610
|
-
${this.#O?m`<div class="dpk-banner" role="alert">
|
|
3611
|
-
<strong>${n.baseDataError}</strong>
|
|
3612
|
-
<code>${this.#O}</code>
|
|
3613
|
-
</div>`:k}
|
|
3614
|
-
${this.#t===null?k:m`<div class="dpk-banner" role="alert">
|
|
3615
|
-
<strong>${n.grillError}</strong>
|
|
3616
|
-
<code>${this.#t}</code>
|
|
3617
|
-
</div>`}
|
|
3618
|
-
${this.#u.error===null?k:m`<div class="dpk-banner" role="alert">
|
|
3619
|
-
<strong>${n.changesError}</strong>
|
|
3620
|
-
<code>${this.#u.error}</code>
|
|
3621
|
-
</div>`}
|
|
3622
|
-
${e.main??k}
|
|
3623
|
-
<slot name="main"></slot>
|
|
3624
|
-
<section class="dpk-orphans" ?hidden=${this.#d.orphans===0}>
|
|
3625
|
-
<p class="dpk-label">previews without metadata</p>
|
|
3626
|
-
<slot name="preview"></slot>
|
|
3627
|
-
</section>
|
|
3628
|
-
${this.#Ae()}
|
|
3629
|
-
</div>
|
|
3630
|
-
${this.#Ue(n)}
|
|
3631
|
-
</main>
|
|
3632
|
-
</div>`}#X(e){return e.footer||this.hasFooterContent()?m`<footer class="dpk-footer">
|
|
3633
|
-
${e.footer??k}
|
|
3634
|
-
<slot name="footer"></slot>
|
|
3635
|
-
</footer>`:k}#be(e,n,s){const r=this.definition.settings?.(e.state),i=r!==void 0&&r.items.length>0,o=L(this.locale);return m`<div class="dpk-header-actions">
|
|
3636
|
-
${i?Pa(this.settingsOpen,o,this.#G):k}
|
|
3637
|
-
${i&&this.settingsOpen?za(r,o,this.#G):k}
|
|
3638
|
-
${this.#xe(n,s)}
|
|
3639
|
-
</div>`}#ve(){const e=this.renderRoot.querySelector(`#${yn}`),n=this.renderRoot.querySelector(`.${Oa}`),s=n??this.renderRoot.querySelector(".dpk-header-actions");!e||!s||Ua(e)||this.#E.open(e,s,{width:La.width,height:Math.min(La.height,window.innerHeight-96)},{placement:n===null?"bottom-end":"bottom-start"})}#xe(e,n){const s=L(this.locale),r=(a,l,d,c)=>{const p=this.notesOpen&&this.#_===a;return m`<button
|
|
3640
|
-
class="dpk-header-action dpk-review-toggle"
|
|
3641
|
-
type="button"
|
|
3642
|
-
data-section=${a}
|
|
3643
|
-
aria-controls=${Vs}
|
|
3644
|
-
aria-pressed=${p?"true":"false"}
|
|
3645
|
-
aria-label=${`${l} (${c??0})`}
|
|
3646
|
-
data-tooltip=${l}
|
|
3647
|
-
@click=${()=>{this.notesOpen=!p,this.reviewSection=a}}
|
|
3648
|
-
>
|
|
3649
|
-
${d} ${c===null?k:m`<span class="dpk-review-badge">${c}</span>`}
|
|
3650
|
-
</button>`},i=a=>a>0?String(a):null,o=Ci(this.#e,this.derivation.answers);return m`<div class="dpk-review-toggles" role="group" aria-label=${s.review}>
|
|
3651
|
-
${r("changes",s.reviewChanges,cp(),i(e))}
|
|
3652
|
-
${o.total===0?k:r("questions",s.grill,dp(),`${o.answered}/${o.total}`)}
|
|
3653
|
-
${r("comments",s.reviewComments,sn(),i(n))}
|
|
3654
|
-
</div>`}#ye(e){const n=L(this.locale),s=this.#_,r=s==="changes"?n.reviewChanges:s==="questions"?n.grill:n.reviewComments;return m`<div
|
|
3655
|
-
id=${Vs}
|
|
3656
|
-
class="dpk-review"
|
|
3657
|
-
popover="manual"
|
|
3658
|
-
role="dialog"
|
|
3659
|
-
aria-label=${r}
|
|
3660
|
-
data-section=${s}
|
|
3661
|
-
>
|
|
3662
|
-
${s==="questions"?this.#we(e.actions.length):k}
|
|
3663
|
-
${this.renderReviewPanel(e)}
|
|
3664
|
-
</div>`}get#_(){return this.reviewSection==="questions"&&this.#e.questions.length===0?"comments":this.reviewSection}#we(e){const n=L(this.locale),s=Df(n,this.#e,this.derivation.answers,{open:this.#n,round:this.#r}),r=this.#te(e,!1);return jf(n,s,this.#a,r?m`<footer class="dpk-grill-footer">${this.#ne(r)}</footer>`:k)}#B(e){this.notesOpen=!0,this.reviewSection="questions",this.#r="current",this.#n=e,this.#i=null,this.requestUpdate()}#$e(e,n){this.dispatch(kd(e,n)).ok&&(n.kind==="option"?this.#ee(e):n.kind==="free"&&n.text===""&&(this.#s=e))}#ee(e){const n=fd(this.#e,this.derivation.answers,e);n!==null&&(this.#n=n,this.requestUpdate())}#Se(){if(!this.notesOpen||this.#_!=="questions")return;const e=this.#s;this.#s=null,e!==null&&this.renderRoot.querySelector(`[data-free-text="${e}"]`)?.focus();const n=qs(this.#e,this.#n);if(this.#r!=="current"||n===null||n===this.#i)return;this.#i=n;const s=this.renderRoot.querySelector(`.dpk-grill [data-question="${n}"]`),r=s?.closest(".dpk-grill-list");s&&r&&bs(r,s)}#Ae(){if(this.#o.length===0)return k;const e=L(this.locale);return m`<div class="dpk-grill-badges">
|
|
3665
|
-
${this.#o.map(n=>m`<button
|
|
3666
|
-
type="button"
|
|
3667
|
-
class="dpk-grill-badge"
|
|
3668
|
-
data-badge=${n.index}
|
|
3669
|
-
data-answered=${String(n.answered)}
|
|
3670
|
-
data-visible="false"
|
|
3671
|
-
aria-pressed=${n.open?"true":"false"}
|
|
3672
|
-
aria-label=${e.grillOpen(`${n.ref} \xB7 ${n.title}`)}
|
|
3673
|
-
title=${`${n.ref} \xB7 ${n.title}`}
|
|
3674
|
-
@click=${()=>this.#B(n.questionId)}
|
|
3675
|
-
>
|
|
3676
|
-
${n.ref}
|
|
3677
|
-
</button>`)}
|
|
3678
|
-
</div>`}#Te(){const e=this.#u.view;if(!e)return k;const n=L(this.locale);return m`${cf(e,n,this.#w)}
|
|
3679
|
-
${pf(e,n,this.#w)}`}#Ce(){const e=this.#u.view;return e?hf(e,L(this.locale),this.#w):k}#Ee(){const e=this.renderRoot.querySelector(`#${vn}`),n=this.renderRoot.querySelector(".dpk-bell");!e||!n||Ua(e)||this.#E.open(e,n,{width:Ha.width,height:Math.min(Ha.height,window.innerHeight-96)})}async#Re(e){const n={};this.#b=n;const s=this.derivation.state,r=e.target===null?null:this.definition.canonicalTarget?.(s,ut(e.target))??ut(e.target),i=su({...e,target:r&&I(r)},a=>this.definition.navigationFor?this.definition.navigationFor(s,a):null);if(!i||(i.navigate&&this.navigate(i.navigate),r===null))return;r.type===ae?this.#B(r.id):this.showTarget(r);const o=I(r);for(let a=0;a<Dg;a+=1){if(await this.updateComplete,await jg(),this.#b!==n)return;const l=Ca(this,o);if(!(l===null||l.getClientRects().length===0)){eg(this,l),sg(l);return}}}showTarget(e){}#_e(e){const n=this.#te(e,this.notesOpen);if(!n)return k;const s=L(this.locale);return m`<div class="dpk-dock" role="group" aria-label=${s.handoffLabel}>
|
|
3680
|
-
${this.#ne(n)}
|
|
3681
|
-
</div>`}#te(e,n){return Ku({actions:e,railOpen:n,sendable:this.canSendToClaude,locale:this.locale},this.#k.state)}#ne(e){const n=L(this.locale);return m`${e.note?m`<p class="dpk-dock-note" role="alert">${e.note}</p>`:k}
|
|
3682
|
-
<div class="dpk-dock-actions">
|
|
3683
|
-
${e.send?m`<button
|
|
3684
|
-
class="dpk-btn dpk-btn--accent"
|
|
3685
|
-
type="button"
|
|
3686
|
-
?disabled=${e.send.disabled}
|
|
3687
|
-
@click=${()=>{this.#k.send(()=>this.sendToClaude())}}
|
|
3688
|
-
>
|
|
3689
|
-
${e.send.label}
|
|
3690
|
-
</button>`:k}
|
|
3691
|
-
<button
|
|
3692
|
-
class=${e.send?"dpk-btn":"dpk-btn dpk-btn--accent"}
|
|
3693
|
-
type="button"
|
|
3694
|
-
data-status=${e.copy.status}
|
|
3695
|
-
title=${n.handoffCopyTitle}
|
|
3696
|
-
@click=${()=>{this.#k.copy(()=>this.api.exportBrief())}}
|
|
3697
|
-
>
|
|
3698
|
-
${e.copy.label}
|
|
3699
|
-
</button>
|
|
3700
|
-
</div>`}#Oe(){const e=this.locale,n=L(e).language;return m`<select
|
|
3701
|
-
class="dpk-lang-select"
|
|
3702
|
-
aria-label=${n}
|
|
3703
|
-
title=${n}
|
|
3704
|
-
@change=${ys(s=>{const r=Mn.find(i=>i===s);r!==void 0&&this.#V.pick(r)})}
|
|
3705
|
-
>
|
|
3706
|
-
${Mn.map(s=>m`<option value=${s} lang=${s} ?selected=${s===e}>
|
|
3707
|
-
${Sd[s]}
|
|
3708
|
-
</option>`)}
|
|
3709
|
-
</select>`}#Le(){const e=this.dataset.theme==="dark",n=L(this.locale),s=e?n.useLightTheme:n.useDarkTheme;return m`<button
|
|
3710
|
-
class="dpk-theme-toggle"
|
|
3711
|
-
type="button"
|
|
3712
|
-
aria-label=${s}
|
|
3713
|
-
title=${s}
|
|
3714
|
-
@click=${()=>this.#m.toggle($t(this.theme))}
|
|
3715
|
-
>
|
|
3716
|
-
${e?xp():yp()}
|
|
3717
|
-
</button>`}get#H(){return this.sidebarLayout.collapsible!==!1}get#Pe(){return this.#A.narrow&&this.#H&&this.sidebarLayout.narrow!=="stack"}#ze(e,n){const s=this.#H?this.#Me(e,n):k;return e||n?m`<div class="dpk-sidebar-strip">${s}</div>`:this.sidebarLayout.side==="left"?m`${this.#se()}${s}`:m`${s}${this.#se()}`}#Me(e,n){const s=L(this.locale),r=hg(this.sidebarLayout.side,e),i=r.action==="collapse"?s.collapseSidebar:s.expandSidebar;return m`<button
|
|
3718
|
-
class="dpk-sidebar-toggle"
|
|
3719
|
-
type="button"
|
|
3720
|
-
aria-controls="dpk-sidebar"
|
|
3721
|
-
aria-expanded=${e?"false":"true"}
|
|
3722
|
-
aria-label=${i}
|
|
3723
|
-
title=${i}
|
|
3724
|
-
@click=${()=>{this.#M=!0,n?this.#h.toggleDrawer():this.#h.toggle()}}
|
|
3725
|
-
>
|
|
3726
|
-
${r.points==="left"?Qi():mt()}
|
|
3727
|
-
</button>`}#se(){const e=L(this.locale),n=this.#v.handlers;return m`<div
|
|
3728
|
-
class="dpk-sidebar-resizer"
|
|
3729
|
-
role="separator"
|
|
3730
|
-
tabindex="0"
|
|
3731
|
-
aria-orientation="vertical"
|
|
3732
|
-
aria-label=${e.resizeSidebar}
|
|
3733
|
-
aria-valuemin=${ye.min}
|
|
3734
|
-
aria-valuemax=${ye.max}
|
|
3735
|
-
aria-valuenow=${this.#v.width}
|
|
3736
|
-
title=${e.resizeSidebarHint}
|
|
3737
|
-
@pointerdown=${n.pointerdown}
|
|
3738
|
-
@pointermove=${n.pointermove}
|
|
3739
|
-
@pointerup=${n.pointerup}
|
|
3740
|
-
@pointercancel=${n.pointercancel}
|
|
3741
|
-
@keydown=${n.keydown}
|
|
3742
|
-
@dblclick=${n.dblclick}
|
|
3743
|
-
></div>`}render(){if(!this.#f)return k;const e=this.#le();return this.renderChrome(e,this.renderRegions(e))}get sidebarLayout(){return lg}hasSidebarContent(){return this.querySelector('[slot="sidebar"]')!==null}hasFooterContent(){return this.querySelector('[slot="footer"]')!==null}context(){return this.#le()}#x(){return this.#c===null?null:Ju(this)}get#U(){return this.#c===null?this.definition.name:`${this.definition.name}@${this.#c}`}#F(e){const n=this.#x();if(n===null)return{ok:!1,issues:[{path:"board",message:"the page is not ready yet"}]};const s=e(n);return this.requestUpdate(),s}#re(e,n){const s=this.#x(),r=this.#c,i=Qt(e,n);return r===null||s===null?i:Qu(i,r,s.boardIds())}#ie(e){const n=this.controller.descriptorFor(e.type)?.targetType??"page";return{...e,target:this.#re(e.target,n)}}#oe(e){const n=this.#x(),s=this.#c;return n===null||s===null?e:tf(n.navigation(),s,e,n.boardIds(),this.definition.navigationHierarchy)}#W(){return{definition:this.definition,controller:()=>this.controller,derivation:()=>this.derivation,ready:this.#me,navigation:()=>this.#C(),issues:()=>this.controller.lastIssues,dispatch:e=>this.dispatch(e),dispatchBatch:e=>this.dispatchBatch(e),subscribe:e=>(this.#D.add(e),()=>{this.#D.delete(e)}),editComment:(e,n)=>this.editComment(e,n),removeAction:e=>this.removeAction(e),clearActions:()=>this.clearActions(),navigate:(e,n)=>this.navigate(e,n),hashFor:e=>this.hashFor(e),requestComment:e=>this.requestComment(e),brief:e=>this.buildBrief(e)}}#Ie(){return sf(this.#W(),this)}#ae(){return aa(this.#W())}#le(){return nf(this.#W())}#C(){const e=this.#x(),n=this.#c===null?this.#$:Ms(e?.navigation()??gt,this.#c);return this.#f?this.definition.resolveNavigation(this.derivation.state,n):n}#Ne(){const e=this.#qe(),n=this.#c!==null;this.#e=n?Ve:this.#ce(),this.#De(),this.#$=n?gt:$a(),this.#j=this.locale;const s=this.storageKey;this.#f=new Zo({definition:this.definition,base:e,storage:n?null:this.#je(),grill:{grill:this.#e,locale:this.locale},...typeof s=="string"?{storageKey:s}:{}}),this.#Y(),this.#S(),this.#z(!0),this.#Q?.(),this.#Be(),this.requestUpdate()}#De(){this.querySelector(`:scope > [slot="${Da}"]`)!==null&&console.warn(`[dev-process-kit] <${this.tagName.toLowerCase()}> no longer shows slot="${Da}"; slot each piece as slot="${Fs}" data-name="\u2026" instead.`)}#je(){return this.storage==="off"?null:this.storage==="memory"?new Rs:_s()}scriptOf(e){return this.querySelector(e)}pendingStart(){return null}templateIdentity(){return this.definition}buildBrief(e){return tn(e,this.controller.definition,X)}#qe(){const e=this.scriptOf(Gs);if(e===null&&this.hasAttribute(ra))return this.definition.emptyBase();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.#O='no <script type="application/json"> child found',this.definition.emptyBase();try{return this.definition.parseBase(JSON.parse(e.textContent))}catch(n){return console.error("[dev-process-kit] invalid base data:",n),this.#O=n instanceof Error?n.message:String(n),this.definition.emptyBase()}}#ce(){const e=this.scriptOf(Ng);if(this.#t=null,!e?.textContent||e.textContent.trim().length===0)return Ve;try{return hd(JSON.parse(e.textContent))}catch(n){return console.error("[dev-process-kit] invalid questions:",n),this.#t=n instanceof Error?n.message:String(n),Ve}}#Be(){this.scriptOf(Gs)||(this.#R=new MutationObserver(()=>{const e=this.scriptOf(Gs);if(e){this.#R?.disconnect(),this.#R=void 0,this.#c===null&&(this.#e=this.#ce()),this.controller.setGrill({grill:this.#e,locale:this.locale});try{this.controller.setBase(this.definition.parseBase(JSON.parse(e.textContent??"null")))}catch(n){console.error("[dev-process-kit] invalid base data:",n)}}}),this.#R.observe(this,{childList:!0,subtree:!0}))}#T(){const e=this.#ae();for(const n of this.#D)n(e)}#He(){if(!this.isConnected){this.requestUpdate(),this.#T();return}this.#c===null&&this.#z(!0),ga(this.#P,this.controller.actions),queueMicrotask(this.#S),this.requestUpdate(),this.#T(),this.#c===null&&this.dispatchEvent(new CustomEvent("dpk-change",{detail:this.#ae(),bubbles:!0,composed:!0}))}#z(e){if(this.#c!==null)return;const n=this.#C();this.#$=n,Qf(n,e)}#de=()=>{this.#$=$a(),this.#z(!0),this.requestUpdate(),this.#T(),this.dispatchEvent(new CustomEvent("dpk-navigate",{detail:{navigation:this.#$},bubbles:!0,composed:!0}))};#S=()=>{this.#L?.disconnect(),this.#P=wf(this,e=>{this.isConnected&&this.#L?.observe(e,{childList:!0,subtree:!0})}),this.#f&&(ga(this.#P,this.#f.actions),this.#f.setComponentSnapshot(Sf(this.#P)))};#pe=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!this.#f)return;const n=e.detail;typeof n!="object"||n===null||!("target"in n)||typeof n.target!="string"||(this.#S(),!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(r=>r.value===n.target))||this.requestComment(n.target)};#he=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!e.cancelable||!this.#f)return;const n=C(lu,e.detail);if(!n.success)return;this.#S();const{target:s,body:r}=n.output;if(!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(a=>a.value===s))return;this.dispatch({type:B,target:s,payload:{body:r}}).ok&&e.preventDefault()};#ue=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!e.cancelable||!this.#f)return;const n=C(id,e.detail);if(!n.success)return;this.#S();const{type:s,target:r,payload:i}=n.output;if(!this.controller.definition.commentTargets(this.derivation.state,this.navigation).some(l=>l.value===r))return;this.dispatch({type:s,target:r,payload:i}).ok&&e.preventDefault()};#fe=e=>{for(const n of e.composedPath()){if(!(n instanceof Element))continue;if(n===this||n.hasAttribute("data-template"))break;const s=n.getAttribute("data-dpk-navigate");if(s!==null){e.preventDefault(),this.navigate(Xt(s.includes("=")?s:`step=${s}`));return}const r=n.getAttribute("data-dpk-comment");if(r!==null){e.preventDefault(),this.requestComment(r);return}}};#Ue(e){const n=kg(this,e.memo),s=xg(this.#p,n),r=i=>{this.#p=i,this.requestUpdate()};return m`<div class="dpk-supplements" ?hidden=${n.length===0} ?data-open=${s!==null}>
|
|
3744
|
-
<div class="dpk-supplements-bar" role="group" aria-label=${e.supplements}>
|
|
3745
|
-
<button
|
|
3746
|
-
type="button"
|
|
3747
|
-
class="dpk-supplements-toggle"
|
|
3748
|
-
aria-expanded=${String(s!==null)}
|
|
3749
|
-
aria-controls="dpk-supplements-body"
|
|
3750
|
-
aria-label=${s===null?e.openSupplements:e.closeSupplements}
|
|
3751
|
-
@click=${()=>r(wg(this.#p,n))}
|
|
3752
|
-
>
|
|
3753
|
-
${mt()}
|
|
3754
|
-
</button>
|
|
3755
|
-
${n.map(i=>m`<button
|
|
3756
|
-
type="button"
|
|
3757
|
-
class="dpk-supplement-tab"
|
|
3758
|
-
aria-expanded=${String(i===s)}
|
|
3759
|
-
aria-controls="dpk-supplements-body"
|
|
3760
|
-
@click=${()=>r(yg(this.#p,i.element))}
|
|
3761
|
-
>
|
|
3762
|
-
${i.name}
|
|
3763
|
-
</button>`)}
|
|
3764
|
-
</div>
|
|
3765
|
-
<div class="dpk-supplements-body" id="dpk-supplements-body" ?hidden=${s===null}>
|
|
3766
|
-
<style .textContent=${s===null?"":bg(this,s)}></style>
|
|
3767
|
-
<slot name=${Fs} @slotchange=${()=>this.requestUpdate()}></slot>
|
|
3768
|
-
</div>
|
|
3769
|
-
</div>`}#Fe(){const e=this.renderRoot.querySelector(".dpk-shell"),n=this.renderRoot.querySelector(".dpk-dock-actions");e&&(n?e.style.setProperty("--dpk-dock-space",`${n.offsetWidth+8}px`):e.style.removeProperty("--dpk-dock-space"))}#We(){this.#d.route()}}export{yt as $,nn as A,sn as B,B as C,Ji as D,gt as E,fp as F,Wi as G,Ki as H,ls as I,Vi as J,Fi as K,Go as L,Rs as M,Xt as N,ut as O,Gc as P,en as Q,Vc as R,es as S,qg as T,hi as U,I as V,Es as W,Vt as X,Qt as Y,Nt as Z,$o as _,ts as a,ji as a$,It as a0,wl as a1,fe as a2,k as a3,m as a4,Me as a5,up as a6,rl as a7,ks as a8,me as a9,wp as aA,bs as aB,li as aC,ci as aD,si as aE,ei as aF,Kt as aG,U as aH,Xe as aI,he as aJ,qh as aK,ys as aL,Hh as aM,mn as aN,Ee as aO,Ah as aP,Ca as aQ,ba as aR,Yr as aS,ni as aT,Fc as aU,Hc as aV,Ge as aW,xr as aX,Qr as aY,A as aZ,Hi as a_,bo as aa,Nn as ab,bp as ac,vp as ad,Gt as ae,z as af,D as ag,j as ah,v as ai,Ft as aj,y as ak,$ as al,di as am,Wt as an,ve as ao,G as ap,Yn as aq,mt as ar,kp as as,C as at,O as au,Zn as av,Jn as aw,vo as ax,Sp as ay,$p as az,Zr as b,qi as b0,zn as b1,lp as b2,Tr as b3,ko as b4,it as b5,Lt as b6,Ln as b7,Qi as b8,Gi as b9,sa as bA,L as bB,Oa as bC,Pa as bD,za as bE,ia as bF,hp as ba,os as bb,Jr as bc,ti as bd,ri as be,Bh as bf,Ui as bg,wo as bh,Di as bi,Bi as bj,oe as bk,Ps as bl,ta as bm,Q as bn,Ms as bo,Zu as bp,Ls as bq,ef as br,oa as bs,ea as bt,na as bu,ht as bv,ai as bw,Na as bx,zs as by,ra as bz,Zo as c,gi as d,Kc as e,tn as f,mi as g,ft as h,Fo as i,Dn as j,ui as k,Jc as l,Xn as m,_s as n,kn as o,Wc as p,Pp as q,Ec as r,zh as s,Wo as t,Pe as u,X as v,Zc as w,Qe as x,mp as y,gp as z};
|