From 580e798e16346eb894eb899edac82d2efdf40adc Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sat, 18 Apr 2026 22:32:53 -0500 Subject: initial commit --- dist/assets/index-C6eIkxoh.js | 200 +++++++++++++++++++++++++++++++++++++++++ dist/assets/index-DGtPY7GZ.css | 1 + dist/index.html | 13 +++ 3 files changed, 214 insertions(+) create mode 100644 dist/assets/index-C6eIkxoh.js create mode 100644 dist/assets/index-DGtPY7GZ.css create mode 100644 dist/index.html (limited to 'dist') diff --git a/dist/assets/index-C6eIkxoh.js b/dist/assets/index-C6eIkxoh.js new file mode 100644 index 0000000..04330aa --- /dev/null +++ b/dist/assets/index-C6eIkxoh.js @@ -0,0 +1,200 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();var la={exports:{}},ul={},oa={exports:{}},D={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var lr=Symbol.for("react.element"),Nc=Symbol.for("react.portal"),Cc=Symbol.for("react.fragment"),Ec=Symbol.for("react.strict_mode"),jc=Symbol.for("react.profiler"),Tc=Symbol.for("react.provider"),Pc=Symbol.for("react.context"),$c=Symbol.for("react.forward_ref"),_c=Symbol.for("react.suspense"),Lc=Symbol.for("react.memo"),zc=Symbol.for("react.lazy"),Qi=Symbol.iterator;function Mc(e){return e===null||typeof e!="object"?null:(e=Qi&&e[Qi]||e["@@iterator"],typeof e=="function"?e:null)}var ia={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sa=Object.assign,aa={};function hn(e,t,n){this.props=e,this.context=t,this.refs=aa,this.updater=n||ia}hn.prototype.isReactComponent={};hn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};hn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ua(){}ua.prototype=hn.prototype;function Xo(e,t,n){this.props=e,this.context=t,this.refs=aa,this.updater=n||ia}var bo=Xo.prototype=new ua;bo.constructor=Xo;sa(bo,hn.prototype);bo.isPureReactComponent=!0;var Gi=Array.isArray,ca=Object.prototype.hasOwnProperty,Zo={current:null},da={key:!0,ref:!0,__self:!0,__source:!0};function fa(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)ca.call(t,r)&&!da.hasOwnProperty(r)&&(l[r]=t[r]);var s=arguments.length-2;if(s===1)l.children=n;else if(1>>1,R=E[M];if(0>>1;Ml(Ft,$))hel(Nt,Ft)?(E[M]=Nt,E[he]=$,M=he):(E[M]=Ft,E[te]=$,M=te);else if(hel(Nt,$))E[M]=Nt,E[he]=$,M=he;else break e}}return N}function l(E,N){var $=E.sortIndex-N.sortIndex;return $!==0?$:E.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var a=[],c=[],d=1,f=null,p=3,y=!1,k=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(E){for(var N=n(c);N!==null;){if(N.callback===null)r(c);else if(N.startTime<=E)r(c),N.sortIndex=N.expirationTime,t(a,N);else break;N=n(c)}}function w(E){if(v=!1,g(E),!k)if(n(a)!==null)k=!0,vn(S);else{var N=n(c);N!==null&&wn(w,N.startTime-E)}}function S(E,N){k=!1,v&&(v=!1,m(P),P=-1),y=!0;var $=p;try{for(g(N),f=n(a);f!==null&&(!(f.expirationTime>N)||E&&!Z());){var M=f.callback;if(typeof M=="function"){f.callback=null,p=f.priorityLevel;var R=M(f.expirationTime<=N);N=e.unstable_now(),typeof R=="function"?f.callback=R:f===n(a)&&r(a),g(N)}else r(a);f=n(a)}if(f!==null)var ze=!0;else{var te=n(c);te!==null&&wn(w,te.startTime-N),ze=!1}return ze}finally{f=null,p=$,y=!1}}var T=!1,C=null,P=-1,I=5,z=-1;function Z(){return!(e.unstable_now()-zE||125M?(E.sortIndex=$,t(c,E),n(a)===null&&E===n(c)&&(v?(m(P),P=-1):v=!0,wn(w,$-M))):(E.sortIndex=R,t(a,E),k||y||(k=!0,vn(S))),E},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(E){var N=p;return function(){var $=p;p=N;try{return E.apply(this,arguments)}finally{p=$}}}})(ya);ga.exports=ya;var Vc=ga.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Qc=L,Ne=Vc;function x(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),no=Object.prototype.hasOwnProperty,Gc=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Yi={},Ji={};function Kc(e){return no.call(Ji,e)?!0:no.call(Yi,e)?!1:Gc.test(e)?Ji[e]=!0:(Yi[e]=!0,!1)}function Yc(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Jc(e,t,n,r){if(t===null||typeof t>"u"||Yc(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function pe(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){le[e]=new pe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];le[t]=new pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){le[e]=new pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){le[e]=new pe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){le[e]=new pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){le[e]=new pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){le[e]=new pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){le[e]=new pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){le[e]=new pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var ei=/[\-:]([a-z])/g;function ti(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ei,ti);le[t]=new pe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ei,ti);le[t]=new pe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ei,ti);le[t]=new pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){le[e]=new pe(e,1,!1,e.toLowerCase(),null,!1,!1)});le.xlinkHref=new pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){le[e]=new pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function ni(e,t,n,r){var l=le.hasOwnProperty(t)?le[t]:null;(l!==null?l.type!==0:r||!(2s||l[i]!==o[s]){var a=` +`+l[i].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=i&&0<=s);break}}}finally{$l=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Pn(e):""}function Xc(e){switch(e.tag){case 5:return Pn(e.type);case 16:return Pn("Lazy");case 13:return Pn("Suspense");case 19:return Pn("SuspenseList");case 0:case 2:case 15:return e=_l(e.type,!1),e;case 11:return e=_l(e.type.render,!1),e;case 1:return e=_l(e.type,!0),e;default:return""}}function io(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ht:return"Fragment";case Wt:return"Portal";case ro:return"Profiler";case ri:return"StrictMode";case lo:return"Suspense";case oo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xa:return(e.displayName||"Context")+".Consumer";case wa:return(e._context.displayName||"Context")+".Provider";case li:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case oi:return t=e.displayName||null,t!==null?t:io(e.type)||"Memo";case rt:t=e._payload,e=e._init;try{return io(e(t))}catch{}}return null}function bc(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return io(t);case 8:return t===ri?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function yt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sa(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zc(e){var t=Sa(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fr(e){e._valueTracker||(e._valueTracker=Zc(e))}function Na(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Sa(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ar(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function so(e,t){var n=t.checked;return Q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=yt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ca(e,t){t=t.checked,t!=null&&ni(e,"checked",t,!1)}function ao(e,t){Ca(e,t);var n=yt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?uo(e,t.type,n):t.hasOwnProperty("defaultValue")&&uo(e,t.type,yt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function uo(e,t,n){(t!=="number"||Ar(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $n=Array.isArray;function en(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=pr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qc=["Webkit","ms","Moz","O"];Object.keys(zn).forEach(function(e){qc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zn[t]=zn[e]})});function Pa(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||zn.hasOwnProperty(e)&&zn[e]?(""+t).trim():t+"px"}function $a(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Pa(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var ed=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function po(e,t){if(t){if(ed[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(x(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(x(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(x(61))}if(t.style!=null&&typeof t.style!="object")throw Error(x(62))}}function ho(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var mo=null;function ii(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var go=null,tn=null,nn=null;function ts(e){if(e=sr(e)){if(typeof go!="function")throw Error(x(280));var t=e.stateNode;t&&(t=hl(t),go(e.stateNode,e.type,t))}}function _a(e){tn?nn?nn.push(e):nn=[e]:tn=e}function La(){if(tn){var e=tn,t=nn;if(nn=tn=null,ts(e),t)for(e=0;e>>=0,e===0?32:31-(dd(e)/fd|0)|0}var hr=64,mr=4194304;function _n(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Hr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var s=i&~l;s!==0?r=_n(s):(o&=i,o!==0&&(r=_n(o)))}else i=n&~l,i!==0?r=_n(i):o!==0&&(r=_n(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function or(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Re(t),e[t]=n}function gd(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Dn),cs=" ",ds=!1;function ba(e,t){switch(e){case"keyup":return Vd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Za(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vt=!1;function Gd(e,t){switch(e){case"compositionend":return Za(t);case"keypress":return t.which!==32?null:(ds=!0,cs);case"textInput":return e=t.data,e===cs&&ds?null:e;default:return null}}function Kd(e,t){if(Vt)return e==="compositionend"||!hi&&ba(e,t)?(e=Ja(),_r=di=st=null,Vt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ms(n)}}function nu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ru(){for(var e=window,t=Ar();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ar(e.document)}return t}function mi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function nf(e){var t=ru(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&nu(n.ownerDocument.documentElement,n)){if(r!==null&&mi(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=gs(n,o);var i=gs(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Qt=null,So=null,In=null,No=!1;function ys(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;No||Qt==null||Qt!==Ar(r)||(r=Qt,"selectionStart"in r&&mi(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),In&&Yn(In,r)||(In=r,r=Gr(So,"onSelect"),0Yt||(e.current=$o[Yt],$o[Yt]=null,Yt--)}function A(e,t){Yt++,$o[Yt]=e.current,e.current=t}var vt={},ae=xt(vt),ye=xt(!1),Lt=vt;function an(e,t){var n=e.type.contextTypes;if(!n)return vt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function ve(e){return e=e.childContextTypes,e!=null}function Yr(){B(ye),B(ae)}function Cs(e,t,n){if(ae.current!==vt)throw Error(x(168));A(ae,t),A(ye,n)}function fu(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(x(108,bc(e)||"Unknown",l));return Q({},n,r)}function Jr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vt,Lt=ae.current,A(ae,e),A(ye,ye.current),!0}function Es(e,t,n){var r=e.stateNode;if(!r)throw Error(x(169));n?(e=fu(e,t,Lt),r.__reactInternalMemoizedMergedChildContext=e,B(ye),B(ae),A(ae,e)):B(ye),A(ye,n)}var Ke=null,ml=!1,Vl=!1;function pu(e){Ke===null?Ke=[e]:Ke.push(e)}function mf(e){ml=!0,pu(e)}function kt(){if(!Vl&&Ke!==null){Vl=!0;var e=0,t=F;try{var n=Ke;for(F=1;e>=i,l-=i,Ye=1<<32-Re(t)+l|n<P?(I=C,C=null):I=C.sibling;var z=p(m,C,g[P],w);if(z===null){C===null&&(C=I);break}e&&C&&z.alternate===null&&t(m,C),h=o(z,h,P),T===null?S=z:T.sibling=z,T=z,C=I}if(P===g.length)return n(m,C),W&&Ct(m,P),S;if(C===null){for(;PP?(I=C,C=null):I=C.sibling;var Z=p(m,C,z.value,w);if(Z===null){C===null&&(C=I);break}e&&C&&Z.alternate===null&&t(m,C),h=o(Z,h,P),T===null?S=Z:T.sibling=Z,T=Z,C=I}if(z.done)return n(m,C),W&&Ct(m,P),S;if(C===null){for(;!z.done;P++,z=g.next())z=f(m,z.value,w),z!==null&&(h=o(z,h,P),T===null?S=z:T.sibling=z,T=z);return W&&Ct(m,P),S}for(C=r(m,C);!z.done;P++,z=g.next())z=y(C,m,P,z.value,w),z!==null&&(e&&z.alternate!==null&&C.delete(z.key===null?P:z.key),h=o(z,h,P),T===null?S=z:T.sibling=z,T=z);return e&&C.forEach(function(ue){return t(m,ue)}),W&&Ct(m,P),S}function _(m,h,g,w){if(typeof g=="object"&&g!==null&&g.type===Ht&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case dr:e:{for(var S=g.key,T=h;T!==null;){if(T.key===S){if(S=g.type,S===Ht){if(T.tag===7){n(m,T.sibling),h=l(T,g.props.children),h.return=m,m=h;break e}}else if(T.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===rt&&Ps(S)===T.type){n(m,T.sibling),h=l(T,g.props),h.ref=En(m,T,g),h.return=m,m=h;break e}n(m,T);break}else t(m,T);T=T.sibling}g.type===Ht?(h=_t(g.props.children,m.mode,w,g.key),h.return=m,m=h):(w=Fr(g.type,g.key,g.props,null,m.mode,w),w.ref=En(m,h,g),w.return=m,m=w)}return i(m);case Wt:e:{for(T=g.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(m,h.sibling),h=l(h,g.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=Zl(g,m.mode,w),h.return=m,m=h}return i(m);case rt:return T=g._init,_(m,h,T(g._payload),w)}if($n(g))return k(m,h,g,w);if(xn(g))return v(m,h,g,w);Sr(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,h!==null&&h.tag===6?(n(m,h.sibling),h=l(h,g),h.return=m,m=h):(n(m,h),h=bl(g,m.mode,w),h.return=m,m=h),i(m)):n(m,h)}return _}var cn=yu(!0),vu=yu(!1),Zr=xt(null),qr=null,bt=null,wi=null;function xi(){wi=bt=qr=null}function ki(e){var t=Zr.current;B(Zr),e._currentValue=t}function zo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ln(e,t){qr=e,wi=bt=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ge=!0),e.firstContext=null)}function _e(e){var t=e._currentValue;if(wi!==e)if(e={context:e,memoizedValue:t,next:null},bt===null){if(qr===null)throw Error(x(308));bt=e,qr.dependencies={lanes:0,firstContext:e}}else bt=bt.next=e;return t}var Tt=null;function Si(e){Tt===null?Tt=[e]:Tt.push(e)}function wu(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Si(t)):(n.next=l.next,l.next=n),t.interleaved=n,qe(e,r)}function qe(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var lt=!1;function Ni(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Xe(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,O&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,qe(e,n)}return l=r.interleaved,l===null?(t.next=t,Si(r)):(t.next=l.next,l.next=t),r.interleaved=t,qe(e,n)}function zr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ai(e,n)}}function $s(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function el(e,t,n,r){var l=e.updateQueue;lt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var a=s,c=a.next;a.next=null,i===null?o=c:i.next=c,i=a;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==i&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=a))}if(o!==null){var f=l.baseState;i=0,d=c=a=null,s=o;do{var p=s.lane,y=s.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:y,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var k=e,v=s;switch(p=t,y=n,v.tag){case 1:if(k=v.payload,typeof k=="function"){f=k.call(y,f,p);break e}f=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=v.payload,p=typeof k=="function"?k.call(y,f,p):k,p==null)break e;f=Q({},f,p);break e;case 2:lt=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[s]:p.push(s))}else y={eventTime:y,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=y,a=f):d=d.next=y,i|=p;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;p=s,s=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(d===null&&(a=f),l.baseState=a,l.firstBaseUpdate=c,l.lastBaseUpdate=d,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);Dt|=i,e.lanes=i,e.memoizedState=f}}function _s(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Gl.transition;Gl.transition={};try{e(!1),t()}finally{F=n,Gl.transition=r}}function Ru(){return Le().memoizedState}function wf(e,t,n){var r=mt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Fu(e))Au(t,n);else if(n=wu(e,t,n,r),n!==null){var l=de();Fe(n,e,r,l),Uu(n,t,r)}}function xf(e,t,n){var r=mt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fu(e))Au(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,s=o(i,n);if(l.hasEagerState=!0,l.eagerState=s,Ae(s,i)){var a=t.interleaved;a===null?(l.next=l,Si(t)):(l.next=a.next,a.next=l),t.interleaved=l;return}}catch{}finally{}n=wu(e,t,l,r),n!==null&&(l=de(),Fe(n,e,r,l),Uu(n,t,r))}}function Fu(e){var t=e.alternate;return e===V||t!==null&&t===V}function Au(e,t){Rn=nl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Uu(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ai(e,n)}}var rl={readContext:_e,useCallback:oe,useContext:oe,useEffect:oe,useImperativeHandle:oe,useInsertionEffect:oe,useLayoutEffect:oe,useMemo:oe,useReducer:oe,useRef:oe,useState:oe,useDebugValue:oe,useDeferredValue:oe,useTransition:oe,useMutableSource:oe,useSyncExternalStore:oe,useId:oe,unstable_isNewReconciler:!1},kf={readContext:_e,useCallback:function(e,t){return We().memoizedState=[e,t===void 0?null:t],e},useContext:_e,useEffect:zs,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Dr(4194308,4,zu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dr(4,2,e,t)},useMemo:function(e,t){var n=We();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=We();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=wf.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=We();return e={current:e},t.memoizedState=e},useState:Ls,useDebugValue:Li,useDeferredValue:function(e){return We().memoizedState=e},useTransition:function(){var e=Ls(!1),t=e[0];return e=vf.bind(null,e[1]),We().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=V,l=We();if(W){if(n===void 0)throw Error(x(407));n=n()}else{if(n=t(),ee===null)throw Error(x(349));Mt&30||Cu(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,zs(ju.bind(null,r,o,e),[e]),r.flags|=2048,nr(9,Eu.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=We(),t=ee.identifierPrefix;if(W){var n=Je,r=Ye;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=er++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[He]=t,e[bn]=r,Xu(e,t,!1,!1),t.stateNode=e;e:{switch(i=ho(n,r),n){case"dialog":U("cancel",e),U("close",e),l=r;break;case"iframe":case"object":case"embed":U("load",e),l=r;break;case"video":case"audio":for(l=0;lpn&&(t.flags|=128,r=!0,jn(o,!1),t.lanes=4194304)}else{if(!r)if(e=tl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),jn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!W)return ie(t),null}else 2*K()-o.renderingStartTime>pn&&n!==1073741824&&(t.flags|=128,r=!0,jn(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=K(),t.sibling=null,n=H.current,A(H,r?n&1|2:n&1),t):(ie(t),null);case 22:case 23:return Ri(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?xe&1073741824&&(ie(t),t.subtreeFlags&6&&(t.flags|=8192)):ie(t),null;case 24:return null;case 25:return null}throw Error(x(156,t.tag))}function $f(e,t){switch(yi(t),t.tag){case 1:return ve(t.type)&&Yr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dn(),B(ye),B(ae),ji(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ei(t),null;case 13:if(B(H),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(x(340));un()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(H),null;case 4:return dn(),null;case 10:return ki(t.type._context),null;case 22:case 23:return Ri(),null;case 24:return null;default:return null}}var Cr=!1,se=!1,_f=typeof WeakSet=="function"?WeakSet:Set,j=null;function Zt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){G(e,t,r)}else n.current=null}function Bo(e,t,n){try{n()}catch(r){G(e,t,r)}}var Hs=!1;function Lf(e,t){if(Co=Vr,e=ru(),mi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,s=-1,a=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var y;f!==n||l!==0&&f.nodeType!==3||(s=i+l),f!==o||r!==0&&f.nodeType!==3||(a=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(y=f.firstChild)!==null;)p=f,f=y;for(;;){if(f===e)break t;if(p===n&&++c===l&&(s=i),p===o&&++d===r&&(a=i),(y=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=y}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Eo={focusedElem:e,selectionRange:n},Vr=!1,j=t;j!==null;)if(t=j,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,j=e;else for(;j!==null;){t=j;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var v=k.memoizedProps,_=k.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:De(t.type,v),_);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(w){G(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,j=e;break}j=t.return}return k=Hs,Hs=!1,k}function Fn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Bo(t,n,o)}l=l.next}while(l!==r)}}function vl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Wo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function qu(e){var t=e.alternate;t!==null&&(e.alternate=null,qu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[He],delete t[bn],delete t[Po],delete t[pf],delete t[hf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ec(e){return e.tag===5||e.tag===3||e.tag===4}function Vs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ec(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ho(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kr));else if(r!==4&&(e=e.child,e!==null))for(Ho(e,t,n),e=e.sibling;e!==null;)Ho(e,t,n),e=e.sibling}function Vo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Vo(e,t,n),e=e.sibling;e!==null;)Vo(e,t,n),e=e.sibling}var ne=null,Oe=!1;function nt(e,t,n){for(n=n.child;n!==null;)tc(e,t,n),n=n.sibling}function tc(e,t,n){if(Ve&&typeof Ve.onCommitFiberUnmount=="function")try{Ve.onCommitFiberUnmount(cl,n)}catch{}switch(n.tag){case 5:se||Zt(n,t);case 6:var r=ne,l=Oe;ne=null,nt(e,t,n),ne=r,Oe=l,ne!==null&&(Oe?(e=ne,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ne.removeChild(n.stateNode));break;case 18:ne!==null&&(Oe?(e=ne,n=n.stateNode,e.nodeType===8?Hl(e.parentNode,n):e.nodeType===1&&Hl(e,n),Gn(e)):Hl(ne,n.stateNode));break;case 4:r=ne,l=Oe,ne=n.stateNode.containerInfo,Oe=!0,nt(e,t,n),ne=r,Oe=l;break;case 0:case 11:case 14:case 15:if(!se&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Bo(n,t,i),l=l.next}while(l!==r)}nt(e,t,n);break;case 1:if(!se&&(Zt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){G(n,t,s)}nt(e,t,n);break;case 21:nt(e,t,n);break;case 22:n.mode&1?(se=(r=se)||n.memoizedState!==null,nt(e,t,n),se=r):nt(e,t,n);break;default:nt(e,t,n)}}function Qs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _f),t.forEach(function(r){var l=Uf.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Me(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=K()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Mf(r/1960))-r,10e?16:e,at===null)var r=!1;else{if(e=at,at=null,il=0,O&6)throw Error(x(331));var l=O;for(O|=4,j=e.current;j!==null;){var o=j,i=o.child;if(j.flags&16){var s=o.deletions;if(s!==null){for(var a=0;aK()-Oi?$t(e,0):Di|=n),we(e,t)}function uc(e,t){t===0&&(e.mode&1?(t=mr,mr<<=1,!(mr&130023424)&&(mr=4194304)):t=1);var n=de();e=qe(e,t),e!==null&&(or(e,t,n),we(e,n))}function Af(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),uc(e,n)}function Uf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(x(314))}r!==null&&r.delete(t),uc(e,n)}var cc;cc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ye.current)ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ge=!1,Tf(e,t,n);ge=!!(e.flags&131072)}else ge=!1,W&&t.flags&1048576&&hu(t,br,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Or(e,t),e=t.pendingProps;var l=an(t,ae.current);ln(t,n),l=Pi(null,t,r,e,l,n);var o=$i();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ve(r)?(o=!0,Jr(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ni(t),l.updater=yl,t.stateNode=l,l._reactInternals=t,Do(t,r,e,n),t=Ro(null,t,r,!0,o,n)):(t.tag=0,W&&o&&gi(t),ce(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Or(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Wf(r),e=De(r,e),l){case 0:t=Io(null,t,r,e,n);break e;case 1:t=Us(null,t,r,e,n);break e;case 11:t=Fs(null,t,r,e,n);break e;case 14:t=As(null,t,r,De(r.type,e),n);break e}throw Error(x(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:De(r,l),Io(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:De(r,l),Us(e,t,r,l,n);case 3:e:{if(Ku(t),e===null)throw Error(x(387));r=t.pendingProps,o=t.memoizedState,l=o.element,xu(e,t),el(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=fn(Error(x(423)),t),t=Bs(e,t,r,n,l);break e}else if(r!==l){l=fn(Error(x(424)),t),t=Bs(e,t,r,n,l);break e}else for(ke=ft(t.stateNode.containerInfo.firstChild),Se=t,W=!0,Ie=null,n=vu(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(un(),r===l){t=et(e,t,n);break e}ce(e,t,r,n)}t=t.child}return t;case 5:return ku(t),e===null&&Lo(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,jo(r,l)?i=null:o!==null&&jo(r,o)&&(t.flags|=32),Gu(e,t),ce(e,t,i,n),t.child;case 6:return e===null&&Lo(t),null;case 13:return Yu(e,t,n);case 4:return Ci(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=cn(t,null,r,n):ce(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:De(r,l),Fs(e,t,r,l,n);case 7:return ce(e,t,t.pendingProps,n),t.child;case 8:return ce(e,t,t.pendingProps.children,n),t.child;case 12:return ce(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,A(Zr,r._currentValue),r._currentValue=i,o!==null)if(Ae(o.value,i)){if(o.children===l.children&&!ye.current){t=et(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){i=o.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Xe(-1,n&-n),a.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?a.next=a:(a.next=d.next,d.next=a),c.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),zo(o.return,n,t),s.lanes|=n;break}a=a.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(x(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),zo(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}ce(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,ln(t,n),l=_e(l),r=r(l),t.flags|=1,ce(e,t,r,n),t.child;case 14:return r=t.type,l=De(r,t.pendingProps),l=De(r.type,l),As(e,t,r,l,n);case 15:return Vu(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:De(r,l),Or(e,t),t.tag=1,ve(r)?(e=!0,Jr(t)):e=!1,ln(t,n),Bu(t,r,l),Do(t,r,l,n),Ro(null,t,r,!0,e,n);case 19:return Ju(e,t,n);case 22:return Qu(e,t,n)}throw Error(x(156,t.tag))};function dc(e,t){return Fa(e,t)}function Bf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pe(e,t,n,r){return new Bf(e,t,n,r)}function Ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wf(e){if(typeof e=="function")return Ai(e)?1:0;if(e!=null){if(e=e.$$typeof,e===li)return 11;if(e===oi)return 14}return 2}function gt(e,t){var n=e.alternate;return n===null?(n=Pe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Fr(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Ai(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ht:return _t(n.children,l,o,t);case ri:i=8,l|=8;break;case ro:return e=Pe(12,n,t,l|2),e.elementType=ro,e.lanes=o,e;case lo:return e=Pe(13,n,t,l),e.elementType=lo,e.lanes=o,e;case oo:return e=Pe(19,n,t,l),e.elementType=oo,e.lanes=o,e;case ka:return xl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wa:i=10;break e;case xa:i=9;break e;case li:i=11;break e;case oi:i=14;break e;case rt:i=16,r=null;break e}throw Error(x(130,e==null?e:typeof e,""))}return t=Pe(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function _t(e,t,n,r){return e=Pe(7,e,r,t),e.lanes=n,e}function xl(e,t,n,r){return e=Pe(22,e,r,t),e.elementType=ka,e.lanes=n,e.stateNode={isHidden:!1},e}function bl(e,t,n){return e=Pe(6,e,null,t),e.lanes=n,e}function Zl(e,t,n){return t=Pe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hf(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zl(0),this.expirationTimes=zl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ui(e,t,n,r,l,o,i,s,a){return e=new Hf(e,t,n,s,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Pe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ni(o),e}function Vf(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mc)}catch(e){console.error(e)}}mc(),ma.exports=Ce;var gc=ma.exports,yc,qs=gc;yc=qs.createRoot,qs.hydrateRoot;function Jf(e){const t=e.toLowerCase();return/\b(dev|developer|tool|cli|sdk|api|library|lib|framework|plugin|compiler|linter|utility)\b/.test(t)?"developer":/\b(design|creative|studio|agency|art|visual|branding|illustration|photography)\b/.test(t)?"creative":/\b(saas|platform|service|app|software|product|startup|dashboard)\b/.test(t)?"product":/\b(consult|advisory|freelance|firm|practice|coach|training)\b/.test(t)?"services":/\b(personal|portfolio|blog|brand|me|writer|designer|maker|creator)\b/.test(t)?"personal":"general"}function Xf(e){const t=Jf(e.category),n=l=>e.tone.some(o=>o.toLowerCase().includes(l.toLowerCase())),r=l=>e.avoid.some(o=>o.toLowerCase().includes(l.toLowerCase()));return{name:e.name.trim()||"Untitled",category:e.category.trim()||"project",purpose:e.purpose.trim()||"solve a specific problem",audience:e.audience.trim()||"its intended users",tone:e.tone,avoid:e.avoid,notes:e.notes.trim(),catType:t,hasTone:n,hasAvoid:r}}function El(e){return e[Math.floor(Math.random()*e.length)]}function yn(e,t){const n=[...e],r=[];for(;r.length0;){const l=Math.floor(Math.random()*n.length);r.push(n.splice(l,1)[0])}return r}function Y(e){return e.charAt(0).toUpperCase()+e.slice(1)}function bf(e){const{name:t,category:n,purpose:r,audience:l,catType:o}=e,i=El([`${t} is a ${n} for ${l}. ${Y(r)}.`,`A ${n} built for ${l}. ${t} is built to ${r}.`,`${t} helps ${l} ${r}.`,`${t} is a ${n} built to ${r}. Made for ${l}.`]);let s="";return e.hasTone("minimal")?s=" Nothing more.":e.hasTone("technical")?s=" Stays out of the way while doing its job.":e.hasTone("calm")?s=" Designed to reduce friction, not add to it.":e.hasTone("bold")?s=" No compromises.":e.hasTone("warm")?s=" Made with care.":o==="developer"?s=" Built to stay composable and predictable.":o==="creative"&&(s=" Work that speaks before the introduction."),i+s}function Zf(e){const{name:t,catType:n}=e,r={developer:[`${t} sits in the space between "build it yourself" and "platform lock-in." It's a workflow layer, not an abstraction. You keep control; ${t} handles the repetitive parts.`,`Most tools in this space try to do too much. ${t} doesn't. It handles exactly what it promises — then stays out of your way.`,`${t} is not a platform. It's a tool. You own the infrastructure; ${t} owns the workflow. That distinction matters.`],creative:[`${t} is defined by its process as much as its output. The work should be recognizable without a logo — that's the goal.`,`${t} occupies a deliberate position: between personal and professional, between output and craft. Not trying to be everything. Trying to be specific.`,`There's no shortage of creative work. ${t} earns attention through quality and consistency, not volume or novelty.`],product:[`${t} doesn't try to replace your existing workflow. It fits into it. The goal is to reduce friction in a specific, measurable place.`,`The space ${t} plays in has no shortage of tools. What it offers is focus — one problem, done well, with clear boundaries.`,`${t} is built for people who've tried the alternatives and found them too complicated, too expensive, or too broad.`],services:[`${t} is not a generalist practice. It works on a specific type of problem with a specific type of client. That specificity is the positioning.`,`Clients come to ${t} when they need someone who has solved this problem before. The brand should communicate experience, not aspiration.`,`${t} does one thing well and charges accordingly. Clarity of scope is the offer.`],personal:[`${t} is a deliberate presence — not a portfolio, not a platform, not a personal brand in the marketing sense. A clear point of view, consistently expressed.`,`${t} doesn't try to appeal to everyone. It's built around a specific set of interests and a specific way of working.`,`There are a lot of personal sites. ${t} is distinct by being specific — not broad, not aspirational, not trying to cover every base.`],general:[`${t} occupies a clear position: built for a specific audience with a specific need. Not trying to be everything.`,`${t} is not for everyone. That's intentional. Clarity of purpose is more valuable than breadth of appeal.`]};return El(r[n]??r.general)}function qf(e){const{name:t,purpose:n,tone:r,avoid:l,catType:o,hasTone:i}=e,s={minimal:"Short sentences. No adjectives unless load-bearing. Direct.",technical:"Precise nouns, specific verbs. Write for experts. Avoid explaining what the reader already knows.",calm:"Measured pace. Confident statements. No urgency cues. Let the work speak.",bold:"Strong verbs. Active voice. Make a claim and stand behind it.",warm:"Approachable but not casual. Human without being informal.",dry:"Deadpan. Understate. Trust the reader to get it.",focused:"Stay on topic. One idea per sentence. Cut the rest."},a={developer:"Write for engineers. Assume technical literacy. Specificity earns trust.",creative:"Lead with the work. Copy should serve the visual, not explain it.",product:"Clear over clever. Features earn their mention by solving something real.",services:"Experience over enthusiasm. What you've done, not what you'll do.",personal:"First person where appropriate. Honest and considered.",general:"Clear, direct, grounded. Earn attention with specificity."},c=r.map(_=>s[_.toLowerCase()]).filter(Boolean),d=c.length>0?c.join(" "):a[o]??a.general,f={developer:['"seamlessly"','"game-changing"','"powerful" as an adjective',"passive voice"],creative:['"unique"','"innovative"','"passion-driven"',"agency-speak"],product:['"revolutionary"','"disrupts"','"leverage"','"synergy"'],services:['"partner"','"solutions"','"holistic"','"best-in-class"'],personal:['"journey"','"passionate about"','"thought leader"','"excited to announce"'],general:['"world-class"','"cutting-edge"','"innovative"','"paradigm"']},p=[...l,...(f[o]??f.general).filter(_=>!l.some(m=>m.toLowerCase().includes(_.toLowerCase().replace(/"/g,""))))],y=[];i("minimal")&&y.push(`"${t}. ${Y(n)}."`),i("technical")&&y.push('"Typed, composable, deterministic."'),i("calm")&&y.push('"Reliable tools, clearly documented, quietly maintained."'),i("bold")&&y.push('"Pick it up. It works. Put it down."'),i("warm")&&y.push('"Made for people who care about their tools."');const k={developer:['"One command. Done."','"Less ceremony. More output."','"Configure once. Forget about it."'],creative:['"The work is the argument."','"No portfolio lorem ipsum."','"Good work, clearly presented."'],product:['"It fits where you already work."','"No setup tax."','"Does one thing. Does it well."'],services:[`"You've seen this problem before. So have we."`,'"Specific outcomes, clear process."',`"We don't do vague."`],personal:['"This is what I work on."','"Specific interests, honest opinions."','"No personal brand. Just work."'],general:['"Built for a reason."','"Useful before impressive."','"Does what it says."']},v=[...y,...k[o]??k.general];return{attributes:r.length>0?r:["direct","clear"],voiceNotes:d,avoidList:p,examplePhrases:yn(v,Math.min(4,v.length))}}function ep(e){const{name:t,category:n,purpose:r,audience:l,hasTone:o}=e,s=r.split(/\s+/)[0]??"build",a=l.split(/\s+/).slice(0,3).join(" "),c=[`${t} — ${n} for ${a}`,`${t} / ${l}`,`${t}: ${Y(s)} without ceremony`,`${t} for ${a}`,`${t} — built to ${s}`];o("minimal")&&c.push(`${t}.`),o("technical")&&(c.push(`${t} — ${n} utility`),c.push(`${t} — ${s}, ship, repeat`)),o("bold")&&(c.push(`${t}. Built for ${a}.`),c.push(`${t}. No ceremony.`)),o("calm")&&c.push(`${t} — a ${n} for ${a}`);const d=c.filter(p=>p!==t),f=yn(d,2);return[t,...f]}function tp(e){const{name:t,category:n,purpose:r,audience:l}=e,o=r.split(/\s+/).slice(0,6).join(" "),i=[`${Y(n)} for ${l}.`,`${Y(r)}.`,`A ${n} built to ${r}.`,`Built for ${l} who need to ${o}.`,`${t}: the ${n} for ${l}.`,`${Y(n)}. For ${l}.`,`${Y(r)}. No overhead.`,`The ${n} for ${l} who know what they need.`];return yn(i,3)}function np(e){const{category:t,purpose:n,audience:r,catType:l,hasTone:o}=e,i=n.split(/\s+/),s=i[0]??"build",a=new Set(["without","with","for","and","or","the","a","an"]),d=i.slice(1).filter(v=>!a.has(v.toLowerCase()))[0]||"your work",f=r.split(/\s+/).slice(0,2).join(" "),p={developer:[`${Y(s)}, ship, move on.`,"Less boilerplate. More control.",`${Y(t)} that stays out of your way.`,"One command. Done.","Configure once. Forget about it.","Less ceremony. More output.",`Built for ${f} who ship.`,`${Y(d)}, no overhead.`],creative:["The work is the argument.","Good work, clearly presented.","No introduction needed.",`${Y(d)}, done properly.`,"Craft over noise.","Say less. Show more.","Quality, consistently."],product:["Does one thing. Does it well.","Fits where you already work.","No setup tax.",`Built for ${f}.`,`${Y(s)} without the friction.`,"One less problem.","Useful before impressive."],services:["You've seen this problem before. So have we.","Specific outcomes. Clear process.","Experience, not enthusiasm.","We don't do vague.","The result is the product.","Built for the problem you actually have."],personal:["This is what I work on.","Specific interests. Honest opinions.","Work, not performance.","Making things that matter.","No brand. Just work."],general:["Built for a reason.","Useful before impressive.","Does what it says.",`${Y(s)} without the noise.`,`For ${f} who know what they want.`]},y=[];o("minimal")&&y.push(`${Y(s)}. Ship.`,"Simple by design."),o("calm")&&y.push("Reliable tools, quietly maintained.","Steady. Dependable. Yours."),o("bold")&&y.push("Pick it up. It works.","No compromises.","Built to be used."),o("technical")&&y.push("Typed. Composable. Predictable.","Deterministic by design.");const k=[...p[l]??p.general,...y];return yn(k,3)}function rp(e){const{catType:t,hasTone:n}=e,r=[];return(t==="developer"||n("technical")||n("minimal"))&&r.push({id:"terminal-minimal",name:"Terminal Minimal",description:"Dark background, monospace type throughout, no ornament. Functional and uncompromising. Every element earns its place.",palette:"Near-black ground (#0d0d0d), off-white text (#e0e0e0), single muted accent (amber or green).",typography:"Monospace primary — JetBrains Mono or Iosevka. Consistent weight. No italic.",references:"htop, k9s, the Stripe CLI, Linear issue view."},{id:"technical-document",name:"Technical Document",description:"Off-white ground, dense information layout, RFC/spec aesthetic. Designed for reading, not scanning. Typography does all the work.",palette:"Warm white (#f5f3ef), dark text (#1a1a1a), minimal color — one functional accent only.",typography:"Sans-serif (Inter or similar) for body, mono for code. Tight line height. Strong hierarchy through size and weight alone.",references:"Stripe docs, Oxide Computer RFCs, GNU manpages reformatted."},{id:"precision-interface",name:"Precision Interface",description:"Neutral mid-range palette, strong grid, engineering-tool aesthetic. Balanced between document and application. Calm but capable.",palette:"Mid-grey ground (#f0f0f0 or #1c1c1c), charcoal type, restrained use of blue or slate as action color.",typography:"Sans-serif for UI, mono for data. Clear size differentiation. No decorative weight use.",references:"Figma sidebar, Retool, Zed editor, TablePlus."}),(t==="creative"||t==="personal")&&r.push({id:"editorial",name:"Editorial",description:"Strong typographic hierarchy, restrained palette, print-design influences. Work foreground, everything else background.",palette:"Off-white or cream (#f7f4ef), near-black type, accent used once — a single warm or cool tone.",typography:"A good serif for display, neutral sans for body. Generous leading. No decorative fonts.",references:"Are.na, Typewolf, Emigre back catalog, Letterform Archive."},{id:"quiet-studio",name:"Quiet Studio",description:"Neutral and considered. Nothing decorative. Space used to direct attention, not fill it.",palette:"Warm white (#fafaf8) or deep neutral (#141414), type-only color use. No gradients.",typography:"One typeface family, two weights. Let leading and spacing create rhythm.",references:"Pentagram case studies, Swiss International Style, Muji product design."},{id:"contemporary-craft",name:"Contemporary Craft",description:"Tactile references — paper, grain, texture — applied with restraint. Warmth without nostalgia.",palette:"Off-white base with a warm paper tone, subtle texture overlays, earthy accent.",typography:"Mix: display serif + utility sans. Comfortable reading size. Generous margins.",references:"Oak Studio, Analog, Offscreen Magazine, Present & Correct."}),(t==="product"||t==="services")&&r.push({id:"focused-product",name:"Focused Product",description:"Clean, professional, information-forward. Looks like it was built to be used, not to be admired. Trust through clarity.",palette:"White or light grey ground, dark neutral type, one brand color used only for primary actions.",typography:"Neutral sans-serif, systematic sizing, no personality — the product is the personality.",references:"Linear, Cron (v1), Vercel dashboard, Raycast."},{id:"minimal-commerce",name:"Minimal Commerce",description:"Premium restraint. No decorative elements. White space signals quality. Type-driven.",palette:"White ground, black type, one warm accent for selective emphasis.",typography:"A refined sans-serif. Large display size for key claims. Small, tracked caps for labels.",references:"Stripe marketing, Basecamp, Arc browser landing page."},{id:"structured-trust",name:"Structured Trust",description:"Grid-heavy, methodical, legible. Communicates that things are in order. More function, less flourish.",palette:"Light neutral ground, two text weights (body + emphasis), a contained accent color.",typography:"Professional sans-serif — GT Walsheim or Plus Jakarta or similar. Tight tracking for headings.",references:"Harvest app, FreshBooks, Notion, Loom landing page."}),r.length===0&&r.push({id:"type-forward",name:"Type Forward",description:"Typography as the only design element. No illustration, no photography, no pattern. Words do everything.",palette:"Black and white, one optional accent. No gradients.",typography:"One great typeface. Multiple weights. Extreme size contrast. Nothing else needed.",references:"Early Bloomberg Businessweek covers, Helvetica film poster, The Economist."},{id:"system-neutral",name:"System Neutral",description:"Invisible design — system fonts, default spacing, no signature. The brand is in the content, not the container.",palette:"System defaults. One custom color — the brand color. Everything else inherited.",typography:"System UI stack. Optimized for the OS it runs on.",references:"HN, iA Writer, Pinboard, older Stripe."}),yn(r,Math.min(3,r.length))}function lp(e){const{name:t,catType:n}=e,r=t.charAt(0).toUpperCase(),l=t.split(/\s+/).slice(0,2).map(i=>i.charAt(0).toUpperCase()).join("")||r,o=[];return n==="developer"?o.push({id:"geometric-letterform",title:"Geometric Letterform",concept:`The letter "${r}" treated as a structural element — not styled, just precise. Think grid construction, not calligraphy.`,mark:"Monoweight geometric construction. Works at 16px and 1600px. No gradients, no effects.",execution:"Build on a strict grid. Consider negative space as intentional, not leftover. Test at 16×16 favicon size first."},{id:"wordmark-mono",title:"Wordmark in Mono",concept:`"${t}" set in a monospace typeface, tracked slightly loose. The choice of mono is the signal.`,mark:"Wordmark only. No icon. The name is the mark.",execution:"Try JetBrains Mono, Iosevka, or Commit Mono at medium weight. Adjust tracking. Optically align."},{id:"abstract-structure",title:"Abstract Structure",concept:"A geometric mark suggesting assembly, layering, or composition — aligned with the product metaphor.",mark:"Two or three simple shapes in precise relation. No ornamentation.",execution:"Explore grid fragments, interlocking forms, or stacked bars. Test inversion on dark and light."}):n==="creative"||n==="personal"?o.push({id:"custom-wordmark",title:"Custom Wordmark",concept:`"${t}" as a custom letterform — not a font off the shelf, but drawn. The craft shows.`,mark:"Wordmark with subtle custom refinements: adjusted spacing, modified terminals, intentional details.",execution:"Start with a base typeface. Modify key letterforms. The goal is invisible craft, not obvious customization."},{id:"monogram",title:"Monogram",concept:`"${l}" as a tight, legible monogram. Simple enough to stamp, refined enough to scale up.`,mark:"Two letterforms in structural relation. Not overlapping decoratively — compositionally.",execution:"Grid-align. Consider positive/negative figure-ground play. Must read clearly at 24px."}):o.push({id:"clean-wordmark",title:"Wordmark",concept:`"${t}" set in a well-chosen typeface, thoughtfully spaced. No icon needed.`,mark:"Wordmark. The typeface selection and spacing carry the identity.",execution:"Choose a typeface with character but not personality. Adjust tracking. Optically center."},{id:"initial-mark",title:`"${r}" Mark`,concept:`A standalone "${r}" mark that works as a favicon, app icon, and small-scale identifier.`,mark:"Single letter, geometric or structured. Consistent weight with wordmark.",execution:"Build on an 8-unit grid. Test at 16px, 32px, and 512px. Must work in one color."}),o.push({id:"symbol-plus-wordmark",title:"Symbol + Wordmark System",concept:"A mark system: standalone symbol for small contexts, symbol + name for full contexts. Flexible.",mark:"Two formats: symbol alone, symbol left-aligned with wordmark right.",execution:"Define the relationship (size ratio, spacing) precisely. Lock it. Never deviate. Test both formats in context."}),yn(o,2)}function op(e){const{name:t,category:n,purpose:r,audience:l,catType:o}=e,i=new Set(["without","for","with","and","or","the","a","an","via","using"]),s=r.split(/\s+/),a=[];for(const f of s){if(i.has(f.toLowerCase())&&a.length>0)break;a.push(f)}const c=a.join(" ")||r,d=[{context:"README header",text:`# ${t} + +${Y(n)} for ${l}. ${Y(r)}.`},{context:"Landing page hero",text:`${Y(c)} without ceremony. + +${t} is a ${n} built for ${l} who need to ${r}.`},{context:"Social / bio",text:`Building ${t} — ${n} for ${l}. ${Y(r)}, no overhead.`},{context:"One-liner",text:`${t}: ${n} built to ${r}.`}];return o==="developer"&&(d.push({context:"Package registry description",text:`${t} is a ${n} for ${l}. ${Y(r)}. No configuration required.`}),d.push({context:"CLI help text intro",text:`${t} — ${Y(r)}.`})),(o==="creative"||o==="personal")&&d.push({context:"Portfolio about line",text:`${t} is the practice of ${l.split(/\s+/).slice(0,2).join(" ")} ${c}.`}),o==="product"&&d.push({context:"App store description",text:`${t} is a ${n} for ${l}. It ${r} — without the complexity of larger platforms.`}),d.slice(0,6)}function ip(e){const{tone:t,avoid:n,hasTone:r}=e,l=[];return t.length>0&&l.push(`Tone: ${t.join(", ")}.`),n.length>0&&l.push(`Avoid: ${n.join(", ")}.`),r("minimal")&&(l.push("Headlines: 6 words maximum."),l.push("Body copy: 2 sentences per paragraph maximum.")),r("technical")&&(l.push("Assume reader has domain knowledge. Skip definitions."),l.push("Prefer specific nouns over categorical ones (say the actual thing).")),r("calm")&&(l.push(`No urgency language ("act now", "limited time", "don't miss").`),l.push("No exclamation points.")),r("bold")&&(l.push("Active voice always. No passive constructions."),l.push("Every claim should be substantiable.")),l.push("No em dashes in casual contexts. Use a period or restructure."),l.push("Spell out numbers under 10 in prose. Use numerals for data."),l.push("One idea per sentence. Split if in doubt."),l}const vc=[{label:"Display",size:"56px",weight:"700",lineHeight:"1.1",usage:"Hero headlines, major landing sections"},{label:"Heading 1",size:"40px",weight:"700",lineHeight:"1.2",usage:"Page titles, primary headers"},{label:"Heading 2",size:"28px",weight:"600",lineHeight:"1.25",usage:"Section headers, card titles"},{label:"Heading 3",size:"20px",weight:"600",lineHeight:"1.3",usage:"Sub-section headers, feature titles"},{label:"Body Large",size:"18px",weight:"400",lineHeight:"1.6",usage:"Lead paragraphs, key descriptions"},{label:"Body",size:"16px",weight:"400",lineHeight:"1.65",usage:"Default body copy"},{label:"Caption",size:"13px",weight:"400",lineHeight:"1.5",usage:"Meta info, timestamps, helper text"},{label:"Label",size:"11px",weight:"600",lineHeight:"1.4",usage:"UI labels, tags, overlines"}],ea={developer:[{primary:"Geist",secondary:"Geist",mono:"Geist Mono",pairNote:"Single-family system. Clean, neutral, interface-optimized."},{primary:"Inter",secondary:"Inter",mono:"JetBrains Mono",pairNote:"Inter for all UI copy; JetBrains Mono for code."},{primary:"IBM Plex Sans",secondary:"IBM Plex Sans",mono:"IBM Plex Mono",pairNote:"IBM Plex family — coherent, technical, widely legible."}],creative:[{primary:"Playfair Display",secondary:"Lato",mono:"Courier Prime",pairNote:"High-contrast editorial serif for display; Lato for body."},{primary:"Fraunces",secondary:"DM Sans",mono:"DM Mono",pairNote:"Optical-size serif for headlines; DM Sans for body. Expressive and modern."},{primary:"Cormorant Garamond",secondary:"Nunito Sans",mono:"Courier Prime",pairNote:"Refined luxury serif for display; Nunito Sans for readable body."}],product:[{primary:"Plus Jakarta Sans",secondary:"Plus Jakarta Sans",mono:"DM Mono",pairNote:"Jakarta Sans at varying weights; DM Mono for data and code."},{primary:"Inter",secondary:"Inter",mono:"Fira Code",pairNote:"Inter throughout — modern, neutral, excellent hinting."},{primary:"Manrope",secondary:"Manrope",mono:"JetBrains Mono",pairNote:"Geometric Manrope for all UI; JetBrains Mono for code blocks."}],services:[{primary:"Libre Baskerville",secondary:"Source Sans 3",mono:"Source Code Pro",pairNote:"Baskerville for authority and trust; Source Sans for approachable body."},{primary:"Merriweather",secondary:"Open Sans",mono:"Roboto Mono",pairNote:"Merriweather for credibility; Open Sans keeps body warm."},{primary:"Lora",secondary:"Nunito Sans",mono:"Courier Prime",pairNote:"Lora brings warmth to headlines; Nunito Sans lightens the reading."}],personal:[{primary:"Lora",secondary:"Nunito",mono:"DM Mono",pairNote:"Lora for expressive headlines; Nunito for friendly body copy."},{primary:"DM Serif Display",secondary:"DM Sans",mono:"DM Mono",pairNote:"Unified DM family. Serif display for character; sans for clarity."},{primary:"Playfair Display",secondary:"Source Sans 3",mono:"Courier Prime",pairNote:"Playfair adds personality; Source Sans 3 grounds body text."}],general:[{primary:"Inter",secondary:"Inter",mono:"JetBrains Mono",pairNote:"Inter throughout with weight variation. Universal starting point."},{primary:"Plus Jakarta Sans",secondary:"Lora",mono:"Fira Code",pairNote:"Geometric sans for UI; Lora serif for long-form content."},{primary:"Manrope",secondary:"Merriweather",mono:"Source Code Pro",pairNote:"Friendly geometric sans paired with a trusted editorial serif."}]};function sp(e){const t=ea[e.catType]??ea.general;return{...El(t),scale:vc}}function ap(e){return e.map(([t,n,r],l)=>({id:`s${l}`,name:t,hex:n,role:r}))}function up(e){const t={developer:[[["Background","#0d1117","background"],["Surface","#161b22","neutral"],["Border","#30363d","neutral"],["Primary","#58a6ff","primary"],["Accent","#3fb950","accent"],["Text","#f0f6fc","text"]],[["Background","#0a0010","background"],["Surface","#160025","neutral"],["Neutral","#2d1f3d","neutral"],["Primary","#7c3aed","primary"],["Accent","#a78bfa","accent"],["Text","#e2d9f3","text"]],[["Background","#0a0a0a","background"],["Surface","#141414","neutral"],["Neutral","#292929","neutral"],["Primary","#e5e5e5","primary"],["Accent","#c9a96e","accent"],["Text","#f5f5f5","text"]]],creative:[[["Background","#faf7f2","background"],["Surface","#f5efe4","neutral"],["Neutral","#e8d9c4","neutral"],["Primary","#c07850","primary"],["Accent","#4a7c5f","accent"],["Text","#1a1410","text"]],[["Background","#0f0f0f","background"],["Surface","#1a1a1a","neutral"],["Neutral","#2e2e2e","neutral"],["Primary","#ff6b35","primary"],["Accent","#ffd700","accent"],["Text","#f8f8f8","text"]],[["Background","#f8f4ef","background"],["Surface","#efe9e0","neutral"],["Neutral","#d4c4b0","neutral"],["Primary","#8b5e3c","primary"],["Accent","#6b8f71","accent"],["Text","#2c2018","text"]]],product:[[["Background","#fafbfc","background"],["Surface","#f0f4f8","neutral"],["Neutral","#d1dce8","neutral"],["Primary","#2563eb","primary"],["Accent","#7c3aed","accent"],["Text","#1e293b","text"]],[["Background","#0f172a","background"],["Surface","#1e293b","neutral"],["Neutral","#334155","neutral"],["Primary","#6366f1","primary"],["Accent","#22d3ee","accent"],["Text","#f1f5f9","text"]],[["Background","#f0fafa","background"],["Surface","#e0f5f5","neutral"],["Neutral","#b2dede","neutral"],["Primary","#0d9488","primary"],["Accent","#f59e0b","accent"],["Text","#134e4a","text"]]],services:[[["Background","#f8fafd","background"],["Surface","#edf2fa","neutral"],["Neutral","#ccd9ee","neutral"],["Primary","#1d4ed8","primary"],["Accent","#0f9e6e","accent"],["Text","#1a2038","text"]],[["Background","#0c1421","background"],["Surface","#152035","neutral"],["Neutral","#243450","neutral"],["Primary","#3b82f6","primary"],["Accent","#34d399","accent"],["Text","#f8fafc","text"]],[["Background","#faf8f5","background"],["Surface","#f0ebe0","neutral"],["Neutral","#d9cdb8","neutral"],["Primary","#78523a","primary"],["Accent","#2d6a4f","accent"],["Text","#1c1410","text"]]],personal:[[["Background","#fffef9","background"],["Surface","#fdf8ee","neutral"],["Neutral","#f0e6cc","neutral"],["Primary","#c9a96e","primary"],["Accent","#7c9e87","accent"],["Text","#2d2d2d","text"]],[["Background","#fafafa","background"],["Surface","#f5f5f5","neutral"],["Neutral","#e5e5e5","neutral"],["Primary","#171717","primary"],["Accent","#737373","accent"],["Text","#404040","text"]],[["Background","#f9f8ff","background"],["Surface","#f0eeff","neutral"],["Neutral","#ddd8f7","neutral"],["Primary","#4f46e5","primary"],["Accent","#ec4899","accent"],["Text","#1e1b4b","text"]]],general:[[["Background","#111111","background"],["Surface","#1a1a1a","neutral"],["Neutral","#2e2e2e","neutral"],["Primary","#c9a96e","primary"],["Accent","#6b8f71","accent"],["Text","#dedede","text"]],[["Background","#ffffff","background"],["Surface","#f5f5f5","neutral"],["Neutral","#e0e0e0","neutral"],["Primary","#1a1a1a","primary"],["Accent","#3b82f6","accent"],["Text","#333333","text"]],[["Background","#0f0f1a","background"],["Surface","#1a1a2e","neutral"],["Neutral","#252545","neutral"],["Primary","#4f8ef7","primary"],["Accent","#a78bfa","accent"],["Text","#e2e8f0","text"]]]},n=t[e.catType]??t.general;return{swatches:ap(El(n))}}function cp(e){const t=Xf(e);return{overview:bf(t),positioning:Zf(t),tone:qf(t),titles:ep(t),subtitles:tp(t),taglines:np(t),visualDirections:rp(t),palette:up(t),typography:sp(t),logoConcepts:lp(t),usageExamples:op(t),constraints:ip(t)}}const dp="You are an expert brand strategist and copywriter. Generate a complete brand identity package as a JSON object. Be specific and creative — every output must feel crafted for the exact brand described, not generic. Use the project details to inform all choices: tone, color palette, typography, and messaging.";function fp(e){return["Generate a brand package for this project.","","PROJECT DETAILS:",`Name: ${e.name||"Untitled"}`,`Category: ${e.category||"general"}`,`Purpose: ${e.purpose||"not specified"}`,`Target audience: ${e.audience||"not specified"}`,e.tone.length?`Tone words: ${e.tone.join(", ")}`:"",e.avoid.length?`Words/phrases to avoid: ${e.avoid.join(", ")}`:"",e.notes?`Additional notes: ${e.notes}`:"","","Return ONLY a valid JSON object with exactly this structure:","",JSON.stringify({overview:"One crisp sentence: what this project is and who it helps",positioning:"2–3 sentence strategic positioning statement — what makes this brand distinct",tone:{attributes:["attribute1","attribute2","attribute3","attribute4"],voiceNotes:"2–3 sentences describing how the brand writes and speaks",avoidList:["thing to never say or do","another thing to avoid"],examplePhrases:["A phrase that shows the brand voice","Another example","A third example"]},titles:["Title option 1","Title option 2","Title option 3"],subtitles:["Subtitle option 1","Subtitle option 2","Subtitle option 3"],taglines:["Short punchy tagline","Alternative tagline","Third tagline option"],palette:{swatches:[{id:"s0",name:"Background",hex:"#hexcode",role:"background"},{id:"s1",name:"Surface",hex:"#hexcode",role:"neutral"},{id:"s2",name:"Primary",hex:"#hexcode",role:"primary"},{id:"s3",name:"Accent",hex:"#hexcode",role:"accent"},{id:"s4",name:"Text",hex:"#hexcode",role:"text"}]},typography:{primary:"Primary font name (e.g. Inter, Playfair Display)",secondary:"Secondary font name or same as primary",mono:"Monospace font name (e.g. JetBrains Mono, Fira Code)",pairNote:"One sentence on why this pairing fits the brand"},visualDirections:[{id:"v1",name:"Direction name",description:"2–3 sentence visual direction description",palette:"Color mood description",typography:"Type style description",references:"Visual references and inspirations"},{id:"v2",name:"Direction name",description:"2–3 sentence description",palette:"Color mood",typography:"Type style",references:"Visual references"},{id:"v3",name:"Direction name",description:"2–3 sentence description",palette:"Color mood",typography:"Type style",references:"Visual references"}],logoConcepts:[{id:"l1",title:"Logo concept name",concept:"Concept description and rationale",mark:"Mark/symbol description",execution:"Execution and usage guidelines"},{id:"l2",title:"Second concept name",concept:"Concept description",mark:"Mark description",execution:"Execution guidelines"}],usageExamples:[{context:"README headline",text:"Actual example copy here"},{context:"Landing page hero",text:"Actual example copy here"},{context:"Social bio",text:"Actual example copy here"},{context:"Email subject line",text:"Actual example copy here"}],constraints:["A specific copy rule","Another brand constraint","A third constraint","A fourth constraint"]},null,2)].filter(n=>n!==null).join(` +`)}function pp(e){const t=e.trim().toLowerCase(),n=t.startsWith("#")?t:`#${t}`;return/^#[0-9a-f]{6}$/.test(n)?n:"#888888"}function hp(e){var l;if(typeof e!="object"||e===null)throw new Error("Response is not a JSON object");const t=e,n=["overview","positioning","tone","titles","subtitles","taglines","palette","typography","visualDirections","logoConcepts","usageExamples","constraints"];for(const o of n)if(!(o in t))throw new Error(`Missing field: ${o}`);const r=t.palette;if(!((l=r==null?void 0:r.swatches)!=null&&l.length))throw new Error("Missing palette swatches");return r.swatches=r.swatches.map((o,i)=>({id:o.id??`s${i}`,name:String(o.name??"Color"),hex:pp(String(o.hex??"#888888")),role:String(o.role??"accent")})),t}async function mp(e,t,n){var c;const r=`${t.baseUrl.replace(/\/$/,"")}/api/chat`;let l;try{l=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},signal:n,body:JSON.stringify({model:t.model,messages:[{role:"system",content:dp},{role:"user",content:fp(e)}],format:"json",stream:!1})})}catch(d){throw d.name==="AbortError"?d:new Error(`Cannot reach Ollama at ${t.baseUrl}. Is it running?`)}if(!l.ok){const d=await l.text().catch(()=>"");throw l.status===404?new Error(`Model "${t.model}" not found. Pull it first: ollama pull ${t.model}`):new Error(`Ollama error ${l.status}: ${d.slice(0,120)}`)}const o=await l.json(),i=(c=o==null?void 0:o.message)==null?void 0:c.content;if(!i)throw new Error("Empty response from Ollama");let s;try{s=JSON.parse(i)}catch{throw new Error("Ollama returned invalid JSON. Try a larger model.")}const a=hp(s);return{...a,typography:{...a.typography,scale:vc}}}async function gp(e){const t=`${e.replace(/\/$/,"")}/api/tags`,n=await fetch(t,{signal:AbortSignal.timeout(5e3)});if(!n.ok)throw new Error(`Ollama responded with ${n.status}`);return((await n.json()).models??[]).map(l=>l.name.replace(/:latest$/,""))}const ql={enabled:!1,baseUrl:"http://localhost:11434",model:"llama3.2"},wc="bw:settings";function xc(){try{const e=localStorage.getItem(wc);return e?{...ql,...JSON.parse(e)}:{...ql}}catch{return{...ql}}}function yp(){return xc()}function vp(){const[e,t]=L.useState(xc);return{settings:e,setSettings:r=>{const l={...e,...r};try{localStorage.setItem(wc,JSON.stringify(l))}catch{}t(l)}}}const wp={name:"",category:"",purpose:"",audience:"",tone:[],avoid:[],notes:""},xp={overview:!1,positioning:!1,tone:!1,messaging:!1,visual:!1,palette:!1,typography:!1,logo:!1,usage:!1,constraints:!1};function kp(e){try{const t=localStorage.getItem(e);if(t){const n=JSON.parse(t);return n.outputs&&(!n.outputs.palette||!n.outputs.typography)&&(n.outputs=null,n.edits={}),n}}catch{}return{}}function Ut(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function Sp(e,t,n,r){return n&&(t.overview&&(e.overview=r.overview??n.overview),t.positioning&&(e.positioning=r.positioning??n.positioning),t.tone&&(e.tone=r.tone??n.tone),t.messaging&&(e.titles=r.titles??n.titles,e.subtitles=r.subtitles??n.subtitles,e.taglines=r.taglines??n.taglines),t.visual&&(e.visualDirections=r.visualDirections??n.visualDirections),t.palette&&(e.palette=r.palette??n.palette),t.typography&&(e.typography=r.typography??n.typography),t.logo&&(e.logoConcepts=r.logoConcepts??n.logoConcepts),t.usage&&(e.usageExamples=r.usageExamples??n.usageExamples),t.constraints&&(e.constraints=r.constraints??n.constraints)),e}function Np(e="bw:workspace"){const t=kp(e),[n,r]=L.useState(t.inputs??wp),[l,o]=L.useState(t.outputs??null),[i,s]=L.useState(t.edits??{}),[a,c]=L.useState(t.locked??xp),[d,f]=L.useState(!1),[p,y]=L.useState("template"),[k,v]=L.useState(null),[_,m]=L.useState(!1),[h,g]=L.useState(!1),w=L.useRef([t.edits??{}]),S=L.useRef(0),T=L.useRef(null),C=L.useRef({inputs:n,outputs:l,edits:i,locked:a});C.current={inputs:n,outputs:l,edits:i,locked:a};const P=()=>{m(S.current>0),g(S.current{$&&(w.current=w.current.slice(0,S.current+1),w.current.push(N),S.current=w.current.length-1),s(N),P()},[]),z=L.useCallback(N=>{const{outputs:$,edits:M,locked:R}=C.current;Ut(e,{inputs:N,outputs:$,edits:M,locked:R})},[e]),Z=L.useCallback(N=>{r($=>{const M=typeof N=="function"?N($):N;return z(M),M})},[z]),ue=L.useCallback(async()=>{var Ft;(Ft=T.current)==null||Ft.abort();const N=new AbortController;T.current=N;const{inputs:$,outputs:M,edits:R,locked:ze}=C.current,te=yp();f(!0),v(null),y(te.enabled?te.model:"template");try{let he;if(te.enabled)he=await mp($,te,N.signal);else{if(await new Promise(Sc=>setTimeout(Sc,120)),N.signal.aborted)return;he=cp($)}if(N.signal.aborted)return;const Nt=Sp({...he},ze,M,R);o(Nt),w.current=[{}],S.current=0,s({}),P(),Ut(e,{inputs:$,outputs:Nt,edits:{},locked:ze})}catch(he){if(he.name==="AbortError")return;v(he.message)}finally{f(!1)}},[e]),St=L.useCallback(()=>{var N;(N=T.current)==null||N.abort(),f(!1),v(null)},[]),ur=L.useCallback((N,$)=>{const{inputs:M,outputs:R,locked:ze}=C.current,te={...C.current.edits,[N]:$};I(te,!0),Ut(e,{inputs:M,outputs:R,edits:te,locked:ze})},[e,I]),jl=L.useCallback(()=>{if(S.current<=0)return;S.current-=1;const N=w.current[S.current],{inputs:$,outputs:M,locked:R}=C.current;I(N,!1),Ut(e,{inputs:$,outputs:M,edits:N,locked:R})},[e,I]),vn=L.useCallback(()=>{if(S.current>=w.current.length-1)return;S.current+=1;const N=w.current[S.current],{inputs:$,outputs:M,locked:R}=C.current;I(N,!1),Ut(e,{inputs:$,outputs:M,edits:N,locked:R})},[e,I]),wn=L.useCallback(N=>{c($=>{const M={...$,[N]:!$[N]},{inputs:R,outputs:ze,edits:te}=C.current;return Ut(e,{inputs:R,outputs:ze,edits:te,locked:M}),M})},[e]),E=l?{...l,...i}:null;return{inputs:n,setInputs:Z,outputs:E,isGenerating:d,generateMode:p,generateError:k,locked:a,runGenerate:ue,cancelGenerate:St,updateEdit:ur,toggleLock:wn,undo:jl,redo:vn,canUndo:_,canRedo:h,hasOutput:l!==null}}const kc="bw:packages",Cp="bw:workspace";function Ep(){return`pkg-${Date.now()}-${Math.random().toString(36).slice(2,7)}`}function Jo(e,t=Ep()){return{id:t,name:e,createdAt:new Date().toISOString(),storageKey:`bw:ws:${t}`}}function jp(){try{const n=localStorage.getItem(kc);if(n)return JSON.parse(n)}catch{}const e=Jo("Package 1");try{const n=localStorage.getItem(Cp);n&&localStorage.setItem(e.storageKey,n)}catch{}const t={activeId:e.id,slots:[e]};return Bt(t),t}function Bt(e){try{localStorage.setItem(kc,JSON.stringify(e))}catch{}}function Tp(){const[e,t]=L.useState(jp),n=e.slots.find(a=>a.id===e.activeId)??e.slots[0],r=L.useCallback(a=>{t(c=>{if(c.activeId===a)return c;const d={...c,activeId:a};return Bt(d),d})},[]),l=L.useCallback(()=>{t(a=>{const c=Jo(`Package ${a.slots.length+1}`),d={activeId:c.id,slots:[...a.slots,c]};return Bt(d),d})},[]),o=L.useCallback(a=>{t(c=>{if(c.slots.length<=1)return c;const d=c.slots.find(k=>k.id===a);try{d&&localStorage.removeItem(d.storageKey)}catch{}const f=c.slots.filter(k=>k.id!==a),y={activeId:c.activeId===a?f[0].id:c.activeId,slots:f};return Bt(y),y})},[]),i=L.useCallback((a,c)=>{t(d=>{const f=d.slots.map(y=>y.id===a?{...y,name:c}:y),p={...d,slots:f};return Bt(p),p})},[]),s=L.useCallback(a=>{t(c=>{const d=c.slots.find(y=>y.id===a);if(!d)return c;const f=Jo(`${d.name} copy`);try{const y=localStorage.getItem(d.storageKey);y&&localStorage.setItem(f.storageKey,y)}catch{}const p={activeId:f.id,slots:[...c.slots,f]};return Bt(p),p})},[]);return{slots:e.slots,activeId:e.activeId,activeSlot:n,switchTo:r,createNew:l,remove:o,rename:i,duplicate:s}}function ta({label:e,values:t,onChange:n,suggestions:r=[],placeholder:l="Type and press Enter"}){const[o,i]=L.useState(""),s=L.useRef(null),a=p=>{const y=p.trim().toLowerCase();y&&!t.includes(y)&&n([...t,y]),i("")},c=p=>{n(t.filter(y=>y!==p))},d=p=>{(p.key==="Enter"||p.key===",")&&o.trim()?(p.preventDefault(),a(o)):p.key==="Backspace"&&!o&&t.length>0&&c(t[t.length-1])},f=r.filter(p=>!t.includes(p));return u.jsxs("div",{className:"token-field",children:[u.jsx("label",{className:"field-label",children:e}),u.jsxs("div",{className:"token-container",onClick:()=>{var p;return(p=s.current)==null?void 0:p.focus()},children:[t.map(p=>u.jsxs("span",{className:"token",children:[p,u.jsx("button",{type:"button",className:"token-remove",onClick:y=>{y.stopPropagation(),c(p)},"aria-label":`Remove ${p}`,children:"×"})]},p)),u.jsx("input",{ref:s,className:"token-input",value:o,onChange:p=>i(p.target.value),onKeyDown:d,onBlur:()=>{o.trim()&&a(o)},placeholder:t.length===0?l:"","aria-label":e})]}),f.length>0&&u.jsx("div",{className:"token-suggestions",children:f.map(p=>u.jsx("button",{type:"button",className:`token-suggestion${t.includes(p)?" active":""}`,onClick:()=>a(p),children:p},p))})]})}const Pp=["minimal","technical","calm","bold","warm","dry","focused","sharp"],$p=["buzzwords","hype","startup language","passive voice","corporate tone","exclamation points","superlatives"];function _p({inputs:e,onChange:t,onGenerate:n,isGenerating:r,generateLabel:l}){const o=a=>c=>t({...e,[a]:c}),i=a=>{a.key==="Enter"&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),n())},s=e.name.trim().length>0&&e.purpose.trim().length>0;return u.jsxs("div",{className:"input-panel",onKeyDown:i,children:[u.jsxs("div",{className:"input-section",children:[u.jsx("div",{className:"input-section-label",children:"Project"}),u.jsxs("div",{className:"field",children:[u.jsx("label",{className:"field-label",htmlFor:"f-name",children:"Name"}),u.jsx("input",{id:"f-name",className:"field-input",placeholder:"e.g. Foundry",value:e.name,onChange:a=>o("name")(a.target.value)})]}),u.jsxs("div",{className:"field",children:[u.jsx("label",{className:"field-label",htmlFor:"f-category",children:"Category"}),u.jsx("input",{id:"f-category",className:"field-input",placeholder:"e.g. developer tool, design studio",value:e.category,onChange:a=>o("category")(a.target.value)})]}),u.jsxs("div",{className:"field",children:[u.jsx("label",{className:"field-label",htmlFor:"f-purpose",children:"One-line purpose"}),u.jsx("input",{id:"f-purpose",className:"field-input",placeholder:"e.g. deploy microservices without boilerplate",value:e.purpose,onChange:a=>o("purpose")(a.target.value)})]}),u.jsxs("div",{className:"field",children:[u.jsx("label",{className:"field-label",htmlFor:"f-audience",children:"Audience"}),u.jsx("input",{id:"f-audience",className:"field-input",placeholder:"e.g. backend engineers",value:e.audience,onChange:a=>o("audience")(a.target.value)})]})]}),u.jsxs("div",{className:"input-section",children:[u.jsx("div",{className:"input-section-label",children:"Voice"}),u.jsx("div",{className:"field",children:u.jsx(ta,{label:"Tone attributes",values:e.tone,onChange:o("tone"),suggestions:Pp,placeholder:"Add tone..."})}),u.jsx("div",{className:"field",style:{marginTop:8},children:u.jsx(ta,{label:"Avoid",values:e.avoid,onChange:o("avoid"),suggestions:$p,placeholder:"Add avoid..."})})]}),u.jsxs("div",{className:"input-section",children:[u.jsx("div",{className:"input-section-label",children:"Notes"}),u.jsxs("div",{className:"field",children:[u.jsx("label",{className:"field-label sr-only",htmlFor:"f-notes",children:"Notes & constraints"}),u.jsx("textarea",{id:"f-notes",className:"field-textarea",placeholder:"Optional: constraints, context, inspirations, or anything the brand package should reflect.",value:e.notes,onChange:a=>o("notes")(a.target.value),rows:4})]})]}),u.jsxs("div",{className:"generate-area",children:[u.jsx("button",{className:`btn-generate${r?" generating":""}`,onClick:n,disabled:!r&&!s,title:s?"Generate brand package (⌘Enter)":"Enter a name and purpose to generate",children:l??(r?"Generating…":"Generate brand package")}),!s&&u.jsx("div",{style:{marginTop:7,fontSize:11,color:"var(--text-4)",textAlign:"center"},children:"Name and purpose required"}),s&&!r&&u.jsx("div",{style:{marginTop:7,fontSize:11,color:"var(--text-4)",textAlign:"center"},children:"⌘ Enter to generate"})]})]})}async function Lp(e){try{return await navigator.clipboard.writeText(e),!0}catch{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n}}function Vi({text:e,label:t="Copy",className:n=""}){const[r,l]=L.useState(!1),o=async()=>{await Lp(e)&&(l(!0),setTimeout(()=>l(!1),1500))};return u.jsx("button",{type:"button",className:`copy-btn${r?" copied":""} ${n}`,onClick:o,title:t,children:r?"✓ Copied":t})}function na({value:e,onChange:t,multiline:n=!1}){const[r,l]=L.useState(!1),[o,i]=L.useState(e),s=L.useRef(null),a=()=>{l(!1),o!==e&&t(o)};return r?n?u.jsx("textarea",{ref:s,autoFocus:!0,className:"editable-text editing",value:o,onChange:c=>i(c.target.value),onBlur:a,onKeyDown:c=>{c.key==="Escape"&&(l(!1),i(e))},style:{width:"100%",resize:"vertical",minHeight:80,padding:"4px 6px",fontFamily:"inherit",fontSize:"inherit",lineHeight:1.65,background:"var(--bg-2)",border:"1px solid var(--border-3)",borderRadius:3,color:"var(--text)",outline:"none"}}):u.jsx("input",{ref:s,autoFocus:!0,className:"editable-text editing",value:o,onChange:c=>i(c.target.value),onBlur:a,onKeyDown:c=>{c.key==="Enter"&&a(),c.key==="Escape"&&(l(!1),i(e))},style:{width:"100%",padding:"2px 6px",fontFamily:"inherit",fontSize:"inherit",background:"var(--bg-2)",border:"1px solid var(--border-3)",borderRadius:3,color:"var(--text)",outline:"none"}}):u.jsx("div",{className:"editable-text",onClick:()=>{i(e),l(!0)},title:"Click to edit",style:{whiteSpace:n?"pre-wrap":"normal",padding:"2px 4px",margin:"-2px -4px"},children:e})}function Be({title:e,locked:t,onToggleLock:n,copyText:r,children:l}){return u.jsxs("div",{className:`doc-section${t?" is-locked":""}`,children:[u.jsxs("div",{className:"doc-section-header",children:[u.jsx("div",{className:"doc-section-title",children:e}),u.jsxs("div",{className:"doc-section-actions",children:[r&&u.jsx(Vi,{text:r,label:"Copy"}),u.jsx("button",{type:"button",className:`section-lock${t?" locked":""}`,onClick:n,title:t?"Locked — click to unlock":"Lock to preserve on regenerate",children:t?"● locked":"○ lock"})]})]}),u.jsx("div",{className:"doc-section-body",children:l})]})}function eo({items:e,onChange:t,numbered:n=!0}){const r=(l,o)=>{const i=[...e];i[l]=o,t(i)};return n?u.jsx("div",{className:"numbered-list",children:e.map((l,o)=>u.jsxs("div",{className:"numbered-item",children:[u.jsxs("span",{className:"numbered-item-num",children:[o+1,"."]}),u.jsx("div",{className:"numbered-item-text",contentEditable:!0,suppressContentEditableWarning:!0,onBlur:i=>r(o,i.currentTarget.textContent??""),onKeyDown:i=>{i.key==="Escape"&&i.currentTarget.blur()},children:l})]},o))}):u.jsx("div",{className:"bullet-list",children:e.map((l,o)=>u.jsx("div",{className:"bullet-item",children:l},o))})}function zp({typography:e}){return u.jsxs("div",{className:"type-section",children:[u.jsxs("div",{className:"type-fonts",children:[u.jsxs("div",{className:"type-font-row",children:[u.jsx("span",{className:"type-font-role",children:"Primary"}),u.jsx("span",{className:"type-font-name",children:e.primary})]}),e.secondary!==e.primary&&u.jsxs("div",{className:"type-font-row",children:[u.jsx("span",{className:"type-font-role",children:"Secondary"}),u.jsx("span",{className:"type-font-name",children:e.secondary})]}),u.jsxs("div",{className:"type-font-row",children:[u.jsx("span",{className:"type-font-role",children:"Monospace"}),u.jsx("span",{className:"type-font-name",style:{fontFamily:"var(--font-mono)"},children:e.mono})]}),u.jsx("div",{className:"type-pair-note",children:e.pairNote})]}),u.jsxs("div",{className:"type-scale",children:[u.jsxs("div",{className:"type-scale-header",children:[u.jsx("span",{children:"Style"}),u.jsx("span",{children:"Size"}),u.jsx("span",{children:"Weight"}),u.jsx("span",{className:"type-scale-usage",children:"Usage"})]}),e.scale.map(t=>u.jsxs("div",{className:"type-scale-row",children:[u.jsx("span",{className:"type-scale-label",children:t.label}),u.jsx("span",{className:"type-scale-size",children:t.size}),u.jsx("span",{className:"type-scale-weight",children:t.weight}),u.jsx("span",{className:"type-scale-usage",children:t.usage})]},t.label))]})]})}function Mp({swatch:e,onChange:t,onRemove:n}){const[r,l]=L.useState(!1),[o,i]=L.useState(e.name),[s,a]=L.useState(!1),[c,d]=L.useState(e.hex),f=()=>{l(!1);const y=o.trim();y&&y!==e.name&&t({...e,name:y})},p=()=>{a(!1);const y=c.trim().toLowerCase(),k=y.startsWith("#")?y:`#${y}`;/^#[0-9a-f]{6}$/.test(k)?t({...e,hex:k}):d(e.hex)};return u.jsxs("div",{className:"color-swatch-card",children:[u.jsxs("div",{className:"color-swatch-preview",style:{background:e.hex},children:[u.jsx("input",{type:"color",className:"color-swatch-picker",value:e.hex,onChange:y=>t({...e,hex:y.target.value}),title:"Pick color"}),u.jsx("button",{className:"color-swatch-remove",onClick:n,title:"Remove",children:"×"})]}),u.jsxs("div",{className:"color-swatch-info",children:[r?u.jsx("input",{autoFocus:!0,className:"color-swatch-field-input",value:o,onChange:y=>i(y.target.value),onBlur:f,onKeyDown:y=>{y.key==="Enter"&&f(),y.key==="Escape"&&(l(!1),i(e.name))}}):u.jsx("div",{className:"color-swatch-name",onClick:()=>{i(e.name),l(!0)},title:"Click to edit",children:e.name}),s?u.jsx("input",{autoFocus:!0,className:"color-swatch-field-input color-swatch-hex-input",value:c,onChange:y=>d(y.target.value),onBlur:p,onKeyDown:y=>{y.key==="Enter"&&p(),y.key==="Escape"&&(a(!1),d(e.hex))}}):u.jsx("div",{className:"color-swatch-hex",onClick:()=>{d(e.hex),a(!0)},title:"Click to edit",children:e.hex})]})]})}function Dp({inputs:e,outputs:t,locked:n,onToggleLock:r,onEdit:l}){const o=t.palette.swatches.map(d=>`${d.name}: ${d.hex}`).join(` +`),i=(d,f)=>{const p=[...t.palette.swatches];p[d]=f,l("palette",{swatches:p})},s=d=>{const f=t.palette.swatches.filter((p,y)=>y!==d);l("palette",{swatches:f})},a=()=>{const d=`s${Date.now()}`;l("palette",{swatches:[...t.palette.swatches,{id:d,name:"New Color",hex:"#888888",role:"accent"}]})},c=["Titles:",...t.titles.map((d,f)=>`${f+1}. ${d}`),"","Taglines:",...t.taglines.map((d,f)=>`${f+1}. ${d}`)].join(` +`);return u.jsxs("div",{className:"brand-doc",children:[u.jsxs("div",{className:"brand-doc-header",children:[u.jsx("div",{className:"brand-doc-title",children:e.name||"Brand Package"}),u.jsxs("div",{className:"brand-doc-meta",children:[e.category&&u.jsxs("span",{className:"brand-doc-meta-item",children:[u.jsx("span",{className:"brand-doc-meta-label",children:"category"}),e.category]}),e.audience&&u.jsxs("span",{className:"brand-doc-meta-item",children:[u.jsx("span",{className:"brand-doc-meta-label",children:"audience"}),e.audience]})]})]}),u.jsx(Be,{title:"Overview",locked:n.overview,onToggleLock:()=>r("overview"),copyText:t.overview,children:u.jsx(na,{value:t.overview,onChange:d=>l("overview",d),multiline:!0})}),u.jsx(Be,{title:"Positioning",locked:n.positioning,onToggleLock:()=>r("positioning"),copyText:t.positioning,children:u.jsx(na,{value:t.positioning,onChange:d=>l("positioning",d),multiline:!0})}),u.jsx(Be,{title:"Tone & Voice",locked:n.tone,onToggleLock:()=>r("tone"),children:u.jsxs("div",{className:"tone-grid",children:[u.jsxs("div",{className:"tone-row",children:[u.jsx("div",{className:"tone-row-label",children:"Attributes"}),u.jsx("div",{className:"tone-tags",children:t.tone.attributes.map(d=>u.jsx("span",{className:"tone-tag",children:d},d))})]}),u.jsxs("div",{className:"tone-row",children:[u.jsx("div",{className:"tone-row-label",children:"Voice"}),u.jsx("div",{className:"tone-row-value",children:t.tone.voiceNotes})]}),t.tone.avoidList.length>0&&u.jsxs("div",{className:"tone-row",children:[u.jsx("div",{className:"tone-row-label",children:"Avoid"}),u.jsx("div",{className:"tone-row-value",children:t.tone.avoidList.join(", ")})]}),t.tone.examplePhrases.length>0&&u.jsxs("div",{className:"tone-row",children:[u.jsx("div",{className:"tone-row-label",children:"Example phrases"}),u.jsx("div",{className:"tone-phrases",children:t.tone.examplePhrases.map((d,f)=>u.jsx("div",{className:"tone-phrase",children:d},f))})]})]})}),u.jsx(Be,{title:"Messaging",locked:n.messaging,onToggleLock:()=>r("messaging"),copyText:c,children:u.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20},children:[u.jsxs("div",{children:[u.jsx("div",{style:{fontSize:11,color:"var(--text-3)",fontWeight:500,marginBottom:10},children:"Titles"}),u.jsx(eo,{items:t.titles,onChange:d=>l("titles",d)})]}),u.jsxs("div",{children:[u.jsx("div",{style:{fontSize:11,color:"var(--text-3)",fontWeight:500,marginBottom:10},children:"Subtitles"}),u.jsx(eo,{items:t.subtitles,onChange:d=>l("subtitles",d)})]}),u.jsxs("div",{children:[u.jsx("div",{style:{fontSize:11,color:"var(--text-3)",fontWeight:500,marginBottom:10},children:"Taglines"}),u.jsx(eo,{items:t.taglines,onChange:d=>l("taglines",d)})]})]})}),u.jsx(Be,{title:"Visual Direction",locked:n.visual,onToggleLock:()=>r("visual"),children:u.jsx("div",{className:"directions-grid",children:t.visualDirections.map(d=>u.jsxs("div",{className:"direction-card",children:[u.jsx("div",{className:"direction-name",children:d.name}),u.jsx("div",{className:"direction-desc",children:d.description}),u.jsxs("div",{className:"direction-attrs",children:[u.jsxs("div",{className:"direction-attr",children:[u.jsx("span",{className:"direction-attr-label",children:"Palette"}),u.jsx("span",{className:"direction-attr-value",children:d.palette})]}),u.jsxs("div",{className:"direction-attr",children:[u.jsx("span",{className:"direction-attr-label",children:"Typography"}),u.jsx("span",{className:"direction-attr-value",children:d.typography})]}),u.jsxs("div",{className:"direction-attr",children:[u.jsx("span",{className:"direction-attr-label",children:"References"}),u.jsx("span",{className:"direction-attr-value",children:d.references})]})]})]},d.id))})}),u.jsx(Be,{title:"Color Palette",locked:n.palette,onToggleLock:()=>r("palette"),copyText:o,children:u.jsxs("div",{className:"color-palette",children:[t.palette.swatches.map((d,f)=>u.jsx(Mp,{swatch:d,onChange:p=>i(f,p),onRemove:()=>s(f)},d.id)),u.jsx("button",{className:"color-swatch-add",onClick:a,title:"Add color",children:"+"})]})}),u.jsx(Be,{title:"Typography",locked:n.typography,onToggleLock:()=>r("typography"),children:u.jsx(zp,{typography:t.typography})}),u.jsx(Be,{title:"Logo Concepts",locked:n.logo,onToggleLock:()=>r("logo"),children:u.jsx("div",{className:"logo-grid",children:t.logoConcepts.map(d=>u.jsxs("div",{className:"logo-card",children:[u.jsx("div",{className:"logo-card-title",children:d.title}),u.jsx("div",{className:"logo-card-concept",children:d.concept}),u.jsxs("div",{className:"logo-card-attrs",children:[u.jsxs("div",{className:"logo-card-attr",children:[u.jsx("span",{className:"logo-card-attr-label",children:"Mark"}),u.jsx("span",{className:"logo-card-attr-value",children:d.mark})]}),u.jsxs("div",{className:"logo-card-attr",children:[u.jsx("span",{className:"logo-card-attr-label",children:"Execution"}),u.jsx("span",{className:"logo-card-attr-value",children:d.execution})]})]})]},d.id))})}),u.jsx(Be,{title:"Usage Examples",locked:n.usage,onToggleLock:()=>r("usage"),children:u.jsx("div",{className:"usage-grid",children:t.usageExamples.map((d,f)=>u.jsxs("div",{className:"usage-item",children:[u.jsx("div",{className:"usage-context",children:d.context}),u.jsxs("div",{className:"usage-text",style:{position:"relative"},children:[d.text,u.jsx("div",{className:"usage-copy",children:u.jsx(Vi,{text:d.text,label:"Copy"})})]})]},f))})}),u.jsx(Be,{title:"Constraints",locked:n.constraints,onToggleLock:()=>r("constraints"),children:u.jsx("div",{className:"constraints-list",children:t.constraints.map((d,f)=>u.jsx("div",{className:"constraint-item",children:d},f))})})]})}function ra(e,t){const n=[];return n.push(`# Brand Package — ${e.name||"Untitled"}`),n.push(""),n.push(`*Generated ${new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}*`),n.push(""),n.push("---"),n.push(""),n.push("## Overview"),n.push(""),n.push(t.overview),n.push(""),n.push("## Positioning"),n.push(""),n.push(t.positioning),n.push(""),n.push("## Tone & Voice"),n.push(""),n.push(`**Attributes:** ${t.tone.attributes.join(", ")}`),n.push(""),n.push(`**Voice:** ${t.tone.voiceNotes}`),n.push(""),t.tone.avoidList.length>0&&(n.push(`**Avoid:** ${t.tone.avoidList.join(", ")}`),n.push("")),t.tone.examplePhrases.length>0&&(n.push("**Example phrases:**"),t.tone.examplePhrases.forEach(r=>n.push(`- ${r}`)),n.push("")),n.push("## Messaging"),n.push(""),n.push("### Titles"),t.titles.forEach((r,l)=>n.push(`${l+1}. ${r}`)),n.push(""),n.push("### Subtitles"),t.subtitles.forEach((r,l)=>n.push(`${l+1}. ${r}`)),n.push(""),n.push("### Taglines"),t.taglines.forEach((r,l)=>n.push(`${l+1}. ${r}`)),n.push(""),n.push("## Color Palette"),n.push(""),t.palette.swatches.forEach(r=>{n.push(`- **${r.name}** — \`${r.hex}\` *(${r.role})*`)}),n.push(""),n.push("## Typography"),n.push(""),n.push(`**Primary:** ${t.typography.primary}`),t.typography.secondary!==t.typography.primary&&n.push(`**Secondary:** ${t.typography.secondary}`),n.push(`**Monospace:** ${t.typography.mono}`),n.push(""),n.push(`*${t.typography.pairNote}*`),n.push(""),n.push("| Style | Size | Weight | Usage |"),n.push("|-------|------|--------|-------|"),t.typography.scale.forEach(r=>{n.push(`| ${r.label} | ${r.size} | ${r.weight} | ${r.usage} |`)}),n.push(""),n.push("## Visual Direction"),n.push(""),t.visualDirections.forEach(r=>{n.push(`### ${r.name}`),n.push(""),n.push(r.description),n.push(""),n.push(`**Palette:** ${r.palette}`),n.push(""),n.push(`**Typography:** ${r.typography}`),n.push(""),n.push(`**References:** ${r.references}`),n.push("")}),n.push("## Logo Concepts"),n.push(""),t.logoConcepts.forEach(r=>{n.push(`### ${r.title}`),n.push(""),n.push(r.concept),n.push(""),n.push(`**Mark:** ${r.mark}`),n.push(""),n.push(`**Execution:** ${r.execution}`),n.push("")}),n.push("## Usage Examples"),n.push(""),t.usageExamples.forEach(r=>{n.push(`### ${r.context}`),n.push(""),n.push("```"),n.push(r.text),n.push("```"),n.push("")}),n.push("## Constraints"),n.push(""),t.constraints.forEach(r=>n.push(`- ${r}`)),n.push(""),n.push("---"),n.push(""),n.push("*Brand Workbench*"),n.join(` +`)}function Op(e,t){return JSON.stringify({project:{name:e.name,category:e.category,purpose:e.purpose,audience:e.audience},brand:t,meta:{generated:new Date().toISOString(),version:"1.0"}},null,2)}function Ip(e,t){const n=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),r=f=>f.replace(/&/g,"&").replace(//g,">"),l=t.palette.swatches.map(f=>` +
+
+
${r(f.name)}
+
${r(f.hex)}
+
`).join(""),o=t.typography.scale.map(f=>` + ${r(f.label)}${r(f.size)}${r(f.weight)}${r(f.usage)}`).join(""),i=t.visualDirections.map(f=>` +
+

${r(f.name)}

+

${r(f.description)}

+
+
Palette
${r(f.palette)}
+
Typography
${r(f.typography)}
+
References
${r(f.references)}
+
+
`).join(""),s=t.logoConcepts.map(f=>` +
+

${r(f.title)}

+

${r(f.concept)}

+
+
Mark
${r(f.mark)}
+
Execution
${r(f.execution)}
+
+
`).join(""),a=t.usageExamples.map(f=>` +
+
${r(f.context)}
+
${r(f.text)}
+
`).join(""),c=t.constraints.map(f=>`
  • ${r(f)}
  • `).join(` +`),d=t.typography.secondary!==t.typography.primary?`Secondary${r(t.typography.secondary)}`:"";return` + + + + +${r(e.name||"Brand")} — Brand Guidelines + + + +
    +
    +

    ${r(e.name||"Brand")} Guidelines

    +
    Generated ${n}${e.category?` · ${r(e.category)}`:""}${e.audience?` · ${r(e.audience)}`:""}
    +
    + +
    +

    Overview

    +

    ${r(t.overview)}

    +
    + +
    +

    Positioning

    +

    ${r(t.positioning)}

    +
    + +
    +

    Tone & Voice

    +
    ${t.tone.attributes.map(f=>`${r(f)}`).join("")}
    +
    Voice${r(t.tone.voiceNotes)}
    + ${t.tone.avoidList.length?`
    Avoid${r(t.tone.avoidList.join(", "))}
    `:""} +
    + +
    +

    Messaging

    +
    +

    Titles

    +
      ${t.titles.map(f=>`
    1. ${r(f)}
    2. `).join("")}
    +
    +
    +
    +

    Taglines

    +
      ${t.taglines.map(f=>`
    1. ${r(f)}
    2. `).join("")}
    +
    +
    + +
    +

    Color Palette

    +
    ${l}
    +
    + +
    +

    Typography

    + + + ${d} + +
    Primary${r(t.typography.primary)}
    Monospace${r(t.typography.mono)}
    +

    ${r(t.typography.pairNote)}

    +
    + + + ${o} +
    StyleSizeWeightUsage
    +
    + +
    +

    Visual Direction

    + ${i} +
    + +
    +

    Logo Concepts

    + ${s} +
    + +
    +

    Usage Examples

    + ${a} +
    + +
    +

    Constraints

    +
      ${c}
    +
    +
    + +`}function to(e,t,n){const r=new Blob([e],{type:n}),l=URL.createObjectURL(r),o=document.createElement("a");o.href=l,o.download=t,o.click(),URL.revokeObjectURL(l)}function Rp({inputs:e,outputs:t,locked:n,onToggleLock:r,onEdit:l,isGenerating:o,generateMode:i,generateError:s,onGenerate:a}){const c=()=>{t&&to(ra(e,t),`${e.name||"brand"}-package.md`,"text/markdown")},d=()=>{t&&to(Op(e,t),`${e.name||"brand"}-package.json`,"application/json")},f=()=>{t&&to(Ip(e,t),`${e.name||"brand"}-guidelines.html`,"text/html")},p=t?ra(e,t):"";return u.jsxs("div",{className:"preview-panel",children:[u.jsxs("div",{className:"preview-toolbar",children:[u.jsxs("div",{className:"preview-toolbar-left",children:[u.jsx("span",{className:"preview-doc-label",children:t?"Brand Package":"Preview"}),t&&u.jsxs("span",{style:{fontSize:11,color:"var(--text-4)"},children:["· ",new Date().toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]}),t&&u.jsx("div",{className:"preview-toolbar-right",children:u.jsx(Vi,{text:p,label:"Copy all"})})]}),s&&u.jsxs("div",{className:"generate-error",children:[u.jsx("span",{className:"generate-error-icon",children:"⚠"}),u.jsx("span",{className:"generate-error-msg",children:s}),a&&u.jsx("button",{className:"generate-error-retry btn btn-ghost",onClick:a,children:"Try template instead"})]}),u.jsx("div",{className:"preview-scroll",children:o?u.jsxs("div",{className:"empty-state",children:[u.jsx("div",{className:"empty-state-title",style:{color:"var(--text-3)"},children:i&&i!=="template"?`Thinking with ${i}…`:"Generating…"}),i&&i!=="template"&&u.jsx("div",{className:"empty-state-sub",children:"This may take 15–60 seconds depending on your hardware"})]}):t?u.jsx(Dp,{inputs:e,outputs:t,locked:n,onToggleLock:r,onEdit:l}):u.jsxs("div",{className:"empty-state",children:[u.jsx("div",{className:"empty-state-title",children:"No package generated yet"}),u.jsx("div",{className:"empty-state-sub",children:"Fill in the project details and click Generate"})]})}),t&&u.jsxs("div",{className:"export-bar",children:[u.jsx("span",{className:"export-bar-left",children:"Export"}),u.jsxs("div",{className:"export-bar-right",children:[u.jsx("button",{className:"btn",onClick:c,children:"Export Markdown"}),u.jsx("button",{className:"btn",onClick:d,children:"Export JSON"}),u.jsx("button",{className:"btn",onClick:f,children:"Export HTML"})]})]})]})}function Fp({slots:e,activeId:t,onSwitch:n,onCreate:r,onRemove:l,onRename:o,onDuplicate:i}){const[s,a]=L.useState(null),[c,d]=L.useState(""),[f,p]=L.useState(null);L.useEffect(()=>{if(!f)return;const v=()=>p(null);return document.addEventListener("click",v),()=>document.removeEventListener("click",v)},[f]);const y=(v,_)=>{if(_.stopPropagation(),(f==null?void 0:f.id)===v){p(null);return}const m=_.currentTarget.getBoundingClientRect();p({id:v,top:m.bottom+4,left:m.left})},k=v=>{const _=c.trim();_&&o(v,_),a(null)};return u.jsxs("div",{className:"pkg-switcher",children:[e.map(v=>u.jsxs("div",{className:`pkg-tab${v.id===t?" active":""}`,onClick:()=>v.id!==t&&n(v.id),children:[s===v.id?u.jsx("input",{autoFocus:!0,className:"pkg-tab-input",value:c,onChange:_=>d(_.target.value),onBlur:()=>k(v.id),onKeyDown:_=>{_.key==="Enter"&&k(v.id),_.key==="Escape"&&a(null)},onClick:_=>_.stopPropagation()}):u.jsx("span",{className:"pkg-tab-name",onDoubleClick:_=>{_.stopPropagation(),d(v.name),a(v.id)},children:v.name}),u.jsxs("div",{className:"pkg-tab-actions",children:[u.jsx("button",{className:"pkg-tab-menu-btn",title:"Options",onClick:_=>y(v.id,_),children:"···"}),e.length>1&&u.jsx("button",{className:"pkg-tab-close",title:"Remove",onClick:_=>{_.stopPropagation(),l(v.id)},children:"×"})]})]},v.id)),u.jsx("button",{className:"pkg-new-btn",onClick:r,title:"New package",children:"+"}),f&&gc.createPortal(u.jsxs("div",{className:"pkg-tab-dropdown",style:{position:"fixed",top:f.top,left:f.left},onClick:v=>v.stopPropagation(),children:[u.jsx("button",{onClick:()=>{const v=e.find(_=>_.id===f.id);v&&(d(v.name),a(v.id)),p(null)},children:"Rename"}),u.jsx("button",{onClick:()=>{i(f.id),p(null)},children:"Duplicate"}),e.length>1&&u.jsx("button",{className:"danger",onClick:()=>{l(f.id),p(null)},children:"Delete"})]}),document.body)]})}function Ap({settings:e,onChange:t,onClose:n}){const[r,l]=L.useState(e.baseUrl),[o,i]=L.useState(e.model),[s,a]=L.useState({status:"idle"}),c=()=>t({baseUrl:r}),d=p=>{i(p),t({model:p})},f=async()=>{t({baseUrl:r}),a({status:"testing"});try{const p=await gp(r);a({status:"ok",models:p})}catch(p){a({status:"error",message:p.message})}};return L.useEffect(()=>{const p=y=>{y.key==="Escape"&&n()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[n]),u.jsx("div",{className:"settings-overlay",onClick:n,children:u.jsxs("div",{className:"settings-panel",onClick:p=>p.stopPropagation(),children:[u.jsxs("div",{className:"settings-header",children:[u.jsx("span",{className:"settings-title",children:"Settings"}),u.jsx("button",{className:"settings-close",onClick:n,children:"×"})]}),u.jsxs("div",{className:"settings-body",children:[u.jsxs("div",{className:"settings-section",children:[u.jsx("div",{className:"settings-section-label",children:"AI Generation"}),u.jsxs("label",{className:"settings-toggle-row",children:[u.jsxs("div",{className:"settings-toggle-info",children:[u.jsx("span",{className:"settings-toggle-name",children:"Use Ollama"}),u.jsx("span",{className:"settings-toggle-desc",children:"Replace template generation with a local AI model"})]}),u.jsx("button",{className:`toggle${e.enabled?" on":""}`,onClick:()=>t({enabled:!e.enabled}),role:"switch","aria-checked":e.enabled,children:u.jsx("span",{className:"toggle-thumb"})})]})]}),e.enabled&&u.jsxs("div",{className:"settings-section",children:[u.jsx("div",{className:"settings-section-label",children:"Ollama"}),u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{className:"settings-field-label",children:"Server URL"}),u.jsxs("div",{className:"settings-field-row",children:[u.jsx("input",{className:"settings-input",type:"url",value:r,onChange:p=>l(p.target.value),onBlur:c,onKeyDown:p=>p.key==="Enter"&&c(),placeholder:"http://localhost:11434",spellCheck:!1}),u.jsx("button",{className:`btn settings-test-btn${s.status==="testing"?" testing":""}`,onClick:f,disabled:s.status==="testing",children:s.status==="testing"?"Testing…":"Test"})]}),s.status==="ok"&&u.jsxs("div",{className:"settings-status ok",children:["Connected · ",s.models.length," model",s.models.length!==1?"s":""," available"]}),s.status==="error"&&u.jsx("div",{className:"settings-status error",children:s.message})]}),u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{className:"settings-field-label",children:"Model"}),u.jsx("input",{className:"settings-input",value:o,onChange:p=>i(p.target.value),onBlur:()=>d(o),onKeyDown:p=>p.key==="Enter"&&d(o),placeholder:"llama3.2",spellCheck:!1}),s.status==="ok"&&s.models.length>0&&u.jsx("div",{className:"settings-model-list",children:s.models.map(p=>u.jsx("button",{className:`settings-model-item${p===o?" active":""}`,onClick:()=>d(p),children:p},p))}),u.jsxs("div",{className:"settings-field-hint",children:["Pull a model first: ",u.jsx("code",{children:"ollama pull llama3.2"})]})]})]}),u.jsxs("div",{className:"settings-section settings-help",children:[u.jsx("div",{className:"settings-section-label",children:"About Ollama"}),u.jsxs("p",{children:["Ollama runs AI models locally on your machine — no API key, no data sent externally. Install from ",u.jsx("strong",{children:"ollama.com"}),", then pull any model to get started."]}),u.jsxs("p",{children:["If connection fails, ensure Ollama is running and CORS is open:",u.jsx("br",{}),u.jsx("code",{children:"OLLAMA_ORIGINS=* ollama serve"})]})]})]})]})})}function Up({storageKey:e,slots:t,activeId:n,onSwitch:r,onCreate:l,onRemove:o,onRename:i,onDuplicate:s,onOpenSettings:a,aiEnabled:c}){const{inputs:d,setInputs:f,outputs:p,isGenerating:y,generateMode:k,generateError:v,locked:_,runGenerate:m,cancelGenerate:h,updateEdit:g,toggleLock:w,undo:S,redo:T,canUndo:C,canRedo:P}=Np(e);L.useEffect(()=>{const Z=ue=>{!(ue.metaKey||ue.ctrlKey)||ue.key!=="z"||(ue.preventDefault(),ue.shiftKey?T():S())};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[S,T]);const I=(Z,ue)=>g(Z,ue),z=y?"Cancel":p?"Regenerate":c?"Generate with AI":"Generate";return u.jsxs(u.Fragment,{children:[u.jsxs("header",{className:"app-header",children:[u.jsxs("div",{className:"app-header-left",children:[u.jsxs("span",{className:"app-wordmark",children:["Brand",u.jsx("span",{children:"bench"})]}),u.jsx(Fp,{slots:t,activeId:n,onSwitch:r,onCreate:l,onRemove:o,onRename:i,onDuplicate:s})]}),u.jsxs("div",{className:"app-header-right",children:[p&&u.jsxs(u.Fragment,{children:[u.jsx("button",{className:"btn btn-ghost",onClick:S,disabled:!C,title:"Undo (⌘Z)",children:"Undo"}),u.jsx("button",{className:"btn btn-ghost",onClick:T,disabled:!P,title:"Redo (⌘⇧Z)",children:"Redo"})]}),c&&u.jsx("span",{className:"ai-badge",title:`AI mode: ${k}`,children:"AI"}),u.jsx("button",{className:"btn btn-ghost settings-open-btn",onClick:a,title:"Settings",children:"⚙"})]})]}),u.jsxs("div",{className:"app-shell",children:[u.jsx(_p,{inputs:d,onChange:f,onGenerate:y?h:m,isGenerating:y,generateLabel:z}),u.jsx(Rp,{inputs:d,outputs:p,locked:_,onToggleLock:w,onEdit:I,isGenerating:y,generateMode:k,generateError:v,onGenerate:m})]})]})}function Bp(){const{slots:e,activeId:t,activeSlot:n,switchTo:r,createNew:l,remove:o,rename:i,duplicate:s}=Tp(),{settings:a,setSettings:c}=vp(),[d,f]=L.useState(!1);return u.jsxs(u.Fragment,{children:[u.jsx(Up,{storageKey:n.storageKey,slots:e,activeId:t,onSwitch:r,onCreate:l,onRemove:o,onRename:i,onDuplicate:s,onOpenSettings:()=>f(!0),aiEnabled:a.enabled},t),d&&u.jsx(Ap,{settings:a,onChange:c,onClose:()=>f(!1)})]})}yc(document.getElementById("root")).render(u.jsx(L.StrictMode,{children:u.jsx(Bp,{})})); diff --git a/dist/assets/index-DGtPY7GZ.css b/dist/assets/index-DGtPY7GZ.css new file mode 100644 index 0000000..c3e6f33 --- /dev/null +++ b/dist/assets/index-DGtPY7GZ.css @@ -0,0 +1 @@ +*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html{font-size:14px}:root{--bg: #0d0d0d;--bg-1: #111111;--bg-2: #161616;--bg-3: #1c1c1c;--bg-4: #222222;--border: #242424;--border-2: #1a1a1a;--border-3: #2e2e2e;--text: #dedede;--text-2: #999999;--text-3: #555555;--text-4: #333333;--accent: #c9a96e;--accent-dim: #7a6341;--success: #4a9470;--danger: #8a3030;--font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--font-mono: ui-monospace, "JetBrains Mono", "Fira Code", "Cascadia Code", Menlo, monospace;--r: 4px;--r-lg: 6px;--header-h: 44px;--panel-w: 360px}body{background:var(--bg);color:var(--text);font-family:var(--font-sans);font-size:13px;line-height:1.5;-webkit-font-smoothing:antialiased;overflow:hidden;height:100vh}#root{height:100vh;display:flex;flex-direction:column}.app-header{height:var(--header-h);min-height:var(--header-h);display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--border);background:var(--bg-1);flex-shrink:0;gap:12px}.app-header-left{display:flex;align-items:center;gap:12px;min-width:0}.app-wordmark{font-size:12px;font-weight:600;letter-spacing:.05em;color:var(--text);text-transform:uppercase;flex-shrink:0}.app-wordmark span{color:var(--text-3);font-weight:400}.app-project-name{font-size:12px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-project-name:before{content:"/ ";color:var(--text-4)}.app-header-right{display:flex;align-items:center;gap:6px;flex-shrink:0}.pkg-switcher{display:flex;align-items:center;gap:2px;overflow-x:auto;scrollbar-width:none;max-width:480px}.pkg-switcher::-webkit-scrollbar{display:none}.pkg-tab{display:flex;align-items:center;gap:4px;padding:0 8px;height:26px;border-radius:var(--r);border:1px solid transparent;font-size:12px;color:var(--text-3);cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:all .1s;flex-shrink:0}.pkg-tab:hover{background:var(--bg-3);color:var(--text-2)}.pkg-tab.active{background:var(--bg-3);border-color:var(--border);color:var(--text)}.pkg-tab-name{max-width:120px;overflow:hidden;text-overflow:ellipsis}.pkg-tab-input{width:100px;background:transparent;border:none;outline:none;font-size:12px;font-family:inherit;color:var(--text);padding:0}.pkg-tab-actions{display:flex;align-items:center;gap:2px;margin-left:2px;opacity:0;transition:opacity .1s}.pkg-tab:hover .pkg-tab-actions,.pkg-tab.active .pkg-tab-actions{opacity:1}.pkg-tab-close,.pkg-tab-menu-btn{background:none;border:none;color:var(--text-4);cursor:pointer;font-size:12px;padding:0 2px;line-height:1;display:flex;align-items:center;border-radius:2px;height:16px}.pkg-tab-close:hover,.pkg-tab-menu-btn:hover{background:var(--bg-4);color:var(--text-2)}.pkg-tab-menu-btn{letter-spacing:-1px;font-size:10px}.pkg-tab-dropdown{background:var(--bg-3);border:1px solid var(--border-3);border-radius:var(--r-lg);padding:4px;z-index:100;min-width:120px;box-shadow:0 4px 16px #0006}.pkg-tab-dropdown button{display:block;width:100%;text-align:left;background:none;border:none;color:var(--text-2);font-size:12px;font-family:inherit;padding:5px 8px;border-radius:var(--r);cursor:pointer}.pkg-tab-dropdown button:hover{background:var(--bg-4);color:var(--text)}.pkg-tab-dropdown button.danger{color:#c04040}.pkg-tab-dropdown button.danger:hover{background:#c0404026}.pkg-new-btn{width:26px;height:26px;border-radius:var(--r);border:1px dashed var(--border-3);background:none;color:var(--text-4);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all .1s}.pkg-new-btn:hover{border-color:var(--text-3);color:var(--text-2);background:var(--bg-3)}.app-shell{display:flex;flex:1;min-height:0;overflow:hidden}.input-panel{width:var(--panel-w);min-width:var(--panel-w);border-right:1px solid var(--border);display:flex;flex-direction:column;overflow-y:auto;background:var(--bg-1)}.input-panel::-webkit-scrollbar{width:4px}.input-panel::-webkit-scrollbar-track{background:transparent}.input-panel::-webkit-scrollbar-thumb{background:var(--border-3);border-radius:2px}.input-section{padding:16px;border-bottom:1px solid var(--border-2)}.input-section:last-of-type{border-bottom:none}.input-section-label{font-size:10px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--text-3);margin-bottom:12px}.field{display:flex;flex-direction:column;gap:5px;margin-bottom:10px}.field:last-child{margin-bottom:0}.field-label{font-size:11px;color:var(--text-2);font-weight:500}.field-input,.field-textarea{background:var(--bg);border:1px solid var(--border);border-radius:var(--r);color:var(--text);font-family:var(--font-sans);font-size:13px;padding:7px 10px;width:100%;transition:border-color .1s;outline:none}.field-input::placeholder,.field-textarea::placeholder{color:var(--text-4)}.field-input:focus,.field-textarea:focus{border-color:var(--border-3)}.field-textarea{resize:vertical;min-height:72px;line-height:1.5}.token-field{display:flex;flex-direction:column;gap:5px}.token-container{display:flex;flex-wrap:wrap;gap:5px;background:var(--bg);border:1px solid var(--border);border-radius:var(--r);padding:6px;min-height:36px;cursor:text;transition:border-color .1s}.token-container:focus-within{border-color:var(--border-3)}.token{display:flex;align-items:center;gap:4px;background:var(--bg-3);border:1px solid var(--border);border-radius:3px;padding:2px 7px 2px 8px;font-size:12px;color:var(--text-2);line-height:1;height:22px}.token-remove{background:none;border:none;color:var(--text-3);cursor:pointer;font-size:14px;line-height:1;padding:0;display:flex;align-items:center;margin-left:1px;opacity:.7}.token-remove:hover{color:var(--text);opacity:1}.token-input{background:none;border:none;color:var(--text);font-family:var(--font-sans);font-size:12px;outline:none;min-width:80px;flex:1;padding:2px}.token-input::placeholder{color:var(--text-4)}.token-suggestions{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.token-suggestion{background:none;border:1px solid var(--border);border-radius:3px;color:var(--text-3);cursor:pointer;font-family:var(--font-sans);font-size:11px;padding:2px 7px;transition:all .1s}.token-suggestion:hover{border-color:var(--border-3);color:var(--text-2)}.token-suggestion.active{background:var(--bg-3);border-color:var(--border-3);color:var(--text)}.generate-area{padding:12px 16px 16px}.btn-generate{width:100%;background:var(--text);border:none;border-radius:var(--r);color:var(--bg);cursor:pointer;font-family:var(--font-sans);font-size:13px;font-weight:600;height:36px;letter-spacing:.01em;transition:opacity .1s,background .1s}.btn-generate:hover:not(:disabled){opacity:.9}.btn-generate:disabled{opacity:.4;cursor:not-allowed}.btn-generate.generating{background:var(--bg-3);color:var(--text-2)}.btn{align-items:center;background:var(--bg-3);border:1px solid var(--border);border-radius:var(--r);color:var(--text-2);cursor:pointer;display:inline-flex;font-family:var(--font-sans);font-size:12px;gap:5px;height:28px;padding:0 10px;transition:all .1s;white-space:nowrap}.btn:hover{border-color:var(--border-3);color:var(--text)}.btn-ghost{background:none;border-color:transparent;color:var(--text-3)}.btn-ghost:hover{background:var(--bg-3);border-color:var(--border);color:var(--text-2)}.btn-icon{padding:0;width:28px;justify-content:center}.preview-panel{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}.preview-toolbar{height:40px;min-height:40px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid var(--border-2);background:var(--bg);flex-shrink:0;gap:12px}.preview-toolbar-left{display:flex;align-items:center;gap:10px}.preview-toolbar-right{display:flex;align-items:center;gap:6px}.preview-doc-label{font-size:11px;color:var(--text-3);font-weight:500}.preview-scroll{flex:1;overflow-y:auto;padding:40px 48px 80px}.preview-scroll::-webkit-scrollbar{width:6px}.preview-scroll::-webkit-scrollbar-track{background:transparent}.preview-scroll::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:8px;color:var(--text-4)}.empty-state-title{font-size:14px;color:var(--text-3);font-weight:500}.empty-state-sub{font-size:12px;color:var(--text-4)}.brand-doc{max-width:720px}.brand-doc-header{margin-bottom:40px;padding-bottom:24px;border-bottom:1px solid var(--border-2)}.brand-doc-title{font-size:28px;font-weight:600;letter-spacing:-.02em;color:var(--text);line-height:1.2;margin-bottom:6px}.brand-doc-meta{font-size:11px;color:var(--text-3);display:flex;gap:12px}.brand-doc-meta-item{display:flex;gap:5px}.brand-doc-meta-label{color:var(--text-4)}.doc-section{border-radius:var(--r);padding:2px;margin:-2px -2px 36px}.doc-section.is-locked{background:#c9a96e06}.doc-section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;gap:8px}.doc-section-title{font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--text-3);display:flex;align-items:center;gap:7px}.section-lock{background:none;border:1px solid transparent;border-radius:3px;color:var(--text-4);cursor:pointer;font-family:var(--font-sans);font-size:10px;letter-spacing:.04em;padding:2px 6px;height:20px;display:inline-flex;align-items:center;transition:all .1s;line-height:1;white-space:nowrap}.section-lock:hover{border-color:var(--border);color:var(--text-3);background:var(--bg-3)}.section-lock.locked{color:var(--accent);border-color:var(--accent-dim);background:#c9a96e0f}.doc-section-actions{display:flex;align-items:center;gap:4px;opacity:0;transition:opacity .15s}.doc-section:hover .doc-section-actions{opacity:1}.doc-section .doc-section-actions:has(.section-lock.locked){opacity:1}.doc-section-body{border-left:1px solid var(--border);padding-left:16px}.doc-section.is-locked .doc-section-body{border-left-color:var(--accent-dim);border-left-width:2px}.editable-text{cursor:text;border-radius:3px;transition:background .1s,outline .1s;line-height:1.65;font-size:14px;color:var(--text);min-height:1em;outline:1px solid transparent}.editable-text:hover{background:var(--bg-2);outline-color:var(--border-2)}.editable-text.editing{background:var(--bg-2);outline:1px solid var(--border-3);border-radius:3px}.numbered-list{display:flex;flex-direction:column;gap:8px}.numbered-item{display:flex;gap:10px;align-items:flex-start}.numbered-item-num{font-size:11px;color:var(--text-4);font-family:var(--font-mono);min-width:16px;margin-top:2px;flex-shrink:0}.numbered-item-text{flex:1;font-size:14px;color:var(--text);line-height:1.5;cursor:text;border-radius:3px;padding:1px 4px;margin:-1px -4px;transition:background .1s}.numbered-item-text:hover{background:var(--bg-2)}.numbered-item-text:focus{background:var(--bg-2);outline:1px solid var(--border-3)}.bullet-list{display:flex;flex-direction:column;gap:6px}.bullet-item{display:flex;gap:8px;align-items:flex-start;font-size:13px;color:var(--text-2);line-height:1.5}.bullet-item:before{content:"–";color:var(--text-4);flex-shrink:0;margin-top:0}.tone-grid{display:flex;flex-direction:column;gap:12px}.tone-row{display:flex;flex-direction:column;gap:4px}.tone-row-label{font-size:11px;color:var(--text-3);font-weight:500}.tone-row-value{font-size:13px;color:var(--text-2);line-height:1.55}.tone-tags{display:flex;flex-wrap:wrap;gap:5px}.tone-tag{background:var(--bg-3);border:1px solid var(--border);border-radius:3px;color:var(--text-2);font-size:11px;padding:2px 8px}.tone-phrases{display:flex;flex-direction:column;gap:5px}.tone-phrase{font-family:var(--font-mono);font-size:12px;color:var(--text-2);padding:5px 8px;background:var(--bg-2);border-radius:3px;border-left:2px solid var(--border-3)}.directions-grid{display:flex;flex-direction:column;gap:20px}.direction-card{border:1px solid var(--border);border-radius:var(--r-lg);padding:16px;background:var(--bg-1)}.direction-name{font-size:13px;font-weight:600;color:var(--text);margin-bottom:8px}.direction-desc{font-size:13px;color:var(--text-2);line-height:1.6;margin-bottom:12px}.direction-attrs{display:flex;flex-direction:column;gap:6px}.direction-attr{display:flex;gap:8px;font-size:12px;line-height:1.5}.direction-attr-label{color:var(--text-4);font-weight:500;min-width:88px;flex-shrink:0}.direction-attr-value{color:var(--text-2)}.logo-grid{display:flex;flex-direction:column;gap:20px}.logo-card{border:1px solid var(--border);border-radius:var(--r-lg);padding:16px;background:var(--bg-1)}.logo-card-title{font-size:13px;font-weight:600;color:var(--text);margin-bottom:8px}.logo-card-concept{font-size:13px;color:var(--text-2);line-height:1.6;margin-bottom:12px}.logo-card-attrs{display:flex;flex-direction:column;gap:6px}.logo-card-attr{display:flex;gap:8px;font-size:12px;line-height:1.5}.logo-card-attr-label{color:var(--text-4);font-weight:500;min-width:72px;flex-shrink:0}.logo-card-attr-value{color:var(--text-2)}.usage-grid{display:flex;flex-direction:column;gap:16px}.usage-item{display:flex;flex-direction:column;gap:6px}.usage-context{font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-4)}.usage-text{font-family:var(--font-mono);font-size:12px;color:var(--text-2);background:var(--bg-2);border:1px solid var(--border-2);border-radius:var(--r);padding:10px 12px;white-space:pre-wrap;line-height:1.6;position:relative}.usage-copy{position:absolute;top:6px;right:6px;opacity:0;transition:opacity .1s}.usage-item:hover .usage-copy{opacity:1}.type-section{display:flex;flex-direction:column;gap:20px}.type-fonts{display:flex;flex-direction:column;gap:6px}.type-font-row{display:flex;align-items:baseline;gap:10px;font-size:13px}.type-font-role{font-size:11px;color:var(--text-4);font-weight:500;min-width:80px;flex-shrink:0}.type-font-name{color:var(--text);font-weight:500}.type-pair-note{font-size:12px;color:var(--text-3);margin-top:4px}.type-scale{display:flex;flex-direction:column}.type-scale-header{display:grid;grid-template-columns:90px 52px 56px 1fr;gap:0 12px;font-size:10px;font-weight:600;color:var(--text-4);letter-spacing:.06em;text-transform:uppercase;padding:0 0 6px;border-bottom:1px solid var(--border-2)}.type-scale-row{display:grid;grid-template-columns:90px 52px 56px 1fr;gap:0 12px;font-size:12px;padding:7px 0;border-bottom:1px solid var(--border-2);align-items:center}.type-scale-row:last-child{border-bottom:none}.type-scale-label{color:var(--text-2);font-weight:500}.type-scale-size,.type-scale-weight{color:var(--text-3);font-family:var(--font-mono)}.type-scale-usage{color:var(--text-4)}.color-palette{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start}.color-swatch-card{display:flex;flex-direction:column;width:88px;gap:6px}.color-swatch-preview{position:relative;width:88px;height:60px;border-radius:var(--r);border:1px solid rgba(0,0,0,.15);overflow:hidden;cursor:pointer}.color-swatch-picker{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;border:none;padding:0}.color-swatch-remove{position:absolute;top:4px;right:4px;width:16px;height:16px;border-radius:50%;background:#00000080;border:none;color:#fff;font-size:12px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .1s;padding:0;z-index:1}.color-swatch-card:hover .color-swatch-remove{opacity:1}.color-swatch-info{display:flex;flex-direction:column;gap:2px}.color-swatch-name{font-size:11px;font-weight:500;color:var(--text-2);cursor:text;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.color-swatch-name:hover{color:var(--text)}.color-swatch-hex{font-family:var(--font-mono);font-size:10px;color:var(--text-3);cursor:text}.color-swatch-hex:hover{color:var(--text-2)}.color-swatch-field-input{width:100%;background:var(--bg-2);border:1px solid var(--border-3);border-radius:3px;color:var(--text);font-family:inherit;font-size:11px;padding:1px 4px;outline:none}.color-swatch-hex-input{font-family:var(--font-mono);font-size:10px}.color-swatch-add{width:88px;height:60px;border-radius:var(--r);border:1px dashed var(--border-3);background:none;color:var(--text-4);font-size:20px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .1s;align-self:flex-start}.color-swatch-add:hover{border-color:var(--text-3);color:var(--text-2);background:var(--bg-2)}.constraints-list{display:flex;flex-direction:column;gap:5px}.constraint-item{font-size:13px;color:var(--text-2);line-height:1.5;display:flex;gap:8px}.constraint-item:before{content:"·";color:var(--text-4);flex-shrink:0}.copy-btn{background:var(--bg-3);border:1px solid var(--border);border-radius:3px;color:var(--text-3);cursor:pointer;font-family:var(--font-sans);font-size:10px;padding:2px 7px;height:20px;display:inline-flex;align-items:center;gap:4px;transition:all .1s;white-space:nowrap}.copy-btn:hover{border-color:var(--border-3);color:var(--text-2)}.copy-btn.copied{color:var(--success);border-color:var(--success)}.export-bar{height:44px;min-height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-top:1px solid var(--border);background:var(--bg-1);flex-shrink:0}.export-bar-left{font-size:11px;color:var(--text-4)}.export-bar-right{display:flex;gap:6px}.settings-open-btn{font-size:16px}.ai-badge{font-size:9px;font-weight:700;letter-spacing:.08em;color:var(--accent);border:1px solid var(--accent-dim);border-radius:3px;padding:1px 5px;cursor:default;flex-shrink:0}.generate-error{display:flex;align-items:center;gap:8px;padding:8px 20px;background:#8a303026;border-bottom:1px solid rgba(138,48,48,.3);font-size:12px;flex-shrink:0}.generate-error-icon{color:#c04040;flex-shrink:0}.generate-error-msg{color:var(--text-2);flex:1;line-height:1.4}.generate-error-retry{margin-left:auto;font-size:11px;flex-shrink:0}.settings-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;z-index:200;display:flex;align-items:flex-start;justify-content:flex-end;padding:var(--header-h) 0 0}.settings-panel{width:400px;height:calc(100vh - var(--header-h));background:var(--bg-2);border-left:1px solid var(--border-3);display:flex;flex-direction:column;overflow:hidden}.settings-header{display:flex;align-items:center;justify-content:space-between;padding:0 20px;height:44px;border-bottom:1px solid var(--border);flex-shrink:0}.settings-title{font-size:12px;font-weight:600;color:var(--text);letter-spacing:.04em;text-transform:uppercase}.settings-close{background:none;border:none;color:var(--text-3);font-size:18px;cursor:pointer;padding:0;line-height:1;width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:var(--r)}.settings-close:hover{background:var(--bg-3);color:var(--text)}.settings-body{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:28px}.settings-section{display:flex;flex-direction:column;gap:12px}.settings-section-label{font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-4)}.settings-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer}.settings-toggle-info{display:flex;flex-direction:column;gap:2px}.settings-toggle-name{font-size:13px;color:var(--text);font-weight:500}.settings-toggle-desc{font-size:11px;color:var(--text-3);line-height:1.4}.toggle{width:36px;height:20px;background:var(--bg-4);border:1px solid var(--border-3);border-radius:10px;cursor:pointer;position:relative;flex-shrink:0;transition:background .15s,border-color .15s}.toggle.on{background:var(--accent-dim);border-color:var(--accent)}.toggle-thumb{position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:var(--text-3);transition:transform .15s,background .15s}.toggle.on .toggle-thumb{transform:translate(16px);background:var(--accent)}.settings-field{display:flex;flex-direction:column;gap:6px}.settings-field-label{font-size:11px;font-weight:500;color:var(--text-3)}.settings-field-row{display:flex;gap:6px}.settings-input{flex:1;background:var(--bg-1);border:1px solid var(--border-3);border-radius:var(--r);color:var(--text);font-family:var(--font-mono);font-size:12px;padding:6px 10px;outline:none;width:100%;transition:border-color .1s}.settings-input:focus{border-color:var(--accent-dim)}.settings-test-btn{flex-shrink:0}.settings-test-btn.testing{opacity:.6}.settings-status{font-size:11px;padding:4px 8px;border-radius:var(--r);line-height:1.4}.settings-status.ok{background:#4a947026;color:#4a9470}.settings-status.error{background:#8a303026;color:#c04040}.settings-model-list{display:flex;flex-direction:column;gap:2px;max-height:180px;overflow-y:auto;border:1px solid var(--border);border-radius:var(--r);padding:4px;background:var(--bg-1)}.settings-model-item{text-align:left;background:none;border:none;color:var(--text-2);font-family:var(--font-mono);font-size:12px;padding:5px 8px;border-radius:3px;cursor:pointer}.settings-model-item:hover{background:var(--bg-3);color:var(--text)}.settings-model-item.active{background:var(--bg-3);color:var(--accent)}.settings-field-hint{font-size:11px;color:var(--text-4);line-height:1.5}.settings-field-hint code{font-family:var(--font-mono);color:var(--text-3);background:var(--bg-1);padding:1px 4px;border-radius:3px}.settings-help p{font-size:12px;color:var(--text-3);line-height:1.6;margin-bottom:8px}.settings-help p:last-child{margin-bottom:0}.settings-help strong{color:var(--text-2);font-weight:500}.settings-help code{font-family:var(--font-mono);font-size:11px;color:var(--text-3);background:var(--bg-1);padding:2px 5px;border-radius:3px;display:inline-block;margin-top:4px}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border-3);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--border-3)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0} diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..1375d33 --- /dev/null +++ b/dist/index.html @@ -0,0 +1,13 @@ + + + + + + Brand Workbench + + + + +
    + + -- cgit v1.2.3