dev-process-kit 0.2.1 → 0.3.0-beta.1
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-BX1EnRfr.js +1 -0
- package/dist/chunks/shared-C-M2Nfmu.js +686 -0
- package/dist/chunks/shared-Cas88qVh.js +2165 -0
- package/dist/chunks/{shared-DeXM1v86.js → shared-Cejw83eH.js} +21 -29
- package/dist/chunks/shared-CfVpKPRY.js +1844 -0
- package/dist/chunks/shared-CnPCm4bJ.js +31 -0
- package/dist/chunks/shared-D1iBuYZV.js +6208 -0
- package/dist/chunks/shared-D7VtCoY6.js +3586 -0
- package/dist/chunks/{shared-zZF1zU0o.js → shared-DHVDag3x.js} +25 -56
- package/dist/chunks/shared-DdpMqkAH.js +4928 -0
- package/dist/chunks/shared-EYOAbLSo.js +1 -0
- package/dist/chunks/shared-TrlnHjrJ.js +1 -0
- package/dist/chunks/shared-a9QCZpxj.js +574 -0
- package/dist/chunks/shared-df9XN7ns.js +904 -0
- package/dist/chunks/shared-dnY35u9q.js +2530 -0
- package/dist/chunks/shared-e9ia12Uz.js +1636 -0
- package/dist/chunks/shared-qk9TB_UM.js +705 -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-B5lBiq5s.js +0 -1
- package/dist/chunks/shared-BjyoXjSO.js +0 -1
- package/dist/chunks/shared-C-d71uRP.js +0 -573
- package/dist/chunks/shared-C5n6LBUz.js +0 -1105
- package/dist/chunks/shared-CAWKGcWJ.js +0 -1053
- package/dist/chunks/shared-CdZhkPto.js +0 -1
- package/dist/chunks/shared-DB_C1Mdu.js +0 -1
- package/dist/chunks/shared-DDOpqbVL.js +0 -49
- package/dist/chunks/shared-DehzCTC2.js +0 -1616
- package/dist/chunks/shared-Dfj6O0K4.js +0 -2774
- package/dist/chunks/shared-DiFAX1_p.js +0 -3780
- package/dist/chunks/shared-DkPo0jX3.js +0 -4214
- package/dist/chunks/shared-GL2Z98Cz.js +0 -4206
- package/dist/chunks/shared-cMhjZGRs.js +0 -301
- 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,3780 +0,0 @@
|
|
|
1
|
-
const Et=globalThis,An=Et.ShadowRoot&&(Et.ShadyCSS===void 0||Et.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Tn=Symbol(),er=new WeakMap;let tr=class{constructor(e,n,s){if(this._$cssResult$=!0,s!==Tn)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(An&&e===void 0){const s=n!==void 0&&n.length===1;s&&(e=er.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&er.set(n,e))}return e}toString(){return this.cssText}};const nr=t=>new tr(typeof t=="string"?t:t+"",void 0,Tn),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 tr(n,t,Tn)},Ka=(t,e)=>{if(An)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const s=document.createElement("style"),r=Et.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=n.cssText,t.appendChild(s)}},sr=An?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const s of e.cssRules)n+=s.cssText;return nr(n)})(t):t,{is:Qa,defineProperty:Za,getOwnPropertyDescriptor:Ya,getOwnPropertyNames:Ja,getOwnPropertySymbols:Xa,getPrototypeOf:el}=Object,Rt=globalThis,rr=Rt.trustedTypes,tl=rr?rr.emptyScript:"",nl=Rt.reactiveElementPolyfillSupport,tt=(t,e)=>t,Cn={toAttribute(t,e){switch(e){case Boolean:t=t?tl: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}},ir=(t,e)=>!Qa(t,e),or={attribute:!0,type:String,converter:Cn,reflect:!1,useDefault:!1,hasChanged:ir};Symbol.metadata??=Symbol("metadata"),Rt.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=or){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&&Za(this.prototype,e,r)}}static getPropertyDescriptor(e,n,s){const{get:r,set:i}=Ya(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)??or}static _$Ei(){if(this.hasOwnProperty(tt("elementProperties")))return;const e=el(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=[...Ja(n),...Xa(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(sr(r))}else e!==void 0&&n.push(sr(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 Ka(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:Cn).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:Cn;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??ir)(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,nl?.({ReactiveElement:Be}),(Rt.reactiveElementVersions??=[]).push("2.1.2");const En=globalThis,ar=t=>t,_t=En.trustedTypes,lr=_t?_t.createPolicy("lit-html",{createHTML:t=>t}):void 0,cr="$lit$",ge=`lit$${Math.random().toFixed(9).slice(2)}$`,dr="?"+ge,sl=`<${dr}>`,Se=document,nt=()=>Se.createComment(""),st=t=>t===null||typeof t!="object"&&typeof t!="function",Rn=Array.isArray,rl=t=>Rn(t)||typeof t?.[Symbol.iterator]=="function",_n=`[
|
|
2
|
-
\f\r]`,rt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pr=/-->/g,hr=/>/g,Ae=RegExp(`>|${_n}(?:([^\\s"'>=/]+)(${_n}*=${_n}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),ur=/'/g,fr=/"/g,gr=/^(?:script|style|textarea|title)$/i,mr=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),m=mr(1),il=mr(2),K=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),kr=new WeakMap,Te=Se.createTreeWalker(Se,129);function br(t,e){if(!Rn(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return lr!==void 0?lr.createHTML(e):e}const ol=(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=pr:c[1]!==void 0?o=hr:c[2]!==void 0?(gr.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]==='"'?fr:ur):o===fr||o===ur?o=Ae:o===pr||o===hr?o=rt:(o=Ae,r=void 0);const h=o===Ae&&t[a+1].startsWith("/>")?" ":"";i+=o===rt?l+sl:p>=0?(s.push(d),l.slice(0,p)+cr+l.slice(p)+ge+h):l+ge+(p===-2?a:h)}return[br(t,i+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};let On=class Wa{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]=ol(e,n);if(this.el=Wa.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(cr)){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]==="."?ll:f[1]==="?"?cl:f[1]==="@"?dl:Lt}),r.removeAttribute(p)}else p.startsWith(ge)&&(l.push({type:6,index:i}),r.removeAttribute(p));if(gr.test(r.tagName)){const p=r.textContent.split(ge),u=p.length-1;if(u>0){r.textContent=_t?_t.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===dr)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 al=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 Ot(i,i.nextSibling,this,e):l.type===1?d=new l.ctor(i,l.name,l.strings,this,e):l.type===6&&(d=new pl(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++}},Ot=class Ga{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):rl(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=On.createElement(br(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(n);else{const i=new al(r,this),o=i.u(this.options);i.p(n),this.T(o),this._$AH=i}}_$AC(e){let n=kr.get(e.strings);return n===void 0&&kr.set(e.strings,n=new On(e)),n}k(e){Rn(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 Ga(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=ar(e).nextSibling;ar(e).remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}};class Lt{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 ll=class extends Lt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},cl=class extends Lt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},dl=class extends Lt{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 pl{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 hl={I:Ot},ul=En.litHtmlPolyfillSupport;ul?.(On,Ot),(En.litHtmlVersions??=[]).push("3.3.3");const fl=(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 Ot(e.insertBefore(nt(),i),i,void 0,n??{})}return r._$AI(t),r},Ln=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=fl(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,Ln.litElementHydrateSupport?.({LitElement:me});const gl=Ln.litElementPolyfillSupport;gl?.({LitElement:me}),(Ln.litElementVersions??=[]).push("4.2.2");const ke={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},it=t=>(...e)=>({_$litDirective$:t,values:e});let Pt=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:ml}=hl,vr=t=>t,kl=t=>t.strings===void 0,xr=()=>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(xr(),r),o=s.insertBefore(xr(),r);n=new ml(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=vr(l).nextSibling;vr(s).insertBefore(l,r),l=d}}}return n},Ce=(t,e,n=t)=>(t._$AI(e,n),t),bl={},Pn=(t,e=bl)=>t._$AH=e,vl=t=>t._$AH,zn=t=>{t._$AR(),t._$AA.remove()},Mn=it(class extends Pt{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(!kl(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 Pn(t),e}});class zt extends Pt{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:[]}}}zt.directiveName="unsafeHTML",zt.resultType=1;const yr=it(zt),Mt=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},In=["en","ja"],wr="en",$r=t=>In.some(e=>e===t),It=t=>{const e=(t??"").split("-")[0]?.toLowerCase()??"";return $r(e)?e:wr},Sr=t=>It(Mt(t)),Nn="dpk-locale-change",Ar=t=>typeof t=="string"&&$r(t)?t:null,xl=t=>t.preference??t.authored,yl=(t,e)=>t===e?null:t,Nt=t=>e=>e==="ja"?t.ja:t.en;class Dn{#e;#t;#n=wr;constructor(e,n=()=>{}){this.#e=e,this.#t=n,e.addController(this)}get locale(){return this.#n}hostConnected(){this.#n=Sr(this.#e),document.addEventListener(Nn,this.#r)}hostDisconnected(){document.removeEventListener(Nn,this.#r)}#r=()=>{const e=Sr(this.#e);e!==this.#n&&(this.#n=e,this.#t(),this.#e.requestUpdate())}}const wl={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)"]},Tr=t=>nr(Object.entries(wl).map(([e,[n,s]])=>`--dpk-${e}: ${t(n,s)};`).join(`
|
|
4
|
-
`)),Dt=fe`
|
|
5
|
-
:host {
|
|
6
|
-
/* Browsers without light-dark() stay light. */
|
|
7
|
-
${Tr(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
|
-
${Tr((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
|
-
`,jn=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
|
-
`,$l=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
|
-
`,Cr=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 qn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Re=qn();function Er(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 Sl=((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}}>`))},Al=/^(?:[ \t]*(?:\n|$))+/,Tl=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Cl=/^ {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+|$)/,El=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Bn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Rr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_r=w(Rr).replace(/bull/g,Bn).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(),Rl=w(Rr).replace(/bull/g,Bn).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(),Hn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,_l=/^[^\n]+/,Un=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ol=w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Un).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ll=w(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Bn).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",Fn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pl=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",Fn).replace("tag",lt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Or=t=>w(Hn).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(),zl=Or(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Ml=Or(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Il=w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ml).getRegex(),Wn={blockquote:Il,code:Tl,def:Ol,fences:Cl,heading:El,hr:at,html:Pl,lheading:_r,list:Ll,newline:Al,paragraph:zl,table:_e,text:_l},Lr=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(),Nl={...Wn,lheading:Rl,table:Lr,paragraph:w(Hn).replace("hr",at).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lr).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()},Dl={...Wn,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fn).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(Hn).replace("hr",at).replace("heading",` *#{1,6} *[^
|
|
558
|
-
]`).replace("lheading",_r).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ql=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Pr=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Bl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ae=/[\p{P}\p{S}]/u,Fe=/[\s\p{P}\p{S}]/u,ct=/[^\s\p{P}\p{S}]/u,Hl=w(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fe).getRegex(),Ul=/[\p{Pi}\p{Ps}"']/u,zr=/(?!~)[\p{P}\p{S}]/u,Fl=/(?!~)[\s\p{P}\p{S}]/u,Wl=/(?:[^\s\p{P}\p{S}]|~)/u,Gl=w(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Sl?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Mr=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Vl=w(Mr,"u").replace(/punct/g,ae).getRegex(),Kl=w(Mr,"u").replace(/punct/g,zr).getRegex(),Ql=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Zl=w(Ql,"u").replace(/openQuote/g,Ul).replace(/punct/g,ae).getRegex(),Ir="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Yl=w(Ir,"gu").replace(/notPunctSpace/g,ct).replace(/punctSpace/g,Fe).replace(/punct/g,ae).getRegex(),Jl=w(Ir,"gu").replace(/notPunctSpace/g,Wl).replace(/punctSpace/g,Fl).replace(/punct/g,zr).getRegex(),Xl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",ec=w(Xl,"gu").replace(/notPunctSpace/g,ct).replace(/punctSpace/g,Fe).replace(/punct/g,ae).getRegex(),tc=w("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ct).replace(/punctSpace/g,Fe).replace(/punct/g,ae).getRegex(),nc="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",sc=w(nc,"gu").replace(/notPunctSpace/g,ct).replace(/punctSpace/g,Fe).replace(/punct/g,ae).getRegex(),rc=w(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ae).getRegex(),ic="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",oc=w(ic,"gu").replace(/notPunctSpace/g,ct).replace(/punctSpace/g,Fe).replace(/punct/g,ae).getRegex(),ac=w(/\\(punct)/,"gu").replace(/punct/g,ae).getRegex(),lc=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(),cc=w(Fn).replace("(?:-->|$)","-->").getRegex(),dc=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",cc).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Nr=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,jt=w(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Nr).getRegex(),pc=w(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",jt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),hc=w(/^!?\[(label)\]\[(ref)\]/).replace("label",jt).replace("ref",Un).getRegex(),uc=w(/^!?\[(ref)\](?:\[\])?/).replace("ref",Un).getRegex(),Dr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,fc=w(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Nr).getRegex(),gc=w("reflink|nolink(?!\\()","g").replace("reflink",w(/^!?\[(label)\]\[(ref)\]/).replace("label",fc).replace("ref",Dr).getRegex()).replace("nolink",w(/^!?\[(ref)\](?:\[\])?/).replace("ref",Dr).getRegex()).getRegex(),jr=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,mc=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,kc=w(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,mc).getRegex(),Gn={_backpedal:_e,anyPunctuation:ac,autolink:lc,blockSkip:Gl,br:Pr,code:ql,del:_e,delLDelim:_e,delRDelim:_e,emStrongLDelim:Vl,emStrongRDelimAst:Yl,emStrongRDelimUnd:tc,escape:jl,link:pc,nolink:uc,punctuation:Hl,reflink:hc,reflinkSearch:gc,tag:dc,text:Bl,url:_e},bc={...Gn,emStrongLDelim:Zl,emStrongRDelimAst:ec,emStrongRDelimUnd:sc,link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",jt).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",jt).getRegex()},Vn={...Gn,emStrongRDelimAst:Jl,emStrongLDelim:Kl,delLDelim:rc,delRDelim:oc,url:w(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",kc).replace("protocol",jr).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",jr).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},vc={...Vn,br:w(Pr).replace("{2,}","*").getRegex(),text:w(Vn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qt={normal:Wn,gfm:Nl,pedantic:Dl},dt={normal:Gn,gfm:Vn,breaks:vc,pedantic:bc},xc={"&":"&","<":"<",">":">",'"':""","'":"'"},qr=t=>xc[t];function W(t,e){if(e){if(N.escapeTest.test(t))return t.replace(N.escapeReplace,qr)}else if(N.escapeTestNoEncode.test(t))return t.replace(N.escapeReplaceNoEncode,qr);return t}function yc(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 Br(t){try{t=encodeURI(t).replace(N.percentDecode,"%")}catch{return null}return t}function Hr(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 Ur(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 Bt(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function Fr(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 Wr(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 Gr(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 wc(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 Vr(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 Ht=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]:Ur(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=wc(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?Wr(p,u):p.replace(this.rules.other.leadingSpaceTab,x=>Wr(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),U=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,oe=>oe.replace(this.rules.other.tabCharGlobal," ")),T.test(f)||_.test(f)||U.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=Ur(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])&&Fr(e[2],"()")!==-1)return;let n=Bt(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=Hr(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(Hr(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&&Vr(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=Fr(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)),Gr(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&&Vr(t,n[1],s,this.rules))return;let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[Bt(r)];if(!i){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return Gr(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]:yc(e[0]),escaped:n}}}},Y=class Qs{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 Ht,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:qt.normal,inline:dt.normal};this.options.pedantic?(n.block=qt.pedantic,n.inline=dt.pedantic):this.options.gfm&&(n.block=qt.gfm,this.options.breaks?n.inline=dt.breaks:n.inline=dt.gfm),this.tokenizer.rules=n}static get rules(){return{block:qt,inline:dt}}static lex(e,n){return new Qs(n).lex(e)}static lexInline(e,n){return new Qs(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,Bt(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,Bt(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)}},Ut=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=Br(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=Br(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)}},Kn=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 Zs{options;renderer;textRenderer;constructor(e){this.options=e||Re,this.options.renderer=this.options.renderer||new Ut,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Kn}static parse(e,n){return new Zs(n).parse(e)}static parseInline(e,n){return new Zs(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}},Kr=class{defaults=qn();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=J;Renderer=Ut;TextRenderer=Kn;Lexer=Y;Tokenizer=Ht;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 Ut(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 Ht(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 Kr;function E(t,e){return Oe.parse(t,e)}E.options=E.setOptions=function(t){return Oe.setOptions(t),E.defaults=Oe.defaults,Er(E.defaults),E},E.getDefaults=qn,E.defaults=Re;function $c(...t){return Oe.use(...t),E.defaults=Oe.defaults,Er(E.defaults),E}E.use=$c,E.walkTokens=function(t,e){return Oe.walkTokens(t,e)},E.parseInline=Oe.parseInline,E.Parser=J,E.parser=J.parse,E.Renderer=Ut,E.TextRenderer=Kn,E.Lexer=Y,E.lexer=Y.lex,E.Tokenizer=Ht,E.Hooks=pt,E.parse=E,E.options,E.setOptions,E.walkTokens,E.parseInline,J.parse,Y.lex;const Sc={"&":"&","<":"<",">":">",'"':""","'":"'"},Le=t=>t.replace(/[&<>"']/g,e=>Sc[e]??e),Ac=new Set(["http","https","mailto"]),Qr=t=>{const e=t.replace(/[\u0000- \u007f]/g,""),n=/^([a-z][a-z0-9+.-]*):/i.exec(e)?.[1];return n===void 0||Ac.has(n.toLowerCase())},Tc=t=>/^https?:/i.test(t.trim()),Cc=new Kr({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(!Qr(t))return s;const r=e?` title="${Le(e)}"`:"",i=Tc(t)?' target="_blank" rel="noopener noreferrer"':"";return`<a href="${Le(t)}"${r}${i}>${s}</a>`},image({href:t,title:e,text:n}){if(!Qr(t))return Le(n);const s=e?` title="${Le(e)}"`:"";return`<img src="${Le(t)}" alt="${Le(n)}"${s}>`}}}),Zr=t=>Cc.parse(t,{async:!1}),Ec=Nt({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 Yr extends me{static{this.styles=[Dt,Cr,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 Dn(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=Ec(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
|
-
${yr(Zr(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=${Mn(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=${Mn(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.#p())}};#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.#p())})};#p=()=>{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 Rc=()=>{customElements.get("dpk-component-inline-edit")||customElements.define("dpk-component-inline-edit",Yr)},_c={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Qn(t){return _c}let Oc;function Lc(t){return Oc?.get(t)}let Pc;function zc(t){return Pc?.get(t)}let Mc;function Ic(t,e){return Mc?.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??Ic(t.reference,l.lang)??(d?zc(l.lang):null)??s.message??Lc(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 Nc(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function Dc(t,e){return Object.prototype.hasOwnProperty.call(t,e)&&e!=="__proto__"&&e!=="prototype"&&e!=="constructor"}function Zn(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},Qn())},t}function jc(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 qc=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};const Bc=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])$/u,Hc=/^\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 Jr(t,e){return{kind:"validation",type:"check",reference:Jr,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 Xr(t){return{kind:"validation",type:"finite",reference:Xr,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 ei(t,e){const n=We(t);return{kind:"validation",type:"includes",reference:ei,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 ti(t){return{kind:"validation",type:"integer",reference:ti,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 ni(t){return{kind:"validation",type:"iso_date",reference:ni,async:!1,expects:null,requirement:Bc,message:t,"~run"(e,n){return e.typed&&!this.requirement.test(e.value)&&R(this,"date",e,n),e}}}function si(t){return{kind:"validation",type:"iso_timestamp",reference:si,async:!1,expects:null,requirement:Hc,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 ri(t,e){return{kind:"validation",type:"min_value",reference:ri,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 te(t,e){return{kind:"validation",type:"regex",reference:te,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 Yn(){return{kind:"transformation",type:"trim",reference:Yn,async:!1,"~run"(t){return t.value=t.value.trim(),t}}}function ii(t){return{kind:"validation",type:"url",reference:ii,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 oi={abortEarly:!0};function ai(t,e,n){return typeof t.fallback=="function"?t.fallback(e,n):t.fallback}function Ft(t,e,n){return typeof t.default=="function"?t.default(e,n):t.default}function Uc(t,e){return!t["~run"]({value:e},oi).issues}function li(){return M({kind:"schema",type:"any",reference:li,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 Jn(t){return M({kind:"schema",type:"boolean",reference:Jn,expects:"boolean",async:!1,message:t,"~run"(e,n){return typeof e.value=="boolean"?e.typed=!0:R(this,"type",e,n),e}})}function B(t,e){return M({kind:"schema",type:"exact_optional",reference:B,expects:t.expects,async:!1,wrapped:t,default:e,"~run"(n,s){return this.wrapped["~run"](n,s)}})}function ci(t){return M({kind:"schema",type:"lazy",reference:ci,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 Nc(n.value,this.literal)?n.typed=!0:R(this,"type",n,s),n}})}function di(t,e){return M({kind:"schema",type:"nullable",reference:di,expects:`(${t.expects} | null)`,async:!1,wrapped:t,default:e,"~run"(n,s){return n.value===null&&(this.default!==void 0&&(n.value=Ft(this,n,s)),n.value===null)?(n.typed=!0,n):this.wrapped["~run"](n,s)}})}function pi(t){return M({kind:"schema",type:"number",reference:pi,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]:Ft(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]=ai(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=Ft(this,n,s)),n.value===void 0)?(n.typed=!0,n):this.wrapped["~run"](n,s)}})}function Wt(t,e){return M({kind:"schema",type:"picklist",reference:Wt,expects:Zn(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(Dc(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]:Ft(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]=ai(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 hi(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 Xn(t,e){return M({kind:"schema",type:"union",reference:Xn,expects:Zn(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:hi(i)}),n.typed=!0}else{if(o?.length===1)return o[0];R(this,"type",n,s,{issues:hi(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 Gt(t,e,n){return M({kind:"schema",type:"variant",reference:Gt,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]},oi).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:Zn(d,"|"),path:[{type:"object",origin:"value",input:i,key:l,value:i[l]}]})}else R(this,"type",s,r);return s}})}function Vt(t,e,n){const s=t["~run"]({value:e},Qn());if(s.issues)throw new qc(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},Qn());return{typed:s.typed,success:!s.issues,output:s.value,issues:s.issues}}function Fc(t){let e="";for(const n of t){e&&(e+=`
|
|
796
|
-
`),e+=`\xD7 ${n.message}`;const s=jc(n);s&&(e+=`
|
|
797
|
-
\u2192 at ${s}`)}return e}const Kt=O({type:y(v(),$(1)),id:y(v(),$(1))}),es=y(v(),$(1),te(/^[A-Za-z0-9_-]+$/,'ids may only contain letters, digits, "_" and "-" (a "." builds a path)')),Wc=(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:Kt,payload:ve(),note:B(v()),createdAt:y(v(),$(1))}),Gc=(t,e,n,s={})=>{const r=O({id:y(v(),$(1)),type:G(t),target:Kt,payload:n,note:B(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}:{}}},Vc=(t,e)=>{const n=ht(t,e.type);if(n===void 0)return null;const s=n.parse(e);return s===null?null:s},Kc=(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,Qc=t=>{throw new Error(`unhandled action: ${JSON.stringify(t)}`)},Zc=O({id:y(v(),$(1))}),Yc=t=>{const e=C(Zc,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},Jc=(t,e)=>t.type===e.type&&t.id===e.id,ui=t=>{const e=t.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return e.length>0?e:"item"},Xc=(t,e)=>{const n=ui(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)}`},fi=()=>{const t=globalThis.crypto;return t?.randomUUID?t.randomUUID():`a-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`},H="comment",ze=t=>{const[e]=t;return{path:e?.path?.map(n=>String(n.key)).join(".")??"",message:e?.message??"invalid action"}},gi=O({type:y(v(),$(1)),target:Xn([y(v(),$(1)),Kt]),payload:D(ve()),note:B(v()),id:B(y(v(),$(1))),createdAt:B(y(v(),$(1)))}),ed=(t,e)=>{const n=C(gi,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??fi(),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)}},ts=(t,e)=>e.dedupeKey?e.dedupeKey(t):e.mode!=="patch"?null:`${t.type}|${I(t.target)}`,mi=(t,e,n)=>{const s=ts(e,n);if(s===null)return[...t,e];const r=t.at(-1);return!r||ts(r,n)!==s||!td(r,e)?[...t,e]:[...t.slice(0,-1),e]},td=(t,e)=>Jc(t.target,e.target),ns=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),ki=O({id:y(v(),$(1)),type:G(H),target:O({type:y(v(),$(1)),id:y(v(),$(1))}),payload:O({body:y(v(),$(1))}),note:B(v()),createdAt:y(v(),$(1))}),ss={schema:ki,mode:"append",targetType:"page"},nd=O({body:v()}),ft=t=>{const e=C(nd,t.payload);return e.success?e.output.body:""},rs="element",bi=y(v(),te(/^[A-Z][A-Z0-9_]*$/,"component action types are CONSTANT_CASE")),vi=Ge(v(),ve()),sd=O({type:G(rs),id:y(v(),te(/^[^/]+\/.+/,"component references start with a provider id"))}),rd=O({id:y(v(),$(1)),type:bi,target:sd,payload:vi,note:B(v()),createdAt:y(v(),$(1))}),id={schema:rd,mode:"sequence",targetType:rs},od=z({type:bi,target:y(v(),te(/^element:[^/]+\/.+/)),payload:D(vi,{})}),xi=z({id:y(v(),$(1)),title:y(v(),$(1)),summary:B(v()),tone:B(Wt(["create","update","delete","move","meta"])),stale:B(Wt(["unsupported-action-type","target-missing","constraint-violated"]))}),is=t=>{if(t.type!==rs)return null;const e=t.id.indexOf("/");if(e<=0)return null;try{return decodeURIComponent(t.id.slice(0,e))}catch{return null}},ne=t=>t.type!==H&&is(t.target)!==null,ad=(t,e)=>t.filter(n=>ne(n)&&is(n.target)===e),yi=(t,e)=>{const n=new Map(t.flatMap(s=>ne(s)?[[s.id,is(s.target)]]:[]));return new Map(e.flatMap(s=>s.results.flatMap(r=>n.get(r.id)===s.id?[[r.id,r]]:[])))},os="data-dpk-grill",se="grill",Zt="answer",gt="data-grill-questions",ld=B(v()),wi=t=>{const e=t?.trim();return e===void 0||e===""?void 0:e},cd=t=>{const e=wi(t);return e===void 0?{}:{questions:e}},Ve={questions:[],rounds:[]},dd=z({id:es,label:y(v(),$(1))}),$i=z({id:es,ref:D(y(v(),$(1))),title:y(v(),$(1)),description:D(v()),note:D(v()),options:D(j(dd),[]),freeText:D(Jn(),!0)}),Si=Gt("kind",[z({kind:G("option"),optionId:y(v(),$(1))}),z({kind:G("free"),text:v()})]),Ai=Gt("kind",[...Si.options,z({kind:G("clear")})]),pd=z({...$i.entries,answer:D(Si)}),hd=z({label:D(y(v(),$(1))),questions:j(pd)}),ud=z({questions:j($i),history:D(j(hd),[])}),Ti=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}})},Ci=t=>({id:t.id,ref:t.ref,title:t.title,description:t.description,note:t.note,options:t.options,freeText:t.freeText}),fd=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{...Ci(t),answer:e}},gd=t=>{const e=Vt(ud,t);return{questions:Ti(e.questions).map(Ci),rounds:e.history.map((n,s)=>({label:n.label??`v${s+1}`,questions:Ti(n.questions).map(fd)}))}},Ke=(t,e)=>t.questions.find(n=>n.id===e),as=(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)!=="",md=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},Ei=(t,e)=>({total:t.questions.length,answered:t.questions.filter(n=>Jt(n,e[n.id])).length}),kd=(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},bd=y(v(),te(/^[A-Za-z0-9_-]+(?:@[A-Za-z0-9_-]+)?$/,"a question id, optionally qualified by its board (`retry@scope`)")),vd=O({id:y(v(),$(1)),type:G(Zt),target:O({type:G(se),id:bd}),payload:Ai,note:B(v()),createdAt:y(v(),$(1))}),xd={schema:vd,mode:"patch",targetType:se},Q=t=>t.type===Zt&&t.target.type===se,yd=(t,e)=>({type:Zt,target:{type:se,id:t},payload:e}),Ri=t=>{const e=C(Ai,t.payload);return e.success?e.output:null},wd=(t,e)=>[...t.filter(n=>!(Q(n)&&n.target.id===e.target.id)),e],_i=(t,e,n)=>{const s=Ke(t,n.target.id),r=Ri(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}},mt=Object.freeze({}),Xt=t=>{const e=t.startsWith("#")?t.slice(1):t;if(e.length===0)return mt;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},$d=(t,e="json")=>`\`\`\`${e}
|
|
798
|
-
${t}
|
|
799
|
-
\`\`\``,Sd=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===H),l=o.filter(p=>p.type!==H&&!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(ne)&&(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}. **${as(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
|
-
${Sd(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===H?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($d(ns(s))),c.push(""),c.join(`
|
|
805
|
-
`)},X="0.2.1",ls=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()}},Oi=Nt({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"}}),Ad=()=>({body:"",editing:null,attachment:{kind:"page"},copy:{kind:"idle"},copyRequest:0,send:{kind:"idle"},sendRequest:0}),Li=t=>t.kind==="explicit"?{kind:t.resume}:t,Pi=(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:Li(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:Li(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}}}},Td=(t,e)=>{const n=t.body.trim();return n===""?null:{target:e,body:n}},Cd=t=>{if(!t.editing)return null;const e=t.editing.body.trim();return e===""?null:{id:t.editing.id,body:e}},Ed={en:"English",ja:"\u65E5\u672C\u8A9E"},L=Nt({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"}}),Rd=4096,_d="reviews",zi="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.",Od=t=>new TextEncoder().encode(t).length,Ld=t=>t.replace(/[\u0000-\u0008\u000B-\u001F\u007F]/g,""),Pd=t=>{const e=`${zi}
|
|
806
|
-
|
|
807
|
-
${Ld(t)}`;return Od(e)<=Rd?e:null},zd=t=>`${zi}
|
|
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).`,Md={consent_required:"consent",forbidden:"forbidden",not_granted:"forbidden",capability_disabled:"forbidden",capability_removed:"forbidden",claude_unavailable:"claude_unavailable",rate_limited:"rate_limited"},Id=t=>{const e=typeof t=="object"&&t!==null&&"code"in t?t.code:void 0;return(typeof e=="string"?Md[e]:void 0)??"error"},Nd={too_large:"handoffTooLarge",consent:"handoffConsent",forbidden:"handoffForbidden",claude_unavailable:"handoffClaudeUnavailable",rate_limited:"handoffRateLimited",storage:"handoffStorage",error:"handoffError"},Mi=(t,e)=>L(e)[Nd[t]],Ii=t=>t.group?`${t.group} \xB7 ${t.label}`:t.label,Ni=(t,e)=>{const{definition:n,state:s,navigation:r,derivation:i}=t,o=Oi(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?Ii(d):l.ref}:l.kind==="current"&&a?{ref:a.value,label:Ii(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===H;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"?Mi(e.send.reason,t.locale):e.copy.kind==="copied"?o.copied:e.copy.kind==="failed"?o.copyFailed:""}},Dd=[Dt,jn,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
|
-
`],Di=(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 Pt{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=vl(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=Di(o,h,f),c=Di(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 zn(r[u]),u--;else zn(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&&zn(g)}return this.ut=o,Pn(t,l),K}});class cs extends zt{}cs.directiveName="unsafeSVG",cs.resultType=2;const jd=it(cs),ji=[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]],qi=[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]],Bi=[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]],Hi=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]],qd=[["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"}]],Bd=[["path",{d:"M20 6 9 17l-5-5"}]],Ui=[["path",{d:"m6 9 6 6 6-6"}]],Hd=[["path",{d:"m15 18-6-6 6-6"}]],Ud=[["path",{d:"m9 18 6-6-6-6"}]],Fi=[["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"}]],Fd=[["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"}]],Wd=[["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"}]],Gd=[["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"}]],Vd=[["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"}]],Kd=[["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"}]],Qd=[["path",{d:"M15 3h6v6"}],["path",{d:"m21 3-7 7"}],["path",{d:"m3 21 7-7"}],["path",{d:"M9 21H3v-6"}]],Zd=[["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"}]],Yd=[["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"}]],Jd=[["path",{d:"m14 10 7-7"}],["path",{d:"M20 10h-6V4"}],["path",{d:"m3 21 7-7"}],["path",{d:"M4 14h6v6"}]],Xd=[["path",{d:"M5 12h14"}]],ep=[["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"}]],tp=[["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"}]],np=[["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"}]],sp=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]],rp=[["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"}]],ip=[["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"}]],op=[["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"}]],ap=[["path",{d:"M3 9h18"}],["path",{d:"M9 3v18"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}]],lp=[["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"}]],cp=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],dp=t=>t.replaceAll("&","&").replaceAll('"',"""),pp=t=>t.map(([e,n])=>`<${e}${Object.entries(n).map(([s,r])=>` ${s}="${dp(String(r))}"`).join("")}></${e}>`).join(""),A=t=>{const e=pp(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
|
-
${jd(e)}
|
|
1234
|
-
</svg>`},nn=A(cp),Wi=A(lp),ds=A(np),sn=A(Yd),hp=A(Zd),up=A(rp),fp=A(Fi),gp=A(ip),Gi=A(Kd),mp=A(Fd),Vi=A(Bd),Ki=A(sp),kp=A(Xd),bp=A(Gd),Qi=A(tp),vp=A(Hi),xp=A(ji);A(qi),A(Bi);const Zi=A(Hd),kt=A(Ud),yp=A(Ui),wp=A(Qd),$p=A(Jd),Sp=A(op),Ap=A(ep),Yi=A(qd),Tp=A(Vd),Cp=A(Wd),Ep=A(ap),Rp=t=>{switch(t){case"comment":return sn();case"create":return Ki();case"update":return ds();case"delete":return Wi();case"move":return Qi();default:return Gi()}},_p=(t,e,n,s=!1)=>m`
|
|
1235
|
-
${s?k:m`<header><h2>${Op(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?Lp(t,e,n):k} ${Pp(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
|
-
`,Op=(t,e)=>e==="changes"?t.changesHeading:e==="comments"?t.commentsHeading:t.heading,Lp=(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
|
-
`,ps=(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>`,Ji=(t,e,n)=>m`<ul
|
|
1316
|
-
class="list"
|
|
1317
|
-
>
|
|
1318
|
-
${Me(e,s=>s.id,s=>zp(t,s,n))}
|
|
1319
|
-
</ul>`,Pp=(t,e,n)=>{const[s]=e.groups;return e.groups.length===1&&s?s.items.length>0?m`<div class="groups">${Ji(t,s.items,n)}</div>`:s.kind==="changes"?ps(t.emptyChanges,t.emptyChangesHint):ps(t.emptyComments,t.emptyCommentsHint):e.groups.every(r=>r.items.length===0)?ps(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
|
-
${Ji(t,r.items,n)}
|
|
1326
|
-
</section>`)}
|
|
1327
|
-
</div>`},zp=(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">${Rp(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
|
-
${ds()}
|
|
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"?Mp(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
|
-
`,Mp=(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
|
-
`,Ip=t=>t==="changes"||t==="comments"?t:"all";class Xi extends me{static{this.styles=Dd}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=Ad();#t=null;#n=new Dn(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=Pi(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:Ip(this.section)}}render(){const e=this.#r();return e?_p(Oi(this.#n.locale),Ni(e,this.#e),this.#i,this.embedded):k}#s(e){this.#e=Pi(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=Cd(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=Td(this.#e,Ni(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 ls(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 Np=()=>{customElements.get("dpk-component-comment-panel")||customElements.define("dpk-component-comment-panel",Xi)},Ze=Math.min,le=Math.max,rn=Math.round,on=Math.floor,ce=t=>({x:t,y:t}),Dp={left:"right",right:"left",bottom:"top",top:"bottom"};function jp(t,e,n){return le(t,Ze(e,n))}function bt(t,e){return typeof t=="function"?t(e):t}function Ie(t){return t.split("-")[0]}function vt(t){return t.split("-")[1]}function eo(t){return t==="x"?"y":"x"}function to(t){return t==="y"?"height":"width"}function de(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function no(t){return eo(de(t))}function qp(t,e,n){n===void 0&&(n=!1);const s=vt(t),r=no(t),i=to(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 Bp(t){const e=an(t);return[hs(t),e,hs(e)]}function hs(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const so=["left","right"],ro=["right","left"],Hp=["top","bottom"],Up=["bottom","top"];function Fp(t,e,n){switch(t){case"top":case"bottom":return n?e?ro:so:e?so:ro;case"left":case"right":return e?Hp:Up;default:return[]}}function Wp(t,e,n,s){const r=vt(t);let i=Fp(Ie(t),n==="start",s);return r&&(i=i.map(o=>o+"-"+r),e&&(i=i.concat(i.map(hs)))),i}function an(t){const e=Ie(t);return Dp[e]+t.slice(e.length)}function Gp(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 Vp(t){return typeof t!="number"?Gp(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 io(t,e,n){let{reference:s,floating:r}=t;const i=de(e),o=no(e),a=to(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=vt(e);return f&&(h[o]+=u*(f==="end"?1:-1)*(n&&d?-1:1)),h}async function Kp(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}=bt(e,t),f=Vp(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},U=ln(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:T,strategy:l}):S);return{top:(x.top-U.top+f.top)/_.y,bottom:(U.bottom-x.bottom+f.bottom)/_.y,left:(x.left-U.left+f.left)/_.x,right:(U.right-x.right+f.right)/_.x}}const Qp=50,Zp=async(t,e,n)=>{const{placement:s="bottom",strategy:r="absolute",middleware:i=[],platform:o}=n,a=o.detectOverflow?o:{...o,detectOverflow:Kp},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}=io(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:U,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],...U},P&&h<Qp&&(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}=io(d,u,l)),g=-1)}return{x:c,y:p,placement:u,strategy:r,middlewareData:f}},Yp=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}=bt(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)),U=u||(T||!g?[an(a)]:Bp(a)),P=f!=="none";!u&&P&&U.push(...Wp(a,g,f,_));const V=[a,...U],q=await l.detectOverflow(e,b),oe=[];let ee=((s=i.flip)==null?void 0:s.overflows)||[];if(c&&oe.push(q[x]),p){const we=qp(r,o,_);oe.push(q[we[0]],q[we[1]])}if(ee=[...ee,{placement:r,overflows:oe}],!oe.every(we=>we<=0)){var Ys,Js;const we=(((Ys=i.flip)==null?void 0:Ys.index)||0)+1,Sn=V[we];if(Sn&&(!(p==="alignment"?S!==de(Sn):!1)||ee.every(Z=>de(Z.placement)===S?Z.overflows[0]>0:!0)))return{data:{index:we,overflows:ee},reset:{placement:Sn}};let et=(Js=ee.filter($e=>$e.overflows[0]<=0).sort(($e,Z)=>$e.overflows[1]-Z.overflows[1])[0])==null?void 0:Js.placement;if(!et)switch(h){case"bestFit":{var Xs;const $e=(Xs=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,Va)=>ue+Va,0)]).sort((Z,ue)=>Z[1]-ue[1])[0])==null?void 0:Xs[0];$e&&(et=$e);break}case"initialPlacement":et=a;break}if(r!==et)return{reset:{placement:et}}}return{}}}},Jp=new Set(["left","top"]);async function Xp(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=vt(n),l=de(n)==="y",d=Jp.has(o)?-1:1,c=i&&l?-1:1,p=bt(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 eh=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 Xp(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}}}}},th=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}=bt(t,e),c={x:n,y:s},p=await i.detectOverflow(e,d),u=de(r),h=eo(u);let f=c[h],g=c[u];const b=(S,T)=>jp(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}}}}}},nh=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}=bt(t,e),l=await r.detectOverflow(e,a),d=Ie(n),c=vt(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,U=!_;let P=S,V=T;_!=null&&_.enabled.x&&(V=x),_!=null&&_.enabled.y&&(P=b),U&&!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 oo(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=(oo(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function oo(t){return cn()?t instanceof Node||t instanceof F(t).Node:!1}function re(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 ao(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}=ie(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&r!=="inline"&&r!=="contents"}function sh(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 rh=/transform|translate|scale|rotate|perspective|filter/,ih=/paint|layout|strict|content/,Ne=t=>!!t&&t!=="none";let us;function fs(t){const e=re(t)?ie(t):t;return Ne(e.transform)||Ne(e.translate)||Ne(e.scale)||Ne(e.rotate)||Ne(e.perspective)||!gs()&&(Ne(e.backdropFilter)||Ne(e.filter))||rh.test(e.willChange||"")||ih.test(e.contain||"")}function oh(t){let e=De(t);for(;xe(e)&&!xt(e);){if(fs(e))return e;if(pn(e))return null;e=De(e)}return null}function gs(){return us==null&&(us=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),us}function xt(t){return/^(html|body|#document)$/.test(Ye(t))}function ie(t){return F(t).getComputedStyle(t)}function hn(t){return re(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||ao(t)&&t.host||pe(t);return ao(e)?e.host:e}function lo(t){const e=De(t);return xt(e)?(t.ownerDocument||t).body:xe(e)&&dn(e)?e:lo(e)}function yt(t,e,n){var s;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=lo(t),i=r===((s=t.ownerDocument)==null?void 0:s.body),o=F(r);if(i){const a=ms(o);return e.concat(o,o.visualViewport||[],dn(r)?r:[],a&&n?yt(a):[])}else return e.concat(r,yt(r,[],n))}function ms(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function co(t){const e=ie(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 ks(t){return re(t)?t:t.contextElement}function Je(t){const e=ks(t);if(!xe(e))return ce(1);const n=e.getBoundingClientRect(),{width:s,height:r,$:i}=co(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 ah=ce(0);function po(t){const e=F(t);return!gs()||!e.visualViewport?ah:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function lh(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=ks(t);let o=ce(1);e&&(s?re(s)&&(o=Je(s)):o=Je(t));const a=lh(i,n,s)?po(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=re(s)?F(s):s;let f=u,g=ms(f);for(;g&&h!==f;){const b=Je(g),x=g.getBoundingClientRect(),S=ie(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=ms(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 ho(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 ch(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?ho(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 dh(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function ph(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 ie(n).direction==="rtl"&&(i+=le(t.clientWidth,n.clientWidth)-s),{width:s,height:r,x:i,y:o}}const hh=25;function uh(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=!gs()||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<=hh&&(a-=x)}return{width:a,height:l,x:d,y:c}}function fh(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 uo(t,e,n){let s;if(e==="viewport"||e==="layoutViewport")s=uh(t,n,e);else if(e==="document")s=ph(pe(t));else if(re(e))s=fh(e,n);else{const r=po(t);s={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ln(s)}function gh(t,e){const n=e.get(t);if(n)return n;let s=yt(t,[],!1).filter(a=>re(a)&&Ye(a)!=="body"),r=null;const i=ie(t).position==="fixed";let o=i?De(t):t;for(;re(o)&&!xt(o);){const a=ie(o),l=fs(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 mh(t){let{element:e,boundary:n,rootBoundary:s,strategy:r}=t;const o=[...n==="clippingAncestors"?pn(e)?[]:gh(e,this._c):[].concat(n),s],a=uo(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=uo(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 kh(t){const{width:e,height:n}=co(t);return{width:e,height:n}}function bh(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?ho(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 bs(t){return ie(t).position==="static"}function fo(t,e){if(!xe(t)||ie(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return pe(t)===n&&(n=n.ownerDocument.body),n}function go(t,e){const n=F(t);if(pn(t))return n;if(!xe(t)){let r=De(t);for(;r&&!xt(r);){if(re(r)&&!bs(r))return r;r=De(r)}return n}let s=fo(t,e);for(;s&&sh(s)&&bs(s);)s=fo(s,e);return s&&xt(s)&&bs(s)&&!fs(s)?n:s||oh(t)||n}const vh=async function(t){const e=this.getOffsetParent||go,n=this.getDimensions,s=await n(t.floating);return{reference:bh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function xh(t){return ie(t).direction==="rtl"}const yh={convertOffsetParentRelativeRectToViewportRelativeRect:ch,getDocumentElement:pe,getClippingRect:mh,getOffsetParent:go,getElementRects:vh,getClientRects:dh,getDimensions:kh,getScale:Je,isElement:re,isRTL:xh};function mo(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function wh(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(oe){const ee=oe[0].intersectionRatio;if(!mo(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 $h(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=ks(t),c=r||i?[...d?yt(d):[],...e?yt(e):[]]:[];c.forEach(x=>{r&&x.addEventListener("scroll",n),i&&x.addEventListener("resize",n)});const p=d&&a?wh(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&&!mo(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 Sh=eh,Ah=th,Th=Yp,Ch=nh,Eh=(t,e,n)=>{const s=new Map,r=n??{},i={...yh,...r.platform,_c:s};return Zp(t,e,{...r,platform:i})},Rh=(t,e)=>({top:e,bottom:e,right:t}),ko=(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=$h(o,t,()=>{const d=++i;Eh(o,t,{strategy:"fixed",placement:s.placement??"bottom-end",middleware:[Sh(8),Th({padding:8,fallbackAxisSideDirection:"end"}),Ah({padding:8}),Ch({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()}},bo=t=>{if(!(!t||typeof t.hidePopover!="function"))try{t.hidePopover()}catch{}};class vo{#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,ko(e,n,s,r))}}function vs(t,e,n){return n==null?Math.min(t,e):Math.min(Math.max(t,e),n)}class xo{#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 yo=(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),wo=(t,e,n)=>{const s=Math.min(n,e/4);return{top:t+s,bottom:t+e-s}},xs=(t,e,n=0)=>{const s=t.getBoundingClientRect();t.scrollTop=yo(t.scrollTop,wo(s.top+t.clientTop,t.clientHeight,n),e.getBoundingClientRect())},$o=(t,e,n=0)=>{const s=t.getBoundingClientRect(),r=e.getBoundingClientRect();t.scrollLeft=yo(t.scrollLeft,wo(s.left+t.clientLeft,t.clientWidth,n),{top:r.left,bottom:r.right})},So=(t,e,n)=>{typeof window>"u"||Object.assign(window,{devProcessKit:{version:t,templates:e,versionParam:n}})},wt="dpk-version",Ao="version",_h=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,fn=t=>_h.test(t),Oh="https://cdn.jsdelivr.net/npm/dev-process-kit@",To="https://data.jsdelivr.com/v1/packages/npm/dev-process-kit",ys=t=>{const e=new URLSearchParams(t),n=e.get(wt)??e.get(Ao);return n!==null&&fn(n)?n:null},Lh=(t,e)=>{const n=ys(t);return n===null||n===e?null:n},Ph=(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`${Oh}${t}/dist/${e}`},zh=(t,e)=>{const n=new URL(t);return n.searchParams.delete(Ao),e===null?n.searchParams.delete(wt):n.searchParams.set(wt,e),n.href},Mh=O({tags:D(Ge(v(),ve()),{}),versions:j(O({version:v()}))}),Ih=t=>{const e=Vt(Mh,t),n=e.tags.latest;return{latest:typeof n=="string"&&fn(n)?n:null,versions:e.versions.map(s=>s.version).filter(fn)}},Co=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 Eo=()=>(gn??=fetch(To).then(async t=>{if(!t.ok)throw new Error(`${To} answered ${t.status}`);return Ih(await t.json())}),gn.catch(()=>{gn=void 0}),gn),Ro=t=>{location.assign(zh(location.href,t))},Nh=t=>import(t),Dh=({entry:t,templates:e,register:n,importModule:s=Nh})=>{const r=()=>{n(),So(X,e,wt)},i=typeof location>"u"?null:Lh(location.search,X);if(i===null){r();return}s(Ph(i,t)).then(()=>{jh()||Bh(i)},o=>{console.error(`dev-process-kit@${i} could not be loaded; running ${X}`,o),r()})},jh=()=>{const t=Reflect.get(window,"devProcessKit");return typeof t=="object"&&t!==null&&"versionParam"in t},ws="dpk-version-fallback",qh=`
|
|
1385
|
-
.${ws} {
|
|
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
|
-
`,Bh=t=>{const e=[...document.body.querySelectorAll("*")].filter(n=>n.localName.startsWith("dpk-template-")&&!n.querySelector(`:scope > .${ws}`));if(e.length!==0){document.head.append(Object.assign(document.createElement("style"),{textContent:qh}));for(const n of e)n.append(Hh(n,t))}},Hh=(t,e)=>{const n=L(It(Mt(t))),s=document.createElement("select");s.className=ws,s.slot="header",s.setAttribute("aria-label",n.versionLabel),s.title=n.versionLabel;const r=o=>{const a=Co({current:e,requested:ys(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=()=>{Eo().then(r,o=>console.warn(o))};return s.addEventListener("pointerenter",i,{once:!0}),s.addEventListener("focus",i,{once:!0}),s.addEventListener("change",()=>Ro(s.value===""?null:s.value)),r(null),s},Uh=O({value:v()}),Fh=t=>e=>{if(!(e instanceof CustomEvent))return;const n=C(Uh,e.detail);n.success&&t(n.output.value)},$s=t=>e=>{const n=Ee(e.target,HTMLSelectElement);n!==null&&t(n.value)},Wh=t=>e=>{const n=Ee(e.target,HTMLInputElement);n!==null&&t(n.value,n)},Gh=t=>e=>{const n=Ee(e.target,HTMLInputElement);n!==null&&t(n.checked)},_o="data-dpk-changes",Vh=/^[^:\s]+:\S+$/,Kh=z({id:D(y(v(),$(1))),title:y(v(),$(1)),body:D(v()),target:D(y(v(),te(Vh,'target must be written "type:id"'))),navigate:D(y(v(),ei("=",'navigate must be written "key=value"')))}),Qh=j(Kh),Zh=y(v(),$(1)),Oo=z({revision:Zh,changes:Qh}),Yh=z({revisions:y(j(Oo),$(1,"list at least one version"))}),Jh=(t,e)=>JSON.stringify([t,e]),$t=t=>[...t.earlier,t.latest],Xh=t=>{const e=t.changes.map((s,r)=>{const i=s.id??String(r);return{key:Jh(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}},eu=t=>{const e=typeof t=="object"&&t!==null&&"revisions"in t,n=C(e?Yh:Oo,t);if(!n.success)return{ok:!1,error:Fc(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=Xh(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"}},tu=z({v:G(1),revision:v(),seen:j(v())}),nu=z({v:G(2),since:v(),seen:Ge(v(),j(v()))}),Lo=t=>{const e=C(nu,t);if(e.success)return e.output;const n=C(tu,t);return n.success?{v:2,since:n.output.revision,seen:{[n.output.revision]:n.output.seen}}:null},Ss={open:!1,fresh:new Set},Po=t=>e=>t.told.has(e.revision)&&!t.seen.has(e.key),As=(t,e)=>$t(t).flatMap(n=>n.entries.filter(Po(e))),zo=t=>t.target!==null||t.navigate!==null,su=(t,e)=>{const n=$t(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:Ss}},Ts=(t,e)=>new Set([...t.seen,...e]),ru=(t,e,n)=>{switch(n.kind){case"open-list":{const s=As(t,e),r=new Set(s.map(o=>o.key)),i=s.filter(o=>!zo(o)).map(o=>o.key);return{...e,seen:Ts(e,i),toasts:[],list:{open:!0,fresh:r}}}case"close-list":return{...e,list:Ss};case"close-toast":return{...e,toasts:e.toasts.filter(s=>s!==n.key)};case"jump":return{...e,seen:Ts(e,[n.key]),toasts:e.toasts.filter(s=>s!==n.key),list:Ss};case"read-all":return{...e,seen:Ts(e,As(t,e).map(s=>s.key)),toasts:[],list:{open:e.list.open,fresh:new Set}}}},iu=(t,e)=>As(t,e).length,ou=(t,e)=>{const n=$t(t),s=n.findIndex(o=>e.told.has(o.revision)&&o.entries.some(Po(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)}},au=(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},Mo=3,lu=t=>e=>({key:e.key,id:e.id,revision:e.revision,title:e.title,body:e.body,jumpable:zo(e),fresh:t.list.fresh.has(e.key)}),cu=(t,e)=>{const n=$t(t).map(i=>({revision:i.revision,latest:i===t.latest,cards:i.entries.map(lu(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:iu(t,e),open:e.list.open,groups:n,toasts:r.slice(0,Mo),waiting:Math.max(0,r.length-Mo)}},St=t=>t==="light"||t==="dark"?t:null,Io=t=>t.authored??t.environment,No=t=>t.preference??Io(t),du=t=>{const e=No(t)==="dark"?"light":"dark";return e===Io(t)?null:e},Do=j(z({value:y(v(),te(/^element:.+/)),label:y(v(),$(1)),group:B(v())})),pu=O({targets:Do,providers:j(O({id:y(v(),$(1)),results:j(xi)}))}),hu=z({target:y(v(),te(/^element:.+/)),body:y(v(),Yn(),$(1))}),jo=t=>t.group?`${t.group} \xB7 ${t.label}`:t.label,uu=(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(ne(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?jo(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:jo(l)}},serialize:r=>ne(r)?`${r.type} ${I(r.target)} ${JSON.stringify(r.payload)}`:t.serialize(r)}},qo=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function Bo(t){return typeof qo.Buffer<"u"&&qo.Buffer.isBuffer(t)}function Ho(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 Uo(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Fo(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const fu="[object RegExp]",gu="[object String]",mu="[object Number]",ku="[object Boolean]",bu="[object Symbol]",vu="[object Date]",xu="[object Map]",yu="[object Set]",wu="[object Array]",$u="[object Function]",Su="[object ArrayBuffer]",Cs="[object Object]",Au="[object Error]",Tu="[object DataView]",Cu="[object Uint8Array]",Eu="[object Uint8ClampedArray]",Ru="[object Uint16Array]",_u="[object Uint32Array]",Ou="[object BigUint64Array]",Lu="[object Int8Array]",Pu="[object Int16Array]",zu="[object Int32Array]",Mu="[object BigInt64Array]",Iu="[object Float32Array]",Nu="[object Float64Array]";function Du(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function ju(t,e,n){return At(t,e,void 0,void 0,void 0,void 0,n)}function At(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 Tt(t,e,i,o)}return Tt(t,e,i,o)}function Tt(t,e,n,s){if(Object.is(t,e))return!0;let r=Fo(t),i=Fo(e);if(r==="[object Arguments]"&&(r=Cs),i==="[object Arguments]"&&(i=Cs),r!==i)return!1;switch(r){case gu:return t.toString()===e.toString();case mu:return Du(t.valueOf(),e.valueOf());case ku:case vu:case bu:return Object.is(t.valueOf(),e.valueOf());case fu:return t.source===e.source&&t.flags===e.flags;case $u: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 xu:if(t.size!==e.size)return!1;for(const[l,d]of t.entries())if(!e.has(l)||!At(d,e.get(l),l,t,e,n,s))return!1;return!0;case yu:{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=>At(p,h,void 0,t,e,n,s));if(u===-1)return!1;d.splice(u,1)}return!0}case wu:case Cu:case Eu:case Ru:case _u:case Ou:case Lu:case Pu:case zu:case Mu:case Iu:case Nu:if(Bo(t)!==Bo(e)||t.length!==e.length)return!1;for(let l=0;l<t.length;l++)if(!At(t[l],e[l],l,t,e,n,s))return!1;return!0;case Su:return t.byteLength!==e.byteLength?!1:Tt(new Uint8Array(t),new Uint8Array(e),n,s);case Tu:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:Tt(new Uint8Array(t),new Uint8Array(e),n,s);case Au:return t.name===e.name&&t.message===e.message;case Cs:{if(!(Tt(t.constructor,e.constructor,n,s)||Ho(t)&&Ho(e)))return!1;const l=[...Object.keys(t),...Uo(t)],d=[...Object.keys(e),...Uo(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(!At(u,h,p,t,e,n,s))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function qu(){}function mn(t,e){return ju(t,e,qu)}const Es="page",Wo=t=>I(t),Go=(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===H)continue;if(ne(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=_i(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"&&Rs(t,i,g)){d.push(h);continue}i=g,a.push(h)}for(const h of n){if(h.type!==H)continue;if(!(h.target.type===Es?t.pageTargetExists?.(i,h.target)??!0:t.hasTarget(i,h.target))){l.push({action:h,reason:"target-missing"});continue}c.push(h);const g=Wo(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}},Rs=(t,e,n)=>e===n?!0:t.canonicalState===void 0?mn(e,n):mn(t.canonicalState(e),t.canonicalState(n)),Vo=t=>{const e=new Set(t.obsolete.map(n=>n.id));return t.actions.filter(n=>!e.has(n.id))},Bu=(t,e,n,s)=>{let r=e;const i=s??Ko(r).map(o=>o.id);for(const o of[...i].reverse())r=Hu(t,r,n,o,s!==void 0)??r;return r},Ko=t=>t.applied.filter(e=>!ne(e)&&!Q(e)),Hu=(t,e,n,s,r)=>{const i=Ko(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?Uu(t,e.base,i,o):[],...Fu(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=Wu(t,e,n,u);if(h!==null)return h}return null},Uu=(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)=>Rs(t,o,i)?[n.slice(a,s+1).map(l=>l.id)]:[])},Fu=(t,e,n)=>{const s=Qo(n),r=e.filter(l=>Qo(l).some(d=>s.includes(d))),i=Zo(t,n),o=r.filter(l=>Zo(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])]},Qo=t=>{const e=t.target.type===Es?[]: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]},Zo=(t,e)=>ht(t.actions,e.type)?.mode,Wu=(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 Rs(t,o.state,e.state)?o:null;if(a.some(l=>l.type===H||ne(l)||Q(l)))return null;for(const l of a)i.add(l.id)}},Gu=(t,e,n)=>{const s=Ri(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))}},Vu=(t,e)=>{const{grill:n}=e,s=L(e.locale);return{...t,hasTarget:(r,i)=>i.type===se?Ke(n,i.id)!==void 0:t.hasTarget(r,i),commentTargets:(r,i)=>[...t.commentTargets(r,i),...n.questions.map(o=>({value:I({type:se,id:o.id}),label:as(n,o.id),group:s.grillGroup}))],describe:(r,i,o)=>{const a=as(n,r.target.id);if(Q(r)){const{title:d,summary:c,tone:p}=Gu(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===se?{...l,targetLabel:a}:l},serialize:r=>Q(r)?`${r.type} ${I(r.target)} ${JSON.stringify(r.payload)}`:t.serialize(r)}},Ku=O({v:G(1),template:y(v(),$(1)),actions:j(ve())});class _s{constructor(e){this.storage=e}load(e,n){try{const s=this.storage.getItem(e);if(s===null)return[];const r=C(Ku,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 Os{constructor(){this.store=new Map}load(e,n){return new _s({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 Ls=()=>{try{if(typeof localStorage<"u")return new _s(localStorage)}catch{}return new Os},kn=t=>`dev-process-kit:draft:${typeof location>"u"?"local":`${location.pathname}${location.search}`}:${t}`,Qu=j(ve());class Yo{#e;#t;#n={targets:[],providers:[]};#r;#s=new Map;#i;#o;#a;#l;#p;#h=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.#p=e.storageKey??kn(e.definition.name),this.#l=e.storage===void 0?Ls():e.storage;const n=e.initialActions??this.#l?.load(this.#p,this.definition.name)??[];this.#o=ea(this.definition,n),this.#a=this.#u(this.#o),this.#f()&&this.#E()}get definition(){return this.#t}setComponentSnapshot(e){const n=Vt(pu,e);if(!mn(n,this.#n)){this.#n=n,this.#k(),this.#a=this.#u(this.#o);for(const s of this.#h)s()}}setTemplate(e){this.#e=e,this.#k(),this.#a=this.#u(this.#o);for(const n of this.#h)n()}setGrill(e){this.#r=e,this.#k(),this.#a=this.#u(this.#o);for(const n of this.#h)n()}#k(){this.#s=yi(this.#o,this.#n.providers),this.#t=this.#v()}#v(){return Vu(uu(this.#e,this.#n.targets,this.#s),this.#r)}#u(e){return Go(this.definition,this.#i,e,yi(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 Jo(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(Xo(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(Qu,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)?_i(this.#r.grill,o,c)===null?null:i:c.type==="comment"||ne(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=Xo(r,c,p);const h=this.#u(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(gi,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=ed(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!==H)return this.#g([{path:"id",message:`no comment "${e}" in the draft`}]);if(ft(s)===n)return{ok:!0,id:e};const r=C(ss.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(ea(this.definition,e))}setBase(e){this.#i=e,this.#b(this.#o)}subscribe(e){return this.#h.add(e),()=>{this.#h.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.#u(this.#o),this.#f(n),this.#E();for(const s of this.#h)s()}#f(e){const n=this.#w(),s=Bu(this.definition,this.#a,r=>this.#u(r),e);return s===this.#a?n:(this.#y+=this.#o.length-s.actions.length,this.#o=[...s.actions],this.#k(),this.#a=this.#u(this.#o),this.#w(),!0)}#w(){return this.#a.obsolete.length===0?!1:(this.#y+=this.#a.obsolete.length,this.#o=Vo(this.#a),this.#k(),this.#a=this.#u(this.#o),!0)}#E(){this.#l?.save(this.#p,this.definition.name,this.#o)}}const Jo=(t,e,n)=>e==="comment"?ss:e===Zt?xd:n!==void 0&&ne({type:e,target:n})?id:t.actionFor?t.actionFor(e,n):ht(t.actions,e),Xo=(t,e,n)=>Q(e)?wd(t,e):mi(t,e,n),ea=(t,e)=>e.flatMap(n=>{const s=C(Pe,n);if(!s.success)return[];const r=s.output,i=Jo(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]:[]}),Zu=()=>({status:{kind:"idle"},request:0}),Yu=(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}},Ju=(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"?Mi(s.reason,t.locale):null}},bn="@",Ps=Object.freeze({type:Es,id:"page"}),zs=/^[A-Za-z0-9_-]+$/,ta=t=>t.type===Ps.type&&t.id===Ps.id,na=t=>{const e=t.id.lastIndexOf(bn);if(e<0)return null;const n=t.id.slice(e+1);return zs.test(n)?{board:n,target:{type:t.type,id:t.id.slice(0,e)}}:null},sa=(t,e)=>({type:t.type,id:`${t.id}${bn}${e}`}),Xu=(t,e,n)=>{if(ta(t))return t;const s=na(t);return s!==null&&n.has(s.board)?t:sa(t,e)},ef=(t,e)=>`${t}${bn}${e}`,tf="dpk-page",ra="board",ia="data-dpk-draft-board",Ms=Symbol.for("dev-process-kit.board-host"),oa=t=>{if(t.parentElement?.localName!==tf)return null;const e=t.getAttribute(ra);return e!==null&&zs.test(e)?e:null},nf=t=>{const e=t.parentElement;if(e===null||!(Ms in e))return null;const n=e[Ms];return sf(n)?n:null},sf=t=>typeof t=="object"&&t!==null&&"dispatch"in t&&"navigation"in t,aa="board",vn=t=>`${t}.`,Is=(t,e)=>{const n=vn(e),s={};for(const[r,i]of Object.entries(t))r.startsWith(n)&&(s[r.slice(n.length)]=i);return s},rf=(t,e)=>Object.fromEntries(Object.entries(e).map(([n,s])=>[`${vn(t)}${n}`,s])),of=(t,e,n,s,r=[])=>{const i={},o={};for(const[c,p]of Object.entries(n)){const u=c.indexOf(".");c===aa||u>0&&s.has(c.slice(0,u))?i[c]=p:o[c]=p}if(Object.keys(o).length===0)return i;const a=Is(t,e),l=en(a,o,r),d={...i};for(const c of Object.keys(a))Object.hasOwn(l,c)||(d[`${vn(e)}${c}`]=null);for(const[c,p]of Object.entries(l))d[`${vn(e)}${c}`]=p;return d},la=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}},af=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)}},lf=(t,e)=>{const n=()=>la(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:H,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)}},Ns=(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 Ns({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 Ns(localStorage,t)}catch{}return he(t)},cf=t=>{try{if(typeof sessionStorage<"u")return Ns(sessionStorage,t)}catch{}return he(t)},df=8e3,pf=t=>t.localName==="script"&&t.getAttribute("type")==="application/json"&&t.hasAttribute(_o);class hf{#e;#t;#n=null;#r=null;#s=null;#i=null;#o="";#a=null;#l=new Map;#p=new Set;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}get view(){return this.#n&&this.#s?cu(this.#n,this.#s):null}get error(){return this.#r}hostConnected(){!this.#m()&&!this.#y()&&this.#u(),document.addEventListener("pointerdown",this.#f,!0),document.addEventListener("keydown",this.#w)}hostUpdate(){!this.#m()&&this.#y()&&this.#A()}hostDisconnected(){this.#A(),document.removeEventListener("pointerdown",this.#f,!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=ru(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?$t(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.#p.size>0;if(this.#p.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.#p.delete(e)||this.#p.size>0))for(const[n,s]of this.#l)this.#b(n,s)}#h(){return`${this.#t.storageKey()}:seen-changes`}#m(){return this.#n!==null||this.#r!==null}#y(){const e=[...this.#e.children].find(pf);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=eu(n);return s.ok?(this.#n=s.log,this.#i=this.#t.persist()?Xe(Lo):he(Lo),this.#s=su(s.log,this.#i.read(this.#h())),this.#k(),this.#g(),this.#e.requestUpdate(),!0):this.#v(s.error)}#k(){if(!this.#n||!this.#s)return;const e=ou(this.#n,this.#s),n=JSON.stringify(e);n!==this.#o&&(this.#o=n,this.#i?.write(this.#h(),e))}#v(e){return console.error("[dev-process-kit] invalid change log:",e),this.#r=e,this.#e.requestUpdate(),!0}#u(){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:df};this.#l.set(n,s),this.#p.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)}#f=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 xn="dpk-changes",uf=(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=${xn}
|
|
1407
|
-
aria-expanded=${t.open?"true":"false"}
|
|
1408
|
-
aria-label=${s}
|
|
1409
|
-
title=${s}
|
|
1410
|
-
@click=${n.toggleList}
|
|
1411
|
-
>
|
|
1412
|
-
${Yi()} ${t.unread>0?m`<span class="dpk-bell-badge" aria-hidden="true">${t.unread}</span>`:k}
|
|
1413
|
-
</button>`},ca=(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,da=(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,ff=(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>`} ${ca(s,e,n)}
|
|
1438
|
-
</li>`)}
|
|
1439
|
-
</ol>
|
|
1440
|
-
</section>`,gf=(t,e,n)=>t.open?m`<div id=${xn} 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
|
-
${da(t,e,n,"list")}
|
|
1444
|
-
</div>
|
|
1445
|
-
${Me(t.groups,s=>s.revision,s=>ff(s,e,n))}
|
|
1446
|
-
</div>`:k,mf=(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">${Yi()}</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
|
-
${ca(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
|
-
${da(t,e,n,"toasts")}
|
|
1477
|
-
</div>`:k}
|
|
1478
|
-
</section>`,Ds=(t,e)=>typeof t=="object"&&t!==null&&e.every(n=>typeof Reflect.get(t,n)=="function"),kf=t=>Ds(t,["use"]),bf=t=>Ds(t,["anchorFor","canSendToClaude","sendToClaude"]),vf=t=>Ds(t,["collection"]),pa=async(t,e)=>{try{return await t.use(e)}catch{return null}},xf=(t,e)=>({async canSend(){try{return await t.canSendToClaude()==="available"}catch{return!1}},async send({brief:n,draft:s,anchor:r}){let i=Pd(n);if(i===null){if(e===null)return{ok:!1,reason:"too_large"};try{const o=e.collection(_d).doc();await o.set({brief:n,draft:s,createdAt:new Date().toISOString()}),i=zd(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:Id(o)}}}}),yf=async t=>{if(!kf(t))return null;const[e,n]=await Promise.all([pa(t,"comments"),pa(t,"db")]);return bf(e)?xf(e,vf(n)?n:null):null},wf=()=>Reflect.get(globalThis,"claude");class $f{#e;#t;#n=null;#r=!1;constructor(e,n=wf){this.#e=e,this.#t=n,e.addController(this)}get available(){return this.#r}hostConnected(){this.#n??=yf(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 js="dev-process-kit:color-scheme",Sf="(prefers-color-scheme: dark)",ha=()=>typeof matchMedia=="function"?matchMedia(Sf):null,ua=()=>St(document.documentElement.dataset.theme)??(ha()?.matches===!0?"dark":"light");class Af{#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(St):he(St),this.#r=this.#n.read(js)),this.#s=ua(),this.#i=ha(),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 No(this.#a(e))}toggle(e){this.#r=du(this.#a(e)),this.#r===null?this.#n?.remove(js):this.#n?.write(js,this.#r),this.#e.requestUpdate()}#a(e){return{preference:this.#r,authored:e,environment:this.#s}}#l=()=>{const e=ua();e!==this.#s&&(this.#s=e,this.#e.requestUpdate())}}const Tf=(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},fa=(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)},ga=t=>fa(t.filter(e=>"elementActions"in e&&e.id.length>0),e=>e.id),ma=(t,e)=>{for(const n of ga(t)){const s=ad(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)}},Cf=t=>{const e=Reflect.get(t,"elementActionResults");return Array.isArray(e)?e.flatMap(n=>{const s=C(xi,n);return s.success?[s.output]:[]}):[]},Ef=t=>{const e=[];for(const n of t){if(!("commentTargets"in n))continue;const s=C(Do,n.commentTargets);s.success&&e.push(...s.output)}return{targets:fa(e,n=>n.value),providers:ga(t).map(n=>({id:n.id,results:Cf(n)}))}};function ka(t){return t===null?1:t===void 0?2:0}function ba(t,e){const n=ka(t),s=ka(e);return n<s?-1:n>s?1:n!==0?0:t<e?-1:t>e?1:0}function Rf(t,e,n){return n==="asc"?ba(t,e):ba(e,t)}function _f(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=Rf(d?l(s):s[l],d?l(r):r[l],a);if(c!==0)return c}return 0})}function va(t,e){return _f(t,e,["asc"])}const Of=5,qs=4,xa=8,Lf=(t,e)=>{const n=e.badgeHeight,s=t.target.right+xa,r=t.target.left-xa,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+qs)},a-=d+Of}return i},ya=(t,e)=>{const n=t.map(()=>[]),s=va(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+qs,d}),r=a}return{points:n,bottom:r-qs}},Pf=(t,e)=>Math.max(0,ya(t,e).bottom),zf=(t,e)=>{const n=ya(t,e),s=Math.max(e.height,n.bottom);return t.map((r,i)=>(r.gutter?n.points[i]??[]:Lf(r,e)).map((o,a)=>({x:vs(o.x,0,Math.max(0,e.width-(r.widths[a]??0))),y:vs(o.y,0,Math.max(0,s-e.badgeHeight))})))},Mf=t=>{const e=[t];t.shadowRoot&&e.push(t.shadowRoot);for(const n of t.querySelectorAll("*"))n.shadowRoot&&e.push(n.shadowRoot);return e},If=(t,e,n,s,r=(i,o)=>[o])=>{if(e.questions.length===0)return[];const i=new Map(e.questions.map(a=>[a.ref,a])),o=[];for(const a of Mf(t))for(const l of a.querySelectorAll(`[${gt}]`)){const d=l.getAttribute(gt)??"";for(const c of d.split(/\s+/)){const p=r(l,c).map(u=>i.get(u)).find(u=>u!==void 0);p&&o.push({index:o.length,target:l,questionId:p.id,ref:p.ref,title:p.title,answered:Jt(p,n[p.id]),open:p.id===s})}}return o},Nf=(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()},Df=(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=Nf(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&&t.dataset.region!=="sidebar"}})}const a=o[0]?.buttons[0]?.offsetHeight??0,l=o.map(({group:u})=>u),d={width:t.clientWidth,height:t.clientHeight,badgeHeight:a},c=Pf(l,d);t.parentElement&&(t.parentElement.style.minHeight=c>0?`${Math.ceil(c)}px`:"");const p=zf(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)`)})})},wa={childList:!0,subtree:!0,attributes:!0,attributeFilter:[gt]};class jf{#e;#t;#n=null;#r=!1;#s="";#i=new Set;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}hostConnected(){document.addEventListener("scroll",this.#l,!0),window.addEventListener("resize",this.#l),this.#e.addEventListener("dpk-diagram-view",this.#l)}hostDisconnected(){document.removeEventListener("scroll",this.#l,!0),window.removeEventListener("resize",this.#l),this.#e.removeEventListener("dpk-diagram-view",this.#l),this.#n?.disconnect(),this.#n=null;for(const e of this.#i)e.removeEventListener("scroll",this.#l,!0);this.#i.clear()}hostUpdated(){if(this.#n?.disconnect(),!this.#t.active())return;const e=this.#a();e!==this.#s&&(this.#s=e,this.#e.requestUpdate()),this.#n??=new MutationObserver(()=>{this.#e.requestUpdate(),this.#l()}),this.#n.observe(this.#e,wa);for(const n of this.#e.querySelectorAll("*"))n.shadowRoot&&this.#n.observe(n.shadowRoot,wa);this.#o(),this.#l()}#o(){const e=[this.#e.shadowRoot,...Array.from(this.#e.querySelectorAll("*"),n=>n.shadowRoot)];for(const n of e)n===null||this.#i.has(n)||(n.addEventListener("scroll",this.#l,!0),this.#i.add(n))}#a(){const e=this.#e.shadowRoot?.querySelectorAll(`[${gt}]`)??[];return Array.from(e,n=>n.getAttribute(gt)??"").join("|")}#l=()=>{this.#r||!this.#t.active()||(this.#r=!0,requestAnimationFrame(()=>{this.#r=!1;const e=this.#t.bindings();for(const n of this.#t.layers())Df(n,e)}))}}const Bs=(t,e)=>e!==null&&Ke(t,e)?e:t.questions[0]?.id??null,qf=(t,e)=>e!=="current"&&t.rounds[e]!==void 0?e:"current",$a=(t,e)=>t.options.map((n,s)=>({id:n.id,letter:md(s),label:n.label,checked:e?.kind==="option"&&e.optionId===n.id})),Bf=(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()]},Hf=(t,e,n,s)=>{const r=Ei(e,n),i=qf(e,s.round),o=Bf(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:$a(c,c.answer),freeText:c.answer?.kind==="free"?c.answer.text:null}})}};const d=Bs(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:$a(c,p),draft:p?.kind==="free"?p.text:"",freeSelected:p?.kind==="free",allowFreeText:c.freeText}})}}},Uf=(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=>Ff(t,r,n)):Me(e.view.questions,r=>r.id,Gf)}
|
|
1496
|
-
</div>
|
|
1497
|
-
${s}
|
|
1498
|
-
</div>
|
|
1499
|
-
`,Ff=(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:se,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">${kt()}</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=>Wf(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
|
-
`,Wf=(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
|
-
`,Gf=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">${kt()}</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
|
-
`,Vf=2400;class Kf{#e=Zu();#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 ls(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=Yu(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})},Vf))}#i(){this.#t!==null&&clearTimeout(this.#t),this.#t=null}}const Hs="dev-process-kit:locale";class Qf{#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 It(Mt(this.#e));const e=this.#e.parentNode;return It(this.#i??(e===null?null:Mt(e)))}get locale(){return this.#o??this.#a()}#a(){return xl({preference:this.#s,authored:this.authored})}hostConnected(){this.#r===null&&(this.#r=this.#t()?Xe(Ar):he(Ar),this.#s=this.#r.read(Hs)),this.#i??=this.#e.getAttribute("lang"),this.#l()}pick(e){this.#s=yl(e,this.authored),this.#s===null?this.#r?.remove(Hs):this.#r?.write(Hs,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(Nn))}}const Zf="(max-width: 760px)",Yf=()=>typeof matchMedia=="function"?matchMedia(Zf):null;class Jf{#e;#t=null;#n=!1;constructor(e){this.#e=e,e.addController(this)}hostConnected(){this.#t=Yf(),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 Sa=()=>Xt(typeof location>"u"?"":location.hash),Xf=(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 eg{#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 Aa=(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},tg=(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},Ta="data-dpk-target",ng=2800,Ca=48,sg=t=>t.getClientRects().length>0,Ea=(t,e)=>{const n=Aa(t,`[${Ta}]`).filter(i=>(i.getAttribute(Ta)??"").split(/\s+/).includes(e)),s=Aa(t,"[data-dpk-comment]").filter(i=>i.getAttribute("data-dpk-comment")===e),r=[...n,...s];return r.find(sg)??r[0]??null},Ra=(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},rg=(t,e)=>{for(const n of tg(e,t))Ra(n,"y")&&xs(n,e,Ca),Ra(n,"x")&&$o(n,e,Ca)},_a="color-mix(in srgb, var(--dpk-accent) 45%, transparent)",qe={outline:"2px solid var(--dpk-accent)",outlineOffset:"3px"},Oa={outline:"2px solid transparent",outlineOffset:"3px"},ig=t=>t?[{...qe},{...qe,offset:.85},{...Oa}]:[{...qe,boxShadow:`0 0 0 0 ${_a}`},{...qe,boxShadow:"0 0 0 14px transparent",offset:.3},{...qe,boxShadow:`0 0 0 0 ${_a}`,offset:.31},{...qe,boxShadow:"0 0 0 14px transparent",offset:.6},{...qe,offset:.85},{...Oa}],Ct={filter:"drop-shadow(0 0 3px var(--dpk-accent)) drop-shadow(0 0 3px var(--dpk-accent))"},yn={filter:"drop-shadow(0 0 3px transparent) drop-shadow(0 0 3px transparent)"},og=t=>t?[{...Ct},{...Ct,offset:.85},{...yn}]:[{...Ct},{...yn,offset:.3},{...Ct,offset:.31},{...yn,offset:.6},{...Ct,offset:.61},{...yn}],ag=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?og(e):ig(e),{duration:ng,easing:"ease-out"})},lg=440,cg=16;class dg{#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-cg);this.#t=ko(e,s,{width:lg,height:i},{placement:"bottom-end"});return}this.#n(),bo(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 wn="dpk-settings",La="dpk-settings-anchor",Pa={width:320,height:420},za=(t,e,n)=>m`<button
|
|
1592
|
-
class="dpk-header-action dpk-settings-trigger"
|
|
1593
|
-
type="button"
|
|
1594
|
-
aria-controls=${wn}
|
|
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
|
-
${gp()}
|
|
1602
|
-
</button>`,Ma=(t,e,n)=>m`<div id=${wn} class="dpk-settings" popover="manual" role="menu" aria-label=${e.settings}>
|
|
1603
|
-
${t.items.map(s=>pg(s,n))}
|
|
1604
|
-
${t.note===void 0?k:m`<p class="dpk-settings-note">${t.note}</p>`}
|
|
1605
|
-
</div>`,pg=(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?Vi():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},hg={side:"left",defaultWidth:260},$n=t=>Math.round(Math.min(ye.max,Math.max(ye.min,t))),Ia=t=>typeof t=="number"&&Number.isFinite(t)?$n(t):null,Us=(t,e)=>t==="left"?e:-e,ug=(t,e)=>$n(t.startWidth+Us(t.side,e-t.startX)),fg=(t,e,{key:n,shiftKey:s})=>{const r=s?ye.largeStep:ye.step;switch(n){case"ArrowLeft":return $n(t+Us(e,-r));case"ArrowRight":return $n(t+Us(e,r));case"Home":return ye.min;case"End":return ye.max;default:return null}},Na=t=>typeof t=="boolean"?t:null,gg=t=>t==="left"?"right":"left",mg=(t,e)=>e?{action:"expand",points:gg(t)}:{action:"collapse",points:t},kg=t=>`dev-process-kit:sidebar-collapsed:${t}`;class bg{#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(Na):he(Na),this.#r=kg(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 vg=t=>`dev-process-kit:sidebar-width:${t}`,Fs={kind:"idle"};class xg{constructor(e,n){this.#n=null,this.#r="",this.#s=null,this.#i=Fs,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(ug(r,s.clientX))},pointerup:s=>this.#o(s),pointercancel:s=>this.#o(s),keydown:s=>{const r=fg(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(Ia):he(Ia),this.#r=vg(this.#t.template()),this.#s=this.#n.read(this.#r))}hostDisconnected(){this.#i=Fs}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=Fs,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 Da=[Dt,jn,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
|
-
/* Spans the sidebar's content, so its badge layer scrolls with it. */
|
|
2258
|
-
.dpk-sidebar-body {
|
|
2259
|
-
position: relative;
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
/*
|
|
2263
|
-
* A right-hand sidebar: a rail beside the main column rather than a list
|
|
2264
|
-
* before it. \`:where\` keeps these as weak as the rules above, so a
|
|
2265
|
-
* template can still restyle the rail (stacking it on a phone, say).
|
|
2266
|
-
*/
|
|
2267
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-main {
|
|
2268
|
-
order: 1;
|
|
2269
|
-
}
|
|
2270
|
-
|
|
2271
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar,
|
|
2272
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-resizer,
|
|
2273
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-toggle,
|
|
2274
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-strip {
|
|
2275
|
-
order: 2;
|
|
2276
|
-
}
|
|
2277
|
-
|
|
2278
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar,
|
|
2279
|
-
:where(.dpk-body[data-sidebar-side='right']) .dpk-sidebar-strip {
|
|
2280
|
-
border-right: 0;
|
|
2281
|
-
border-left: 1px solid var(--dpk-rule);
|
|
2282
|
-
}
|
|
2283
|
-
|
|
2284
|
-
/*
|
|
2285
|
-
* The fold button. Expanded, it sits on the sidebar's border near the top
|
|
2286
|
-
* and, like the resizer, takes no room of its own; folded, it is the only
|
|
2287
|
-
* thing left in a narrow strip where the sidebar was.
|
|
2288
|
-
*/
|
|
2289
|
-
.dpk-sidebar-toggle {
|
|
2290
|
-
position: relative;
|
|
2291
|
-
z-index: 7;
|
|
2292
|
-
display: inline-flex;
|
|
2293
|
-
flex: none;
|
|
2294
|
-
align-self: flex-start;
|
|
2295
|
-
align-items: center;
|
|
2296
|
-
justify-content: center;
|
|
2297
|
-
width: 22px;
|
|
2298
|
-
height: 22px;
|
|
2299
|
-
margin: 14px -11px 0;
|
|
2300
|
-
padding: 0;
|
|
2301
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2302
|
-
border-radius: 999px;
|
|
2303
|
-
background: var(--dpk-paper-raised);
|
|
2304
|
-
color: var(--dpk-ink-soft);
|
|
2305
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
2306
|
-
cursor: pointer;
|
|
2307
|
-
transition:
|
|
2308
|
-
color 160ms var(--dpk-ease),
|
|
2309
|
-
border-color 160ms var(--dpk-ease),
|
|
2310
|
-
background 160ms var(--dpk-ease);
|
|
2311
|
-
}
|
|
2312
|
-
|
|
2313
|
-
.dpk-sidebar-toggle svg {
|
|
2314
|
-
width: 13px;
|
|
2315
|
-
height: 13px;
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
.dpk-sidebar-toggle:hover {
|
|
2319
|
-
color: var(--dpk-accent);
|
|
2320
|
-
border-color: color-mix(in srgb, var(--dpk-accent) 45%, transparent);
|
|
2321
|
-
}
|
|
2322
|
-
|
|
2323
|
-
.dpk-sidebar-toggle:focus-visible {
|
|
2324
|
-
outline: none;
|
|
2325
|
-
box-shadow: var(--dpk-focus);
|
|
2326
|
-
}
|
|
2327
|
-
|
|
2328
|
-
.dpk-sidebar-strip {
|
|
2329
|
-
display: flex;
|
|
2330
|
-
flex: none;
|
|
2331
|
-
justify-content: center;
|
|
2332
|
-
width: 36px;
|
|
2333
|
-
padding-top: 14px;
|
|
2334
|
-
border-right: 1px solid var(--dpk-rule);
|
|
2335
|
-
background: var(--dpk-paper-sunken);
|
|
2336
|
-
}
|
|
2337
|
-
|
|
2338
|
-
.dpk-sidebar-strip .dpk-sidebar-toggle {
|
|
2339
|
-
margin: 0;
|
|
2340
|
-
}
|
|
2341
|
-
|
|
2342
|
-
/*
|
|
2343
|
-
* The sidebar's resizable edge: a hit area straddling its border that takes
|
|
2344
|
-
* no room of its own, with an accent line while hovered, focused or dragged.
|
|
2345
|
-
*/
|
|
2346
|
-
.dpk-sidebar-resizer {
|
|
2347
|
-
position: relative;
|
|
2348
|
-
z-index: 6;
|
|
2349
|
-
flex: none;
|
|
2350
|
-
width: 9px;
|
|
2351
|
-
/* Centred on the sidebar's border, whichever side that is. */
|
|
2352
|
-
margin: 0 -5px 0 -4px;
|
|
2353
|
-
cursor: col-resize;
|
|
2354
|
-
touch-action: none;
|
|
2355
|
-
}
|
|
2356
|
-
|
|
2357
|
-
.dpk-sidebar-resizer::after {
|
|
2358
|
-
content: '';
|
|
2359
|
-
position: absolute;
|
|
2360
|
-
top: 0;
|
|
2361
|
-
bottom: 0;
|
|
2362
|
-
left: 3px;
|
|
2363
|
-
width: 2px;
|
|
2364
|
-
border-radius: 1px;
|
|
2365
|
-
background: var(--dpk-accent);
|
|
2366
|
-
opacity: 0;
|
|
2367
|
-
transition: opacity 160ms var(--dpk-ease);
|
|
2368
|
-
}
|
|
2369
|
-
|
|
2370
|
-
.dpk-sidebar-resizer:hover::after,
|
|
2371
|
-
.dpk-sidebar-resizer:focus-visible::after,
|
|
2372
|
-
.dpk-shell[data-resizing] .dpk-sidebar-resizer::after {
|
|
2373
|
-
opacity: 1;
|
|
2374
|
-
}
|
|
2375
|
-
|
|
2376
|
-
.dpk-sidebar-resizer:focus-visible {
|
|
2377
|
-
outline: none;
|
|
2378
|
-
}
|
|
2379
|
-
|
|
2380
|
-
/*
|
|
2381
|
-
* A phone-width screen has no room for a column beside the main one: the
|
|
2382
|
-
* sidebar is a drawer that the strip's button slides over the main column,
|
|
2383
|
-
* leaving a sliver of it to tap the drawer shut.
|
|
2384
|
-
*/
|
|
2385
|
-
.dpk-body[data-sidebar-drawer] > .dpk-sidebar {
|
|
2386
|
-
position: absolute;
|
|
2387
|
-
top: 0;
|
|
2388
|
-
bottom: 0;
|
|
2389
|
-
left: 36px;
|
|
2390
|
-
z-index: 25;
|
|
2391
|
-
width: min(var(--dpk-sidebar-width), calc(100% - 36px - 48px));
|
|
2392
|
-
max-width: none;
|
|
2393
|
-
box-shadow: var(--dpk-shadow-lg);
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
.dpk-body[data-sidebar-drawer][data-sidebar-side='right'] > .dpk-sidebar {
|
|
2397
|
-
left: auto;
|
|
2398
|
-
right: 36px;
|
|
2399
|
-
}
|
|
2400
|
-
|
|
2401
|
-
.dpk-sidebar-scrim {
|
|
2402
|
-
position: absolute;
|
|
2403
|
-
inset: 0;
|
|
2404
|
-
z-index: 24;
|
|
2405
|
-
background: color-mix(in srgb, var(--dpk-ink) 16%, transparent);
|
|
2406
|
-
}
|
|
2407
|
-
|
|
2408
|
-
/* While dragging, the cursor stays put and nothing underneath (text, preview frames) reacts. */
|
|
2409
|
-
.dpk-shell[data-resizing] {
|
|
2410
|
-
cursor: col-resize;
|
|
2411
|
-
user-select: none;
|
|
2412
|
-
}
|
|
2413
|
-
|
|
2414
|
-
.dpk-shell[data-resizing] .dpk-main {
|
|
2415
|
-
pointer-events: none;
|
|
2416
|
-
}
|
|
2417
|
-
|
|
2418
|
-
.dpk-main {
|
|
2419
|
-
flex: 1 1 0%;
|
|
2420
|
-
display: flex;
|
|
2421
|
-
flex-direction: column;
|
|
2422
|
-
min-width: 0;
|
|
2423
|
-
overflow: auto;
|
|
2424
|
-
/* A faint wash of the accent from the top left corner gives the ground some depth. */
|
|
2425
|
-
background:
|
|
2426
|
-
radial-gradient(
|
|
2427
|
-
ellipse 900px 360px at 0% 0%,
|
|
2428
|
-
color-mix(in srgb, var(--dpk-accent) 5%, transparent),
|
|
2429
|
-
transparent 70%
|
|
2430
|
-
),
|
|
2431
|
-
radial-gradient(
|
|
2432
|
-
ellipse 700px 320px at 100% 0%,
|
|
2433
|
-
color-mix(in srgb, var(--dpk-blue) 4%, transparent),
|
|
2434
|
-
transparent 70%
|
|
2435
|
-
),
|
|
2436
|
-
var(--dpk-paper);
|
|
2437
|
-
background-attachment: local;
|
|
2438
|
-
}
|
|
2439
|
-
|
|
2440
|
-
.dpk-main-body {
|
|
2441
|
-
flex: 1 0 auto;
|
|
2442
|
-
display: grid;
|
|
2443
|
-
/* The column is as wide as the page, not as its widest unbreakable line. */
|
|
2444
|
-
grid-template-columns: minmax(0, 1fr);
|
|
2445
|
-
align-content: start;
|
|
2446
|
-
gap: 16px;
|
|
2447
|
-
min-width: 0;
|
|
2448
|
-
padding: 24px;
|
|
2449
|
-
animation: dpk-rise 420ms var(--dpk-ease) backwards;
|
|
2450
|
-
}
|
|
2451
|
-
|
|
2452
|
-
/*
|
|
2453
|
-
* Scrolled to the end, the last of the content clears the hand-off dock
|
|
2454
|
-
* floating over the bottom right. \`--dpk-dock-clearance\` is how far up
|
|
2455
|
-
* that is; it reaches into components too, and a template's own floating
|
|
2456
|
-
* controls rise by it. \`:where\` lets a full-bleed template keep no padding.
|
|
2457
|
-
*/
|
|
2458
|
-
.dpk-shell:has(> .dpk-dock) {
|
|
2459
|
-
--dpk-dock-clearance: 64px;
|
|
2460
|
-
}
|
|
2461
|
-
|
|
2462
|
-
:where(.dpk-shell:has(> .dpk-dock)) .dpk-main-body {
|
|
2463
|
-
padding-bottom: calc(24px + var(--dpk-dock-clearance));
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
|
-
:where(.dpk-shell:has(> .dpk-dock)) .dpk-sidebar {
|
|
2467
|
-
padding-bottom: calc(18px + var(--dpk-dock-clearance));
|
|
2468
|
-
}
|
|
2469
|
-
|
|
2470
|
-
@keyframes dpk-rise {
|
|
2471
|
-
from {
|
|
2472
|
-
opacity: 0;
|
|
2473
|
-
transform: translateY(6px);
|
|
2474
|
-
}
|
|
2475
|
-
}
|
|
2476
|
-
|
|
2477
|
-
/*
|
|
2478
|
-
* Supplements. They sit at the end of the main column and stick to the
|
|
2479
|
-
* bottom of the scrollport as a bar the full width of the column, edge to
|
|
2480
|
-
* edge: always in reach and never stealing height from the preview. The bar
|
|
2481
|
-
* names each supplement; the one opened grows upward over the content and
|
|
2482
|
-
* shows whole; only one taller than the window scrolls, so its top stays
|
|
2483
|
-
* reachable.
|
|
2484
|
-
*/
|
|
2485
|
-
.dpk-supplements {
|
|
2486
|
-
position: sticky;
|
|
2487
|
-
bottom: 0;
|
|
2488
|
-
z-index: 5;
|
|
2489
|
-
margin-top: auto;
|
|
2490
|
-
/* A faint amber wash over the whole bar marks it as the author's aside. */
|
|
2491
|
-
border-top: 1px solid color-mix(in srgb, var(--dpk-amber) 28%, var(--dpk-rule-strong));
|
|
2492
|
-
background: color-mix(in srgb, color-mix(in srgb, var(--dpk-amber) 7%, var(--dpk-paper-raised)) 94%, transparent);
|
|
2493
|
-
backdrop-filter: blur(12px);
|
|
2494
|
-
box-shadow: 0 -8px 24px -18px color-mix(in srgb, var(--dpk-ink) 40%, transparent);
|
|
2495
|
-
}
|
|
2496
|
-
|
|
2497
|
-
.dpk-supplements[hidden] {
|
|
2498
|
-
display: none;
|
|
2499
|
-
}
|
|
2500
|
-
|
|
2501
|
-
.dpk-supplements-bar {
|
|
2502
|
-
display: flex;
|
|
2503
|
-
flex-wrap: wrap;
|
|
2504
|
-
align-items: center;
|
|
2505
|
-
gap: 2px;
|
|
2506
|
-
/* Clear of the hand-off dock at the bottom right while it is shown. */
|
|
2507
|
-
padding: 5px calc(16px + var(--dpk-dock-space, 0px)) 5px 10px;
|
|
2508
|
-
color: var(--dpk-ink-soft);
|
|
2509
|
-
}
|
|
2510
|
-
|
|
2511
|
-
.dpk-supplements-toggle {
|
|
2512
|
-
flex: none;
|
|
2513
|
-
display: grid;
|
|
2514
|
-
place-items: center;
|
|
2515
|
-
width: 24px;
|
|
2516
|
-
height: 24px;
|
|
2517
|
-
margin-right: 2px;
|
|
2518
|
-
border: 0;
|
|
2519
|
-
border-radius: 7px;
|
|
2520
|
-
padding: 0;
|
|
2521
|
-
background: transparent;
|
|
2522
|
-
color: inherit;
|
|
2523
|
-
cursor: pointer;
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
.dpk-supplements-toggle:hover {
|
|
2527
|
-
color: var(--dpk-ink);
|
|
2528
|
-
background: color-mix(in srgb, var(--dpk-amber) 10%, transparent);
|
|
2529
|
-
}
|
|
2530
|
-
|
|
2531
|
-
.dpk-supplements-toggle:focus-visible {
|
|
2532
|
-
outline: none;
|
|
2533
|
-
box-shadow: var(--dpk-focus);
|
|
2534
|
-
}
|
|
2535
|
-
|
|
2536
|
-
.dpk-supplements-toggle svg {
|
|
2537
|
-
width: 14px;
|
|
2538
|
-
height: 14px;
|
|
2539
|
-
transition: transform 160ms var(--dpk-ease);
|
|
2540
|
-
}
|
|
2541
|
-
|
|
2542
|
-
.dpk-supplements[data-open] .dpk-supplements-toggle svg {
|
|
2543
|
-
transform: rotate(90deg);
|
|
2544
|
-
}
|
|
2545
|
-
|
|
2546
|
-
.dpk-supplement-tab {
|
|
2547
|
-
position: relative;
|
|
2548
|
-
border: 0;
|
|
2549
|
-
border-radius: 7px;
|
|
2550
|
-
padding: 4px 10px;
|
|
2551
|
-
background: transparent;
|
|
2552
|
-
font: inherit;
|
|
2553
|
-
font-size: 12.5px;
|
|
2554
|
-
font-weight: 600;
|
|
2555
|
-
color: inherit;
|
|
2556
|
-
cursor: pointer;
|
|
2557
|
-
user-select: none;
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
|
-
/* A rule between neighbours reads the names as one row: ERD | Checklist | Sequence. */
|
|
2561
|
-
.dpk-supplement-tab + .dpk-supplement-tab::before {
|
|
2562
|
-
content: '';
|
|
2563
|
-
position: absolute;
|
|
2564
|
-
top: 25%;
|
|
2565
|
-
bottom: 25%;
|
|
2566
|
-
left: -1px;
|
|
2567
|
-
width: 1px;
|
|
2568
|
-
background: var(--dpk-rule-strong);
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
|
-
.dpk-supplement-tab:hover {
|
|
2572
|
-
color: var(--dpk-ink);
|
|
2573
|
-
background: color-mix(in srgb, var(--dpk-amber) 10%, transparent);
|
|
2574
|
-
}
|
|
2575
|
-
|
|
2576
|
-
.dpk-supplement-tab[aria-expanded='true'] {
|
|
2577
|
-
color: var(--dpk-ink);
|
|
2578
|
-
background: color-mix(in srgb, var(--dpk-amber) 18%, transparent);
|
|
2579
|
-
}
|
|
2580
|
-
|
|
2581
|
-
.dpk-supplement-tab:hover::before,
|
|
2582
|
-
.dpk-supplement-tab[aria-expanded='true']::before,
|
|
2583
|
-
.dpk-supplement-tab:hover + .dpk-supplement-tab::before,
|
|
2584
|
-
.dpk-supplement-tab[aria-expanded='true'] + .dpk-supplement-tab::before {
|
|
2585
|
-
visibility: hidden;
|
|
2586
|
-
}
|
|
2587
|
-
|
|
2588
|
-
.dpk-supplement-tab:focus-visible {
|
|
2589
|
-
outline: none;
|
|
2590
|
-
box-shadow: var(--dpk-focus);
|
|
2591
|
-
}
|
|
2592
|
-
|
|
2593
|
-
.dpk-supplements-body {
|
|
2594
|
-
max-height: calc(100dvh - 120px);
|
|
2595
|
-
overflow: auto;
|
|
2596
|
-
overscroll-behavior: contain;
|
|
2597
|
-
padding: 4px 16px 16px;
|
|
2598
|
-
/*
|
|
2599
|
-
* The dock floats over the bottom of what is open; showing it must not
|
|
2600
|
-
* resize that. Components lift the controls along their bottom edge by
|
|
2601
|
-
* this much instead.
|
|
2602
|
-
*/
|
|
2603
|
-
--dpk-dock-overlap: var(--dpk-dock-clearance, 0px);
|
|
2604
|
-
font-size: 12.5px;
|
|
2605
|
-
line-height: 1.7;
|
|
2606
|
-
color: var(--dpk-ink-soft);
|
|
2607
|
-
}
|
|
2608
|
-
|
|
2609
|
-
.dpk-supplements-body[hidden] {
|
|
2610
|
-
display: none;
|
|
2611
|
-
}
|
|
2612
|
-
|
|
2613
|
-
.dpk-supplements ::slotted(*) {
|
|
2614
|
-
display: block;
|
|
2615
|
-
max-width: 100%;
|
|
2616
|
-
}
|
|
2617
|
-
|
|
2618
|
-
.dpk-orphans {
|
|
2619
|
-
margin-top: 16px;
|
|
2620
|
-
border: 1px dashed var(--dpk-rule-strong);
|
|
2621
|
-
border-radius: var(--dpk-radius);
|
|
2622
|
-
padding: 12px;
|
|
2623
|
-
}
|
|
2624
|
-
|
|
2625
|
-
.dpk-banner {
|
|
2626
|
-
display: grid;
|
|
2627
|
-
gap: 4px;
|
|
2628
|
-
margin-bottom: 14px;
|
|
2629
|
-
border: 1px solid color-mix(in srgb, var(--dpk-danger) 35%, transparent);
|
|
2630
|
-
border-radius: var(--dpk-radius);
|
|
2631
|
-
background: linear-gradient(90deg, var(--dpk-danger) 0 3px, transparent 3px), var(--dpk-danger-soft);
|
|
2632
|
-
padding: 12px 14px 12px 17px;
|
|
2633
|
-
max-width: 900px;
|
|
2634
|
-
}
|
|
2635
|
-
|
|
2636
|
-
.dpk-banner strong {
|
|
2637
|
-
font-size: 13px;
|
|
2638
|
-
color: var(--dpk-danger);
|
|
2639
|
-
}
|
|
2640
|
-
|
|
2641
|
-
.dpk-banner code {
|
|
2642
|
-
font-family: var(--dpk-mono);
|
|
2643
|
-
font-size: 11px;
|
|
2644
|
-
color: var(--dpk-ink-soft);
|
|
2645
|
-
overflow-wrap: anywhere;
|
|
2646
|
-
}
|
|
2647
|
-
|
|
2648
|
-
/* ------------------------------------------------------------- footer */
|
|
2649
|
-
|
|
2650
|
-
.dpk-footer {
|
|
2651
|
-
border-top: 1px solid var(--dpk-rule);
|
|
2652
|
-
padding: 10px 20px;
|
|
2653
|
-
display: flex;
|
|
2654
|
-
gap: 12px;
|
|
2655
|
-
align-items: center;
|
|
2656
|
-
background: var(--dpk-glass);
|
|
2657
|
-
backdrop-filter: blur(12px);
|
|
2658
|
-
font-size: 12px;
|
|
2659
|
-
color: var(--dpk-ink-faint);
|
|
2660
|
-
}
|
|
2661
|
-
|
|
2662
|
-
/* --------------------------------------------------- floating review */
|
|
2663
|
-
|
|
2664
|
-
/* The review floats over the page from its toggles, as tall as the screen
|
|
2665
|
-
allows: the main column keeps its whole width while it is open. The
|
|
2666
|
-
popover positions it; this only shapes the surface. */
|
|
2667
|
-
.dpk-review {
|
|
2668
|
-
box-sizing: border-box;
|
|
2669
|
-
position: fixed;
|
|
2670
|
-
inset: auto;
|
|
2671
|
-
margin: 0;
|
|
2672
|
-
padding: 0;
|
|
2673
|
-
height: 100dvh;
|
|
2674
|
-
overflow: hidden;
|
|
2675
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2676
|
-
border-radius: var(--dpk-radius-lg);
|
|
2677
|
-
background: var(--dpk-paper-raised);
|
|
2678
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2679
|
-
color: var(--dpk-ink);
|
|
2680
|
-
}
|
|
2681
|
-
|
|
2682
|
-
.dpk-review:popover-open {
|
|
2683
|
-
display: flex;
|
|
2684
|
-
animation: dpk-review-in 180ms var(--dpk-ease);
|
|
2685
|
-
}
|
|
2686
|
-
|
|
2687
|
-
@keyframes dpk-review-in {
|
|
2688
|
-
from {
|
|
2689
|
-
opacity: 0;
|
|
2690
|
-
transform: translateY(-6px);
|
|
2691
|
-
}
|
|
2692
|
-
}
|
|
2693
|
-
|
|
2694
|
-
.dpk-review > dpk-component-comment-panel {
|
|
2695
|
-
flex: 1 1 auto;
|
|
2696
|
-
}
|
|
2697
|
-
|
|
2698
|
-
/* Review toggles: the changes and the review comments of the draft, each
|
|
2699
|
-
opening its own part of the review. Pinned to the top right corner, always
|
|
2700
|
-
in the same place. */
|
|
2701
|
-
.dpk-header-actions {
|
|
2702
|
-
position: fixed;
|
|
2703
|
-
top: 6px;
|
|
2704
|
-
right: 16px;
|
|
2705
|
-
z-index: 60;
|
|
2706
|
-
display: flex;
|
|
2707
|
-
gap: 6px;
|
|
2708
|
-
}
|
|
2709
|
-
|
|
2710
|
-
.dpk-review-toggles {
|
|
2711
|
-
display: flex;
|
|
2712
|
-
gap: 6px;
|
|
2713
|
-
}
|
|
2714
|
-
|
|
2715
|
-
/* Each further button (the questions, the settings gear) widens what the header keeps clear of. */
|
|
2716
|
-
.dpk-shell:is(:has(.dpk-settings-trigger), :has(.dpk-review-toggles > :nth-child(3))) .dpk-header {
|
|
2717
|
-
padding-right: 138px;
|
|
2718
|
-
}
|
|
2719
|
-
|
|
2720
|
-
.dpk-shell:has(.dpk-settings-trigger):has(.dpk-review-toggles > :nth-child(3)) .dpk-header {
|
|
2721
|
-
padding-right: 176px;
|
|
2722
|
-
}
|
|
2723
|
-
|
|
2724
|
-
.dpk-header-action {
|
|
2725
|
-
position: relative;
|
|
2726
|
-
display: inline-flex;
|
|
2727
|
-
align-items: center;
|
|
2728
|
-
justify-content: center;
|
|
2729
|
-
width: 32px;
|
|
2730
|
-
height: 32px;
|
|
2731
|
-
padding: 0;
|
|
2732
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2733
|
-
border-radius: 10px;
|
|
2734
|
-
background: var(--dpk-paper-raised);
|
|
2735
|
-
color: var(--dpk-ink-soft);
|
|
2736
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
2737
|
-
cursor: pointer;
|
|
2738
|
-
transition:
|
|
2739
|
-
color 180ms var(--dpk-ease),
|
|
2740
|
-
background 180ms var(--dpk-ease),
|
|
2741
|
-
border-color 180ms var(--dpk-ease),
|
|
2742
|
-
box-shadow 180ms var(--dpk-ease),
|
|
2743
|
-
transform 220ms var(--dpk-ease-spring);
|
|
2744
|
-
}
|
|
2745
|
-
|
|
2746
|
-
.dpk-header-action svg {
|
|
2747
|
-
width: 16px;
|
|
2748
|
-
height: 16px;
|
|
2749
|
-
}
|
|
2750
|
-
|
|
2751
|
-
.dpk-header-action:hover {
|
|
2752
|
-
color: var(--dpk-ink);
|
|
2753
|
-
border-color: var(--dpk-rule-hover);
|
|
2754
|
-
transform: translateY(-1px);
|
|
2755
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow);
|
|
2756
|
-
}
|
|
2757
|
-
|
|
2758
|
-
.dpk-header-action:active {
|
|
2759
|
-
transform: translateY(0) scale(0.95);
|
|
2760
|
-
box-shadow: var(--dpk-shadow-xs);
|
|
2761
|
-
}
|
|
2762
|
-
|
|
2763
|
-
.dpk-header-action:focus-visible {
|
|
2764
|
-
outline: none;
|
|
2765
|
-
box-shadow: var(--dpk-focus);
|
|
2766
|
-
}
|
|
2767
|
-
|
|
2768
|
-
.dpk-header-action[aria-pressed='true'],
|
|
2769
|
-
.dpk-header-action[aria-expanded='true'] {
|
|
2770
|
-
color: var(--dpk-accent-ink);
|
|
2771
|
-
border-color: color-mix(in srgb, var(--dpk-accent-strong) 70%, transparent);
|
|
2772
|
-
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent-strong));
|
|
2773
|
-
box-shadow:
|
|
2774
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
2775
|
-
0 6px 16px -6px color-mix(in srgb, var(--dpk-accent) 70%, transparent);
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
.dpk-header-action[aria-pressed='true']:hover,
|
|
2779
|
-
.dpk-header-action[aria-expanded='true']:hover {
|
|
2780
|
-
box-shadow:
|
|
2781
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.25),
|
|
2782
|
-
0 10px 22px -8px color-mix(in srgb, var(--dpk-accent) 80%, transparent);
|
|
2783
|
-
}
|
|
2784
|
-
|
|
2785
|
-
.dpk-review-badge {
|
|
2786
|
-
position: absolute;
|
|
2787
|
-
top: -6px;
|
|
2788
|
-
right: -6px;
|
|
2789
|
-
min-width: 18px;
|
|
2790
|
-
height: 18px;
|
|
2791
|
-
padding: 0 4px;
|
|
2792
|
-
border: 2px solid var(--dpk-paper);
|
|
2793
|
-
border-radius: 999px;
|
|
2794
|
-
background: linear-gradient(145deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
2795
|
-
color: var(--dpk-accent-ink);
|
|
2796
|
-
font-family: var(--dpk-mono);
|
|
2797
|
-
font-size: 9.5px;
|
|
2798
|
-
font-weight: 650;
|
|
2799
|
-
font-variant-numeric: tabular-nums;
|
|
2800
|
-
line-height: 14px;
|
|
2801
|
-
text-align: center;
|
|
2802
|
-
white-space: nowrap;
|
|
2803
|
-
box-shadow: 0 3px 8px -2px color-mix(in srgb, var(--dpk-accent) 60%, transparent);
|
|
2804
|
-
animation: dpk-pop 260ms var(--dpk-ease-spring);
|
|
2805
|
-
}
|
|
2806
|
-
|
|
2807
|
-
@keyframes dpk-pop {
|
|
2808
|
-
from {
|
|
2809
|
-
transform: scale(0.4);
|
|
2810
|
-
opacity: 0;
|
|
2811
|
-
}
|
|
2812
|
-
}
|
|
2813
|
-
|
|
2814
|
-
/* What an icon button does, named below it on hover or keyboard focus. */
|
|
2815
|
-
.dpk-header-action[data-tooltip]::after {
|
|
2816
|
-
content: attr(data-tooltip);
|
|
2817
|
-
position: absolute;
|
|
2818
|
-
top: calc(100% + 8px);
|
|
2819
|
-
right: 0;
|
|
2820
|
-
padding: 4px 8px;
|
|
2821
|
-
border-radius: var(--dpk-radius-sm);
|
|
2822
|
-
background: var(--dpk-ink);
|
|
2823
|
-
color: var(--dpk-paper);
|
|
2824
|
-
font-size: 11.5px;
|
|
2825
|
-
font-weight: 600;
|
|
2826
|
-
line-height: 1.4;
|
|
2827
|
-
white-space: nowrap;
|
|
2828
|
-
box-shadow: var(--dpk-shadow-sm);
|
|
2829
|
-
pointer-events: none;
|
|
2830
|
-
opacity: 0;
|
|
2831
|
-
transform: translateY(-2px);
|
|
2832
|
-
transition:
|
|
2833
|
-
opacity 120ms var(--dpk-ease),
|
|
2834
|
-
transform 120ms var(--dpk-ease);
|
|
2835
|
-
}
|
|
2836
|
-
|
|
2837
|
-
.dpk-header-action[data-tooltip]:hover::after,
|
|
2838
|
-
.dpk-header-action[data-tooltip]:focus-visible::after {
|
|
2839
|
-
opacity: 1;
|
|
2840
|
-
transform: none;
|
|
2841
|
-
transition-delay: 250ms;
|
|
2842
|
-
}
|
|
2843
|
-
|
|
2844
|
-
/* An open popover hangs where the labels would show, and names itself. */
|
|
2845
|
-
.dpk-header-actions:has([aria-pressed='true'], [aria-expanded='true']) .dpk-header-action::after {
|
|
2846
|
-
display: none;
|
|
2847
|
-
}
|
|
2848
|
-
|
|
2849
|
-
/* ----------------------------------------------------------- settings */
|
|
2850
|
-
|
|
2851
|
-
.dpk-settings {
|
|
2852
|
-
box-sizing: border-box;
|
|
2853
|
-
overflow: auto;
|
|
2854
|
-
position: fixed;
|
|
2855
|
-
inset: auto;
|
|
2856
|
-
margin: 0;
|
|
2857
|
-
padding: 6px;
|
|
2858
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2859
|
-
border-radius: var(--dpk-radius-lg);
|
|
2860
|
-
background: var(--dpk-paper-raised);
|
|
2861
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2862
|
-
color: var(--dpk-ink);
|
|
2863
|
-
}
|
|
2864
|
-
|
|
2865
|
-
.dpk-settings:popover-open {
|
|
2866
|
-
display: grid;
|
|
2867
|
-
align-content: start;
|
|
2868
|
-
gap: 2px;
|
|
2869
|
-
animation: dpk-review-in 180ms var(--dpk-ease);
|
|
2870
|
-
}
|
|
2871
|
-
|
|
2872
|
-
.dpk-settings-option {
|
|
2873
|
-
display: flex;
|
|
2874
|
-
align-items: flex-start;
|
|
2875
|
-
gap: 10px;
|
|
2876
|
-
width: 100%;
|
|
2877
|
-
padding: 8px;
|
|
2878
|
-
border: 0;
|
|
2879
|
-
border-radius: var(--dpk-radius-sm);
|
|
2880
|
-
background: none;
|
|
2881
|
-
color: var(--dpk-ink);
|
|
2882
|
-
font: inherit;
|
|
2883
|
-
text-align: left;
|
|
2884
|
-
cursor: pointer;
|
|
2885
|
-
}
|
|
2886
|
-
|
|
2887
|
-
.dpk-settings-option:hover,
|
|
2888
|
-
.dpk-settings-option:focus-visible {
|
|
2889
|
-
outline: none;
|
|
2890
|
-
background: var(--dpk-paper-sunken);
|
|
2891
|
-
}
|
|
2892
|
-
|
|
2893
|
-
.dpk-settings-check {
|
|
2894
|
-
flex: none;
|
|
2895
|
-
display: inline-grid;
|
|
2896
|
-
place-items: center;
|
|
2897
|
-
width: 16px;
|
|
2898
|
-
height: 16px;
|
|
2899
|
-
margin-top: 1px;
|
|
2900
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2901
|
-
border-radius: 4px;
|
|
2902
|
-
background: var(--dpk-paper-raised);
|
|
2903
|
-
}
|
|
2904
|
-
|
|
2905
|
-
.dpk-settings-option[aria-checked='true'] .dpk-settings-check {
|
|
2906
|
-
border-color: var(--dpk-accent-strong);
|
|
2907
|
-
background: var(--dpk-accent-strong);
|
|
2908
|
-
color: var(--dpk-accent-ink);
|
|
2909
|
-
}
|
|
2910
|
-
|
|
2911
|
-
.dpk-settings-check svg {
|
|
2912
|
-
width: 12px;
|
|
2913
|
-
height: 12px;
|
|
2914
|
-
stroke-width: 3;
|
|
2915
|
-
}
|
|
2916
|
-
|
|
2917
|
-
.dpk-settings-text {
|
|
2918
|
-
display: grid;
|
|
2919
|
-
gap: 2px;
|
|
2920
|
-
min-width: 0;
|
|
2921
|
-
}
|
|
2922
|
-
|
|
2923
|
-
.dpk-settings-name {
|
|
2924
|
-
font-size: 13px;
|
|
2925
|
-
font-weight: 650;
|
|
2926
|
-
}
|
|
2927
|
-
|
|
2928
|
-
.dpk-settings-hint {
|
|
2929
|
-
color: var(--dpk-ink-soft);
|
|
2930
|
-
font-size: 11.5px;
|
|
2931
|
-
line-height: 1.45;
|
|
2932
|
-
}
|
|
2933
|
-
|
|
2934
|
-
.dpk-settings-note {
|
|
2935
|
-
margin: 4px 8px;
|
|
2936
|
-
padding-top: 8px;
|
|
2937
|
-
border-top: 1px solid var(--dpk-rule);
|
|
2938
|
-
color: var(--dpk-ink-faint);
|
|
2939
|
-
font-size: 11px;
|
|
2940
|
-
line-height: 1.45;
|
|
2941
|
-
}
|
|
2942
|
-
|
|
2943
|
-
/* ------------------------------------------------------ hand-off dock */
|
|
2944
|
-
|
|
2945
|
-
.dpk-dock {
|
|
2946
|
-
position: fixed;
|
|
2947
|
-
right: 16px;
|
|
2948
|
-
bottom: 16px;
|
|
2949
|
-
z-index: 60;
|
|
2950
|
-
display: flex;
|
|
2951
|
-
flex-direction: column;
|
|
2952
|
-
align-items: flex-end;
|
|
2953
|
-
gap: 8px;
|
|
2954
|
-
max-width: calc(100vw - 32px);
|
|
2955
|
-
animation: dpk-dock-in 260ms var(--dpk-ease) backwards;
|
|
2956
|
-
}
|
|
2957
|
-
|
|
2958
|
-
@keyframes dpk-dock-in {
|
|
2959
|
-
from {
|
|
2960
|
-
transform: translateY(8px);
|
|
2961
|
-
opacity: 0;
|
|
2962
|
-
}
|
|
2963
|
-
}
|
|
2964
|
-
|
|
2965
|
-
.dpk-dock-actions {
|
|
2966
|
-
display: flex;
|
|
2967
|
-
gap: 6px;
|
|
2968
|
-
padding: 6px;
|
|
2969
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2970
|
-
border-radius: var(--dpk-radius-lg);
|
|
2971
|
-
background: var(--dpk-glass);
|
|
2972
|
-
backdrop-filter: blur(12px);
|
|
2973
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
2974
|
-
}
|
|
2975
|
-
|
|
2976
|
-
.dpk-dock-note {
|
|
2977
|
-
max-width: 320px;
|
|
2978
|
-
margin: 0;
|
|
2979
|
-
padding: 8px 12px;
|
|
2980
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2981
|
-
border-radius: var(--dpk-radius);
|
|
2982
|
-
background: var(--dpk-paper-raised);
|
|
2983
|
-
box-shadow: var(--dpk-shadow);
|
|
2984
|
-
color: var(--dpk-ink-soft);
|
|
2985
|
-
font-size: 12px;
|
|
2986
|
-
line-height: 1.6;
|
|
2987
|
-
}
|
|
2988
|
-
|
|
2989
|
-
/* ---------------------------------------------------------- questions */
|
|
2990
|
-
|
|
2991
|
-
/* The questions the page asks, in the review popover beside the changes and
|
|
2992
|
-
the review comments. The comment panel stays mounted (it holds the
|
|
2993
|
-
composer's unsent text) but steps aside. */
|
|
2994
|
-
.dpk-review[data-section='questions'] > dpk-component-comment-panel {
|
|
2995
|
-
display: none;
|
|
2996
|
-
}
|
|
2997
|
-
|
|
2998
|
-
.dpk-grill {
|
|
2999
|
-
display: flex;
|
|
3000
|
-
flex-direction: column;
|
|
3001
|
-
flex: 1 1 auto;
|
|
3002
|
-
min-width: 0;
|
|
3003
|
-
min-height: 0;
|
|
3004
|
-
}
|
|
3005
|
-
|
|
3006
|
-
.dpk-grill-head {
|
|
3007
|
-
display: flex;
|
|
3008
|
-
align-items: center;
|
|
3009
|
-
justify-content: space-between;
|
|
3010
|
-
gap: 8px;
|
|
3011
|
-
padding: 14px 16px 12px;
|
|
3012
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
3013
|
-
background: var(--dpk-glass);
|
|
3014
|
-
backdrop-filter: blur(12px);
|
|
3015
|
-
box-shadow: 0 1px 0 var(--dpk-highlight) inset;
|
|
3016
|
-
}
|
|
3017
|
-
|
|
3018
|
-
.dpk-grill-head h2 {
|
|
3019
|
-
margin: 0;
|
|
3020
|
-
font-size: 13.5px;
|
|
3021
|
-
font-weight: 660;
|
|
3022
|
-
letter-spacing: -0.015em;
|
|
3023
|
-
}
|
|
3024
|
-
|
|
3025
|
-
.dpk-grill-progress {
|
|
3026
|
-
font-family: var(--dpk-mono);
|
|
3027
|
-
font-size: 11px;
|
|
3028
|
-
font-variant-numeric: tabular-nums;
|
|
3029
|
-
color: var(--dpk-ink-faint);
|
|
3030
|
-
}
|
|
3031
|
-
|
|
3032
|
-
/* With earlier rounds, a select of rounds: the current one first. */
|
|
3033
|
-
.dpk-grill-rounds {
|
|
3034
|
-
flex-shrink: 0;
|
|
3035
|
-
padding: 10px 10px 0;
|
|
3036
|
-
}
|
|
3037
|
-
|
|
3038
|
-
.dpk-grill-round {
|
|
3039
|
-
width: 100%;
|
|
3040
|
-
padding: 6px 24px 6px 9px;
|
|
3041
|
-
border: 1px solid var(--dpk-rule);
|
|
3042
|
-
border-radius: var(--dpk-radius-sm);
|
|
3043
|
-
appearance: none;
|
|
3044
|
-
background-color: var(--dpk-paper-sunken);
|
|
3045
|
-
background-image:
|
|
3046
|
-
linear-gradient(45deg, transparent 50%, currentColor 50%),
|
|
3047
|
-
linear-gradient(135deg, currentColor 50%, transparent 50%);
|
|
3048
|
-
background-position:
|
|
3049
|
-
calc(100% - 13px) 52%,
|
|
3050
|
-
calc(100% - 9px) 52%;
|
|
3051
|
-
background-size: 4px 4px;
|
|
3052
|
-
background-repeat: no-repeat;
|
|
3053
|
-
color: var(--dpk-ink);
|
|
3054
|
-
font: inherit;
|
|
3055
|
-
font-size: 11.5px;
|
|
3056
|
-
cursor: pointer;
|
|
3057
|
-
}
|
|
3058
|
-
|
|
3059
|
-
.dpk-grill-round:focus-visible {
|
|
3060
|
-
outline: none;
|
|
3061
|
-
box-shadow: var(--dpk-focus);
|
|
3062
|
-
}
|
|
3063
|
-
|
|
3064
|
-
.dpk-grill-round option {
|
|
3065
|
-
color: var(--dpk-ink);
|
|
3066
|
-
background: var(--dpk-paper-raised);
|
|
3067
|
-
}
|
|
3068
|
-
|
|
3069
|
-
.dpk-grill-round-note {
|
|
3070
|
-
margin: 4px 0 2px;
|
|
3071
|
-
padding: 0 8px;
|
|
3072
|
-
font-size: 10.5px;
|
|
3073
|
-
line-height: 1.6;
|
|
3074
|
-
color: var(--dpk-ink-faint);
|
|
3075
|
-
}
|
|
3076
|
-
|
|
3077
|
-
.dpk-grill-list {
|
|
3078
|
-
flex: 1;
|
|
3079
|
-
min-height: 0;
|
|
3080
|
-
overflow: auto;
|
|
3081
|
-
overscroll-behavior: contain;
|
|
3082
|
-
padding: 2px 10px 12px;
|
|
3083
|
-
}
|
|
3084
|
-
|
|
3085
|
-
.dpk-grill-empty {
|
|
3086
|
-
margin: 0;
|
|
3087
|
-
padding: 22px 8px;
|
|
3088
|
-
text-align: center;
|
|
3089
|
-
font-size: 12px;
|
|
3090
|
-
color: var(--dpk-ink-faint);
|
|
3091
|
-
}
|
|
3092
|
-
|
|
3093
|
-
.dpk-grill-question {
|
|
3094
|
-
margin: 6px 0;
|
|
3095
|
-
border: 1px solid transparent;
|
|
3096
|
-
border-radius: var(--dpk-radius);
|
|
3097
|
-
transition:
|
|
3098
|
-
background 140ms var(--dpk-ease),
|
|
3099
|
-
border-color 140ms var(--dpk-ease);
|
|
3100
|
-
}
|
|
3101
|
-
|
|
3102
|
-
.dpk-grill-question:has(.dpk-grill-heading[aria-expanded='true']) {
|
|
3103
|
-
border-color: var(--dpk-rule);
|
|
3104
|
-
background: var(--dpk-paper-raised);
|
|
3105
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
3106
|
-
}
|
|
3107
|
-
|
|
3108
|
-
.dpk-grill-heading {
|
|
3109
|
-
display: flex;
|
|
3110
|
-
align-items: flex-start;
|
|
3111
|
-
gap: 9px;
|
|
3112
|
-
width: 100%;
|
|
3113
|
-
padding: 10px 8px;
|
|
3114
|
-
border: 0;
|
|
3115
|
-
border-radius: var(--dpk-radius-sm);
|
|
3116
|
-
background: none;
|
|
3117
|
-
text-align: left;
|
|
3118
|
-
cursor: pointer;
|
|
3119
|
-
}
|
|
3120
|
-
|
|
3121
|
-
.dpk-grill-heading:hover {
|
|
3122
|
-
background: var(--dpk-paper-sunken);
|
|
3123
|
-
}
|
|
3124
|
-
|
|
3125
|
-
.dpk-grill-question:has(.dpk-grill-heading[aria-expanded='true']) .dpk-grill-heading:hover {
|
|
3126
|
-
background: none;
|
|
3127
|
-
}
|
|
3128
|
-
|
|
3129
|
-
.dpk-grill-ref {
|
|
3130
|
-
flex: 0 0 auto;
|
|
3131
|
-
display: grid;
|
|
3132
|
-
place-items: center;
|
|
3133
|
-
min-width: 30px;
|
|
3134
|
-
height: 22px;
|
|
3135
|
-
padding: 0 6px;
|
|
3136
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
3137
|
-
border-radius: 999px;
|
|
3138
|
-
background: var(--dpk-paper-sunken);
|
|
3139
|
-
font-family: var(--dpk-mono);
|
|
3140
|
-
font-size: 10px;
|
|
3141
|
-
font-weight: 600;
|
|
3142
|
-
font-variant-numeric: tabular-nums;
|
|
3143
|
-
color: var(--dpk-ink-faint);
|
|
3144
|
-
box-shadow: inset 0 1px 2px var(--dpk-shade-1);
|
|
3145
|
-
transition:
|
|
3146
|
-
background 140ms var(--dpk-ease),
|
|
3147
|
-
color 140ms var(--dpk-ease),
|
|
3148
|
-
border-color 140ms var(--dpk-ease),
|
|
3149
|
-
box-shadow 140ms var(--dpk-ease);
|
|
3150
|
-
}
|
|
3151
|
-
|
|
3152
|
-
.dpk-grill-question[data-answered='true'] .dpk-grill-ref {
|
|
3153
|
-
border-color: transparent;
|
|
3154
|
-
background: linear-gradient(180deg, var(--dpk-green-soft), color-mix(in srgb, var(--dpk-green) 16%, transparent));
|
|
3155
|
-
color: var(--dpk-green);
|
|
3156
|
-
box-shadow: var(--dpk-bevel);
|
|
3157
|
-
}
|
|
3158
|
-
|
|
3159
|
-
.dpk-grill-question:has(.dpk-grill-heading[aria-expanded='true']) .dpk-grill-ref {
|
|
3160
|
-
border-color: transparent;
|
|
3161
|
-
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
3162
|
-
color: var(--dpk-accent-ink);
|
|
3163
|
-
box-shadow:
|
|
3164
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.24),
|
|
3165
|
-
0 2px 6px -2px color-mix(in srgb, var(--dpk-accent) 55%, transparent);
|
|
3166
|
-
}
|
|
3167
|
-
|
|
3168
|
-
.dpk-grill-heading-text {
|
|
3169
|
-
flex: 1;
|
|
3170
|
-
min-width: 0;
|
|
3171
|
-
}
|
|
3172
|
-
|
|
3173
|
-
.dpk-grill-heading-text strong {
|
|
3174
|
-
display: block;
|
|
3175
|
-
font-size: 12.5px;
|
|
3176
|
-
font-weight: 620;
|
|
3177
|
-
line-height: 1.6;
|
|
3178
|
-
letter-spacing: -0.005em;
|
|
3179
|
-
}
|
|
3180
|
-
|
|
3181
|
-
.dpk-grill-summary {
|
|
3182
|
-
display: block;
|
|
3183
|
-
margin-top: 4px;
|
|
3184
|
-
font-size: 10.5px;
|
|
3185
|
-
line-height: 1.6;
|
|
3186
|
-
color: var(--dpk-green);
|
|
3187
|
-
white-space: nowrap;
|
|
3188
|
-
overflow: hidden;
|
|
3189
|
-
text-overflow: ellipsis;
|
|
3190
|
-
}
|
|
3191
|
-
|
|
3192
|
-
.dpk-grill-chevron {
|
|
3193
|
-
flex: 0 0 auto;
|
|
3194
|
-
width: 16px;
|
|
3195
|
-
color: var(--dpk-ink-faint);
|
|
3196
|
-
line-height: 22px;
|
|
3197
|
-
text-align: center;
|
|
3198
|
-
}
|
|
3199
|
-
|
|
3200
|
-
.dpk-grill-chevron svg {
|
|
3201
|
-
display: block;
|
|
3202
|
-
width: 13px;
|
|
3203
|
-
height: 13px;
|
|
3204
|
-
margin: 4.5px auto 0;
|
|
3205
|
-
transition: transform 180ms var(--dpk-ease);
|
|
3206
|
-
}
|
|
3207
|
-
|
|
3208
|
-
.dpk-grill-heading[aria-expanded='true'] .dpk-grill-chevron svg {
|
|
3209
|
-
transform: rotate(90deg);
|
|
3210
|
-
color: var(--dpk-accent);
|
|
3211
|
-
}
|
|
3212
|
-
|
|
3213
|
-
.dpk-grill-body {
|
|
3214
|
-
padding: 2px 8px 14px 47px;
|
|
3215
|
-
animation: dpk-grill-open 180ms var(--dpk-ease) backwards;
|
|
3216
|
-
}
|
|
3217
|
-
|
|
3218
|
-
@keyframes dpk-grill-open {
|
|
3219
|
-
from {
|
|
3220
|
-
opacity: 0;
|
|
3221
|
-
transform: translateY(-4px);
|
|
3222
|
-
}
|
|
3223
|
-
}
|
|
3224
|
-
|
|
3225
|
-
.dpk-grill-description {
|
|
3226
|
-
margin: 0 0 8px;
|
|
3227
|
-
font-size: 11.5px;
|
|
3228
|
-
line-height: 1.85;
|
|
3229
|
-
color: var(--dpk-ink-soft);
|
|
3230
|
-
}
|
|
3231
|
-
|
|
3232
|
-
.dpk-grill-note {
|
|
3233
|
-
margin: 0 0 10px;
|
|
3234
|
-
padding: 7px 10px;
|
|
3235
|
-
border: 1px solid color-mix(in srgb, var(--dpk-amber) 30%, transparent);
|
|
3236
|
-
border-radius: var(--dpk-radius-sm);
|
|
3237
|
-
background: var(--dpk-amber-soft);
|
|
3238
|
-
font-size: 11px;
|
|
3239
|
-
line-height: 1.7;
|
|
3240
|
-
color: var(--dpk-ink-soft);
|
|
3241
|
-
}
|
|
3242
|
-
|
|
3243
|
-
.dpk-grill-choices {
|
|
3244
|
-
display: grid;
|
|
3245
|
-
gap: 6px;
|
|
3246
|
-
}
|
|
3247
|
-
|
|
3248
|
-
.dpk-grill-choice {
|
|
3249
|
-
position: relative;
|
|
3250
|
-
display: flex;
|
|
3251
|
-
align-items: flex-start;
|
|
3252
|
-
gap: 8px;
|
|
3253
|
-
padding: 8px 9px;
|
|
3254
|
-
border: 1px solid var(--dpk-rule);
|
|
3255
|
-
border-radius: var(--dpk-radius-sm);
|
|
3256
|
-
background: var(--dpk-paper);
|
|
3257
|
-
font-size: 11.5px;
|
|
3258
|
-
line-height: 1.7;
|
|
3259
|
-
cursor: pointer;
|
|
3260
|
-
overflow: hidden;
|
|
3261
|
-
transition:
|
|
3262
|
-
border-color 140ms var(--dpk-ease),
|
|
3263
|
-
background 140ms var(--dpk-ease),
|
|
3264
|
-
box-shadow 140ms var(--dpk-ease),
|
|
3265
|
-
transform 140ms var(--dpk-ease);
|
|
3266
|
-
}
|
|
3267
|
-
|
|
3268
|
-
.dpk-grill-choice:hover {
|
|
3269
|
-
border-color: var(--dpk-rule-hover);
|
|
3270
|
-
background: var(--dpk-paper-inset);
|
|
3271
|
-
}
|
|
3272
|
-
|
|
3273
|
-
.dpk-grill-choice:has(input:checked) {
|
|
3274
|
-
border-color: color-mix(in srgb, var(--dpk-green) 45%, transparent);
|
|
3275
|
-
background: var(--dpk-green-soft);
|
|
3276
|
-
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dpk-green) 30%, transparent);
|
|
3277
|
-
}
|
|
3278
|
-
|
|
3279
|
-
.dpk-grill-choice[data-free] {
|
|
3280
|
-
border-style: dashed;
|
|
3281
|
-
}
|
|
3282
|
-
|
|
3283
|
-
.dpk-grill-choice[data-free='true'] {
|
|
3284
|
-
border-style: solid;
|
|
3285
|
-
}
|
|
3286
|
-
|
|
3287
|
-
.dpk-grill-choice input {
|
|
3288
|
-
flex: 0 0 auto;
|
|
3289
|
-
margin: 3px 0 0;
|
|
3290
|
-
accent-color: var(--dpk-green);
|
|
3291
|
-
}
|
|
3292
|
-
|
|
3293
|
-
.dpk-grill-choice-text {
|
|
3294
|
-
display: flex;
|
|
3295
|
-
gap: 7px;
|
|
3296
|
-
min-width: 0;
|
|
3297
|
-
}
|
|
3298
|
-
|
|
3299
|
-
.dpk-grill-letter {
|
|
3300
|
-
flex: 0 0 auto;
|
|
3301
|
-
font-family: var(--dpk-mono);
|
|
3302
|
-
font-size: 10px;
|
|
3303
|
-
font-weight: 600;
|
|
3304
|
-
line-height: 1.9;
|
|
3305
|
-
color: var(--dpk-green);
|
|
3306
|
-
}
|
|
3307
|
-
|
|
3308
|
-
/* An earlier round: a disclosure per question, nothing to answer with. */
|
|
3309
|
-
.dpk-grill-question[data-past] > summary {
|
|
3310
|
-
list-style: none;
|
|
3311
|
-
}
|
|
3312
|
-
|
|
3313
|
-
.dpk-grill-question[data-past] > summary::-webkit-details-marker {
|
|
3314
|
-
display: none;
|
|
3315
|
-
}
|
|
3316
|
-
|
|
3317
|
-
.dpk-grill-question[data-past][open] {
|
|
3318
|
-
border-color: var(--dpk-rule);
|
|
3319
|
-
background: var(--dpk-paper-raised);
|
|
3320
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
3321
|
-
}
|
|
3322
|
-
|
|
3323
|
-
.dpk-grill-question[data-past][open] .dpk-grill-heading:hover {
|
|
3324
|
-
background: none;
|
|
3325
|
-
}
|
|
3326
|
-
|
|
3327
|
-
.dpk-grill-question[data-past][open] .dpk-grill-chevron svg {
|
|
3328
|
-
transform: rotate(90deg);
|
|
3329
|
-
}
|
|
3330
|
-
|
|
3331
|
-
.dpk-grill-question[data-past][open] .dpk-grill-summary {
|
|
3332
|
-
display: none;
|
|
3333
|
-
}
|
|
3334
|
-
|
|
3335
|
-
.dpk-grill-question[data-past][data-answered='false'] .dpk-grill-summary {
|
|
3336
|
-
color: var(--dpk-ink-faint);
|
|
3337
|
-
}
|
|
3338
|
-
|
|
3339
|
-
.dpk-grill-past-choices {
|
|
3340
|
-
display: grid;
|
|
3341
|
-
gap: 6px;
|
|
3342
|
-
margin: 0;
|
|
3343
|
-
padding: 0;
|
|
3344
|
-
list-style: none;
|
|
3345
|
-
}
|
|
3346
|
-
|
|
3347
|
-
.dpk-grill-past-choice {
|
|
3348
|
-
display: flex;
|
|
3349
|
-
gap: 7px;
|
|
3350
|
-
margin: 0;
|
|
3351
|
-
padding: 7px 9px;
|
|
3352
|
-
border: 1px solid var(--dpk-rule);
|
|
3353
|
-
border-radius: var(--dpk-radius-sm);
|
|
3354
|
-
font-size: 11.5px;
|
|
3355
|
-
line-height: 1.7;
|
|
3356
|
-
color: var(--dpk-ink-faint);
|
|
3357
|
-
}
|
|
3358
|
-
|
|
3359
|
-
.dpk-grill-past-choice[data-checked='true'] {
|
|
3360
|
-
border-color: color-mix(in srgb, var(--dpk-green) 45%, transparent);
|
|
3361
|
-
background: var(--dpk-green-soft);
|
|
3362
|
-
color: var(--dpk-ink);
|
|
3363
|
-
}
|
|
3364
|
-
|
|
3365
|
-
.dpk-grill-past-free {
|
|
3366
|
-
margin-top: 6px;
|
|
3367
|
-
white-space: pre-wrap;
|
|
3368
|
-
}
|
|
3369
|
-
|
|
3370
|
-
.dpk-grill-free {
|
|
3371
|
-
margin-top: 7px;
|
|
3372
|
-
min-height: 76px;
|
|
3373
|
-
max-height: 240px;
|
|
3374
|
-
}
|
|
3375
|
-
|
|
3376
|
-
.dpk-grill-clear {
|
|
3377
|
-
margin-top: 10px;
|
|
3378
|
-
padding: 0;
|
|
3379
|
-
border: 0;
|
|
3380
|
-
background: none;
|
|
3381
|
-
color: var(--dpk-ink-faint);
|
|
3382
|
-
font-size: 10.5px;
|
|
3383
|
-
text-decoration: underline;
|
|
3384
|
-
text-underline-offset: 3px;
|
|
3385
|
-
cursor: pointer;
|
|
3386
|
-
}
|
|
3387
|
-
|
|
3388
|
-
.dpk-grill-clear:hover {
|
|
3389
|
-
color: var(--dpk-ink);
|
|
3390
|
-
}
|
|
3391
|
-
|
|
3392
|
-
/* The hand-off at the foot of the questions: the comment panel's own is hidden. */
|
|
3393
|
-
.dpk-grill-footer {
|
|
3394
|
-
flex-shrink: 0;
|
|
3395
|
-
display: grid;
|
|
3396
|
-
gap: 8px;
|
|
3397
|
-
padding: 10px 12px;
|
|
3398
|
-
border-top: 1px solid var(--dpk-rule);
|
|
3399
|
-
background: var(--dpk-paper-raised);
|
|
3400
|
-
box-shadow: 0 -6px 12px -10px var(--dpk-shade-2);
|
|
3401
|
-
}
|
|
3402
|
-
|
|
3403
|
-
.dpk-grill-footer .dpk-dock-actions {
|
|
3404
|
-
padding: 0;
|
|
3405
|
-
border: 0;
|
|
3406
|
-
background: none;
|
|
3407
|
-
backdrop-filter: none;
|
|
3408
|
-
box-shadow: none;
|
|
3409
|
-
}
|
|
3410
|
-
|
|
3411
|
-
.dpk-grill-footer .dpk-dock-actions > .dpk-btn {
|
|
3412
|
-
flex: 1;
|
|
3413
|
-
min-width: 0;
|
|
3414
|
-
}
|
|
3415
|
-
|
|
3416
|
-
.dpk-grill-footer .dpk-dock-note {
|
|
3417
|
-
max-width: none;
|
|
3418
|
-
box-shadow: none;
|
|
3419
|
-
}
|
|
3420
|
-
|
|
3421
|
-
/* --------------------------------------------------------- Q badges */
|
|
3422
|
-
|
|
3423
|
-
/* The badges are laid over the main column; the page marks what a question
|
|
3424
|
-
is about with \`data-grill-questions\`. */
|
|
3425
|
-
.dpk-main-body {
|
|
3426
|
-
position: relative;
|
|
3427
|
-
}
|
|
3428
|
-
|
|
3429
|
-
/* Badges on the author's own markup stand in a column of their own on the
|
|
3430
|
-
right, beside the line they mark, so they never cover its words. */
|
|
3431
|
-
.dpk-main-body[data-grill-gutter] {
|
|
3432
|
-
padding-right: 56px;
|
|
3433
|
-
}
|
|
3434
|
-
|
|
3435
|
-
.dpk-grill-badges {
|
|
3436
|
-
position: absolute;
|
|
3437
|
-
inset: 0;
|
|
3438
|
-
z-index: 3;
|
|
3439
|
-
overflow: hidden;
|
|
3440
|
-
pointer-events: none;
|
|
3441
|
-
}
|
|
3442
|
-
|
|
3443
|
-
.dpk-grill-badge {
|
|
3444
|
-
position: absolute;
|
|
3445
|
-
display: inline-flex;
|
|
3446
|
-
align-items: center;
|
|
3447
|
-
justify-content: center;
|
|
3448
|
-
min-width: 30px;
|
|
3449
|
-
height: 22px;
|
|
3450
|
-
padding: 0 7px;
|
|
3451
|
-
border: 2px solid var(--dpk-paper-raised);
|
|
3452
|
-
border-radius: 999px;
|
|
3453
|
-
background: linear-gradient(180deg, var(--dpk-accent-bright), var(--dpk-accent));
|
|
3454
|
-
color: var(--dpk-accent-ink);
|
|
3455
|
-
font-family: var(--dpk-mono);
|
|
3456
|
-
font-size: 10px;
|
|
3457
|
-
font-weight: 650;
|
|
3458
|
-
font-variant-numeric: tabular-nums;
|
|
3459
|
-
box-shadow:
|
|
3460
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.28),
|
|
3461
|
-
0 2px 6px -2px color-mix(in srgb, var(--dpk-accent) 55%, transparent);
|
|
3462
|
-
cursor: pointer;
|
|
3463
|
-
pointer-events: auto;
|
|
3464
|
-
transition:
|
|
3465
|
-
transform 160ms var(--dpk-ease-spring),
|
|
3466
|
-
box-shadow 160ms var(--dpk-ease),
|
|
3467
|
-
background 160ms var(--dpk-ease);
|
|
3468
|
-
}
|
|
3469
|
-
|
|
3470
|
-
.dpk-grill-badge[data-visible='false'] {
|
|
3471
|
-
visibility: hidden;
|
|
3472
|
-
}
|
|
3473
|
-
|
|
3474
|
-
.dpk-grill-badge:hover {
|
|
3475
|
-
transform: translateY(-1px) scale(1.06);
|
|
3476
|
-
box-shadow:
|
|
3477
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.3),
|
|
3478
|
-
0 4px 10px -2px color-mix(in srgb, var(--dpk-accent) 60%, transparent);
|
|
3479
|
-
}
|
|
3480
|
-
|
|
3481
|
-
.dpk-grill-badge[data-answered='true'] {
|
|
3482
|
-
background: linear-gradient(180deg, color-mix(in srgb, var(--dpk-green) 85%, white), var(--dpk-green));
|
|
3483
|
-
}
|
|
3484
|
-
|
|
3485
|
-
.dpk-grill-badge[aria-pressed='true'] {
|
|
3486
|
-
box-shadow:
|
|
3487
|
-
0 0 0 2px color-mix(in srgb, var(--dpk-accent) 45%, transparent),
|
|
3488
|
-
var(--dpk-shadow-sm);
|
|
3489
|
-
}
|
|
3490
|
-
|
|
3491
|
-
.dpk-grill-badge:focus-visible {
|
|
3492
|
-
outline: none;
|
|
3493
|
-
box-shadow: var(--dpk-focus);
|
|
3494
|
-
}
|
|
3495
|
-
|
|
3496
|
-
/* The template's name repeats the mark above the title; the title needs the room more. */
|
|
3497
|
-
@media (max-width: 1100px) {
|
|
3498
|
-
.dpk-header-meta > .dpk-meta-name {
|
|
3499
|
-
display: none;
|
|
3500
|
-
}
|
|
3501
|
-
}
|
|
3502
|
-
|
|
3503
|
-
@media (max-width: 720px) {
|
|
3504
|
-
/* The version select stays: it is the reader's only way to switch versions. */
|
|
3505
|
-
.dpk-header-meta > :not(.dpk-version) {
|
|
3506
|
-
display: none;
|
|
3507
|
-
}
|
|
3508
|
-
|
|
3509
|
-
/* On a phone the row may be narrower than the select: it gives up its width. */
|
|
3510
|
-
.dpk-header-meta {
|
|
3511
|
-
min-width: 0;
|
|
3512
|
-
max-width: 100%;
|
|
3513
|
-
}
|
|
3514
|
-
|
|
3515
|
-
.dpk-header-meta > .dpk-version {
|
|
3516
|
-
display: flex;
|
|
3517
|
-
min-width: 0;
|
|
3518
|
-
}
|
|
3519
|
-
|
|
3520
|
-
.dpk-header-meta .dpk-version-select {
|
|
3521
|
-
width: 100%;
|
|
3522
|
-
min-width: 0;
|
|
3523
|
-
text-overflow: ellipsis;
|
|
3524
|
-
}
|
|
3525
|
-
|
|
3526
|
-
/* The title takes the first row whole; the version select and tools wrap below it. */
|
|
3527
|
-
.dpk-title {
|
|
3528
|
-
flex: 1 0 100%;
|
|
3529
|
-
}
|
|
3530
|
-
|
|
3531
|
-
.dpk-brand {
|
|
3532
|
-
display: none;
|
|
3533
|
-
}
|
|
3534
|
-
|
|
3535
|
-
/* The page's own content goes last, so a long one cannot push the version
|
|
3536
|
-
select and tools below it. */
|
|
3537
|
-
.dpk-header-slot {
|
|
3538
|
-
order: 1;
|
|
3539
|
-
}
|
|
3540
|
-
}
|
|
3541
|
-
`],Ws="supplement",ja="memo",yg=(t,e)=>[...t.children].filter(n=>n.getAttribute("slot")===Ws).map(n=>{const s=n.getAttribute("data-name")?.trim()??"";return{name:s===""?e:s,element:n}}),wg=(t,e)=>`.dpk-supplements-body ::slotted(:not(:nth-child(${[...t.children].indexOf(e.element)+1}))) { display: none !important; }`,$g={selected:null,open:!1},Sg=(t,e)=>t.open?e.find(n=>n.element===t.selected)??null:null,Ag=(t,e)=>({selected:e,open:!(t.open&&t.selected===e)}),Tg=(t,e)=>t.open?{...t,open:!1}:{selected:e.some(s=>s.element===t.selected)?t.selected:e[0]?.element??null,open:!0},Cg=30,Eg=Ge(v(),O({base:v(),value:v()})),qa=t=>{const e=C(Eg,t);return e.success?e.output:null},Rg=t=>t.key===void 0?JSON.stringify(["field",t.hosts,t.name,t.base]):JSON.stringify(["key",t.key,t.name]),_g=(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-Cg)))},Og=(t,e)=>{if(!(e in t))return t;const{[e]:n,...s}=t;return s},Lg=(t,e,n)=>{const s=t[e];return s===void 0||s.base!==n||s.value===n?null:s.value},Pg=new Set(["text","search","url","email","tel"]),Ba=t=>t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&Pg.has(t.type)?t:null,zg=(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},Mg=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)}},Ig=t=>t.composedPath().find(e=>e instanceof Element&&e.hasAttribute("data-dpk-text-discard"))??null,Ng=(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[]},Dg=t=>t.getAttribute("aria-label")??(t.placeholder||t.name||t.localName),Gs=t=>typeof t=="string"?[t]:Array.isArray(t)?t.flatMap(Gs):typeof t=="object"&&t!==null?Object.values(t).flatMap(Gs):[],Ha=t=>t.replace(/\s+/g," ").trim();class jg{#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()?cf(qa):he(qa),this.#r=this.#t.storageKey()),this.#e.addEventListener("focusin",this.#l),this.#e.addEventListener("input",this.#p),this.#e.addEventListener("click",this.#a,!0)}hostDisconnected(){this.#e.removeEventListener("focusin",this.#l),this.#e.removeEventListener("input",this.#p),this.#e.removeEventListener("click",this.#a,!0)}settle(e){const n=new Set(e.flatMap(Gs).map(Ha));this.#o([...this.#i].filter(s=>n.has(Ha(s.value))))}#o(e){for(const n of e){this.#i.delete(n);const s=this.#s.get(n);s!==void 0&&this.#m(Og(this.#h(),s.id))}}#a=e=>{const n=Ig(e);n!==null&&this.#o(Ng(n,this.#i))};#l=e=>{const n=Ba(e.composedPath()[0]);if(n===null||this.#i.has(n))return;const s=zg(this.#e,n);if(s===null)return;const r=Mg(n),i=n.value,o=Rg({...r===void 0?{}:{key:r},hosts:s,name:Dg(n),base:i});this.#s.set(n,{id:o,base:i});const a=Lg(this.#h(),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}))}})};#p=e=>{const n=Ba(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(_g(this.#h(),s.id,{base:s.base,value:n.value}))}};#h(){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 qg{#e;#t;#n;#r=null;#s=!1;constructor(e,n={}){this.#e=e,this.#t=n.fetchVersions??Eo,this.#n=n.switchTo??Ro,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=Co({current:X,requested:ys(location.search)!==null,published:this.#r,text:{pinned:n.versionPinned,latest:n.versionLatest}}),r=()=>this.load();return m`<span class="dpk-version"
|
|
3542
|
-
>dev-process-kit@<select
|
|
3543
|
-
class="dpk-version-select"
|
|
3544
|
-
aria-label=${n.versionLabel}
|
|
3545
|
-
title=${n.versionLabel}
|
|
3546
|
-
@pointerenter=${r}
|
|
3547
|
-
@focus=${r}
|
|
3548
|
-
@change=${$s(i=>this.pick(i))}
|
|
3549
|
-
>
|
|
3550
|
-
${s.options.map(i=>m`<option value=${i.value} ?selected=${i.value===s.value}>${i.label}</option>`)}
|
|
3551
|
-
</select></span
|
|
3552
|
-
>`}}const Vs=`script[type="application/json"]:not([${_o}]):not([${os}])`,Bg=`script[type="application/json"][${os}]`,Hg=30,Ua={width:360,height:480},Ks="dpk-review",Fa=t=>{try{return t.matches(":popover-open")}catch{return!1}},Ug=()=>new Promise(t=>requestAnimationFrame(()=>t()));class Fg extends me{static{this.styles=Da}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.#Se(e,n),next:e=>this.#ee(e),pickRound:e=>{this.#r=e,this.#i=null,this.requestUpdate()}};#l=!1;#p=new eg(this);#h=$g;#m=new Af(this,()=>this.storage!=="off"&&this.storage!=="memory");#y=new $f(this);#k=new Kf(this);#v=new xg(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",template:()=>this.#U,layout:()=>this.sidebarLayout});#u=new bg(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",template:()=>this.#U});#A=new Jf(this);#g=new jg(this,{persist:()=>this.storage!=="off"&&this.storage!=="memory",storageKey:()=>`${this.storageKey??kn(this.#U)}:unsent-text`});#b=null;#f=new hf(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===xn||n.classList.contains("dpk-bell"))),show:e=>{this.#Re(e)}});#w={toggleList:()=>this.#f.toggleList(),openList:()=>this.#f.send({kind:"open-list"}),show:e=>this.#f.show(e),dismiss:e=>this.#f.send({kind:"close-toast",key:e}),readAll:()=>this.#f.send({kind:"read-all"}),pause:e=>this.#f.pause(e),resume:e=>this.#f.resume(e)};#E=new vo(this);#G={toggle:()=>{this.settingsOpen=!this.settingsOpen},flip:e=>{this.dispatch(e)}};constructor(){super(),this.settingsOpen=!1,new dg(this,{surface:()=>this.renderRoot.querySelector(`#${Ks}`),anchor:()=>this.renderRoot.querySelector(".dpk-header-actions"),open:()=>this.notesOpen,close:()=>{this.notesOpen=!1}}),new jf(this,{active:()=>this.#e.questions.length>0,layers:()=>Array.from(this.renderRoot.querySelectorAll(".dpk-grill-badges")),bindings:()=>this.#o}),new xo(this,{open:()=>this.settingsOpen,closesOn:e=>!e.some(n=>n instanceof Element&&(n.id===wn||n.matches(".dpk-settings-trigger"))),ownsEscape:()=>!0,dismiss:()=>{this.settingsOpen=!1}})}#M=!1;#me=new qg(this);#V=new Qf(this,()=>this.storage!=="off"&&this.storage!=="memory",()=>{this.#d?.setTemplate(this.definition),this.#d?.setGrill({grill:this.#e,locale:this.locale})});#I;#d;#$=mt;#N=null;#D=new Set;#O=null;#K;#R;#L;#P=[];#Q;#ke=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=oa(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.#pe),this.addEventListener("click",this.#ge),this.addEventListener("dpk-comment-targets-change",this.#S),this.addEventListener("dpk-comment-request",this.#he),this.addEventListener("dpk-comment-submit",this.#ue),this.addEventListener("dpk-element-action",this.#fe),this.#L??=new MutationObserver(this.#S),this.#S()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("hashchange",this.#pe),this.removeEventListener("click",this.#ge),this.#R?.disconnect(),this.#L?.disconnect(),this.removeEventListener("dpk-comment-targets-change",this.#S),this.removeEventListener("dpk-comment-request",this.#he),this.removeEventListener("dpk-comment-submit",this.#ue),this.removeEventListener("dpk-element-action",this.#fe)}#q(e=0){if(this.#d){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.#d?.subscribe(()=>this.#He()))}willUpdate(){const e=this.#x();this.dataset.theme=e?.theme()??this.#m.resolve(St(this.theme)),e!==null&&this.#d&&this.#j!==e.locale()&&(this.#j=e.locale(),this.#d.setTemplate(this.definition))}updated(){this.#We(),this.#Fe(),this.#Ee(),this.#xe(),this.#Ae(),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.#d)throw new Error(`<${this.tagName.toLowerCase()}> is not initialized yet`);return this.#d}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.#ae(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.#ae(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.#le(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.#le(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.#oe(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:ns(this.derivation.actions),anchor:this})}renderReviewPanel(e){return m`<dpk-component-comment-panel
|
|
3553
|
-
.definition=${this.controller.definition}
|
|
3554
|
-
.state=${e.state}
|
|
3555
|
-
.navigation=${e.navigation}
|
|
3556
|
-
.derivation=${this.derivation}
|
|
3557
|
-
.issues=${this.controller.lastIssues}
|
|
3558
|
-
.exportBrief=${()=>this.api.exportBrief()}
|
|
3559
|
-
.sendToClaude=${this.canSendToClaude?()=>this.sendToClaude():void 0}
|
|
3560
|
-
.pendingTarget=${this.#N}
|
|
3561
|
-
.section=${this.#_==="questions"?null:this.#_}
|
|
3562
|
-
.onDelete=${n=>this.removeAction(n)}
|
|
3563
|
-
.onEditComment=${(n,s)=>this.editComment(n,s)}
|
|
3564
|
-
.onClear=${()=>this.clearActions()}
|
|
3565
|
-
.onComment=${(n,s)=>{const r=this.dispatch({type:H,target:n,payload:{body:s}});return r.ok&&(this.#N=null),r}}
|
|
3566
|
-
></dpk-component-comment-panel>`}renderChrome(e,n){if(this.#c!==null)return this.#be(n);const s=e.actions.length,r=e.actions.filter(d=>d.type===H).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=If(this,this.#e,this.derivation.answers,this.notesOpen&&this.reviewSection==="questions"?Bs(this.#e,this.#n):null,(d,c)=>this.grillRefsOf(d,c));const l=this.definition.title(e.state);return m`
|
|
3567
|
-
<div class="dpk-shell" ?data-resizing=${this.#v.dragging}>
|
|
3568
|
-
<header class="dpk-header">
|
|
3569
|
-
<span class="dpk-brand" aria-hidden="true"></span>
|
|
3570
|
-
<div class="dpk-title">
|
|
3571
|
-
<span class="dpk-template-mark">${this.templateIdentity().label}</span>
|
|
3572
|
-
<h1 title=${l}>${l}</h1>
|
|
3573
|
-
</div>
|
|
3574
|
-
<div class="dpk-header-slot">
|
|
3575
|
-
${n.header??k}
|
|
3576
|
-
<slot name="header"></slot>
|
|
3577
|
-
</div>
|
|
3578
|
-
<div class="dpk-header-meta">
|
|
3579
|
-
${this.#me.render(this.locale)}
|
|
3580
|
-
<span class="dpk-meta-name">${this.templateIdentity().name}</span>
|
|
3581
|
-
</div>
|
|
3582
|
-
<div class="dpk-header-tools">
|
|
3583
|
-
${this.#Te()} ${this.#Oe()} ${this.#Le()}
|
|
3584
|
-
</div>
|
|
3585
|
-
</header>
|
|
3586
|
-
${this.#J(n)} ${this.#X(n)}
|
|
3587
|
-
${this.#ve(e,a,r)} ${this.#we(e)}
|
|
3588
|
-
${this.#_e(s)} ${this.#Ce()}
|
|
3589
|
-
</div>
|
|
3590
|
-
`}#be(e){this.#o=[];const n=e.header!==void 0&&e.header!==k||this.querySelector(':scope > [slot="header"]')!==null;return m`
|
|
3591
|
-
<div class="dpk-shell" data-board ?data-resizing=${this.#v.dragging}>
|
|
3592
|
-
<div class="dpk-board-bar" ?hidden=${!n}>
|
|
3593
|
-
<div class="dpk-header-slot">
|
|
3594
|
-
${e.header??k}
|
|
3595
|
-
<slot name="header"></slot>
|
|
3596
|
-
</div>
|
|
3597
|
-
</div>
|
|
3598
|
-
${this.#J(e)} ${this.#X(e)}
|
|
3599
|
-
</div>
|
|
3600
|
-
`}#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.#u.drawerOpen:this.#u.collapsed),a=s?k:this.#ze(o,i);return m`<div class="dpk-body" data-sidebar-side=${r} ?data-sidebar-drawer=${i}>
|
|
3601
|
-
${r==="right"?a:k}
|
|
3602
|
-
<aside
|
|
3603
|
-
id="dpk-sidebar"
|
|
3604
|
-
class="dpk-sidebar"
|
|
3605
|
-
?hidden=${s||o}
|
|
3606
|
-
style=${`--dpk-sidebar-width: ${this.#v.width}px`}
|
|
3607
|
-
>
|
|
3608
|
-
<div class="dpk-sidebar-body">
|
|
3609
|
-
${e.sidebar??k}
|
|
3610
|
-
<slot name="sidebar"></slot>
|
|
3611
|
-
${this.#ne("sidebar")}
|
|
3612
|
-
</div>
|
|
3613
|
-
</aside>
|
|
3614
|
-
${r==="left"?a:k}
|
|
3615
|
-
${i&&!o&&!s?m`<div class="dpk-sidebar-scrim" @click=${()=>this.#u.closeDrawer()}></div>`:k}
|
|
3616
|
-
<main class="dpk-main">
|
|
3617
|
-
<div
|
|
3618
|
-
class="dpk-main-body"
|
|
3619
|
-
?data-grill-gutter=${this.#o.some(l=>this.contains(l.target)&&this.#te(l)==="main")}
|
|
3620
|
-
>
|
|
3621
|
-
${this.#O?m`<div class="dpk-banner" role="alert">
|
|
3622
|
-
<strong>${n.baseDataError}</strong>
|
|
3623
|
-
<code>${this.#O}</code>
|
|
3624
|
-
</div>`:k}
|
|
3625
|
-
${this.#t===null?k:m`<div class="dpk-banner" role="alert">
|
|
3626
|
-
<strong>${n.grillError}</strong>
|
|
3627
|
-
<code>${this.#t}</code>
|
|
3628
|
-
</div>`}
|
|
3629
|
-
${this.#f.error===null?k:m`<div class="dpk-banner" role="alert">
|
|
3630
|
-
<strong>${n.changesError}</strong>
|
|
3631
|
-
<code>${this.#f.error}</code>
|
|
3632
|
-
</div>`}
|
|
3633
|
-
${e.main??k}
|
|
3634
|
-
<slot name="main"></slot>
|
|
3635
|
-
<section class="dpk-orphans" ?hidden=${this.#p.orphans===0}>
|
|
3636
|
-
<p class="dpk-label">previews without metadata</p>
|
|
3637
|
-
<slot name="preview"></slot>
|
|
3638
|
-
</section>
|
|
3639
|
-
${this.#ne("main")}
|
|
3640
|
-
</div>
|
|
3641
|
-
${this.#Ue(n)}
|
|
3642
|
-
</main>
|
|
3643
|
-
</div>`}#X(e){return e.footer||this.hasFooterContent()?m`<footer class="dpk-footer">
|
|
3644
|
-
${e.footer??k}
|
|
3645
|
-
<slot name="footer"></slot>
|
|
3646
|
-
</footer>`:k}#ve(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">
|
|
3647
|
-
${i?za(this.settingsOpen,o,this.#G):k}
|
|
3648
|
-
${i&&this.settingsOpen?Ma(r,o,this.#G):k}
|
|
3649
|
-
${this.#ye(n,s)}
|
|
3650
|
-
</div>`}#xe(){const e=this.renderRoot.querySelector(`#${wn}`),n=this.renderRoot.querySelector(`.${La}`),s=n??this.renderRoot.querySelector(".dpk-header-actions");!e||!s||Fa(e)||this.#E.open(e,s,{width:Pa.width,height:Math.min(Pa.height,window.innerHeight-96)},{placement:n===null?"bottom-end":"bottom-start"})}#ye(e,n){const s=L(this.locale),r=(a,l,d,c)=>{const p=this.notesOpen&&this.#_===a;return m`<button
|
|
3651
|
-
class="dpk-header-action dpk-review-toggle"
|
|
3652
|
-
type="button"
|
|
3653
|
-
data-section=${a}
|
|
3654
|
-
aria-controls=${Ks}
|
|
3655
|
-
aria-pressed=${p?"true":"false"}
|
|
3656
|
-
aria-label=${`${l} (${c??0})`}
|
|
3657
|
-
data-tooltip=${l}
|
|
3658
|
-
@click=${()=>{this.notesOpen=!p,this.reviewSection=a}}
|
|
3659
|
-
>
|
|
3660
|
-
${d} ${c===null?k:m`<span class="dpk-review-badge">${c}</span>`}
|
|
3661
|
-
</button>`},i=a=>a>0?String(a):null,o=Ei(this.#e,this.derivation.answers);return m`<div class="dpk-review-toggles" role="group" aria-label=${s.review}>
|
|
3662
|
-
${r("changes",s.reviewChanges,up(),i(e))}
|
|
3663
|
-
${o.total===0?k:r("questions",s.grill,fp(),`${o.answered}/${o.total}`)}
|
|
3664
|
-
${r("comments",s.reviewComments,sn(),i(n))}
|
|
3665
|
-
</div>`}#we(e){const n=L(this.locale),s=this.#_,r=s==="changes"?n.reviewChanges:s==="questions"?n.grill:n.reviewComments;return m`<div
|
|
3666
|
-
id=${Ks}
|
|
3667
|
-
class="dpk-review"
|
|
3668
|
-
popover="manual"
|
|
3669
|
-
role="dialog"
|
|
3670
|
-
aria-label=${r}
|
|
3671
|
-
data-section=${s}
|
|
3672
|
-
>
|
|
3673
|
-
${s==="questions"?this.#$e(e.actions.length):k}
|
|
3674
|
-
${this.renderReviewPanel(e)}
|
|
3675
|
-
</div>`}get#_(){return this.reviewSection==="questions"&&this.#e.questions.length===0?"comments":this.reviewSection}#$e(e){const n=L(this.locale),s=Hf(n,this.#e,this.derivation.answers,{open:this.#n,round:this.#r}),r=this.#se(e,!1);return Uf(n,s,this.#a,r?m`<footer class="dpk-grill-footer">${this.#re(r)}</footer>`:k)}#B(e){this.notesOpen=!0,this.reviewSection="questions",this.#r="current",this.#n=e,this.#i=null,this.requestUpdate()}#Se(e,n){this.dispatch(yd(e,n)).ok&&(n.kind==="option"?this.#ee(e):n.kind==="free"&&n.text===""&&(this.#s=e))}#ee(e){const n=kd(this.#e,this.derivation.answers,e);n!==null&&(this.#n=n,this.requestUpdate())}#Ae(){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=Bs(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&&xs(r,s)}#te(e){const n=this.renderRoot.querySelector(".dpk-sidebar");let s=e.target;for(;s!==null&&s!==this;){if(s===n)return"sidebar";const r=s.getRootNode();s=s.assignedSlot??s.parentElement??(r instanceof ShadowRoot?r.host:null)}return"main"}#ne(e){const n=this.#o.filter(r=>this.#te(r)===e);if(n.length===0)return k;const s=L(this.locale);return m`<div class="dpk-grill-badges" data-region=${e}>
|
|
3676
|
-
${n.map(r=>m`<button
|
|
3677
|
-
type="button"
|
|
3678
|
-
class="dpk-grill-badge"
|
|
3679
|
-
data-badge=${r.index}
|
|
3680
|
-
data-answered=${String(r.answered)}
|
|
3681
|
-
data-visible="false"
|
|
3682
|
-
aria-pressed=${r.open?"true":"false"}
|
|
3683
|
-
aria-label=${s.grillOpen(`${r.ref} \xB7 ${r.title}`)}
|
|
3684
|
-
title=${`${r.ref} \xB7 ${r.title}`}
|
|
3685
|
-
@click=${()=>this.#B(r.questionId)}
|
|
3686
|
-
>
|
|
3687
|
-
${r.ref}
|
|
3688
|
-
</button>`)}
|
|
3689
|
-
</div>`}#Te(){const e=this.#f.view;if(!e)return k;const n=L(this.locale);return m`${uf(e,n,this.#w)}
|
|
3690
|
-
${gf(e,n,this.#w)}`}#Ce(){const e=this.#f.view;return e?mf(e,L(this.locale),this.#w):k}#Ee(){const e=this.renderRoot.querySelector(`#${xn}`),n=this.renderRoot.querySelector(".dpk-bell");!e||!n||Fa(e)||this.#E.open(e,n,{width:Ua.width,height:Math.min(Ua.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=au({...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===se?this.#B(r.id):this.showTarget(r);const o=I(r);for(let a=0;a<Hg;a+=1){if(await this.updateComplete,await Ug(),this.#b!==n)return;const l=Ea(this,o);if(!(l===null||l.getClientRects().length===0)){rg(this,l),ag(l);return}}}showTarget(e){}#_e(e){const n=this.#se(e,this.notesOpen);if(!n)return k;const s=L(this.locale);return m`<div class="dpk-dock" role="group" aria-label=${s.handoffLabel}>
|
|
3691
|
-
${this.#re(n)}
|
|
3692
|
-
</div>`}#se(e,n){return Ju({actions:e,railOpen:n,sendable:this.canSendToClaude,locale:this.locale},this.#k.state)}#re(e){const n=L(this.locale);return m`${e.note?m`<p class="dpk-dock-note" role="alert">${e.note}</p>`:k}
|
|
3693
|
-
<div class="dpk-dock-actions">
|
|
3694
|
-
${e.send?m`<button
|
|
3695
|
-
class="dpk-btn dpk-btn--accent"
|
|
3696
|
-
type="button"
|
|
3697
|
-
?disabled=${e.send.disabled}
|
|
3698
|
-
@click=${()=>{this.#k.send(()=>this.sendToClaude())}}
|
|
3699
|
-
>
|
|
3700
|
-
${e.send.label}
|
|
3701
|
-
</button>`:k}
|
|
3702
|
-
<button
|
|
3703
|
-
class=${e.send?"dpk-btn":"dpk-btn dpk-btn--accent"}
|
|
3704
|
-
type="button"
|
|
3705
|
-
data-status=${e.copy.status}
|
|
3706
|
-
title=${n.handoffCopyTitle}
|
|
3707
|
-
@click=${()=>{this.#k.copy(()=>this.api.exportBrief())}}
|
|
3708
|
-
>
|
|
3709
|
-
${e.copy.label}
|
|
3710
|
-
</button>
|
|
3711
|
-
</div>`}#Oe(){const e=this.locale,n=L(e).language;return m`<select
|
|
3712
|
-
class="dpk-lang-select"
|
|
3713
|
-
aria-label=${n}
|
|
3714
|
-
title=${n}
|
|
3715
|
-
@change=${$s(s=>{const r=In.find(i=>i===s);r!==void 0&&this.#V.pick(r)})}
|
|
3716
|
-
>
|
|
3717
|
-
${In.map(s=>m`<option value=${s} lang=${s} ?selected=${s===e}>
|
|
3718
|
-
${Ed[s]}
|
|
3719
|
-
</option>`)}
|
|
3720
|
-
</select>`}#Le(){const e=this.dataset.theme==="dark",n=L(this.locale),s=e?n.useLightTheme:n.useDarkTheme;return m`<button
|
|
3721
|
-
class="dpk-theme-toggle"
|
|
3722
|
-
type="button"
|
|
3723
|
-
aria-label=${s}
|
|
3724
|
-
title=${s}
|
|
3725
|
-
@click=${()=>this.#m.toggle(St(this.theme))}
|
|
3726
|
-
>
|
|
3727
|
-
${e?Sp():Ap()}
|
|
3728
|
-
</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.#ie()}${s}`:m`${s}${this.#ie()}`}#Me(e,n){const s=L(this.locale),r=mg(this.sidebarLayout.side,e),i=r.action==="collapse"?s.collapseSidebar:s.expandSidebar;return m`<button
|
|
3729
|
-
class="dpk-sidebar-toggle"
|
|
3730
|
-
type="button"
|
|
3731
|
-
aria-controls="dpk-sidebar"
|
|
3732
|
-
aria-expanded=${e?"false":"true"}
|
|
3733
|
-
aria-label=${i}
|
|
3734
|
-
title=${i}
|
|
3735
|
-
@click=${()=>{this.#M=!0,n?this.#u.toggleDrawer():this.#u.toggle()}}
|
|
3736
|
-
>
|
|
3737
|
-
${r.points==="left"?Zi():kt()}
|
|
3738
|
-
</button>`}#ie(){const e=L(this.locale),n=this.#v.handlers;return m`<div
|
|
3739
|
-
class="dpk-sidebar-resizer"
|
|
3740
|
-
role="separator"
|
|
3741
|
-
tabindex="0"
|
|
3742
|
-
aria-orientation="vertical"
|
|
3743
|
-
aria-label=${e.resizeSidebar}
|
|
3744
|
-
aria-valuemin=${ye.min}
|
|
3745
|
-
aria-valuemax=${ye.max}
|
|
3746
|
-
aria-valuenow=${this.#v.width}
|
|
3747
|
-
title=${e.resizeSidebarHint}
|
|
3748
|
-
@pointerdown=${n.pointerdown}
|
|
3749
|
-
@pointermove=${n.pointermove}
|
|
3750
|
-
@pointerup=${n.pointerup}
|
|
3751
|
-
@pointercancel=${n.pointercancel}
|
|
3752
|
-
@keydown=${n.keydown}
|
|
3753
|
-
@dblclick=${n.dblclick}
|
|
3754
|
-
></div>`}render(){if(!this.#d)return k;const e=this.#de();return this.renderChrome(e,this.renderRegions(e))}get sidebarLayout(){return hg}hasSidebarContent(){return this.querySelector('[slot="sidebar"]')!==null}hasFooterContent(){return this.querySelector('[slot="footer"]')!==null}context(){return this.#de()}#x(){return this.#c===null?null:nf(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}#oe(e,n){const s=this.#x(),r=this.#c,i=Qt(e,n);return r===null||s===null?i:Xu(i,r,s.boardIds())}#ae(e){const n=this.controller.descriptorFor(e.type)?.targetType??"page";return{...e,target:this.#oe(e.target,n)}}#le(e){const n=this.#x(),s=this.#c;return n===null||s===null?e:of(n.navigation(),s,e,n.boardIds(),this.definition.navigationHierarchy)}#W(){return{definition:this.definition,controller:()=>this.controller,derivation:()=>this.derivation,ready:this.#ke,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 lf(this.#W(),this)}#ce(){return la(this.#W())}#de(){return af(this.#W())}#C(){const e=this.#x(),n=this.#c===null?this.#$:Is(e?.navigation()??mt,this.#c);return this.#d?this.definition.resolveNavigation(this.derivation.state,n):n}#Ne(){const e=this.#qe(),n=this.#c!==null;this.#e=n?Ve:this.readGrill(),this.#De(),this.#$=n?mt:Sa(),this.#j=this.locale;const s=this.storageKey;this.#d=new Yo({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="${ja}"]`)!==null&&console.warn(`[dev-process-kit] <${this.tagName.toLowerCase()}> no longer shows slot="${ja}"; slot each piece as slot="${Ws}" data-name="\u2026" instead.`)}#je(){return this.storage==="off"?null:this.storage==="memory"?new Os:Ls()}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(Vs);if(e===null&&this.hasAttribute(ia))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()}}readGrill(){return this.#t=null,this.parseGrillScript(this.scriptOf(Bg))}parseGrillScript(e,n){if(!e?.textContent||e.textContent.trim().length===0)return Ve;try{return gd(JSON.parse(e.textContent))}catch(s){console.error(`[dev-process-kit] invalid questions${n===void 0?"":` in ${n}`}:`,s);const r=s instanceof Error?s.message:String(s);return this.#t=n===void 0?r:`${n}: ${r}`,Ve}}refreshGrill(){this.#c!==null||!this.#d||(this.#e=this.readGrill(),this.#d.setGrill({grill:this.#e,locale:this.locale}),this.requestUpdate())}grillRefsOf(e,n){return[n]}#Be(){this.scriptOf(Vs)||(this.#R=new MutationObserver(()=>{const e=this.scriptOf(Vs);if(e){this.#R?.disconnect(),this.#R=void 0,this.#c===null&&(this.#e=this.readGrill()),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.#ce();for(const n of this.#D)n(e)}#He(){if(!this.isConnected){this.requestUpdate(),this.#T();return}this.#c===null&&this.#z(!0),ma(this.#P,this.controller.actions),queueMicrotask(this.#S),this.requestUpdate(),this.#T(),this.#c===null&&this.dispatchEvent(new CustomEvent("dpk-change",{detail:this.#ce(),bubbles:!0,composed:!0}))}#z(e){if(this.#c!==null)return;const n=this.#C();this.#$=n,Xf(n,e)}#pe=()=>{this.#$=Sa(),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=Tf(this,e=>{this.isConnected&&this.#L?.observe(e,{childList:!0,subtree:!0})}),this.#d&&(ma(this.#P,this.#d.actions),this.#d.setComponentSnapshot(Ef(this.#P)))};#he=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!this.#d)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)};#ue=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!e.cancelable||!this.#d)return;const n=C(hu,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:H,target:s,payload:{body:r}}).ok&&e.preventDefault()};#fe=e=>{if(e.stopPropagation(),!(e instanceof CustomEvent)||!e.cancelable||!this.#d)return;const n=C(od,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()};#ge=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=yg(this,e.memo),s=Sg(this.#h,n),r=i=>{this.#h=i,this.requestUpdate()};return m`<div class="dpk-supplements" ?hidden=${n.length===0} ?data-open=${s!==null}>
|
|
3755
|
-
<div class="dpk-supplements-bar" role="group" aria-label=${e.supplements}>
|
|
3756
|
-
<button
|
|
3757
|
-
type="button"
|
|
3758
|
-
class="dpk-supplements-toggle"
|
|
3759
|
-
aria-expanded=${String(s!==null)}
|
|
3760
|
-
aria-controls="dpk-supplements-body"
|
|
3761
|
-
aria-label=${s===null?e.openSupplements:e.closeSupplements}
|
|
3762
|
-
@click=${()=>r(Tg(this.#h,n))}
|
|
3763
|
-
>
|
|
3764
|
-
${kt()}
|
|
3765
|
-
</button>
|
|
3766
|
-
${n.map(i=>m`<button
|
|
3767
|
-
type="button"
|
|
3768
|
-
class="dpk-supplement-tab"
|
|
3769
|
-
aria-expanded=${String(i===s)}
|
|
3770
|
-
aria-controls="dpk-supplements-body"
|
|
3771
|
-
@click=${()=>r(Ag(this.#h,i.element))}
|
|
3772
|
-
>
|
|
3773
|
-
${i.name}
|
|
3774
|
-
</button>`)}
|
|
3775
|
-
</div>
|
|
3776
|
-
<div class="dpk-supplements-body" id="dpk-supplements-body" ?hidden=${s===null}>
|
|
3777
|
-
<style .textContent=${s===null?"":wg(this,s)}></style>
|
|
3778
|
-
<slot name=${Ws} @slotchange=${()=>this.requestUpdate()}></slot>
|
|
3779
|
-
</div>
|
|
3780
|
-
</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.#p.route()}}export{wt as $,nn as A,sn as B,H as C,Xi as D,mt as E,bp as F,Gi as G,Qi as H,ds as I,Ki as J,Wi as K,Vo as L,Os as M,Xt as N,ut as O,Vc as P,en as Q,Kc as R,ns as S,Fg as T,ui as U,I as V,_s as W,Kt as X,Qt as Y,Dt as Z,So as _,ss as a,Zr as a$,Nt as a0,$l as a1,fe as a2,k as a3,m as a4,Me as a5,kp as a6,il as a7,vs as a8,me as a9,Tp as aA,xs as aB,ci as aC,di as aD,ri as aE,ti as aF,es as aG,ld as aH,B as aI,cd as aJ,Xe as aK,he as aL,Fh as aM,$s as aN,Gh as aO,mn as aP,Ee as aQ,wi as aR,Rh as aS,Ea as aT,va as aU,Jr as aV,si as aW,Wc as aX,Uc as aY,Ge as aZ,yr as a_,vo as aa,Dn as ab,wp as ac,$p as ad,Vt as ae,z as af,D as ag,j as ah,v as ai,Wt as aj,y as ak,$ as al,pi as am,Gt as an,ve as ao,G as ap,Jn as aq,kt as ar,yp as as,C as at,O as au,Yn as av,Xn as aw,xo as ax,Ep as ay,Cp as az,Yr as b,A as b0,Ui as b1,qi as b2,Bi as b3,Mn as b4,hp as b5,Cr as b6,bo as b7,it as b8,Pt as b9,bn as bA,oa as bB,Da as bC,Ms as bD,ia as bE,ra as bF,os as bG,L as bH,La as bI,za as bJ,Ma as bK,se as bL,Pn as ba,Zi as bb,Vi as bc,mp as bd,ls as be,Xr as bf,ni as bg,ii as bh,Wh as bi,Fi as bj,$o as bk,ji as bl,Hi as bm,te as bn,zs as bo,na as bp,Q as bq,Is as br,ef as bs,Ps as bt,rf as bu,aa as bv,ta as bw,sa as bx,ht as by,li as bz,Yo as c,mi as d,Qc as e,tn as f,ki as g,ft as h,Wo as i,jn as j,fi as k,Xc as l,ts as m,Ls as n,kn as o,Gc as p,Np as q,Rc as r,Dh as s,Go as t,Pe as u,X as v,Yc as w,Qe as x,xp as y,vp as z};
|