@mhosaic/feedback 0.15.5 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1683 @@
1
+ "use strict";var MhosaicFeedback=(()=>{var ie=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var Dt=Object.getOwnPropertyNames;var Kt=Object.prototype.hasOwnProperty;var Wt=(e,t,r)=>t in e?ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ht=(e,t)=>{for(var r in t)ie(e,r,{get:t[r],enumerable:!0})},Ut=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Dt(t))!Kt.call(e,a)&&a!==r&&ie(e,a,{get:()=>t[a],enumerable:!(n=$t(t,a))||n.enumerable});return e};var Nt=e=>Ut(ie({},"__esModule",{value:!0}),e);var Se=(e,t,r)=>Wt(e,typeof t!="symbol"?t+"":t,r);var co={};Ht(co,{createFeedback:()=>It});var jt=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function Ot(e){let t;try{t=new URL(e)}catch(r){throw new Error(`[mhosaic-feedback] \`endpoint\` is not a valid URL: ${e}`)}if(t.protocol!=="https:"&&!(t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]")))throw new Error(`[mhosaic-feedback] \`endpoint\` must use https:// (got ${t.protocol}//${t.hostname}). http:// is only allowed for localhost in dev.`)}function We(e){var v,w;let t=((v=e.endpoint)!=null?v:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');Ot(t);let r=(w=e.fetch)!=null?w:globalThis.fetch;async function n(h){var C,L,T;let m=h;if(e.beforeSend&&(m=await e.beforeSend(h)),m===!1)throw new Error("Submission cancelled by beforeSend");let p=new FormData;for(let A of jt)p.append(A,String(m[A]));p.append("technical_context",JSON.stringify(m.technical_context)),m.screenshot&&p.append("screenshot",m.screenshot,"screenshot.png"),m.synthetic&&p.append("synthetic","true"),(C=m.user)!=null&&C.id&&p.append("user",JSON.stringify(m.user)),m.widget_version&&p.append("widget_version",m.widget_version);let u={Authorization:`Bearer ${e.apiKey}`};m.synthetic&&(u["X-Mhosaic-Capture-Source"]="error-tracking");let _=(L=e.getSignedIdentity)==null?void 0:L.call(e);_&&_.userHash&&_.exp&&((T=m.user)!=null&&T.id)&&(u["X-Mhosaic-User"]=String(m.user.id),u["X-Mhosaic-User-Hmac"]=_.userHash,u["X-Mhosaic-User-Exp"]=String(_.exp),_.email&&(u["X-Mhosaic-User-Email"]=_.email));let S=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:u,body:p});if(!S.ok){let A=await S.text().catch(()=>"");throw new Error(`Feedback submit failed: ${S.status} ${A}`)}return S.json()}function a(h){var u;let m={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":h},p=(u=e.getSignedIdentity)==null?void 0:u.call(e);return p&&p.userHash&&p.exp&&(m["X-Mhosaic-User-Hmac"]=p.userHash,m["X-Mhosaic-User-Exp"]=String(p.exp),p.email&&(m["X-Mhosaic-User-Email"]=p.email)),m}async function i(h){let m=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:a(h)});if(m.status===404)return[];if(!m.ok){let p=await m.text().catch(()=>"");throw new Error(`listMine failed: ${m.status} ${p}`)}return m.json()}async function s(h){let m=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:a(h)});if(m.status===404)return[];if(!m.ok){let p=await m.text().catch(()=>"");throw new Error(`listChangelog failed: ${m.status} ${p}`)}return m.json()}async function l(h,m){let p=await r(`${t}/api/feedback/v1/reports/widget/${h}/`,{method:"GET",headers:a(m)});if(!p.ok){let u=await p.text().catch(()=>"");throw new Error(`getReport failed: ${p.status} ${u}`)}return p.json()}async function f(h,m,p,u){let _=await r(`${t}/api/feedback/v1/reports/widget/${h}/comments/`,{method:"POST",headers:{...a(m),"Content-Type":"application/json"},body:JSON.stringify({body:p,...u!==void 0&&{client_nonce:u}})});if(!_.ok){let S=await _.text().catch(()=>"");throw new Error(`addComment failed: ${_.status} ${S}`)}return _.json()}async function c(h,m){let p=await r(`${t}/api/feedback/v1/reports/widget/${h}/`,{method:"PATCH",headers:{...a(m),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!p.ok){let u=await p.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${p.status} ${u}`)}return p.json()}function b(h){var u,_,S;if(!h)return"";let m=new URLSearchParams;(u=h.status)==null||u.forEach(C=>m.append("status",C)),(_=h.type)==null||_.forEach(C=>m.append("type",C)),(S=h.severity)==null||S.forEach(C=>m.append("severity",C)),h.q&&m.set("q",h.q),h.mine&&m.set("mine","1"),h.page&&h.page>1&&m.set("page",String(h.page));let p=m.toString();return p?`?${p}`:""}async function d(h,m){let p=await r(`${t}/api/feedback/v1/reports/widget/board/${b(m)}`,{method:"GET",headers:a(h)});if(p.status===404)return{count:0,next:null,previous:null,results:[]};if(!p.ok){let u=await p.text().catch(()=>"");throw new Error(`listBoard failed: ${p.status} ${u}`)}return p.json()}async function y(h,m){let p=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${b(m)}`,{method:"GET",headers:a(h)});if(p.status===404)return{total:0,by_status:{},resolution_rate:0,scope:"mine"};if(!p.ok){let u=await p.text().catch(()=>"");throw new Error(`fetchBoardKpis failed: ${p.status} ${u}`)}return p.json()}return{submitReport:n,listMine:i,listChangelog:s,getReport:l,addComment:f,closeAsResolved:c,listBoard:d,fetchBoardKpis:y}}var qt=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,Vt=[/^eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,/^(?:sk|pk)_proj_[A-Za-z0-9_-]{16,}$/,/^gh[pousr]_[A-Za-z0-9]{30,}$/,/^(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}$/,/^AKIA[0-9A-Z]{12,}$/,/^xox[abprso]-[A-Za-z0-9-]{12,}$/,/^[a-f0-9]{40,}$/i,/^[A-Za-z0-9_-]{40,}$/];function Gt(e){return Vt.some(t=>t.test(e))}function Z(e){try{let t=/^https?:\/\//i.test(e),r=e.startsWith("/");if(!t&&!r)return e;let n=typeof window!="undefined"?window.location.origin:"http://localhost",a=new URL(e,n),i=new URLSearchParams;return a.searchParams.forEach((s,l)=>{qt.test(l)||Gt(s)?i.set(l,"[redacted]"):i.set(l,s)}),a.search=i.toString(),a.hash=a.hash?"#[redacted]":"",a.toString()}catch(t){return e}}var Xt=[/\b(?:sk|pk)_proj_[A-Za-z0-9_*-]+/g,/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,/\bBearer\s+[A-Za-z0-9._~+/=-]{16,}\b/g,/\bAuthorization\s*[:=]\s*["']?[A-Za-z0-9._~+/=-]{16,}["']?/gi,/\bgh[pousr]_[A-Za-z0-9]{30,}\b/g,/\b(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}\b/g,/\bAKIA[0-9A-Z]{12,}\b/g,/\bxox[abprso]-[A-Za-z0-9-]{12,}\b/g,/\bAIza[0-9A-Za-z_-]{35}\b/g,/\bsk-(?:proj-|svcacct-)?[A-Za-z0-9_-]{20,}\b/g,/\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{40,}\b/g,/\bAC[a-f0-9]{32}\b/g,/\bSK[a-f0-9]{32}\b/g];function N(e){let t=e;for(let r of Xt)t=t.replace(r,"[redacted-token]");return t}function He(){var l;let e=navigator,t=(l=e.connection)==null?void 0:l.effectiveType,r=e.deviceMemory,n=document.referrer||void 0,a=n!==void 0?Z(n):void 0,i=Z(window.location.pathname+window.location.search),s;try{let f=new URL(i,window.location.origin);s=f.pathname+f.search}catch(f){s=window.location.pathname}return{viewport:{w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},screen:{w:window.screen.width,h:window.screen.height},platform:e.platform,language:e.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,timezoneOffset:new Date().getTimezoneOffset(),...t!==void 0&&{connection:t},online:e.onLine,...r!==void 0&&{deviceMemory:r},hardwareConcurrency:e.hardwareConcurrency,...a!==void 0&&{referrer:a},title:N(document.title||"").slice(0,200),pathname:s}}function Zt(e){if(e==null)return String(e);if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(e instanceof Error)return`${e.name}: ${e.message}`;if(e instanceof Element)return`<${e.tagName.toLowerCase()}>`;try{return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)}catch(t){try{return String(e)}catch(r){return"[unserializable]"}}}function Ue(e){let t=["log","info","warn","error","debug"],r={};for(let n of t){let a=console[n];typeof a=="function"&&(r[n]=a,console[n]=function(...s){try{let l=s.map(Zt).join(" "),f=N(l).slice(0,2e3),c={level:n,message:f,ts:Date.now()};if(n==="error"){let b=new Error().stack;b&&(c.stack=b.split(`
2
+ `).slice(2,8).join(`
3
+ `))}e.push(c)}catch(l){}a.apply(console,s)})}return()=>{for(let[n,a]of Object.entries(r))console[n]=a}}function Ne(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(a,i){let s=performance.now(),l=typeof a=="string"?a:a instanceof URL?a.toString():a.url,f=((i==null?void 0:i.method)||(a instanceof Request?a.method:"GET")).toUpperCase();try{let c=await r(a,i);return e.push({url:t(l),method:f,status:c.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),c}catch(c){let b=c instanceof Error?c.message:String(c);throw e.push({url:t(l),method:f,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:N(b)}),c}},()=>{window.fetch=r}}function je(e,t){if(typeof window=="undefined"||typeof window.XMLHttpRequest!="function")return()=>{};let r=window.XMLHttpRequest,n=r.prototype.open,a=r.prototype.send;return r.prototype.open=function(s,l){return this.__mfb={method:s.toUpperCase(),url:typeof l=="string"?l:l.toString(),start:performance.now()},n.apply(this,arguments)},r.prototype.send=function(s){return this.addEventListener("loadend",()=>{try{let l=this.__mfb;if(!l)return;e.push({url:t(l.url),method:l.method,status:this.status,durationMs:Math.round(performance.now()-l.start),ts:Date.now()})}catch(l){}}),a.call(this,s!=null?s:null)},()=>{r.prototype.open=n,r.prototype.send=a}}function Oe(e){if(typeof window=="undefined")return()=>{};let t=n=>{let a=n.error instanceof Error?n.error.stack:void 0,i=a!==void 0?N(a):void 0;e.push({message:N(n.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=n=>{let a=n.reason,i=a instanceof Error?a.message:typeof a=="string"?a:(()=>{try{return JSON.stringify(a)}catch(f){return String(a)}})(),s=a instanceof Error?a.stack:void 0,l=s!==void 0?N(s):void 0;e.push({message:N(i),...l!==void 0&&{stack:l},ts:Date.now(),source:"unhandledrejection"})};return window.addEventListener("error",t),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",r)}}function qe(e=1e3){let t=[],r=[],n=null;if(typeof PerformanceObserver!="undefined")try{n=new PerformanceObserver(a=>{for(let i of a.getEntries())if(i.entryType==="longtask")for(t.push({duration:i.duration,startTime:i.startTime});t.length>20;)t.shift();else if(i.entryType==="resource"){let s=i;if(s.duration>e)for(r.push({name:Z(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),n.observe({entryTypes:["longtask","resource"]})}catch(a){}return{snapshot(){let a=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=a?{type:a.type,duration:a.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){n==null||n.disconnect()}}}var Q=class{constructor(t){Se(this,"max",t);Se(this,"items",[])}push(t){for(this.items.push(t);this.items.length>this.max;)this.items.shift()}snapshot(){return this.items.slice()}clear(){this.items.length=0}};function Ve(e={}){var v;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:n=20}=e,a=(v=e.sanitizeUrl)!=null?v:Z,i=new Q(t),s=new Q(r),l=new Q(n),f=Ue(i),c=Ne(s,a),b=je(s,a),d=Oe(l),y=qe();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:He(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){f(),c(),b(),d(),y.dispose()}}}var Yt={"fab.label":"Send feedback","form.title":"Send feedback","form.description.label":"What happened?","form.description.placeholder":"Describe the issue or idea in one or two sentences.","form.type.label":"Type","form.severity.label":"Severity","form.submit":"Send","form.cancel":"Cancel","form.close":"Close","form.submitting":"Sending\u2026","form.success":"Thanks \u2014 your feedback was sent.","form.error":"Could not send. Please try again.","form.description.required":"Please describe the issue before sending.","form.screenshot.label":"Screenshot","form.screenshot.cta_click":"Click","form.screenshot.cta_rest":"drop, or paste an image","form.screenshot.formats":"PNG, JPEG or WebP \u2014 up to 10 MB","form.screenshot.remove":"Remove screenshot","form.screenshot.annotate":"Annotate","form.screenshot.error_type":"Unsupported file type. Use PNG, JPEG or WebP.","form.screenshot.error_size":"File too large (max {max} MB).","form.context.label":"Page","type.bug":"Bug","type.feature":"Feature request","type.question":"Question","type.praise":"Praise","type.typo":"Typo","severity.blocker":"Blocker","severity.high":"High","severity.medium":"Medium","severity.low":"Low","annotator.title":"Annotate screenshot","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Arrow","annotator.tool.freehand":"Freehand","annotator.tool.text":"Text","annotator.tool.highlight":"Highlight","annotator.tool.blur":"Blur (hide sensitive data)","annotator.text_prompt":"Enter text:","annotator.color_picker":"Custom color","annotator.undo":"Undo","annotator.redo":"Redo","annotator.clear":"Clear all","annotator.count_suffix":"annotations","annotator.loading":"Loading\u2026","annotator.apply":"Apply","annotator.applying":"Applying\u2026","tab.send":"Send","tab.mine":"My reports","tab.changelog":"This week","tab.board":"Board","board.kpi.total":"Total","board.kpi.new":"New","board.kpi.in_progress":"In progress","board.kpi.awaiting_validation":"Awaiting validation","board.kpi.closed":"Closed","board.kpi.rejected":"Rejected","board.kpi.resolution_rate":"Resolution rate","board.filter.status":"Status","board.filter.type":"Type","board.filter.severity":"Severity","board.filter.search.placeholder":"Search\u2026","board.filter.mine":"Mine only","board.filter.clear":"Clear filters","board.list.empty.title":"Nothing here yet","board.list.empty.description":"When reports land, they\u2019ll show up here.","board.list.loading":"Loading\u2026","board.list.error":"Couldn\u2019t load reports. Try again.","board.list.you":"you","board.list.count":"{n} of {total}","board.detail.empty":"Pick a report on the left to see its full thread.","board.detail.by":"By","board.detail.confirm_resolution":"Confirm resolution","board.detail.status_history":"History","board.scope.project":"Project reports","board.scope.mine":"Your reports","board.back":"Back","changelog.empty.title":"Nothing resolved yet","changelog.empty.body":"Once a report you sent is fixed it will appear here, grouped by week.","changelog.week_of":"Week of {date}","changelog.resolved_one":"{count} resolved","changelog.resolved_many":"{count} resolved","mine.empty.title":"No reports yet","mine.empty.body":"Once you send feedback you can follow the thread here.","mine.refresh":"Refresh","mine.loading":"Loading\u2026","mine.error":"Could not load your reports.","mine.replies_one":"1 reply","mine.replies_many":"{count} replies","mine.filter.empty":"No reports match this filter.","kpi.new":"New","kpi.in_progress":"In progress","kpi.awaiting_validation":"Awaiting you","kpi.resolution_rate":"Resolution rate","detail.back":"Back","detail.thread":"Conversation","detail.no_replies":"No replies yet \u2014 we\u2019ll let you know when an operator responds.","detail.compose_placeholder":"Add a follow-up reply\u2026","detail.compose_send":"Reply","detail.compose_sending":"Sending\u2026","detail.close_cta":"Mark as resolved","detail.close_busy":"Marking\u2026","detail.teammate_notice":"Viewing a teammate\u2019s report \u2014 replies are private to the submitter.","detail.load_failed.title":"Report not available","detail.load_failed.body":"It may have been deleted, or you no longer have access to it.","detail.load_failed.cta":"Back","detail.send_failed":"Couldn\u2019t send your reply. Try again.","detail.close_failed":"Couldn\u2019t mark as resolved. Try again.","detail.history":"Status history","detail.context.submitted_at":"Submitted","detail.context.page":"Page","detail.context.capture.manual":"Manual capture","detail.context.capture.html2canvas":"Auto capture","detail.context.capture.display_media":"Screen share","detail.context.capture.none":"No screenshot","detail.author.staff":"Operator","detail.author.mcp":"Mhosaic Team","detail.author.system":"System","detail.tech.title":"What we received","detail.tech.errors_one":"error","detail.tech.errors_many":"errors","detail.tech.device":"Device","detail.tech.device.viewport":"Viewport","detail.tech.device.platform":"Platform","detail.tech.device.language":"Language","detail.tech.device.timezone":"Timezone","detail.tech.device.connection":"Connection","detail.tech.errors":"Runtime errors","detail.tech.console":"Console (last 20)","detail.tech.network":"Network (last 15)","status.new":"New","status.in_progress":"In progress","status.awaiting_validation":"Awaiting your validation","status.closed":"Closed","status.rejected":"Rejected","status.duplicate":"Duplicate","status.wontfix":"Won\u2019t fix"},Jt={"fab.label":"Envoyer un commentaire","form.title":"Envoyer un commentaire","form.description.label":"Qu\u2019est-il arriv\xE9 ?","form.description.placeholder":"D\xE9crivez le probl\xE8me ou l\u2019id\xE9e en une ou deux phrases.","form.type.label":"Type","form.severity.label":"S\xE9v\xE9rit\xE9","form.submit":"Envoyer","form.cancel":"Annuler","form.close":"Fermer","form.submitting":"Envoi\u2026","form.success":"Merci \u2014 votre commentaire a \xE9t\xE9 envoy\xE9.","form.error":"\xC9chec d\u2019envoi. Veuillez r\xE9essayer.","form.description.required":"D\xE9crivez le probl\xE8me avant d\u2019envoyer.","form.screenshot.label":"Capture d\u2019\xE9cran","form.screenshot.cta_click":"Cliquez","form.screenshot.cta_rest":"d\xE9posez ou collez une image","form.screenshot.formats":"PNG, JPEG ou WebP \u2014 jusqu\u2019\xE0 10 Mo","form.screenshot.remove":"Retirer la capture","form.screenshot.annotate":"Annoter","form.screenshot.error_type":"Format non support\xE9. Utilisez PNG, JPEG ou WebP.","form.screenshot.error_size":"Fichier trop volumineux (max {max} Mo).","form.context.label":"Page","type.bug":"Bogue","type.feature":"Suggestion","type.question":"Question","type.praise":"Compliment","type.typo":"Coquille","severity.blocker":"Bloquant","severity.high":"\xC9lev\xE9e","severity.medium":"Moyenne","severity.low":"Faible","annotator.title":"Annoter la capture","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Fl\xE8che","annotator.tool.freehand":"Dessin libre","annotator.tool.text":"Texte","annotator.tool.highlight":"Surligner","annotator.tool.blur":"Flouter (donn\xE9es sensibles)","annotator.text_prompt":"Entrez le texte :","annotator.color_picker":"Couleur personnalis\xE9e","annotator.undo":"Annuler","annotator.redo":"Refaire","annotator.clear":"Tout effacer","annotator.count_suffix":"annotations","annotator.loading":"Chargement\u2026","annotator.apply":"Appliquer","annotator.applying":"Application\u2026","tab.send":"Envoyer","tab.mine":"Mes rapports","tab.changelog":"Cette semaine","tab.board":"Tableau","board.kpi.total":"Total","board.kpi.new":"Nouveau","board.kpi.in_progress":"En cours","board.kpi.awaiting_validation":"\xC0 valider","board.kpi.closed":"Ferm\xE9","board.kpi.rejected":"Refus\xE9","board.kpi.resolution_rate":"Taux de r\xE9solution","board.filter.status":"Statut","board.filter.type":"Type","board.filter.severity":"S\xE9v\xE9rit\xE9","board.filter.search.placeholder":"Rechercher\u2026","board.filter.mine":"Les miens","board.filter.clear":"Effacer les filtres","board.list.empty.title":"Rien \xE0 voir ici","board.list.empty.description":"Les rapports appara\xEEtront ici d\xE8s qu\u2019ils arrivent.","board.list.loading":"Chargement\u2026","board.list.error":"Impossible de charger les rapports. R\xE9essayez.","board.list.you":"vous","board.list.count":"{n} sur {total}","board.detail.empty":"S\xE9lectionnez un rapport \xE0 gauche pour voir le fil complet.","board.detail.by":"Par","board.detail.confirm_resolution":"Confirmer la r\xE9solution","board.detail.status_history":"Historique","board.scope.project":"Rapports du projet","board.scope.mine":"Vos rapports","board.back":"Retour","changelog.empty.title":"Rien de r\xE9solu pour l\u2019instant","changelog.empty.body":"Quand un rapport que vous avez envoy\xE9 est corrig\xE9, il appara\xEEtra ici, regroup\xE9 par semaine.","changelog.week_of":"Semaine du {date}","changelog.resolved_one":"{count} r\xE9solu","changelog.resolved_many":"{count} r\xE9solus","mine.empty.title":"Aucun rapport","mine.empty.body":"Apr\xE8s votre premier envoi vous pourrez suivre la conversation ici.","mine.refresh":"Actualiser","mine.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","mine.replies_one":"1 r\xE9ponse","mine.replies_many":"{count} r\xE9ponses","mine.filter.empty":"Aucun rapport ne correspond \xE0 ce filtre.","kpi.new":"Nouveau","kpi.in_progress":"En cours","kpi.awaiting_validation":"\xC0 valider","kpi.resolution_rate":"Taux de r\xE9solution","detail.back":"Retour","detail.thread":"Conversation","detail.no_replies":"Pas encore de r\xE9ponse \u2014 vous serez notifi\xE9 d\xE8s qu\u2019un op\xE9rateur r\xE9pondra.","detail.compose_placeholder":"Ajouter une r\xE9ponse\u2026","detail.compose_send":"R\xE9pondre","detail.compose_sending":"Envoi\u2026","detail.close_cta":"Marquer comme r\xE9solu","detail.close_busy":"Validation\u2026","detail.teammate_notice":"Vous consultez le rapport d\u2019un co\xE9quipier \u2014 les r\xE9ponses sont priv\xE9es au soumetteur.","detail.load_failed.title":"Rapport indisponible","detail.load_failed.body":"Il a peut-\xEAtre \xE9t\xE9 supprim\xE9, ou vous n\u2019y avez plus acc\xE8s.","detail.load_failed.cta":"Retour","detail.send_failed":"Impossible d\u2019envoyer votre r\xE9ponse. R\xE9essayez.","detail.close_failed":"Impossible de marquer comme r\xE9solu. R\xE9essayez.","detail.history":"Historique du statut","detail.context.submitted_at":"Envoy\xE9","detail.context.page":"Page","detail.context.capture.manual":"Capture manuelle","detail.context.capture.html2canvas":"Capture automatique","detail.context.capture.display_media":"Partage d\u2019\xE9cran","detail.context.capture.none":"Sans capture","detail.author.staff":"Op\xE9rateur","detail.author.mcp":"\xC9quipe Mhosaic","detail.author.system":"Syst\xE8me","detail.tech.title":"Ce que nous avons re\xE7u","detail.tech.errors_one":"erreur","detail.tech.errors_many":"erreurs","detail.tech.device":"Appareil","detail.tech.device.viewport":"Fen\xEAtre","detail.tech.device.platform":"Plateforme","detail.tech.device.language":"Langue","detail.tech.device.timezone":"Fuseau horaire","detail.tech.device.connection":"Connexion","detail.tech.errors":"Erreurs d\u2019ex\xE9cution","detail.tech.console":"Console (20 derniers)","detail.tech.network":"R\xE9seau (15 derniers)","status.new":"Nouveau","status.in_progress":"En cours","status.awaiting_validation":"En attente de validation","status.closed":"Ferm\xE9","status.rejected":"Rejet\xE9","status.duplicate":"Doublon","status.wontfix":"Non corrig\xE9"},Qt={fr:Jt};function er(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=Qt[t])!=null?r:null}function Ge(e,t={}){var n;let r=(n=er(t.locale))!=null?n:{};return{...Yt,...r,...e}}var me,P,Qe,tr,X,Xe,et,tt,Re,le,ne,rt,Te,Ce,Ee,rr,pe={},ue=[],or=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,be=Array.isArray;function V(e,t){for(var r in t)e[r]=t[r];return e}function Pe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ze(e,t,r){var n,a,i,s={};for(i in t)i=="key"?n=t[i]:i=="ref"?a=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?me.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ce(e,s,n,a,null)}function ce(e,t,r,n,a){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a==null?++Qe:a,__i:-1,__u:0};return a==null&&P.vnode!=null&&P.vnode(i),i}function U(e){return e.children}function de(e,t){this.props=e,this.context=t}function ee(e,t){if(t==null)return e.__?ee(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ee(e):null}function nr(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,n=[],a=[],i=V({},t);i.__v=t.__v+1,P.vnode&&P.vnode(i),Be(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,n,r==null?ee(t):r,!!(32&t.__u),a),i.__v=t.__v,i.__.__k[i.__i]=i,it(n,i,a),t.__e=t.__=null,i.__e!=r&&ot(i)}}function ot(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),ot(e)}function Ze(e){(!e.__d&&(e.__d=!0)&&X.push(e)&&!fe.__r++||Xe!=P.debounceRendering)&&((Xe=P.debounceRendering)||et)(fe)}function fe(){try{for(var e,t=1;X.length;)X.length>t&&X.sort(tt),e=X.shift(),t=X.length,nr(e)}finally{X.length=fe.__r=0}}function nt(e,t,r,n,a,i,s,l,f,c,b){var d,y,v,w,h,m,p,u=n&&n.__k||ue,_=t.length;for(f=ar(r,t,u,f,_),d=0;d<_;d++)(v=r.__k[d])!=null&&(y=v.__i!=-1&&u[v.__i]||pe,v.__i=d,m=Be(e,v,y,a,i,s,l,f,c,b),w=v.__e,v.ref&&y.ref!=v.ref&&(y.ref&&Le(y.ref,null,v),b.push(v.ref,v.__c||w,v)),h==null&&w!=null&&(h=w),(p=!!(4&v.__u))||y.__k===v.__k?(f=at(v,f,e,p),p&&y.__e&&(y.__e=null)):typeof v.type=="function"&&m!==void 0?f=m:w&&(f=w.nextSibling),v.__u&=-7);return r.__e=h,f}function ar(e,t,r,n,a){var i,s,l,f,c,b=r.length,d=b,y=0;for(e.__k=new Array(a),i=0;i<a;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=ce(null,s,null,null,null):be(s)?s=e.__k[i]=ce(U,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=ce(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,f=i+y,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=ir(s,r,f,d))!=-1&&(d--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(a>b?y--:a<b&&y++),typeof s.type!="function"&&(s.__u|=4)):c!=f&&(c==f-1?y--:c==f+1?y++:(c>f?y--:y++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<b;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==n&&(n=ee(l)),lt(l,l));return n}function at(e,t,r,n){var a,i;if(typeof e.type=="function"){for(a=e.__k,i=0;a&&i<a.length;i++)a[i]&&(a[i].__=e,t=at(a[i],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=ee(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ir(e,t,r,n){var a,i,s,l=e.key,f=e.type,c=t[r],b=c!=null&&(2&c.__u)==0;if(c===null&&l==null||b&&l==c.key&&f==c.type)return r;if(n>(b?1:0)){for(a=r-1,i=r+1;a>=0||i<t.length;)if((c=t[s=a>=0?a--:i++])!=null&&(2&c.__u)==0&&l==c.key&&f==c.type)return s}return-1}function Ye(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||or.test(t)?r:r+"px"}function se(e,t,r,n,a){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Ye(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||Ye(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(rt,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r[ne]=n[ne]:(r[ne]=Te,e.addEventListener(t,i?Ee:Ce,i)):e.removeEventListener(t,i?Ee:Ce,i);else{if(a=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r==null?"":r;break e}catch(l){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Je(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[le]==null)t[le]=Te++;else if(t[le]<r[ne])return;return r(P.event?P.event(t):t)}}}function Be(e,t,r,n,a,i,s,l,f,c){var b,d,y,v,w,h,m,p,u,_,S,C,L,T,A,B=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),i=[l=t.__e=r.__e]),(b=P.__b)&&b(t);e:if(typeof B=="function")try{if(p=t.props,u=B.prototype&&B.prototype.render,_=(b=B.contextType)&&n[b.__c],S=b?_?_.props.value:b.__:n,r.__c?m=(d=t.__c=r.__c).__=d.__E:(u?t.__c=d=new B(p,S):(t.__c=d=new de(p,S),d.constructor=B,d.render=lr),_&&_.sub(d),d.state||(d.state={}),d.__n=n,y=d.__d=!0,d.__h=[],d._sb=[]),u&&d.__s==null&&(d.__s=d.state),u&&B.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=V({},d.__s)),V(d.__s,B.getDerivedStateFromProps(p,d.__s))),v=d.props,w=d.state,d.__v=t,y)u&&B.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),u&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(u&&B.getDerivedStateFromProps==null&&p!==v&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(p,S),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(p,d.__s,S)===!1){t.__v!=r.__v&&(d.props=p,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(K){K&&(K.__=t)}),ue.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(p,d.__s,S),u&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(v,w,h)})}if(d.context=S,d.props=p,d.__P=e,d.__e=!1,C=P.__r,L=0,u)d.state=d.__s,d.__d=!1,C&&C(t),b=d.render(d.props,d.state,d.context),ue.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,C&&C(t),b=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++L<25);d.state=d.__s,d.getChildContext!=null&&(n=V(V({},n),d.getChildContext())),u&&!y&&d.getSnapshotBeforeUpdate!=null&&(h=d.getSnapshotBeforeUpdate(v,w)),T=b!=null&&b.type===U&&b.key==null?st(b.props.children):b,l=nt(e,be(T)?T:[T],t,r,n,a,i,s,l,f,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),m&&(d.__E=d.__=null)}catch(K){if(t.__v=null,f||i!=null)if(K.then){for(t.__u|=f?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(A=i.length;A--;)Pe(i[A]);Me(t)}else t.__e=r.__e,t.__k=r.__k,K.then||Me(t);P.__e(K,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=sr(r.__e,t,r,n,a,i,s,f,c);return(b=P.diffed)&&b(t),128&t.__u?void 0:l}function Me(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Me))}function it(e,t,r){for(var n=0;n<r.length;n++)Le(r[n],r[++n],r[++n]);P.__c&&P.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){P.__e(i,a.__v)}})}function st(e){return typeof e!="object"||e==null||e.__b>0?e:be(e)?e.map(st):V({},e)}function sr(e,t,r,n,a,i,s,l,f){var c,b,d,y,v,w,h,m=r.props||pe,p=t.props,u=t.type;if(u=="svg"?a="http://www.w3.org/2000/svg":u=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((v=i[c])&&"setAttribute"in v==!!u&&(u?v.localName==u:v.nodeType==3)){e=v,i[c]=null;break}}if(e==null){if(u==null)return document.createTextNode(p);e=document.createElementNS(a,u,p.is&&p),l&&(P.__m&&P.__m(t,i),l=!1),i=null}if(u==null)m===p||l&&e.data==p||(e.data=p);else{if(i=i&&me.call(e.childNodes),!l&&i!=null)for(m={},c=0;c<e.attributes.length;c++)m[(v=e.attributes[c]).name]=v.value;for(c in m)v=m[c],c=="dangerouslySetInnerHTML"?d=v:c=="children"||c in p||c=="value"&&"defaultValue"in p||c=="checked"&&"defaultChecked"in p||se(e,c,null,v,a);for(c in p)v=p[c],c=="children"?y=v:c=="dangerouslySetInnerHTML"?b=v:c=="value"?w=v:c=="checked"?h=v:l&&typeof v!="function"||m[c]===v||se(e,c,v,m[c],a);if(b)l||d&&(b.__html==d.__html||b.__html==e.innerHTML)||(e.innerHTML=b.__html),t.__k=[];else if(d&&(e.innerHTML=""),nt(t.type=="template"?e.content:e,be(y)?y:[y],t,r,n,u=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:r.__k&&ee(r,0),l,f),i!=null)for(c=i.length;c--;)Pe(i[c]);l||(c="value",u=="progress"&&w==null?e.removeAttribute("value"):w!=null&&(w!==e[c]||u=="progress"&&!w||u=="option"&&w!=m[c])&&se(e,c,w,m[c],a),c="checked",h!=null&&h!=e[c]&&se(e,c,h,m[c],a))}return e}function Le(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(a){P.__e(a,r)}}function lt(e,t,r){var n,a;if(P.unmount&&P.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||Le(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){P.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(a=0;a<n.length;a++)n[a]&&lt(n[a],t,r||typeof e.type!="function");r||Pe(e.__e),e.__c=e.__=e.__e=void 0}function lr(e,t,r){return this.constructor(e,r)}function Ae(e,t,r){var n,a,i,s;t==document&&(t=document.documentElement),P.__&&P.__(e,t),a=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Be(t,e=(!n&&r||t).__k=ze(U,null,[e]),a||pe,pe,t.namespaceURI,!n&&r?[r]:a?null:t.firstChild?me.call(t.childNodes):null,i,!n&&r?r:a?a.__e:t.firstChild,n,s),it(i,e,s)}me=ue.slice,P={__e:function(e,t,r,n){for(var a,i,s;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,n||{}),s=a.__d),s)return a.__E=a}catch(l){e=l}throw e}},Qe=0,tr=function(e){return e!=null&&e.constructor===void 0},de.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=V({},this.state),typeof e=="function"&&(e=e(V({},r),this.props)),e&&V(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ze(this))},de.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ze(this))},de.prototype.render=U,X=[],et=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tt=function(e,t){return e.__v.__b-t.__v.__b},fe.__r=0,Re=Math.random().toString(8),le="__d"+Re,ne="__a"+Re,rt=/(PointerCapture)$|Capture$/i,Te=0,Ce=Je(!1),Ee=Je(!0),rr=0;var te,F,Fe,ct,ae=0,gt=[],$=P,dt=$.__b,pt=$.__r,ut=$.diffed,ft=$.__c,mt=$.unmount,bt=$.__;function ge(e,t){$.__h&&$.__h(F,e,ae||t),ae=0;var r=F.__H||(F.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function R(e){return ae=1,cr(yt,e)}function cr(e,t,r){var n=ge(te++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):yt(void 0,t),function(l){var f=n.__N?n.__N[0]:n.__[0],c=n.t(f,l);f!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=F,!F.__f)){var a=function(l,f,c){if(!n.__c.__H)return!0;var b=n.__c.__H.__.filter(function(y){return y.__c});if(b.every(function(y){return!y.__N}))return!i||i.call(this,l,f,c);var d=n.__c.props!==l;return b.some(function(y){if(y.__N){var v=y.__[0];y.__=y.__N,y.__N=void 0,v!==y.__[0]&&(d=!0)}}),i&&i.call(this,l,f,c)||d};F.__f=!0;var i=F.shouldComponentUpdate,s=F.componentWillUpdate;F.componentWillUpdate=function(l,f,c){if(this.__e){var b=i;i=void 0,a(l,f,c),i=b}s&&s.call(this,l,f,c)},F.shouldComponentUpdate=a}return n.__N||n.__}function H(e,t){var r=ge(te++,3);!$.__s&&De(r.__H,t)&&(r.__=e,r.u=t,F.__H.__h.push(r))}function $e(e,t){var r=ge(te++,4);!$.__s&&De(r.__H,t)&&(r.__=e,r.u=t,F.__h.push(r))}function W(e){return ae=5,Y(function(){return{current:e}},[])}function Y(e,t){var r=ge(te++,7);return De(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function vt(e,t){return ae=8,Y(function(){return e},t)}function dr(){for(var e;e=gt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(he),t.__h.some(Ie),t.__h=[]}catch(r){t.__h=[],$.__e(r,e.__v)}}}$.__b=function(e){F=null,dt&&dt(e)},$.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),bt&&bt(e,t)},$.__r=function(e){pt&&pt(e),te=0;var t=(F=e.__c).__H;t&&(Fe===F?(t.__h=[],F.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(he),t.__h.some(Ie),t.__h=[],te=0)),Fe=F},$.diffed=function(e){ut&&ut(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(gt.push(t)!==1&&ct===$.requestAnimationFrame||((ct=$.requestAnimationFrame)||pr)(dr)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Fe=F=null},$.__c=function(e,t){t.some(function(r){try{r.__h.some(he),r.__h=r.__h.filter(function(n){return!n.__||Ie(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],$.__e(n,r.__v)}}),ft&&ft(e,t)},$.unmount=function(e){mt&&mt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(n){try{he(n)}catch(a){t=a}}),r.__H=void 0,t&&$.__e(t,r.__v))};var ht=typeof requestAnimationFrame=="function";function pr(e){var t,r=function(){clearTimeout(n),ht&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);ht&&(t=requestAnimationFrame(r))}function he(e){var t=F,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),F=t}function Ie(e){var t=F;e.__c=e.__(),F=t}function De(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function yt(e,t){return typeof t=="function"?t(e):t}var ur=0;function o(e,t,r,n,a,i){t||(t={});var s,l,f=t;if("ref"in f)for(l in f={},t)l=="ref"?s=t[l]:f[l]=t[l];var c={type:e,props:f,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ur,__i:-1,__u:0,__source:a,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)f[l]===void 0&&(f[l]=s[l]);return P.vnode&&P.vnode(c),c}function _t({comment:e,strings:t}){let r=e.is_mine,n=!r&&e.author_source==="mcp",a=!r&&e.author_source==="system",i=n?"mcp":a?"system":"staff",s=i==="mcp"?"detail.author.mcp":i==="system"?"detail.author.system":"detail.author.staff",l=e.author_label||t[s];return o("div",{class:`comment-bubble ${r?"is-mine":"is-other"}`,children:[!r&&l&&o("div",{class:`comment-author comment-author--${i}`,children:l}),o("div",{class:"comment-body",children:e.body}),o("div",{class:"comment-time",children:fr(e.created_at)})]})}function fr(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var mr=["image/png","image/jpeg","image/webp"];function xt(e){return mr.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function re(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),n=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-n)}`}function Ke(e){if(!e)return;let t;try{t=new URL(e)}catch(r){return}if(t.protocol==="https:"||t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]"))return t.toString()}var br=3e4;function ve({api:e,externalId:t,reportId:r,strings:n,onBack:a,canModerate:i=!0,variant:s="modal"}){var A,B,K;let[l,f]=R(null),[c,b]=R(null),[d,y]=R(""),[v,w]=R(!1),[h,m]=R(!1),p=W(!0),u=async()=>{try{let z=await e.getReport(r,t);if(!p.current)return;f(z),b(null)}catch(z){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",z),!p.current)return;b("load_failed")}};H(()=>{p.current=!0,u();let z=setInterval(()=>{u()},br);return()=>{p.current=!1,clearInterval(z)}},[r,t]);let _=async()=>{if(!(!d.trim()||v)){w(!0);try{let z=`${r}:${Date.now()}`,j=await e.addComment(r,t,d.trim(),z);if(!p.current)return;y(""),f(D=>D&&{...D,comments:hr(D.comments,j)}),u()}catch(z){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",z),!p.current)return;b(n["detail.send_failed"])}finally{p.current&&w(!1)}}},S=async()=>{if(!h){m(!0);try{let z=await e.closeAsResolved(r,t);if(!p.current)return;f(z)}catch(z){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",z),!p.current)return;b(n["detail.close_failed"])}finally{p.current&&m(!1)}}};if(!l&&!c)return o("div",{class:"mine-loading",children:n["mine.loading"]});if(!l)return o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:n["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:n["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:a,children:["\u2190 ",n["detail.load_failed.cta"]]})]});let C=(A=l.is_mine)!=null?A:i,L=C&&l.status==="awaiting_validation",T=C;return o("div",{class:`report-detail variant-${s}`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:a,children:["\u2190 ",n["detail.back"]]}),o("span",{class:`pill pill-status pill-status--${l.status}`,children:(B=n[`status.${l.status}`])!=null?B:l.status})]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:a,"aria-label":n["board.back"],children:["\u2190 ",n["board.back"]]}),o("span",{class:`pill pill-status pill-status--${l.status}`,children:(K=n[`status.${l.status}`])!=null?K:l.status})]}),o("div",{class:"report-detail-body",children:[o(gr,{detail:l,strings:n}),o("p",{class:"report-detail-description",children:l.description}),l.screenshot_url&&(()=>{let z=Ke(l.screenshot_url);return z?o("a",{class:"report-detail-screenshot",href:z,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:l.screenshot_url,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:l.screenshot_url,alt:"",loading:"lazy"})})})(),o("h3",{class:"report-detail-section",children:n["detail.thread"]}),l.comments.length===0?o("p",{class:"report-detail-empty",children:n["detail.no_replies"]}):o("ul",{class:"report-comments",children:l.comments.map(z=>o("li",{children:o(_t,{comment:z,strings:n})}))}),l.status_history&&l.status_history.length>0&&o(Cr,{rows:l.status_history,strings:n}),l.technical_context&&o(_r,{ctx:l.technical_context,strings:n}),T?o("div",{class:"report-compose",children:[o("textarea",{value:d,placeholder:n["detail.compose_placeholder"],onInput:z=>y(z.target.value),disabled:v}),o("div",{class:"report-compose-actions",children:[L&&o("button",{type:"button",class:"btn",onClick:S,disabled:h,children:h?n["detail.close_busy"]:n["detail.close_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:_,disabled:!d.trim()||v,children:v?n["detail.compose_sending"]:n["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:n["detail.teammate_notice"]}),c&&o("div",{class:"error",children:c})]})]})}function hr(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function gr({detail:e,strings:t}){var a;let r=`detail.context.capture.${e.capture_method}`,n=(a=t[r])!=null?a:e.capture_method;return o("div",{class:"report-detail-context",children:[o("div",{class:"report-detail-context-pills",children:[o("span",{class:"pill pill-type",children:t[`type.${e.feedback_type}`]}),o("span",{class:`pill pill-severity pill-severity--${e.severity}`,children:t[`severity.${e.severity}`]}),o("span",{class:"pill pill-capture",children:n})]}),o("div",{class:"report-detail-context-line",children:[o("span",{class:"report-detail-context-label",children:t["detail.context.submitted_at"]}),o("span",{children:wt(e.created_at)})]}),e.page_url&&(()=>{let i=Ke(e.page_url);return o("div",{class:"report-detail-context-line",title:e.page_url,children:[o("span",{class:"report-detail-context-label",children:t["detail.context.page"]}),i?o("a",{class:"report-detail-context-url",href:i,target:"_blank",rel:"noopener noreferrer",children:re(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:re(e.page_url,64)})]})})()]})}function wt(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var vr=20,yr=15;function _r({ctx:e,strings:t}){var c,b,d;let r=(c=e.errors)!=null?c:[],n=((b=e.consoleLogs)!=null?b:[]).slice(-vr),a=((d=e.networkRequests)!=null?d:[]).slice(-yr),i=e.device;if(!(!!i||r.length>0||n.length>0||a.length>0))return null;let l=r.length,f=l>0?`${t["detail.tech.title"]} \xB7 ${l} ${l===1?t["detail.tech.errors_one"]:t["detail.tech.errors_many"]}`:t["detail.tech.title"];return o("details",{class:"report-detail-tech",children:[o("summary",{children:f}),o("div",{class:"tech-body",children:[i&&o(xr,{device:i,strings:t}),r.length>0&&o(wr,{errors:r,strings:t}),n.length>0&&o(kr,{logs:n,strings:t}),a.length>0&&o(Sr,{rows:a,strings:t})]})]})}function xr({device:e,strings:t}){let r=[];if(e!=null&&e.viewport){let n=e.viewport.dpr?` @${e.viewport.dpr}x`:"";r.push({label:t["detail.tech.device.viewport"],value:`${e.viewport.w}\xD7${e.viewport.h}${n}`})}return e!=null&&e.platform&&r.push({label:t["detail.tech.device.platform"],value:e.platform}),e!=null&&e.language&&r.push({label:t["detail.tech.device.language"],value:e.language}),e!=null&&e.timezone&&r.push({label:t["detail.tech.device.timezone"],value:e.timezone}),e!=null&&e.connection&&r.push({label:t["detail.tech.device.connection"],value:e.connection}),r.length===0?null:o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.device"]}),o("dl",{class:"tech-device",children:r.map(n=>o(U,{children:[o("dt",{children:n.label}),o("dd",{children:n.value})]}))})]})}function wr({errors:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.errors"]}),o("ul",{class:"tech-errors",children:e.map(r=>o("li",{children:[o("div",{class:"tech-errors-msg",children:r.message}),r.stack&&o("pre",{class:"tech-errors-stack",children:Rr(r.stack)})]}))})]})}function kr({logs:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.console"]}),o("ul",{class:"tech-console",children:e.map(r=>o("li",{class:`tech-console-row tech-console-row--${r.level}`,children:[o("span",{class:"tech-console-level",children:r.level}),o("span",{class:"tech-console-msg",children:r.message})]}))})]})}function Sr({rows:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.network"]}),o("ul",{class:"tech-network",children:e.map(r=>{let n=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${n?" tech-network-row--fail":""}`,children:[o("span",{class:"tech-network-status",children:r.status||"\u2014"}),o("span",{class:"tech-network-method",children:r.method}),o("span",{class:"tech-network-url",title:r.url,children:re(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Rr(e){let t=e.split(`
4
+ `);return t.length<=12?e:t.slice(0,12).join(`
5
+ `)+`
6
+ \u2026`}function Cr({rows:e,strings:t}){return o("div",{class:"report-detail-history",children:[o("h3",{class:"report-detail-section",children:t["detail.history"]}),o("ol",{class:"status-history",children:e.map(r=>{var s,l;let n=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,a=(l=t[`status.${r.to_status}`])!=null?l:r.to_status,i=r.changed_by_source==="mcp"?"detail.author.mcp":r.changed_by_source==="system"?"detail.author.system":"detail.author.staff";return o("li",{class:"status-history-row",children:[o("span",{class:"status-history-time",children:wt(r.created_at)}),o("span",{class:"status-history-transition",children:[o("span",{class:`pill pill-status pill-status--${r.from_status}`,children:n}),o("span",{class:"status-history-arrow","aria-hidden":"true",children:"\u2192"}),o("span",{class:`pill pill-status pill-status--${r.to_status}`,children:a})]}),o("span",{class:`status-history-source status-history-source--${r.changed_by_source}`,children:t[i]})]})})})]})}var Er=3e4,Mr=["new","in_progress","awaiting_validation","closed","rejected"],Tr=["bug","feature","question","praise","typo"],Pr=["blocker","high","medium","low"];function kt({api:e,externalId:t,strings:r}){let[n,a]=R({}),[i,s]=R(null),[l,f]=R(null),[c,b]=R(!0),[d,y]=R(null),[v,w]=R(null),[h,m]=R(0),p=Y(()=>{var S,C,L,T,A,B;return((C=(S=n.status)==null?void 0:S.length)!=null?C:0)+((T=(L=n.type)==null?void 0:L.length)!=null?T:0)+((B=(A=n.severity)==null?void 0:A.length)!=null?B:0)+(n.q?1:0)+(n.mine?1:0)},[n]);H(()=>{let S=!1,C=null,L=async()=>{try{let[T,A]=await Promise.all([e.listBoard(t,n),e.fetchBoardKpis(t,n)]);if(S)return;s(T),f(A),y(null)}catch(T){if(S)return;y(T instanceof Error?T.message:String(T))}finally{S||b(!1),S||(C=setTimeout(L,Er))}};return b(!0),L(),()=>{S=!0,C&&clearTimeout(C)}},[e,t,Ur(n)]);let u=Y(()=>{var S;return!v||!i?null:(S=i.results.find(C=>C.id===v))!=null?S:null},[v,i]),_=S=>{w(S.id),m(C=>C+1)};return o("div",{class:"board-view",children:[o(zr,{strings:r,kpis:l}),o(Lr,{filters:n,onChange:a,activeCount:p,strings:r}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":c&&!i,children:[d&&o("div",{class:"board-error",children:r["board.list.error"]}),!d&&c&&!i&&o($r,{}),!d&&i&&i.results.length===0&&!c&&o(Ir,{strings:r}),!d&&i&&i.results.length>0&&o(Ar,{rows:i.results,selectedId:v,onPick:_,strings:r,total:i.count})]}),o("div",{class:`board-detail-wrap ${u?"has-selection":""}`,children:u?o(ve,{api:e,externalId:t,reportId:u.id,strings:r,onBack:()=>w(null),canModerate:u.is_mine,variant:"board"},h):o("div",{class:"board-detail-empty",children:[o(Hr,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function zr({strings:e,kpis:t}){let r=(t==null?void 0:t.scope)==="project"?e["board.scope.project"]:e["board.scope.mine"];return o("header",{class:"board-header",children:[o("div",{class:"board-header-title",children:[o("span",{class:"board-header-emoji","aria-hidden":"true",children:"\u{1F4CB}"}),o("div",{children:[o("h2",{class:"board-header-h",children:e["tab.board"]}),o("p",{class:"board-header-sub",children:t?`${t.total} \xB7 ${r}`:r})]})]}),o(Br,{kpis:t,strings:e})]})}function Br({kpis:e,strings:t}){var n,a,i,s,l,f;let r=[{key:"new",label:t["board.kpi.new"],value:String((a=(n=e==null?void 0:e.by_status)==null?void 0:n.new)!=null?a:0),tone:"tone-new"},{key:"in_progress",label:t["board.kpi.in_progress"],value:String((s=(i=e==null?void 0:e.by_status)==null?void 0:i.in_progress)!=null?s:0),tone:"tone-progress"},{key:"awaiting_validation",label:t["board.kpi.awaiting_validation"],value:String((f=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?f:0),tone:"tone-validation"},{key:"rate",label:t["board.kpi.resolution_rate"],value:e?`${Math.round((e.resolution_rate||0)*100)}%`:"\u2014",tone:"tone-rate"}];return o("div",{class:`board-kpi-strip ${e?"is-ready":"is-loading"}`,"aria-live":"polite",children:r.map(c=>o("div",{class:`board-kpi-card ${c.tone}`,children:[o("div",{class:"board-kpi-value",children:c.value}),o("div",{class:"board-kpi-label",children:c.label})]},c.key))})}function Lr({filters:e,onChange:t,activeCount:r,strings:n}){var b,d,y,v,w,h,m;let a=p=>{if(p===""){let{status:u,..._}=e;t(_)}else t({...e,status:[p]})},i=p=>{if(p===""){let{type:u,..._}=e;t(_)}else t({...e,type:[p]})},s=p=>{if(p===""){let{severity:u,..._}=e;t(_)}else t({...e,severity:[p]})},l=p=>t({...e,q:p}),f=()=>{if(e.mine){let{mine:p,...u}=e;t(u)}else t({...e,mine:!0})},c=()=>t({});return o("div",{class:"board-filters",children:[o("select",{class:"board-filter-select","aria-label":n["board.filter.status"],value:(d=(b=e.status)==null?void 0:b[0])!=null?d:"",onChange:p=>a(p.target.value),children:[o("option",{value:"",children:n["board.filter.status"]}),Mr.map(p=>{var u;return o("option",{value:p,children:(u=n[`board.kpi.${p}`])!=null?u:p},p)})]}),o("select",{class:"board-filter-select","aria-label":n["board.filter.type"],value:(v=(y=e.type)==null?void 0:y[0])!=null?v:"",onChange:p=>i(p.target.value),children:[o("option",{value:"",children:n["board.filter.type"]}),Tr.map(p=>{var u;return o("option",{value:p,children:(u=n[`type.${p}`])!=null?u:p},p)})]}),o("select",{class:"board-filter-select","aria-label":n["board.filter.severity"],value:(h=(w=e.severity)==null?void 0:w[0])!=null?h:"",onChange:p=>s(p.target.value),children:[o("option",{value:"",children:n["board.filter.severity"]}),Pr.map(p=>{var u;return o("option",{value:p,children:(u=n[`severity.${p}`])!=null?u:p},p)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:n["board.filter.search.placeholder"],value:(m=e.q)!=null?m:"",onInput:p=>l(p.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:f}),o("span",{children:n["board.filter.mine"]})]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:c,children:[o(Kr,{}),n["board.filter.clear"]]})]})}function Ar({rows:e,selectedId:t,onPick:r,strings:n,total:a}){return o(U,{children:[o("div",{class:"board-list-count",children:n["board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(a))}),o("ul",{class:"board-list",role:"list",children:e.map(i=>o(Fr,{row:i,selected:i.id===t,onPick:r,strings:n},i.id))})]})}function Fr({row:e,selected:t,onPick:r,strings:n}){var i,s;let a=e.is_mine?n["board.list.you"]:e.author_label||"\u2014";return o("li",{children:o("button",{type:"button",class:`board-row ${t?"is-selected":""}`,onClick:()=>r(e),"aria-pressed":t,children:[o("div",{class:"board-row-badges",children:[o("span",{class:`badge status-${e.status}`,children:(i=n[`status.${e.status}`])!=null?i:e.status}),o("span",{class:`badge severity-${e.severity}`,children:(s=n[`severity.${e.severity}`])!=null?s:e.severity})]}),o("div",{class:"board-row-description",children:e.description}),o("div",{class:"board-row-meta",children:[o("span",{class:"board-row-author",children:a}),e.comment_count>0&&o("span",{class:"board-row-comments",children:[o(Dr,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Nr(e.created_at)})]})]})})}function Ir({strings:e}){return o("div",{class:"board-empty",children:[o(Wr,{}),o("h3",{children:e["board.list.empty.title"]}),o("p",{children:e["board.list.empty.description"]})]})}function $r(){return o("ul",{class:"board-list board-list-skeleton","aria-hidden":"true",children:Array.from({length:5}).map((e,t)=>o("li",{children:o("div",{class:"board-row skeleton-row",children:[o("div",{class:"skeleton-line skeleton-badges"}),o("div",{class:"skeleton-line skeleton-text"}),o("div",{class:"skeleton-line skeleton-text short"})]})},t))})}function Dr(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function Kr(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Wr(){return o("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("circle",{cx:"32",cy:"32",r:"28",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2"}),o("path",{d:"M22 32h20M32 22v20",stroke:"currentColor","stroke-opacity":"0.35","stroke-width":"2","stroke-linecap":"round"})]})}function Hr(){return o("svg",{width:"80",height:"80",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("rect",{x:"10",y:"12",width:"44",height:"36",rx:"4",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2"}),o("line",{x1:"18",y1:"22",x2:"46",y2:"22",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"30",x2:"38",y2:"30",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"38",x2:"32",y2:"38",stroke:"currentColor","stroke-opacity":"0.14","stroke-width":"2","stroke-linecap":"round"})]})}function Ur(e){var t,r,n,a;return JSON.stringify({s:(t=e.status)==null?void 0:t.slice().sort(),t:(r=e.type)==null?void 0:r.slice().sort(),sv:(n=e.severity)==null?void 0:n.slice().sort(),q:(a=e.q)!=null?a:"",m:!!e.mine})}function Nr(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Math.max(0,Date.now()-t),n=Math.floor(r/6e4);if(n<1)return"just now";if(n<60)return`${n}m`;let a=Math.floor(n/60);if(a<24)return`${a}h`;let i=Math.floor(a/24);return i<7?`${i}d`:`${Math.floor(i/7)}w`}function jr(e){return`pill pill-status pill-status--${e}`}function Or(e){return`pill pill-severity pill-severity--${e}`}function qr(){return"pill pill-type"}function Vr(e){let t=Date.parse(e);if(!Number.isFinite(t))return"";let r=Math.max(1,Math.round((Date.now()-t)/1e3));if(r<60)return`${r}s`;let n=Math.round(r/60);if(n<60)return`${n}m`;let a=Math.round(n/60);return a<48?`${a}h`:`${Math.round(a/24)}d`}function Gr(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function ye({row:e,strings:t,onClick:r}){var a;let n=e.description.length>120?e.description.slice(0,117)+"\u2026":e.description;return o("button",{type:"button",class:"mine-row",onClick:r,children:[o("div",{class:"mine-row-pills",children:[o("span",{class:jr(e.status),children:(a=t[`status.${e.status}`])!=null?a:e.status}),o("span",{class:qr(),children:t[`type.${e.feedback_type}`]}),o("span",{class:Or(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:n}),o("div",{class:"mine-row-meta",children:[o("span",{children:Vr(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",Gr(e.comment_count,t)]})]})]})}var Xr=3e4;function Zr(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=(t.getUTCDay()+6)%7;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()-r)).toISOString().slice(0,10)}function Yr(e){let t=new Map;for(let r of e){let n=Zr(r.resolved_at);if(!n)continue;let a=t.get(n);a?a.push(r):t.set(n,[r])}return Array.from(t.entries()).sort(([r],[n])=>r<n?1:-1).map(([r,n])=>({weekKey:r,label:Jr(r),rows:n}))}function Jr(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function St({api:e,externalId:t,strings:r,onSelect:n}){let[a,i]=R(null),[s,l]=R(null),[f,c]=R(!1),b=W(!0),d=async()=>{c(!0),l(null);try{let h=await e.listChangelog(t);if(!b.current)return;i(h)}catch(h){if(typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",h),!b.current)return;l(r["mine.error"])}finally{b.current&&c(!1)}};H(()=>{b.current=!0,d();let h=setInterval(()=>{d()},Xr);return()=>{b.current=!1,clearInterval(h)}},[t]);let y=Y(()=>a?Yr(a):[],[a]),v=a===null&&!s,w=a!==null&&a.length===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.changelog"]}),o("button",{type:"button",class:"btn",onClick:()=>{d()},disabled:f,children:f?r["mine.loading"]:r["mine.refresh"]})]}),v&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),w&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),y.length>0&&o("div",{class:"changelog-groups",children:y.map(h=>o("section",{class:"changelog-group",children:[o("header",{class:"changelog-group-header",children:[o("span",{class:"changelog-group-marker","aria-hidden":"true",children:"\u25CF"}),o("span",{class:"changelog-group-label",children:r["changelog.week_of"].replace("{date}",h.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[h.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(h.rows.length))})]}),o("ul",{class:"mine-rows",children:h.rows.map(m=>o("li",{children:o(ye,{row:m,strings:r,onClick:()=>n(m)})}))})]},h.weekKey))})]})}function Qr(){return o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:[o("path",{d:"m8 2 1.88 1.88"}),o("path",{d:"M14.12 3.88 16 2"}),o("path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"}),o("path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"}),o("path",{d:"M12 20v-9"}),o("path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5"}),o("path",{d:"M6 13H2"}),o("path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4"}),o("path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4"}),o("path",{d:"M22 13h-4"}),o("path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4"})]})}function Rt({label:e,onClick:t}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:o(Qr,{})})}var Ct=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],eo=.35;function Et(e,t,r){if(e.save(),e.strokeStyle=t.color,e.fillStyle=t.color,e.lineWidth=t.lineWidth,e.lineCap="round",e.lineJoin="round",t.kind==="rectangle")e.strokeRect(t.x,t.y,t.w,t.h);else if(t.kind==="arrow")to(e,t.x1,t.y1,t.x2,t.y2);else if(t.kind==="freehand"){if(t.points.length<2){e.restore();return}e.beginPath(),e.moveTo(t.points[0].x,t.points[0].y);for(let n=1;n<t.points.length;n++)e.lineTo(t.points[n].x,t.points[n].y);e.stroke()}else if(t.kind==="text"){e.font=`bold ${t.fontSize}px -apple-system, BlinkMacSystemFont, sans-serif`,e.textBaseline="top";let n=e.measureText(t.text),a=4,i=n.width+a*2,s=t.fontSize+a*2;e.fillStyle="rgba(0, 0, 0, 0.6)",e.fillRect(t.x-a,t.y-a,i,s),e.fillStyle=t.color,e.fillText(t.text,t.x,t.y)}else t.kind==="highlight"?(e.globalAlpha=eo,e.fillRect(_e(t.x,t.w),_e(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&ro(e,t,r);e.restore()}function _e(e,t){return t<0?e+t:e}function to(e,t,r,n,a){let s=Math.atan2(a-r,n-t);e.beginPath(),e.moveTo(t,r),e.lineTo(n,a),e.stroke(),e.beginPath(),e.moveTo(n,a),e.lineTo(n-14*Math.cos(s-Math.PI/6),a-14*Math.sin(s-Math.PI/6)),e.lineTo(n-14*Math.cos(s+Math.PI/6),a-14*Math.sin(s+Math.PI/6)),e.closePath(),e.fill()}function ro(e,t,r){if(!r)return;let n=_e(t.x,t.w),a=_e(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let l=Math.max(4,t.tile);for(let f=a;f<a+s;f+=l)for(let c=n;c<n+i;c+=l){let b=Math.min(l,n+i-c),d=Math.min(l,a+s-f);e.drawImage(r,c,f,b,d,c,f,b,d)}e.imageSmoothingEnabled=!1;for(let f=a;f<a+s;f+=l)for(let c=n;c<n+i;c+=l){let b=Math.min(l,n+i-c),d=Math.min(l,a+s-f);e.drawImage(r,c,f,1,1,c,f,b,d)}e.imageSmoothingEnabled=!0}var q={rect:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("rect",{x:"2",y:"3",width:"12",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.5"})}),arrow:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M2 8h11M9 4l4 4-4 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),pencil:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M11.5 2.5l2 2L5 13H3v-2l8.5-8.5z",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})}),text:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 3h10M8 3v10M5 13h6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})}),highlight:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("path",{d:"M3 13l3-3L11 5l-2-2-5 5-3 3v2h2zM10 4l2 2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M2 14h12",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}),blur:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("rect",{x:"2",y:"2",width:"4",height:"4",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"7",y:"2",width:"3",height:"3",fill:"currentColor",opacity:"0.55"}),o("rect",{x:"11",y:"2",width:"3",height:"4",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"2",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.6"}),o("rect",{x:"6",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"10",y:"7",width:"4",height:"3",fill:"currentColor",opacity:"0.5"}),o("rect",{x:"2",y:"11",width:"4",height:"3",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"7",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.65"}),o("rect",{x:"11",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.85"})]}),undo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 7l3-3M4 7l3 3M4 7h6a3 3 0 0 1 0 6H7",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),redo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M12 7l-3-3M12 7l-3 3M12 7H6a3 3 0 0 0 0 6h2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),trash:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 4h10M6 4V2.5h4V4M5 4l.5 9h5L11 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),close:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})})};function Mt({imageBlob:e,strings:t,onSave:r,onCancel:n}){let a=W(null),i=W(null),s=W(null),[l,f]=R("rectangle"),[c,b]=R(Ct[0]),[d,y]=R([]),[v,w]=R([]),[h,m]=R([]),p=W(!1),[u,_]=R(null),[S,C]=R(!1),[L,T]=R(!1),A=W(1);function B(g){y(x=>(w(E=>[...E,x]),[...x,g])),m([])}function K(){y(g=>(w(x=>[...x,g]),[])),m([])}function z(){w(g=>{if(g.length===0)return g;let x=g[g.length-1];return y(E=>(m(M=>[E,...M]),x)),g.slice(0,-1)})}function j(){m(g=>{if(g.length===0)return g;let x=g[0];return y(E=>(w(M=>[...M,E]),x)),g.slice(1)})}$e(()=>{let g=x=>{x.key==="Escape"&&(x.stopPropagation(),n())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[n]),H(()=>{let g=x=>{if(!(x.metaKey||x.ctrlKey))return;let M=x.key.toLowerCase();M==="z"?(x.preventDefault(),x.stopPropagation(),x.shiftKey?j():z()):M==="y"&&(x.preventDefault(),x.stopPropagation(),j())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[v,h,d]),H(()=>{let g=URL.createObjectURL(e),x=new Image;return x.onload=()=>{s.current=x,C(!0)},x.src=g,()=>URL.revokeObjectURL(g)},[e]),$e(()=>{if(!S||!a.current||!s.current||!i.current)return;let g=s.current,E=i.current.clientWidth-16,M=window.innerHeight*.65,O=Math.min(E/g.width,M/g.height,1);A.current=O;let J=a.current;J.width=g.width,J.height=g.height,J.style.width=`${g.width*O}px`,J.style.height=`${g.height*O}px`,D()},[S]),H(()=>{D()},[d,u]);function D(){let g=a.current,x=s.current;if(!g||!x)return;let E=g.getContext("2d");if(E){E.clearRect(0,0,g.width,g.height),E.drawImage(x,0,0);for(let M of d)Et(E,M,x);u&&Et(E,u,x)}}function G(g){let E=a.current.getBoundingClientRect();return{x:(g.clientX-E.left)/A.current,y:(g.clientY-E.top)/A.current}}let oe=g=>{if(!S)return;let{x,y:E}=G(g),M=a.current.width,O=Math.max(3,Math.round(M/400)),J=Math.max(8,Math.round(M/80));if(l==="text"){let ke=window.prompt(t["annotator.text_prompt"]);ke&&ke.trim()&&B({kind:"text",x,y:E,text:ke.trim(),color:c,fontSize:Math.max(16,Math.round(M/50)),lineWidth:1});return}p.current=!0,l==="rectangle"?_({kind:"rectangle",x,y:E,w:0,h:0,color:c,lineWidth:O}):l==="arrow"?_({kind:"arrow",x1:x,y1:E,x2:x,y2:E,color:c,lineWidth:O}):l==="freehand"?_({kind:"freehand",points:[{x,y:E}],color:c,lineWidth:O}):l==="highlight"?_({kind:"highlight",x,y:E,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&_({kind:"blur",x,y:E,w:0,h:0,color:"#000000",lineWidth:0,tile:J})},xe=g=>{if(!p.current)return;let{x,y:E}=G(g);_(M=>M&&(M.kind==="rectangle"||M.kind==="highlight"||M.kind==="blur"?{...M,w:x-M.x,h:E-M.y}:M.kind==="arrow"?{...M,x2:x,y2:E}:M.kind==="freehand"?{...M,points:[...M.points,{x,y:E}]}:M))},we=()=>{_(g=>(p.current&&g&&((g.kind==="rectangle"||g.kind==="highlight"||g.kind==="blur")&&Math.abs(g.w)<4&&Math.abs(g.h)<4||g.kind==="arrow"&&Math.hypot(g.x2-g.x1,g.y2-g.y1)<4||g.kind==="freehand"&&g.points.length<3||B(g)),null)),p.current=!1},k=async()=>{let g=a.current;if(g){T(!0);try{let x=await new Promise(E=>g.toBlob(E,"image/png",.92));x&&r(x)}finally{T(!1)}}},I=[{id:"rectangle",icon:q.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:q.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:q.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:q.text,label:t["annotator.tool.text"]},{id:"highlight",icon:q.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:q.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:g=>{g.target===g.currentTarget&&n()},children:o("div",{class:"annotator",role:"dialog","aria-modal":"true","aria-label":t["annotator.title"],children:[o("div",{class:"annotator-header",children:[o("span",{children:t["annotator.title"]}),o("button",{type:"button",class:"modal-close","aria-label":t["form.close"],onClick:n,children:q.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:I.map(g=>o("button",{type:"button",onClick:()=>f(g.id),title:g.label,"aria-label":g.label,"aria-pressed":l===g.id,class:`annotator-tool ${l===g.id?"is-active":""}`,children:g.icon},g.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Ct.map(g=>o("button",{type:"button",onClick:()=>b(g),"aria-label":g,"aria-pressed":c===g,class:`annotator-color ${c===g?"is-active":""}`,style:{backgroundColor:g}},g)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:g=>b(g.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:z,disabled:v.length===0,title:t["annotator.undo"],children:[q.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:j,disabled:h.length===0,title:t["annotator.redo"],children:[q.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:K,disabled:d.length===0,children:[q.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[d.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:S?o("canvas",{ref:a,onMouseDown:oe,onMouseMove:xe,onMouseUp:we,onMouseLeave:we,class:"annotator-canvas"}):o("span",{class:"annotator-loading",children:t["annotator.loading"]})}),o("div",{class:"annotator-footer",children:[o("button",{type:"button",class:"btn",onClick:n,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:k,disabled:L||!S,children:L?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var oo=["bug","feature","question","praise","typo"],no=["blocker","high","medium","low"];function Tt({strings:e,onSubmit:t,onCancel:r,status:n,errorMessage:a}){let[i,s]=R(""),[l,f]=R("bug"),[c,b]=R("medium"),[d,y]=R(""),[v,w]=R(null),[h,m]=R(null),[p,u]=R(!1),[_,S]=R(!1),C=W(null),L=W(null),T=n==="submitting",A=T?e["form.submitting"]:e["form.submit"],B=typeof window!="undefined"?window.location.href:"";H(()=>()=>{h&&URL.revokeObjectURL(h)},[h]);let K=k=>{if(y(""),k instanceof File){let I=xt(k);if(I){y(I.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(I.maxMb)));return}}h&&URL.revokeObjectURL(h),w(k),m(URL.createObjectURL(k))},z=()=>{h&&URL.revokeObjectURL(h),m(null),w(null),y(""),C.current&&(C.current.value="")},j=k=>{var g;let I=(g=k.target.files)==null?void 0:g[0];I&&K(I)},D=k=>{k.preventDefault(),k.stopPropagation(),u(!0)},G=k=>{k.preventDefault(),k.stopPropagation(),k.currentTarget===k.target&&u(!1)},oe=k=>{var g,x;k.preventDefault(),k.stopPropagation(),u(!1);let I=(x=(g=k.dataTransfer)==null?void 0:g.files)==null?void 0:x[0];I&&K(I)};H(()=>{let k=L.current;if(!k)return;let I=g=>{var E;let x=(E=g.clipboardData)==null?void 0:E.items;if(x){for(let M of Array.from(x))if(M.kind==="file"&&M.type.startsWith("image/")){let O=M.getAsFile();if(O){g.preventDefault(),K(O);return}}}};return k.addEventListener("paste",I),()=>k.removeEventListener("paste",I)},[h]);let xe=k=>{h&&URL.revokeObjectURL(h),w(k),m(URL.createObjectURL(k)),S(!1)};return o("form",{onSubmit:k=>{if(k.preventDefault(),!i.trim()){y(e["form.description.required"]);return}y("");let I={description:i.trim(),feedback_type:l,severity:c};v&&(I.screenshot=v,I.capture_method="manual"),t(I)},children:[o("h2",{children:e["form.title"]}),o("div",{class:"field",children:[o("label",{for:"mfb-desc",children:e["form.description.label"]}),o("textarea",{id:"mfb-desc",value:i,placeholder:e["form.description.placeholder"],onInput:k=>s(k.target.value)})]}),o("div",{class:"row",children:[o("div",{class:"field",children:[o("label",{for:"mfb-type",children:e["form.type.label"]}),o("select",{id:"mfb-type",value:l,onChange:k=>f(k.target.value),children:oo.map(k=>o("option",{value:k,children:e[`type.${k}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:c,onChange:k=>b(k.target.value),children:no.map(k=>o("option",{value:k,children:e[`severity.${k}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:C,type:"file",accept:"image/png,image/jpeg,image/webp",class:"mfb-sr-only",onChange:j,"aria-hidden":"true",tabIndex:-1}),h?o("div",{class:"screenshot-preview",children:[o("img",{src:h,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>S(!0),children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),o("path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}),e["form.screenshot.annotate"]]}),o("button",{type:"button",class:"btn",onClick:z,children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14z"})}),e["form.screenshot.remove"]]})]})]}):o("div",{ref:L,class:`screenshot-dropzone ${p?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var k;return(k=C.current)==null?void 0:k.click()},onKeyDown:k=>{var I;(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),(I=C.current)==null||I.click())},onDragOver:D,onDragLeave:G,onDrop:oe,children:[o("svg",{class:"screenshot-icon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o("polyline",{points:"17 8 12 3 7 8"}),o("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),o("div",{class:"screenshot-cta",children:[o("strong",{children:e["form.screenshot.cta_click"]}),", ",e["form.screenshot.cta_rest"]]}),o("div",{class:"screenshot-formats",children:e["form.screenshot.formats"]})]})]}),B&&o("div",{class:"page-context",title:B,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:re(B,90)})]}),d&&o("div",{class:"error",children:d}),n==="error"&&a&&o("div",{class:"error",children:a}),n==="success"&&o("div",{class:"success",children:e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:T,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:T,children:A})]}),_&&v&&o(Mt,{imageBlob:v,strings:e,onCancel:()=>S(!1),onSave:xe})]})}function ao(e){let t={new:0,in_progress:0,awaiting_validation:0,resolved:0,total:0};for(let r of e)switch(t.total+=1,r.status){case"new":t.new+=1;break;case"in_progress":t.in_progress+=1;break;case"awaiting_validation":t.awaiting_validation+=1;break;case"closed":case"rejected":case"duplicate":case"wontfix":t.resolved+=1;break}return t}function io(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var so={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function Pt(e,t){return t==="all"?e:e.filter(r=>so[r.status]===t)}function zt({rows:e,filter:t,onFilter:r,strings:n}){let a=ao(e),i=io(a),s=[{key:"new",label:n["kpi.new"],value:String(a.new)},{key:"in_progress",label:n["kpi.in_progress"],value:String(a.in_progress)},{key:"awaiting_validation",label:n["kpi.awaiting_validation"],value:String(a.awaiting_validation)},{key:"resolved",label:n["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(l=>{let f=t===l.key,c=f?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${f?" is-active":""}`,onClick:()=>r(c),"aria-pressed":f,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var lo=3e4;function Bt({api:e,externalId:t,strings:r,onSelect:n}){var u;let[a,i]=R(null),[s,l]=R(null),[f,c]=R(!1),[b,d]=R("all"),y=W(!0),v=async()=>{c(!0),l(null);try{let _=await e.listMine(t);if(!y.current)return;i(_)}catch(_){if(typeof console!="undefined"&&console.warn("[mhosaic] listMine:",_),!y.current)return;l(r["mine.error"])}finally{y.current&&c(!1)}};H(()=>{y.current=!0,v();let _=setInterval(()=>{v()},lo);return()=>{y.current=!1,clearInterval(_)}},[t]);let w=a!==null&&a.length===0,h=a===null&&!s,m=a?Pt(a,b):null,p=!!a&&a.length>0&&((u=m==null?void 0:m.length)!=null?u:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("button",{type:"button",class:"btn",onClick:()=>{v()},disabled:f,children:f?r["mine.loading"]:r["mine.refresh"]})]}),a&&a.length>0&&o(zt,{rows:a,filter:b,onFilter:d,strings:r}),h&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),w&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),p&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),m&&m.length>0&&o("ul",{class:"mine-rows",children:m.map(_=>o("li",{children:o(ye,{row:_,strings:r,onClick:()=>n(_)})}))})]})}function Lt({onDismiss:e,children:t,closeLabel:r="Close",expanded:n=!1}){let a=W(null),i=W(null);return H(()=>{var f;i.current=document.activeElement;let s=c=>{var d;if(c.key!=="Escape")return;let b=(d=a.current)==null?void 0:d.getRootNode();b instanceof ShadowRoot&&b.querySelector(".annotator-backdrop")||(c.stopPropagation(),e())};window.addEventListener("keydown",s);let l=(f=a.current)==null?void 0:f.querySelector("textarea, input, select, button");return l==null||l.focus(),()=>{window.removeEventListener("keydown",s);let c=i.current;c&&typeof c.focus=="function"&&c.focus()}},[e]),o("div",{class:`backdrop ${n?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e()},children:o("div",{ref:a,class:`modal ${n?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:e,children:"\xD7"}),t]})})}var At=`
7
+ :host {
8
+ --mfb-accent: #3b82f6;
9
+ --mfb-accent-contrast: #ffffff;
10
+ --mfb-bg: #ffffff;
11
+ --mfb-surface: #f9fafb;
12
+ --mfb-surface-2: #f3f4f6;
13
+ --mfb-text: #0a0a0a;
14
+ --mfb-text-muted: #6b7280;
15
+ --mfb-border: #e5e7eb;
16
+ --mfb-border-strong: #d1d5db;
17
+ --mfb-radius: 8px;
18
+ --mfb-radius-lg: 14px;
19
+ --mfb-font: system-ui, -apple-system, sans-serif;
20
+ --mfb-z-index: 2147483640;
21
+
22
+ /* Spacing scale \u2014 4px base, used everywhere instead of magic numbers. */
23
+ --mfb-space-1: 4px;
24
+ --mfb-space-2: 8px;
25
+ --mfb-space-3: 12px;
26
+ --mfb-space-4: 16px;
27
+ --mfb-space-5: 24px;
28
+ --mfb-space-6: 32px;
29
+ --mfb-space-7: 48px;
30
+
31
+ /* Type scale \u2014 fixed sizes, no fluid scaling. Body 14px sits in the
32
+ "comfortable on every viewport" range; headings step up gracefully. */
33
+ --mfb-text-xs: 11px;
34
+ --mfb-text-sm: 13px;
35
+ --mfb-text-base: 14px;
36
+ --mfb-text-md: 15px;
37
+ --mfb-text-lg: 17px;
38
+ --mfb-text-xl: 20px;
39
+
40
+ /* Elevation \u2014 three tiers for layering. */
41
+ --mfb-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.08);
42
+ --mfb-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.12);
43
+ --mfb-shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.18), 0 8px 20px rgba(0, 0, 0, 0.10);
44
+
45
+ all: initial;
46
+ font-family: var(--mfb-font);
47
+ color: var(--mfb-text);
48
+ position: fixed;
49
+ z-index: var(--mfb-z-index);
50
+ }
51
+
52
+ @media (prefers-color-scheme: dark) {
53
+ :host {
54
+ --mfb-bg: #0f172a;
55
+ --mfb-surface: #1e293b;
56
+ --mfb-surface-2: #253349;
57
+ --mfb-text: #f8fafc;
58
+ --mfb-text-muted: #94a3b8;
59
+ --mfb-border: #334155;
60
+ --mfb-border-strong: #475569;
61
+ --mfb-shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.55), 0 8px 20px rgba(0, 0, 0, 0.40);
62
+ }
63
+ }
64
+
65
+ /* FAB \u2014 56px (Material standard), two-layer elevation, scale-on-press,
66
+ custom SVG icon (no emoji \u2014 emoji renders inconsistently across OSes
67
+ and can't inherit color). */
68
+ .fab {
69
+ position: fixed;
70
+ bottom: 24px;
71
+ right: 24px;
72
+ width: 56px;
73
+ height: 56px;
74
+ border-radius: 999px;
75
+ background: var(--mfb-accent);
76
+ color: var(--mfb-accent-contrast);
77
+ border: none;
78
+ cursor: pointer;
79
+ /* Two-layer elevation: ambient (soft, large) + key (tighter, near). */
80
+ box-shadow:
81
+ 0 4px 12px rgba(0, 0, 0, 0.08),
82
+ 0 2px 4px rgba(0, 0, 0, 0.12);
83
+ display: grid;
84
+ place-items: center;
85
+ transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1),
86
+ box-shadow 180ms cubic-bezier(0.4, 0, 0.2, 1);
87
+ }
88
+
89
+ .fab:hover {
90
+ transform: translateY(-2px);
91
+ box-shadow:
92
+ 0 8px 24px rgba(0, 0, 0, 0.12),
93
+ 0 3px 6px rgba(0, 0, 0, 0.16);
94
+ }
95
+ .fab:active {
96
+ transform: translateY(0) scale(0.96);
97
+ box-shadow:
98
+ 0 3px 8px rgba(0, 0, 0, 0.10),
99
+ 0 1px 2px rgba(0, 0, 0, 0.14);
100
+ }
101
+ .fab:focus-visible {
102
+ outline: 2px solid var(--mfb-accent-contrast);
103
+ outline-offset: 3px;
104
+ box-shadow:
105
+ 0 0 0 4px var(--mfb-accent),
106
+ 0 4px 12px rgba(0, 0, 0, 0.08),
107
+ 0 2px 4px rgba(0, 0, 0, 0.12);
108
+ }
109
+ @media (prefers-color-scheme: dark) {
110
+ /* Slightly desaturate so the FAB doesn't glow against dark backgrounds. */
111
+ .fab { box-shadow:
112
+ 0 4px 12px rgba(0, 0, 0, 0.32),
113
+ 0 2px 4px rgba(0, 0, 0, 0.40); }
114
+ }
115
+ @media (prefers-reduced-motion: reduce) {
116
+ .fab { transition: none; }
117
+ .fab:hover, .fab:active { transform: none; }
118
+ }
119
+
120
+ /* Backdrop \u2014 fade in with a slight blur for depth. The blur gives the
121
+ modal that "page that opens" weight: the underlying page recedes
122
+ visually so the widget feels foregrounded, not pasted on. */
123
+ .backdrop {
124
+ position: fixed;
125
+ inset: 0;
126
+ background: rgba(15, 23, 42, 0.55);
127
+ backdrop-filter: blur(6px);
128
+ -webkit-backdrop-filter: blur(6px);
129
+ display: grid;
130
+ place-items: center;
131
+ animation: mfb-backdrop-in 220ms cubic-bezier(0.16, 1, 0.3, 1);
132
+ }
133
+
134
+ @keyframes mfb-backdrop-in {
135
+ from { opacity: 0; backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); }
136
+ to { opacity: 1; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
137
+ }
138
+
139
+ .modal {
140
+ background: var(--mfb-bg);
141
+ border-radius: var(--mfb-radius-lg);
142
+ box-shadow: var(--mfb-shadow-lg);
143
+ /* 720px is the "page that opens" sweet spot \u2014 wide enough to feel
144
+ like a workspace, narrow enough to not dominate the screen. Was
145
+ 440px before; the bump trades a denser modal for a calmer canvas. */
146
+ width: min(720px, calc(100vw - var(--mfb-space-7)));
147
+ padding: var(--mfb-space-6);
148
+ display: flex;
149
+ flex-direction: column;
150
+ gap: var(--mfb-space-5);
151
+ position: relative;
152
+ /* Cap height with breathing room. The form scrolls internally if
153
+ the user attaches a tall screenshot. */
154
+ max-height: min(820px, calc(100vh - var(--mfb-space-7)));
155
+ overflow-y: auto;
156
+ /* Entrance: opacity-only. Avoids any geometric shift during the
157
+ animation so interaction tests that read boundingBox immediately
158
+ after the modal becomes visible get stable coordinates. 220ms
159
+ ease-out is snappy enough that human users barely register it. */
160
+ animation: mfb-modal-in 220ms ease-out;
161
+ /* Transition lives on the BASE rule with a SHORTER duration so the
162
+ "back" trip (Board \u2192 other tab, where .is-expanded is removed)
163
+ feels snappy. The grow direction overrides this with a slower
164
+ curve in .modal.is-expanded below \u2014 the asymmetry is intentional:
165
+ a slow grow reads as a transport, a slow shrink reads as
166
+ hesitation. */
167
+ transition:
168
+ width 200ms cubic-bezier(0.4, 0, 0.2, 1),
169
+ height 200ms cubic-bezier(0.4, 0, 0.2, 1),
170
+ max-height 200ms cubic-bezier(0.4, 0, 0.2, 1),
171
+ padding 200ms cubic-bezier(0.4, 0, 0.2, 1);
172
+ }
173
+
174
+ @keyframes mfb-modal-in {
175
+ from { opacity: 0; }
176
+ to { opacity: 1; }
177
+ }
178
+
179
+ /* Mobile: full-height sheet that slides up from the bottom. The
180
+ slide-up gesture matches platform-native sheets users already know. */
181
+ @media (max-width: 640px) {
182
+ .backdrop { place-items: end center; }
183
+ .modal {
184
+ width: 100vw;
185
+ height: calc(100vh - var(--mfb-space-7));
186
+ max-height: none;
187
+ border-radius: var(--mfb-radius-lg) var(--mfb-radius-lg) 0 0;
188
+ padding: var(--mfb-space-5) var(--mfb-space-4) var(--mfb-space-4);
189
+ animation: mfb-sheet-up 280ms cubic-bezier(0.16, 1, 0.3, 1);
190
+ }
191
+ }
192
+
193
+ @keyframes mfb-sheet-up {
194
+ from { transform: translateY(100%); }
195
+ to { transform: translateY(0); }
196
+ }
197
+
198
+ @media (prefers-reduced-motion: reduce) {
199
+ .backdrop, .modal { animation: none; }
200
+ }
201
+
202
+ .modal h2 {
203
+ margin: 0;
204
+ font-size: var(--mfb-text-xl);
205
+ font-weight: 600;
206
+ padding-right: var(--mfb-space-6);
207
+ letter-spacing: -0.015em;
208
+ line-height: 1.2;
209
+ }
210
+
211
+ .modal form {
212
+ display: flex;
213
+ flex-direction: column;
214
+ gap: var(--mfb-space-5);
215
+ /* Match the entrance motion the Board/MineList/Changelog containers
216
+ * use so switching tabs (especially Board \u2192 Send, where the modal
217
+ * is mid-shrink) doesn't show a content snap behind the transition.
218
+ * 40ms delay lets the modal's shrink finish first. */
219
+ animation: mfb-board-in 220ms ease-out 40ms both;
220
+ }
221
+ @media (prefers-reduced-motion: reduce) {
222
+ .modal form { animation: none; }
223
+ }
224
+
225
+ .modal-close {
226
+ position: absolute;
227
+ top: var(--mfb-space-3);
228
+ right: var(--mfb-space-3);
229
+ width: 36px;
230
+ height: 36px;
231
+ display: grid;
232
+ place-items: center;
233
+ background: transparent;
234
+ border: none;
235
+ border-radius: var(--mfb-radius);
236
+ color: var(--mfb-text-muted);
237
+ font: inherit;
238
+ font-size: 22px;
239
+ line-height: 1;
240
+ cursor: pointer;
241
+ transition: background 120ms ease, color 120ms ease;
242
+ }
243
+ .modal-close:hover { background: var(--mfb-surface); color: var(--mfb-text); }
244
+ .modal-close:focus-visible { outline: 2px solid var(--mfb-accent); outline-offset: 2px; }
245
+
246
+ /* Each field group: label + input stacked with breathing room.
247
+ The 24px modal-level gap separates groups. */
248
+ .field { display: flex; flex-direction: column; gap: var(--mfb-space-2); font-size: var(--mfb-text-sm); }
249
+
250
+ .field label {
251
+ color: var(--mfb-text-muted);
252
+ font-weight: 500;
253
+ font-size: var(--mfb-text-xs);
254
+ letter-spacing: 0.03em;
255
+ text-transform: uppercase;
256
+ }
257
+
258
+ .field input, .field select, .field textarea {
259
+ font-family: inherit;
260
+ font-size: var(--mfb-text-base);
261
+ color: inherit;
262
+ padding: 11px 14px;
263
+ border: 1px solid var(--mfb-border);
264
+ border-radius: var(--mfb-radius);
265
+ background: var(--mfb-surface);
266
+ transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
267
+ }
268
+
269
+ .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--mfb-border-strong); }
270
+ .field input:focus, .field select:focus, .field textarea:focus {
271
+ outline: none;
272
+ border-color: var(--mfb-accent);
273
+ background: var(--mfb-bg);
274
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--mfb-accent) 22%, transparent);
275
+ }
276
+
277
+ .field select {
278
+ -webkit-appearance: none;
279
+ -moz-appearance: none;
280
+ appearance: none;
281
+ padding-right: 28px;
282
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/></svg>");
283
+ background-repeat: no-repeat;
284
+ background-position: right 10px center;
285
+ }
286
+
287
+ .field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
288
+
289
+ .row { display: flex; gap: var(--mfb-space-3); }
290
+ .row > * { flex: 1; }
291
+
292
+ /* Footer: subtle separation via border, slightly more vertical space. */
293
+ .actions {
294
+ display: flex;
295
+ gap: var(--mfb-space-2);
296
+ justify-content: flex-end;
297
+ padding-top: var(--mfb-space-4);
298
+ margin-top: var(--mfb-space-1);
299
+ border-top: 1px solid var(--mfb-border);
300
+ }
301
+
302
+ .btn {
303
+ padding: 10px 18px;
304
+ border-radius: var(--mfb-radius);
305
+ border: 1px solid var(--mfb-border);
306
+ background: var(--mfb-bg);
307
+ color: var(--mfb-text);
308
+ font: inherit;
309
+ font-size: var(--mfb-text-sm);
310
+ font-weight: 500;
311
+ cursor: pointer;
312
+ transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
313
+ }
314
+ .btn:hover { background: var(--mfb-surface); border-color: var(--mfb-border-strong); }
315
+ .btn:active { transform: scale(0.98); }
316
+
317
+ .btn--primary {
318
+ background: var(--mfb-accent);
319
+ color: var(--mfb-accent-contrast);
320
+ border-color: var(--mfb-accent);
321
+ }
322
+ .btn--primary:hover {
323
+ background: color-mix(in srgb, var(--mfb-accent) 88%, black);
324
+ border-color: color-mix(in srgb, var(--mfb-accent) 88%, black);
325
+ }
326
+
327
+ /* Subdued button \u2014 borrows accent text but transparent background. Used
328
+ * for the "Capture this page" alt-action that sits below the dropzone,
329
+ * where a full --primary would compete with the form's main submit. */
330
+ .btn--ghost {
331
+ background: transparent;
332
+ color: var(--mfb-accent);
333
+ border-color: color-mix(in srgb, var(--mfb-accent) 40%, transparent);
334
+ }
335
+ .btn--ghost:hover {
336
+ background: color-mix(in srgb, var(--mfb-accent) 8%, transparent);
337
+ border-color: var(--mfb-accent);
338
+ }
339
+
340
+ .btn[disabled] { opacity: 0.6; cursor: not-allowed; }
341
+
342
+ .error { color: #dc2626; font-size: 13px; }
343
+ .success { color: #059669; font-size: 13px; }
344
+
345
+ /* ---- v0.6.0: manual screenshot upload + annotator -------------------- */
346
+
347
+ .mfb-sr-only {
348
+ position: absolute;
349
+ width: 1px;
350
+ height: 1px;
351
+ padding: 0;
352
+ margin: -1px;
353
+ overflow: hidden;
354
+ clip: rect(0, 0, 0, 0);
355
+ white-space: nowrap;
356
+ border: 0;
357
+ }
358
+
359
+ /* Dropzone \u2014 bigger, more inviting; the icon + heading + sub-line
360
+ hierarchy makes it feel like a deliberate target, not an afterthought. */
361
+ .screenshot-dropzone {
362
+ border: 1.5px dashed var(--mfb-border-strong);
363
+ border-radius: var(--mfb-radius-lg);
364
+ padding: var(--mfb-space-6) var(--mfb-space-4);
365
+ text-align: center;
366
+ cursor: pointer;
367
+ background: var(--mfb-surface);
368
+ transition: border-color 160ms ease, background 160ms ease, transform 120ms ease;
369
+ display: flex;
370
+ flex-direction: column;
371
+ align-items: center;
372
+ gap: var(--mfb-space-2);
373
+ }
374
+ .screenshot-dropzone:hover {
375
+ border-color: var(--mfb-accent);
376
+ background: color-mix(in srgb, var(--mfb-accent) 4%, var(--mfb-surface));
377
+ }
378
+ .screenshot-dropzone.is-dragover {
379
+ border-color: var(--mfb-accent);
380
+ border-style: solid;
381
+ background: color-mix(in srgb, var(--mfb-accent) 10%, var(--mfb-surface));
382
+ transform: scale(1.005);
383
+ }
384
+ .screenshot-dropzone:focus-visible {
385
+ outline: 2px solid var(--mfb-accent);
386
+ outline-offset: 2px;
387
+ }
388
+ .screenshot-icon {
389
+ color: var(--mfb-text-muted);
390
+ opacity: 0.7;
391
+ margin-bottom: var(--mfb-space-1);
392
+ transition: color 160ms ease, opacity 160ms ease;
393
+ }
394
+ .screenshot-dropzone:hover .screenshot-icon,
395
+ .screenshot-dropzone.is-dragover .screenshot-icon {
396
+ color: var(--mfb-accent);
397
+ opacity: 1;
398
+ }
399
+ .screenshot-cta { font-size: var(--mfb-text-base); color: var(--mfb-text); font-weight: 500; }
400
+ .screenshot-cta strong { color: var(--mfb-accent); font-weight: 600; }
401
+ .screenshot-formats { font-size: var(--mfb-text-xs); color: var(--mfb-text-muted); }
402
+
403
+ .screenshot-preview {
404
+ position: relative;
405
+ border: 1px solid var(--mfb-border);
406
+ border-radius: var(--mfb-radius);
407
+ overflow: hidden;
408
+ background: var(--mfb-surface);
409
+ display: flex;
410
+ flex-direction: column;
411
+ }
412
+ .screenshot-preview img {
413
+ display: block;
414
+ width: 100%;
415
+ height: auto;
416
+ max-height: 280px;
417
+ object-fit: contain;
418
+ background: #1a1a1a;
419
+ }
420
+ .screenshot-preview-actions {
421
+ display: flex;
422
+ gap: var(--mfb-space-2);
423
+ padding: var(--mfb-space-2);
424
+ border-top: 1px solid var(--mfb-border);
425
+ background: var(--mfb-bg);
426
+ }
427
+ .screenshot-preview-actions .btn {
428
+ flex: 1;
429
+ padding: 8px 12px;
430
+ font-size: var(--mfb-text-sm);
431
+ display: inline-flex;
432
+ align-items: center;
433
+ justify-content: center;
434
+ gap: 6px;
435
+ }
436
+ .screenshot-preview-actions .btn--primary {
437
+ background: var(--mfb-bg);
438
+ color: var(--mfb-accent);
439
+ border-color: var(--mfb-accent);
440
+ }
441
+ .screenshot-preview-actions .btn--primary:hover {
442
+ background: color-mix(in srgb, var(--mfb-accent) 8%, var(--mfb-bg));
443
+ border-color: var(--mfb-accent);
444
+ color: var(--mfb-accent);
445
+ }
446
+ .screenshot-remove {
447
+ /* Kept for legacy markup that uses the old corner-cross button. */
448
+ position: absolute;
449
+ top: 6px;
450
+ right: 6px;
451
+ width: 26px;
452
+ height: 26px;
453
+ display: grid;
454
+ place-items: center;
455
+ background: rgba(255, 255, 255, 0.9);
456
+ border: 1px solid var(--mfb-border);
457
+ border-radius: 999px;
458
+ font-size: 18px;
459
+ line-height: 1;
460
+ cursor: pointer;
461
+ color: #111827;
462
+ }
463
+ .screenshot-remove:hover { background: #fff; }
464
+ .screenshot-annotate {
465
+ /* Kept for legacy; new markup uses .screenshot-preview-actions. */
466
+ border-radius: 0;
467
+ border-width: 0;
468
+ border-top: 1px solid var(--mfb-border);
469
+ background: var(--mfb-bg);
470
+ }
471
+ .screenshot-annotate:hover { background: var(--mfb-surface); }
472
+
473
+ .page-context {
474
+ display: flex;
475
+ align-items: center;
476
+ gap: 8px;
477
+ font-size: 11px;
478
+ color: var(--mfb-text-muted);
479
+ }
480
+ .page-context-label {
481
+ text-transform: uppercase;
482
+ font-weight: 600;
483
+ letter-spacing: 0.04em;
484
+ font-size: 10px;
485
+ }
486
+ .page-context-url {
487
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
488
+ font-size: 11px;
489
+ color: var(--mfb-text-muted);
490
+ flex: 1;
491
+ overflow: hidden;
492
+ text-overflow: ellipsis;
493
+ white-space: nowrap;
494
+ }
495
+
496
+ /* Annotator modal \u2014 sits above the feedback modal (z-index +1). */
497
+
498
+ .annotator-backdrop {
499
+ position: fixed;
500
+ inset: 0;
501
+ background: rgba(0, 0, 0, 0.78);
502
+ display: grid;
503
+ place-items: center;
504
+ z-index: 1;
505
+ padding: 12px;
506
+ }
507
+ .annotator {
508
+ position: relative;
509
+ background: var(--mfb-bg);
510
+ color: var(--mfb-text);
511
+ border-radius: calc(var(--mfb-radius) * 1.5);
512
+ width: min(960px, 96vw);
513
+ max-height: calc(100vh - 24px);
514
+ display: flex;
515
+ flex-direction: column;
516
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
517
+ }
518
+ .annotator-header {
519
+ display: flex;
520
+ align-items: center;
521
+ justify-content: space-between;
522
+ padding: 10px 14px;
523
+ border-bottom: 1px solid var(--mfb-border);
524
+ font-size: 13px;
525
+ font-weight: 600;
526
+ }
527
+ .annotator-toolbar {
528
+ display: flex;
529
+ flex-wrap: wrap;
530
+ align-items: center;
531
+ gap: 8px;
532
+ padding: 8px 14px;
533
+ border-bottom: 1px solid var(--mfb-border);
534
+ }
535
+ .annotator-tools, .annotator-colors { display: flex; gap: 4px; }
536
+ .annotator-sep {
537
+ display: inline-block;
538
+ width: 1px;
539
+ height: 18px;
540
+ background: var(--mfb-border);
541
+ margin: 0 4px;
542
+ }
543
+ .annotator-spacer { flex: 1; }
544
+ .annotator-tool {
545
+ width: 30px;
546
+ height: 30px;
547
+ display: grid;
548
+ place-items: center;
549
+ background: var(--mfb-bg);
550
+ color: var(--mfb-text);
551
+ border: 1px solid var(--mfb-border);
552
+ border-radius: var(--mfb-radius);
553
+ cursor: pointer;
554
+ }
555
+ .annotator-tool:hover { background: var(--mfb-surface); }
556
+ .annotator-tool.is-active {
557
+ background: var(--mfb-text);
558
+ color: var(--mfb-bg);
559
+ border-color: var(--mfb-text);
560
+ }
561
+ .annotator-color {
562
+ width: 24px;
563
+ height: 24px;
564
+ border-radius: 999px;
565
+ border: 2px solid var(--mfb-border);
566
+ cursor: pointer;
567
+ padding: 0;
568
+ transition: transform 120ms ease;
569
+ position: relative;
570
+ }
571
+ .annotator-color.is-active {
572
+ transform: scale(1.12);
573
+ border-color: var(--mfb-text);
574
+ }
575
+ /* Color-picker swatch: rainbow gradient fill so users see this isn't
576
+ a preset, plus a tiny native <input type="color"> overlaid invisibly. */
577
+ .annotator-color-picker {
578
+ display: grid;
579
+ place-items: center;
580
+ background: conic-gradient(from 180deg, #ef4444, #f59e0b, #10b981, #3b82f6, #8b5cf6, #ec4899, #ef4444);
581
+ overflow: hidden;
582
+ }
583
+ .annotator-color-picker input[type="color"] {
584
+ position: absolute;
585
+ inset: 0;
586
+ width: 100%;
587
+ height: 100%;
588
+ border: 0;
589
+ padding: 0;
590
+ margin: 0;
591
+ opacity: 0;
592
+ cursor: pointer;
593
+ }
594
+ .annotator-btn {
595
+ display: inline-flex;
596
+ align-items: center;
597
+ gap: 4px;
598
+ height: 30px;
599
+ padding: 0 10px;
600
+ font: inherit;
601
+ font-size: 12px;
602
+ background: var(--mfb-bg);
603
+ color: var(--mfb-text);
604
+ border: 1px solid var(--mfb-border);
605
+ border-radius: var(--mfb-radius);
606
+ cursor: pointer;
607
+ }
608
+ .annotator-btn:hover { background: var(--mfb-surface); }
609
+ .annotator-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
610
+ .annotator-count { font-size: 11px; color: var(--mfb-text-muted); }
611
+ .annotator-canvas-wrap {
612
+ flex: 1;
613
+ overflow: auto;
614
+ background: #1a1a1a;
615
+ display: flex;
616
+ align-items: center;
617
+ justify-content: center;
618
+ padding: 12px;
619
+ min-height: 200px;
620
+ }
621
+ .annotator-canvas {
622
+ cursor: crosshair;
623
+ box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
624
+ background: #fff;
625
+ }
626
+ .annotator-loading {
627
+ color: rgba(255, 255, 255, 0.7);
628
+ font-size: 13px;
629
+ }
630
+ .annotator-footer {
631
+ display: flex;
632
+ align-items: center;
633
+ justify-content: flex-end;
634
+ gap: 8px;
635
+ padding: 10px 14px;
636
+ border-top: 1px solid var(--mfb-border);
637
+ }
638
+
639
+ /* ---- v0.7: tabs + reader UI -------------------------------------- */
640
+
641
+ .tab-strip {
642
+ display: flex;
643
+ gap: var(--mfb-space-1);
644
+ border-bottom: 1px solid var(--mfb-border);
645
+ margin: 0;
646
+ padding: 0;
647
+ }
648
+ .tab-button {
649
+ appearance: none;
650
+ background: transparent;
651
+ border: 0;
652
+ border-bottom: 2px solid transparent;
653
+ padding: var(--mfb-space-3) var(--mfb-space-4);
654
+ margin-bottom: -1px;
655
+ font: inherit;
656
+ font-size: var(--mfb-text-sm);
657
+ font-weight: 500;
658
+ color: var(--mfb-text-muted);
659
+ cursor: pointer;
660
+ transition: color 120ms ease, border-color 120ms ease;
661
+ }
662
+ .tab-button:hover { color: var(--mfb-text); }
663
+ .tab-button.is-active {
664
+ color: var(--mfb-accent);
665
+ border-bottom-color: var(--mfb-accent);
666
+ }
667
+ .tab-button[aria-selected="true"] { font-weight: 600; }
668
+
669
+ .mine-list {
670
+ display: flex;
671
+ flex-direction: column;
672
+ gap: var(--mfb-space-3);
673
+ /* Matches .board-view's entrance so switching tabs feels like a real
674
+ * page transition rather than a flicker. */
675
+ animation: mfb-board-in 280ms ease-out 40ms both;
676
+ }
677
+ @media (prefers-reduced-motion: reduce) {
678
+ .mine-list { animation: none; }
679
+ }
680
+ .mine-list-header {
681
+ display: flex;
682
+ align-items: center;
683
+ justify-content: space-between;
684
+ }
685
+ .mine-list-header h2 { margin: 0; font-size: var(--mfb-text-lg); font-weight: 600; letter-spacing: -0.01em; }
686
+ .mine-loading { color: var(--mfb-text-muted); font-size: 13px; }
687
+ .mine-empty {
688
+ text-align: center;
689
+ padding: 24px 12px;
690
+ color: var(--mfb-text-muted);
691
+ font-size: 13px;
692
+ }
693
+ .mine-empty strong { display: block; color: var(--mfb-text); margin-bottom: 4px; }
694
+
695
+ .mine-rows {
696
+ list-style: none;
697
+ margin: 0;
698
+ padding: 0;
699
+ display: flex;
700
+ flex-direction: column;
701
+ gap: 6px;
702
+ max-height: 380px;
703
+ overflow-y: auto;
704
+ }
705
+ .mine-row {
706
+ appearance: none;
707
+ text-align: left;
708
+ background: var(--mfb-surface);
709
+ border: 1px solid var(--mfb-border);
710
+ border-radius: var(--mfb-radius);
711
+ padding: 10px 12px;
712
+ font: inherit;
713
+ color: inherit;
714
+ cursor: pointer;
715
+ display: flex;
716
+ flex-direction: column;
717
+ gap: 4px;
718
+ width: 100%;
719
+ transition:
720
+ border-color 140ms ease,
721
+ background 140ms ease,
722
+ transform 100ms ease,
723
+ box-shadow 140ms ease;
724
+ }
725
+ .mine-row:hover {
726
+ border-color: var(--mfb-border-strong);
727
+ background: var(--mfb-bg);
728
+ transform: translateY(-1px);
729
+ box-shadow: var(--mfb-shadow);
730
+ }
731
+ .mine-row:active { transform: scale(0.997); }
732
+ .mine-row:focus-visible {
733
+ outline: 2px solid var(--mfb-accent);
734
+ outline-offset: 2px;
735
+ }
736
+ .mine-row-pills { display: flex; gap: 4px; flex-wrap: wrap; }
737
+ .mine-row-preview {
738
+ font-size: 13px;
739
+ color: var(--mfb-text);
740
+ display: -webkit-box;
741
+ -webkit-line-clamp: 2;
742
+ -webkit-box-orient: vertical;
743
+ overflow: hidden;
744
+ }
745
+ .mine-row-meta {
746
+ display: flex;
747
+ gap: 6px;
748
+ font-size: 11px;
749
+ color: var(--mfb-text-muted);
750
+ }
751
+
752
+ .pill {
753
+ display: inline-block;
754
+ font-size: 10px;
755
+ font-weight: 600;
756
+ text-transform: uppercase;
757
+ letter-spacing: 0.04em;
758
+ padding: 2px 8px;
759
+ border-radius: 999px;
760
+ border: 1px solid transparent;
761
+ }
762
+ .pill-status { background: #eff6ff; color: #1e40af; border-color: #dbeafe; }
763
+ .pill-status--in_progress { background: #fffbeb; color: #92400e; border-color: #fde68a; }
764
+ .pill-status--awaiting_validation { background: #faf5ff; color: #6b21a8; border-color: #e9d5ff; }
765
+ .pill-status--closed { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
766
+ .pill-status--rejected, .pill-status--wontfix, .pill-status--duplicate { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }
767
+ .pill-type { background: var(--mfb-surface); color: var(--mfb-text-muted); border-color: var(--mfb-border); }
768
+ .pill-severity { background: var(--mfb-surface); color: var(--mfb-text-muted); border-color: var(--mfb-border); }
769
+ .pill-severity--blocker { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
770
+ .pill-severity--high { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
771
+ .pill-severity--medium { background: #fefce8; color: #854d0e; border-color: #fef08a; }
772
+ .pill-severity--low { background: var(--mfb-surface); color: var(--mfb-text-muted); }
773
+
774
+ .report-detail { display: flex; flex-direction: column; gap: 12px; }
775
+ .report-detail-header {
776
+ display: flex;
777
+ align-items: center;
778
+ justify-content: space-between;
779
+ gap: 8px;
780
+ }
781
+ .report-detail-body { display: flex; flex-direction: column; gap: 10px; }
782
+ .report-detail-description {
783
+ font-size: 14px;
784
+ white-space: pre-wrap;
785
+ margin: 0;
786
+ }
787
+ .report-detail-screenshot {
788
+ display: block;
789
+ border: 1px solid var(--mfb-border);
790
+ border-radius: var(--mfb-radius);
791
+ overflow: hidden;
792
+ background: #1a1a1a;
793
+ }
794
+ .report-detail-screenshot img {
795
+ display: block;
796
+ width: 100%;
797
+ max-height: 200px;
798
+ object-fit: contain;
799
+ }
800
+ .report-detail-section {
801
+ font-size: 12px;
802
+ text-transform: uppercase;
803
+ letter-spacing: 0.04em;
804
+ color: var(--mfb-text-muted);
805
+ margin: 8px 0 4px;
806
+ font-weight: 600;
807
+ }
808
+
809
+ .report-detail-context {
810
+ display: flex;
811
+ flex-direction: column;
812
+ gap: 6px;
813
+ padding: 10px 12px;
814
+ background: var(--mfb-surface);
815
+ border-radius: var(--mfb-radius);
816
+ border: 1px solid var(--mfb-border);
817
+ }
818
+ .report-detail-context-pills { display: flex; gap: 4px; flex-wrap: wrap; }
819
+ .report-detail-context-line {
820
+ display: flex;
821
+ align-items: baseline;
822
+ gap: 8px;
823
+ font-size: 12px;
824
+ color: var(--mfb-text);
825
+ }
826
+ .report-detail-context-label {
827
+ text-transform: uppercase;
828
+ letter-spacing: 0.04em;
829
+ font-size: 10px;
830
+ font-weight: 600;
831
+ color: var(--mfb-text-muted);
832
+ min-width: 56px;
833
+ }
834
+ .report-detail-context-url {
835
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
836
+ color: var(--mfb-accent);
837
+ text-decoration: none;
838
+ font-size: 11px;
839
+ overflow: hidden;
840
+ text-overflow: ellipsis;
841
+ white-space: nowrap;
842
+ }
843
+ .report-detail-context-url:hover { text-decoration: underline; }
844
+ .pill-capture { background: var(--mfb-bg); color: var(--mfb-text-muted); border-color: var(--mfb-border); }
845
+ .report-detail-empty {
846
+ font-size: 12px;
847
+ color: var(--mfb-text-muted);
848
+ margin: 0;
849
+ }
850
+
851
+ .report-comments {
852
+ list-style: none;
853
+ margin: 0;
854
+ padding: 0;
855
+ display: flex;
856
+ flex-direction: column;
857
+ gap: 6px;
858
+ max-height: 300px;
859
+ overflow-y: auto;
860
+ }
861
+
862
+ .comment-bubble {
863
+ padding: 8px 10px;
864
+ border-radius: 12px;
865
+ max-width: 88%;
866
+ font-size: 13px;
867
+ line-height: 1.4;
868
+ }
869
+ .comment-bubble.is-mine {
870
+ align-self: flex-end;
871
+ background: var(--mfb-accent);
872
+ color: var(--mfb-accent-contrast);
873
+ }
874
+ .comment-bubble.is-other {
875
+ align-self: flex-start;
876
+ background: var(--mfb-surface);
877
+ border: 1px solid var(--mfb-border);
878
+ color: var(--mfb-text);
879
+ }
880
+ .comment-author {
881
+ font-size: 10px;
882
+ text-transform: uppercase;
883
+ letter-spacing: 0.04em;
884
+ font-weight: 600;
885
+ margin-bottom: 2px;
886
+ }
887
+ .comment-author--mcp { color: #6b21a8; }
888
+ .comment-author--staff { color: #1e40af; }
889
+ .comment-author--system { color: var(--mfb-text-muted); }
890
+ .comment-body { white-space: pre-wrap; }
891
+ .comment-time {
892
+ font-size: 10px;
893
+ margin-top: 4px;
894
+ opacity: 0.7;
895
+ }
896
+
897
+ .report-compose {
898
+ display: flex;
899
+ flex-direction: column;
900
+ gap: 6px;
901
+ margin-top: 4px;
902
+ }
903
+ .report-compose textarea {
904
+ font: inherit;
905
+ font-size: 13px;
906
+ padding: 8px 10px;
907
+ border: 1px solid var(--mfb-border);
908
+ border-radius: var(--mfb-radius);
909
+ background: var(--mfb-surface);
910
+ color: inherit;
911
+ min-height: 64px;
912
+ resize: vertical;
913
+ }
914
+ .report-compose-actions {
915
+ display: flex;
916
+ justify-content: flex-end;
917
+ gap: 6px;
918
+ }
919
+
920
+ /* v0.15.3 \u2014 teammate-viewing notice. Shown in place of the compose
921
+ * box when a non-submitter opens a project-wide row from the Board
922
+ * tab. Replies are private to the submitter; we surface this once
923
+ * (calm tone, neutral surface) so the viewer understands why no
924
+ * Reply box appears, instead of leaving them wondering. */
925
+ .report-detail-teammate-notice {
926
+ margin: 0;
927
+ padding: var(--mfb-space-3) var(--mfb-space-4);
928
+ background: var(--mfb-surface);
929
+ border: 1px dashed var(--mfb-border);
930
+ border-radius: var(--mfb-radius);
931
+ font-size: var(--mfb-text-sm);
932
+ color: var(--mfb-text-muted);
933
+ font-style: italic;
934
+ }
935
+
936
+ /* v0.15.3 \u2014 friendly "report not available" empty state. Replaces
937
+ * the raw API error message (e.g. getReport failed: 404 \u2026) that
938
+ * used to leak from setError(err.message) straight into the DOM. */
939
+ .report-detail-empty-state {
940
+ display: flex;
941
+ flex-direction: column;
942
+ align-items: flex-start;
943
+ gap: var(--mfb-space-3);
944
+ padding: var(--mfb-space-5);
945
+ background: var(--mfb-surface);
946
+ border-radius: var(--mfb-radius);
947
+ border: 1px solid var(--mfb-border);
948
+ }
949
+ .report-detail-empty-state-title {
950
+ margin: 0;
951
+ font-size: var(--mfb-text-md);
952
+ font-weight: 600;
953
+ color: var(--mfb-text);
954
+ }
955
+ .report-detail-empty-state-body {
956
+ margin: 0;
957
+ font-size: var(--mfb-text-sm);
958
+ color: var(--mfb-text-muted);
959
+ }
960
+
961
+ /* Status history \u2014 read-only audit trail visible to the submitter.
962
+ Timeline of who flipped the status and when (operator vs. agent vs.
963
+ system). Bordered, neutral surface so it doesn't compete visually
964
+ with the conversation thread above. */
965
+ .report-detail-history {
966
+ display: flex;
967
+ flex-direction: column;
968
+ gap: 6px;
969
+ border: 1px solid var(--mfb-border);
970
+ border-radius: var(--mfb-radius);
971
+ background: var(--mfb-surface);
972
+ padding: 8px 10px;
973
+ }
974
+ .report-detail-history .report-detail-section {
975
+ margin: 0;
976
+ font-size: 11px;
977
+ text-transform: uppercase;
978
+ letter-spacing: 0.04em;
979
+ color: var(--mfb-text-muted);
980
+ }
981
+ .status-history {
982
+ list-style: none;
983
+ margin: 0;
984
+ padding: 0;
985
+ display: flex;
986
+ flex-direction: column;
987
+ gap: 4px;
988
+ }
989
+ .status-history-row {
990
+ display: grid;
991
+ grid-template-columns: auto 1fr auto;
992
+ gap: 8px;
993
+ align-items: center;
994
+ font-size: 11px;
995
+ }
996
+ .status-history-time {
997
+ color: var(--mfb-text-muted);
998
+ font-variant-numeric: tabular-nums;
999
+ white-space: nowrap;
1000
+ }
1001
+ .status-history-transition {
1002
+ display: inline-flex;
1003
+ gap: 4px;
1004
+ align-items: center;
1005
+ flex-wrap: wrap;
1006
+ }
1007
+ .status-history-arrow {
1008
+ color: var(--mfb-text-muted);
1009
+ font-size: 11px;
1010
+ }
1011
+ .status-history-source {
1012
+ font-size: 10px;
1013
+ text-transform: uppercase;
1014
+ letter-spacing: 0.04em;
1015
+ font-weight: 600;
1016
+ white-space: nowrap;
1017
+ }
1018
+ .status-history-source--mcp { color: #6b21a8; }
1019
+ .status-history-source--user { color: #1e40af; }
1020
+ .status-history-source--system { color: var(--mfb-text-muted); }
1021
+
1022
+ /* Transparency drawer \u2014 closed by default. The user can click open to
1023
+ verify what their browser sent: device, errors, console tail, network
1024
+ tail. Read-only; purely a trust-building gesture. */
1025
+ .report-detail-tech {
1026
+ border: 1px solid var(--mfb-border);
1027
+ border-radius: var(--mfb-radius);
1028
+ background: var(--mfb-surface);
1029
+ }
1030
+ .report-detail-tech > summary {
1031
+ cursor: pointer;
1032
+ padding: 8px 10px;
1033
+ font-size: 11px;
1034
+ text-transform: uppercase;
1035
+ letter-spacing: 0.04em;
1036
+ color: var(--mfb-text-muted);
1037
+ user-select: none;
1038
+ list-style: none;
1039
+ }
1040
+ .report-detail-tech > summary::-webkit-details-marker { display: none; }
1041
+ .report-detail-tech > summary::before {
1042
+ content: '\u25B8';
1043
+ display: inline-block;
1044
+ margin-right: 6px;
1045
+ transition: transform 120ms;
1046
+ }
1047
+ .report-detail-tech[open] > summary::before { transform: rotate(90deg); }
1048
+ .tech-body {
1049
+ padding: 0 10px 10px 10px;
1050
+ display: flex;
1051
+ flex-direction: column;
1052
+ gap: 10px;
1053
+ }
1054
+ .tech-section h4 {
1055
+ margin: 0 0 4px 0;
1056
+ font-size: 10px;
1057
+ text-transform: uppercase;
1058
+ letter-spacing: 0.04em;
1059
+ color: var(--mfb-text-muted);
1060
+ font-weight: 600;
1061
+ }
1062
+ .tech-device {
1063
+ display: grid;
1064
+ grid-template-columns: max-content 1fr;
1065
+ column-gap: 8px;
1066
+ row-gap: 2px;
1067
+ margin: 0;
1068
+ font-size: 11px;
1069
+ font-variant-numeric: tabular-nums;
1070
+ }
1071
+ .tech-device dt { color: var(--mfb-text-muted); }
1072
+ .tech-device dd { margin: 0; }
1073
+ .tech-errors, .tech-console, .tech-network {
1074
+ list-style: none;
1075
+ margin: 0;
1076
+ padding: 0;
1077
+ display: flex;
1078
+ flex-direction: column;
1079
+ gap: 2px;
1080
+ font-size: 11px;
1081
+ font-family: ui-monospace, "SF Mono", Menlo, monospace;
1082
+ max-height: 200px;
1083
+ overflow-y: auto;
1084
+ }
1085
+ .tech-errors li { padding: 4px 0; border-top: 1px solid var(--mfb-border); }
1086
+ .tech-errors li:first-child { border-top: 0; }
1087
+ .tech-errors-msg { color: #991b1b; font-weight: 600; }
1088
+ .tech-errors-stack {
1089
+ margin: 4px 0 0 0;
1090
+ padding: 4px 6px;
1091
+ background: var(--mfb-bg);
1092
+ border-radius: 4px;
1093
+ font-size: 10px;
1094
+ white-space: pre-wrap;
1095
+ color: var(--mfb-text-muted);
1096
+ max-height: 120px;
1097
+ overflow-y: auto;
1098
+ }
1099
+ .tech-console-row {
1100
+ display: grid;
1101
+ grid-template-columns: 48px 1fr;
1102
+ gap: 6px;
1103
+ padding: 1px 0;
1104
+ }
1105
+ .tech-console-level {
1106
+ text-transform: uppercase;
1107
+ font-size: 9px;
1108
+ font-weight: 600;
1109
+ align-self: center;
1110
+ color: var(--mfb-text-muted);
1111
+ }
1112
+ .tech-console-row--warn .tech-console-level { color: #92400e; }
1113
+ .tech-console-row--error .tech-console-level { color: #991b1b; }
1114
+ .tech-console-row--info .tech-console-level { color: #1e40af; }
1115
+ .tech-console-msg { word-break: break-word; }
1116
+ .tech-network-row {
1117
+ display: grid;
1118
+ grid-template-columns: 48px 56px 1fr 56px;
1119
+ gap: 6px;
1120
+ padding: 1px 0;
1121
+ }
1122
+ .tech-network-row--fail .tech-network-status { color: #991b1b; font-weight: 700; }
1123
+ .tech-network-status { font-variant-numeric: tabular-nums; }
1124
+ .tech-network-method { color: var(--mfb-text-muted); }
1125
+ .tech-network-url { word-break: break-all; }
1126
+ .tech-network-time { text-align: right; color: var(--mfb-text-muted); font-variant-numeric: tabular-nums; }
1127
+
1128
+ /* KPI strip \u2014 four pills above the My Reports list. Each is clickable
1129
+ to filter the rows below. Borrowed from thePnr's FeedbackKPICards. */
1130
+ .kpi-strip {
1131
+ display: grid;
1132
+ grid-template-columns: repeat(4, 1fr);
1133
+ gap: 6px;
1134
+ }
1135
+ .kpi-cell {
1136
+ appearance: none;
1137
+ background: var(--mfb-bg);
1138
+ border: 1px solid var(--mfb-border);
1139
+ border-radius: var(--mfb-radius);
1140
+ padding: 10px 10px 10px 14px;
1141
+ cursor: pointer;
1142
+ display: flex;
1143
+ flex-direction: column;
1144
+ align-items: flex-start;
1145
+ gap: 2px;
1146
+ font-family: inherit;
1147
+ color: inherit;
1148
+ position: relative;
1149
+ overflow: hidden;
1150
+ transition:
1151
+ background 140ms ease,
1152
+ border-color 140ms ease,
1153
+ transform 100ms ease,
1154
+ box-shadow 140ms ease;
1155
+ }
1156
+ .kpi-cell::before {
1157
+ /* Vertical tone accent \u2014 matches the Board KPI cards' visual rhythm so
1158
+ * the two surfaces feel like they belong to the same product. v0.12
1159
+ * polish pass. */
1160
+ content: '';
1161
+ position: absolute;
1162
+ top: 0;
1163
+ left: 0;
1164
+ width: 3px;
1165
+ height: 100%;
1166
+ background: var(--mfb-border);
1167
+ transition: background 140ms ease;
1168
+ }
1169
+ .kpi-cell--new::before { background: #3b82f6; }
1170
+ .kpi-cell--in_progress::before { background: #f59e0b; }
1171
+ .kpi-cell--awaiting_validation::before { background: #a855f7; }
1172
+ .kpi-cell--resolved::before { background: #10b981; }
1173
+ .kpi-cell:hover {
1174
+ background: var(--mfb-surface);
1175
+ transform: translateY(-1px);
1176
+ box-shadow: var(--mfb-shadow);
1177
+ }
1178
+ .kpi-cell.is-active {
1179
+ border-color: var(--mfb-accent);
1180
+ background: rgba(59, 130, 246, 0.08);
1181
+ }
1182
+ .kpi-cell.is-active.kpi-cell--in_progress { border-color: #d97706; background: rgba(251, 191, 36, 0.10); }
1183
+ .kpi-cell.is-active.kpi-cell--awaiting_validation { border-color: #9333ea; background: rgba(168, 85, 247, 0.10); }
1184
+ .kpi-cell.is-active.kpi-cell--resolved { border-color: #059669; background: rgba(16, 185, 129, 0.10); }
1185
+ .kpi-value {
1186
+ font-size: 18px;
1187
+ font-weight: 700;
1188
+ font-variant-numeric: tabular-nums;
1189
+ line-height: 1;
1190
+ }
1191
+ .kpi-label {
1192
+ font-size: 10px;
1193
+ text-transform: uppercase;
1194
+ letter-spacing: 0.04em;
1195
+ color: var(--mfb-text-muted);
1196
+ }
1197
+
1198
+ /* Changelog ("This week") \u2014 week-grouped resolved-report timeline.
1199
+ Borrowed from thePnr's FeedbackChangelogView; the header per group
1200
+ reads "\u25CF Week of {date} \u2501\u2501\u2501 {n} resolved". */
1201
+ .changelog-groups {
1202
+ display: flex;
1203
+ flex-direction: column;
1204
+ gap: 12px;
1205
+ animation: mfb-board-in 280ms ease-out 40ms both;
1206
+ }
1207
+ @media (prefers-reduced-motion: reduce) {
1208
+ .changelog-groups { animation: none; }
1209
+ }
1210
+ .changelog-group {
1211
+ display: flex;
1212
+ flex-direction: column;
1213
+ gap: 6px;
1214
+ }
1215
+ .changelog-group-header {
1216
+ display: grid;
1217
+ grid-template-columns: auto auto 1fr auto;
1218
+ gap: 6px;
1219
+ align-items: center;
1220
+ font-size: 11px;
1221
+ text-transform: uppercase;
1222
+ letter-spacing: 0.04em;
1223
+ color: var(--mfb-text-muted);
1224
+ }
1225
+ .changelog-group-marker {
1226
+ color: var(--mfb-accent);
1227
+ font-size: 14px;
1228
+ line-height: 1;
1229
+ }
1230
+ .changelog-group-label { font-weight: 600; }
1231
+ .changelog-group-rule {
1232
+ height: 1px;
1233
+ background: var(--mfb-border);
1234
+ align-self: center;
1235
+ }
1236
+ .changelog-group-count {
1237
+ font-variant-numeric: tabular-nums;
1238
+ font-weight: 600;
1239
+ }
1240
+
1241
+ /* ---- v0.12: Board tab + expanded modal ("transport" feel) ------------ */
1242
+
1243
+ /* When the Board tab is active, the modal grows toward near-fullscreen
1244
+ * on desktop and full-screen on mobile. The CSS transition gives the
1245
+ * sense of clicking through to a real page rather than switching tabs.
1246
+ * Width/height/max-* are animated together; padding too, since the
1247
+ * board's denser layout needs less of the modal's default padding. */
1248
+ .modal.is-expanded {
1249
+ /* Margin around the expanded board view. --mfb-space-7 (48px) matches
1250
+ * the breathing room of the default modal \u2014 24px top + 24px bottom +
1251
+ * 24px on each side \u2014 so the panel reads as "near-fullscreen with a
1252
+ * visible frame" instead of "the whole viewport, content cut off".
1253
+ *
1254
+ * The base .modal rule uses the browser default content-box, so
1255
+ * without an override the 24px padding would be ADDED to the
1256
+ * calc(100vh - 48px) height \u2014 the rendered box would exactly equal
1257
+ * the viewport again, defeating the margin. Force border-box so
1258
+ * padding lives INSIDE the height we set. */
1259
+ box-sizing: border-box;
1260
+ width: min(1280px, calc(100vw - var(--mfb-space-7)));
1261
+ max-height: calc(100vh - var(--mfb-space-7));
1262
+ height: calc(100vh - var(--mfb-space-7));
1263
+ padding: var(--mfb-space-5);
1264
+ transition:
1265
+ width 320ms cubic-bezier(0.22, 1, 0.36, 1),
1266
+ height 320ms cubic-bezier(0.22, 1, 0.36, 1),
1267
+ max-height 320ms cubic-bezier(0.22, 1, 0.36, 1),
1268
+ padding 320ms cubic-bezier(0.22, 1, 0.36, 1);
1269
+ }
1270
+ @media (prefers-reduced-motion: reduce) {
1271
+ .modal.is-expanded { transition: none; }
1272
+ }
1273
+ .backdrop.is-expanded { /* hook for any backdrop-level overrides */ }
1274
+
1275
+ @media (max-width: 640px) {
1276
+ /* On mobile the sheet still snaps to the bottom edge and stretches
1277
+ * almost the full viewport \u2014 24px gap from the top is enough to
1278
+ * convey "this is a panel, not a takeover", but we don't pull margin
1279
+ * off the sides where users expect the sheet to fill the viewport. */
1280
+ .modal.is-expanded {
1281
+ width: 100vw;
1282
+ height: calc(100vh - var(--mfb-space-5));
1283
+ border-radius: var(--mfb-radius-lg) var(--mfb-radius-lg) 0 0;
1284
+ }
1285
+ }
1286
+
1287
+ /* Decorative purple accent on the Board tab button so users discover
1288
+ * it's a different surface \u2014 subtle, not loud. */
1289
+ .tab-button--board.is-active {
1290
+ color: #6b21a8;
1291
+ box-shadow: inset 0 -2px 0 0 #a855f7;
1292
+ }
1293
+ .tab-button--board:not(.is-active):hover {
1294
+ color: #6b21a8;
1295
+ }
1296
+
1297
+ /* ---- Board layout ---- */
1298
+
1299
+ .board-view {
1300
+ display: flex;
1301
+ flex-direction: column;
1302
+ gap: var(--mfb-space-4);
1303
+ flex: 1 1 auto;
1304
+ min-height: 0; /* allow inner panes to scroll */
1305
+ animation: mfb-board-in 280ms ease-out 40ms both;
1306
+ }
1307
+ @keyframes mfb-board-in {
1308
+ from { opacity: 0; transform: translateY(8px); }
1309
+ to { opacity: 1; transform: translateY(0); }
1310
+ }
1311
+ @media (prefers-reduced-motion: reduce) {
1312
+ .board-view { animation: none; }
1313
+ }
1314
+
1315
+ .board-header {
1316
+ display: flex;
1317
+ flex-direction: column;
1318
+ gap: var(--mfb-space-4);
1319
+ }
1320
+ .board-header-title {
1321
+ display: flex;
1322
+ align-items: center;
1323
+ gap: 12px;
1324
+ }
1325
+ .board-header-emoji {
1326
+ font-size: 26px;
1327
+ line-height: 1;
1328
+ }
1329
+ .board-header-h {
1330
+ margin: 0;
1331
+ font-size: var(--mfb-text-2xl);
1332
+ font-weight: 600;
1333
+ letter-spacing: -0.01em;
1334
+ }
1335
+ .board-header-sub {
1336
+ margin: 2px 0 0 0;
1337
+ color: var(--mfb-text-muted);
1338
+ font-size: var(--mfb-text-sm);
1339
+ }
1340
+
1341
+ /* KPI strip \u2014 4 cards, equal width, subtle tone-tints by bucket. */
1342
+ .board-kpi-strip {
1343
+ display: grid;
1344
+ grid-template-columns: repeat(4, 1fr);
1345
+ gap: 12px;
1346
+ }
1347
+ .board-kpi-card {
1348
+ border: 1px solid var(--mfb-border);
1349
+ border-radius: var(--mfb-radius);
1350
+ padding: 14px 16px;
1351
+ background: var(--mfb-bg);
1352
+ display: flex;
1353
+ flex-direction: column;
1354
+ gap: 4px;
1355
+ position: relative;
1356
+ overflow: hidden;
1357
+ transition: transform 160ms ease, box-shadow 160ms ease;
1358
+ }
1359
+ .board-kpi-card::after {
1360
+ content: '';
1361
+ position: absolute;
1362
+ top: 0;
1363
+ left: 0;
1364
+ width: 3px;
1365
+ height: 100%;
1366
+ background: var(--mfb-border);
1367
+ transition: background 160ms ease;
1368
+ }
1369
+ .board-kpi-card:hover {
1370
+ transform: translateY(-1px);
1371
+ box-shadow: var(--mfb-shadow);
1372
+ }
1373
+ .board-kpi-card.tone-new::after { background: #3b82f6; }
1374
+ .board-kpi-card.tone-progress::after { background: #f59e0b; }
1375
+ .board-kpi-card.tone-validation::after { background: #a855f7; }
1376
+ .board-kpi-card.tone-rate::after { background: #10b981; }
1377
+ .board-kpi-value {
1378
+ font-size: 28px;
1379
+ font-weight: 700;
1380
+ line-height: 1;
1381
+ letter-spacing: -0.02em;
1382
+ color: var(--mfb-text);
1383
+ font-variant-numeric: tabular-nums;
1384
+ }
1385
+ .board-kpi-label {
1386
+ font-size: var(--mfb-text-xs);
1387
+ color: var(--mfb-text-muted);
1388
+ text-transform: uppercase;
1389
+ letter-spacing: 0.04em;
1390
+ font-weight: 500;
1391
+ }
1392
+ .board-kpi-strip.is-loading .board-kpi-value {
1393
+ opacity: 0.35;
1394
+ }
1395
+ @media (max-width: 720px) {
1396
+ .board-kpi-strip { grid-template-columns: repeat(2, 1fr); }
1397
+ }
1398
+
1399
+ /* Filter row */
1400
+ .board-filters {
1401
+ display: flex;
1402
+ align-items: center;
1403
+ gap: 8px;
1404
+ flex-wrap: wrap;
1405
+ }
1406
+ .board-filter-select,
1407
+ .board-filter-search {
1408
+ padding: 6px 10px;
1409
+ border: 1px solid var(--mfb-border);
1410
+ border-radius: var(--mfb-radius);
1411
+ background: var(--mfb-bg);
1412
+ color: var(--mfb-text);
1413
+ font: inherit;
1414
+ font-size: var(--mfb-text-sm);
1415
+ height: 32px;
1416
+ transition: border-color 120ms ease, box-shadow 120ms ease;
1417
+ }
1418
+ .board-filter-select:focus-visible,
1419
+ .board-filter-search:focus-visible {
1420
+ outline: none;
1421
+ border-color: var(--mfb-accent);
1422
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--mfb-accent) 18%, transparent);
1423
+ }
1424
+ .board-filter-search { min-width: 180px; flex: 1 1 220px; }
1425
+ .board-filter-toggle {
1426
+ display: inline-flex;
1427
+ align-items: center;
1428
+ gap: 6px;
1429
+ font-size: var(--mfb-text-sm);
1430
+ color: var(--mfb-text);
1431
+ cursor: pointer;
1432
+ user-select: none;
1433
+ }
1434
+ .board-filter-toggle input { margin: 0; }
1435
+ .board-filter-clear {
1436
+ background: transparent;
1437
+ border: 0;
1438
+ color: var(--mfb-text-muted);
1439
+ font: inherit;
1440
+ font-size: var(--mfb-text-sm);
1441
+ display: inline-flex;
1442
+ align-items: center;
1443
+ gap: 4px;
1444
+ cursor: pointer;
1445
+ padding: 4px 6px;
1446
+ border-radius: var(--mfb-radius);
1447
+ transition: background 120ms ease, color 120ms ease;
1448
+ }
1449
+ .board-filter-clear:hover {
1450
+ color: var(--mfb-text);
1451
+ background: var(--mfb-surface);
1452
+ }
1453
+
1454
+ /* Master/detail layout \u2014 two-column at >=900px, stacked below. */
1455
+ .board-body {
1456
+ display: grid;
1457
+ grid-template-columns: minmax(280px, 360px) 1fr;
1458
+ gap: var(--mfb-space-4);
1459
+ flex: 1 1 auto;
1460
+ min-height: 0;
1461
+ }
1462
+ @media (max-width: 900px) {
1463
+ .board-body { grid-template-columns: 1fr; }
1464
+ .board-detail-wrap:not(.has-selection) { display: none; }
1465
+ }
1466
+
1467
+ .board-list-wrap {
1468
+ display: flex;
1469
+ flex-direction: column;
1470
+ gap: 6px;
1471
+ min-height: 0;
1472
+ overflow: hidden;
1473
+ }
1474
+ .board-list-count {
1475
+ font-size: var(--mfb-text-xs);
1476
+ color: var(--mfb-text-muted);
1477
+ padding: 0 4px;
1478
+ }
1479
+ .board-list {
1480
+ list-style: none;
1481
+ margin: 0;
1482
+ padding: 0;
1483
+ display: flex;
1484
+ flex-direction: column;
1485
+ gap: 8px;
1486
+ overflow-y: auto;
1487
+ flex: 1 1 auto;
1488
+ scrollbar-width: thin;
1489
+ scrollbar-gutter: stable;
1490
+ }
1491
+
1492
+ .board-row {
1493
+ display: flex;
1494
+ flex-direction: column;
1495
+ gap: 6px;
1496
+ width: 100%;
1497
+ text-align: left;
1498
+ padding: 12px 14px;
1499
+ border-radius: var(--mfb-radius);
1500
+ background: var(--mfb-bg);
1501
+ border: 1px solid var(--mfb-border);
1502
+ cursor: pointer;
1503
+ font: inherit;
1504
+ color: inherit;
1505
+ /* Stagger reveal on first paint. */
1506
+ animation: mfb-row-in 280ms ease-out both;
1507
+ transition: border-color 140ms ease, background 140ms ease, transform 80ms ease;
1508
+ }
1509
+ .board-row:hover {
1510
+ border-color: var(--mfb-border-strong);
1511
+ background: var(--mfb-surface);
1512
+ }
1513
+ .board-row:active { transform: scale(0.997); }
1514
+ .board-row.is-selected {
1515
+ border-color: var(--mfb-accent);
1516
+ background: color-mix(in srgb, var(--mfb-accent) 6%, var(--mfb-bg));
1517
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--mfb-accent) 18%, transparent);
1518
+ }
1519
+ @keyframes mfb-row-in {
1520
+ from { opacity: 0; transform: translateY(4px); }
1521
+ to { opacity: 1; transform: translateY(0); }
1522
+ }
1523
+ @media (prefers-reduced-motion: reduce) {
1524
+ .board-row { animation: none; }
1525
+ }
1526
+ /* Stagger first 6 rows so the list reveals top-down. */
1527
+ .board-row:nth-child(1) { animation-delay: 0ms; }
1528
+ .board-row:nth-child(2) { animation-delay: 40ms; }
1529
+ .board-row:nth-child(3) { animation-delay: 80ms; }
1530
+ .board-row:nth-child(4) { animation-delay: 120ms; }
1531
+ .board-row:nth-child(5) { animation-delay: 160ms; }
1532
+ .board-row:nth-child(6) { animation-delay: 200ms; }
1533
+
1534
+ .board-row-badges {
1535
+ display: flex;
1536
+ gap: 6px;
1537
+ align-items: center;
1538
+ flex-wrap: wrap;
1539
+ }
1540
+ .board-row-description {
1541
+ font-size: var(--mfb-text-sm);
1542
+ color: var(--mfb-text);
1543
+ line-height: 1.4;
1544
+ display: -webkit-box;
1545
+ -webkit-line-clamp: 2;
1546
+ -webkit-box-orient: vertical;
1547
+ overflow: hidden;
1548
+ }
1549
+ .board-row-meta {
1550
+ display: flex;
1551
+ align-items: center;
1552
+ gap: 10px;
1553
+ font-size: var(--mfb-text-xs);
1554
+ color: var(--mfb-text-muted);
1555
+ flex-wrap: wrap;
1556
+ }
1557
+ .board-row-author { font-weight: 500; color: var(--mfb-text); }
1558
+ .board-row-comments {
1559
+ display: inline-flex;
1560
+ align-items: center;
1561
+ gap: 3px;
1562
+ font-variant-numeric: tabular-nums;
1563
+ }
1564
+ .board-row-time { margin-left: auto; font-variant-numeric: tabular-nums; }
1565
+
1566
+ /* Status / severity badges shared with the detail panel. The tones
1567
+ * borrow PNR's badge palette \u2014 calm pastels that don't fight content. */
1568
+ .board-row-badges .badge {
1569
+ font-size: 11px;
1570
+ font-weight: 500;
1571
+ letter-spacing: 0.02em;
1572
+ padding: 2px 8px;
1573
+ border-radius: 999px;
1574
+ background: #f3f4f6;
1575
+ color: #374151;
1576
+ text-transform: lowercase;
1577
+ }
1578
+ .badge.status-new { background: #dbeafe; color: #1e40af; }
1579
+ .badge.status-in_progress { background: #fef3c7; color: #92400e; }
1580
+ .badge.status-awaiting_validation { background: #ede9fe; color: #6b21a8; }
1581
+ .badge.status-closed { background: #d1fae5; color: #065f46; }
1582
+ .badge.status-rejected { background: #fee2e2; color: #991b1b; }
1583
+ .badge.status-duplicate { background: #f3f4f6; color: #4b5563; }
1584
+ .badge.status-wontfix { background: #f3f4f6; color: #4b5563; }
1585
+ .badge.severity-blocker { background: #fee2e2; color: #991b1b; }
1586
+ .badge.severity-high { background: #fee2e2; color: #b91c1c; }
1587
+ .badge.severity-medium { background: #fef3c7; color: #92400e; }
1588
+ .badge.severity-low { background: #e0f2fe; color: #075985; }
1589
+
1590
+ /* Detail pane (within Board). Inherits from .report-detail.variant-board */
1591
+ .board-detail-wrap {
1592
+ border: 1px solid var(--mfb-border);
1593
+ border-radius: var(--mfb-radius);
1594
+ background: var(--mfb-bg);
1595
+ overflow-y: auto;
1596
+ min-height: 0;
1597
+ display: flex;
1598
+ flex-direction: column;
1599
+ }
1600
+ .board-detail-empty {
1601
+ flex: 1 1 auto;
1602
+ display: flex;
1603
+ flex-direction: column;
1604
+ align-items: center;
1605
+ justify-content: center;
1606
+ gap: 12px;
1607
+ color: var(--mfb-text-muted);
1608
+ padding: var(--mfb-space-5);
1609
+ text-align: center;
1610
+ font-size: var(--mfb-text-sm);
1611
+ }
1612
+ .board-detail-empty svg { opacity: 0.6; }
1613
+
1614
+ .report-detail.variant-board { padding: 16px 18px; }
1615
+ .report-detail-header--board {
1616
+ align-items: center;
1617
+ }
1618
+ .report-detail-back {
1619
+ display: inline-flex;
1620
+ align-items: center;
1621
+ gap: 4px;
1622
+ height: 28px;
1623
+ padding: 0 10px;
1624
+ }
1625
+
1626
+ /* Empty + loading + error states */
1627
+ .board-empty {
1628
+ display: flex;
1629
+ flex-direction: column;
1630
+ align-items: center;
1631
+ justify-content: center;
1632
+ gap: 8px;
1633
+ text-align: center;
1634
+ padding: var(--mfb-space-5);
1635
+ color: var(--mfb-text-muted);
1636
+ flex: 1 1 auto;
1637
+ }
1638
+ .board-empty h3 {
1639
+ margin: 0;
1640
+ font-size: var(--mfb-text-base);
1641
+ color: var(--mfb-text);
1642
+ }
1643
+ .board-empty p {
1644
+ margin: 0;
1645
+ font-size: var(--mfb-text-sm);
1646
+ }
1647
+ .board-error {
1648
+ padding: 12px 14px;
1649
+ border-radius: var(--mfb-radius);
1650
+ background: #fef2f2;
1651
+ color: #991b1b;
1652
+ font-size: var(--mfb-text-sm);
1653
+ }
1654
+
1655
+ /* Skeleton rows pulse subtly so the user knows something's coming. */
1656
+ .board-list-skeleton .skeleton-row {
1657
+ cursor: default;
1658
+ pointer-events: none;
1659
+ }
1660
+ .skeleton-line {
1661
+ height: 12px;
1662
+ background: linear-gradient(
1663
+ 90deg,
1664
+ var(--mfb-surface) 0%,
1665
+ color-mix(in srgb, var(--mfb-surface) 60%, var(--mfb-border)) 50%,
1666
+ var(--mfb-surface) 100%
1667
+ );
1668
+ background-size: 200% 100%;
1669
+ border-radius: 4px;
1670
+ animation: mfb-skeleton 1400ms ease-in-out infinite;
1671
+ }
1672
+ .skeleton-badges { width: 60%; height: 14px; }
1673
+ .skeleton-text { width: 90%; }
1674
+ .skeleton-text.short { width: 60%; }
1675
+ @keyframes mfb-skeleton {
1676
+ from { background-position: 100% 0; }
1677
+ to { background-position: -100% 0; }
1678
+ }
1679
+ @media (prefers-reduced-motion: reduce) {
1680
+ .skeleton-line { animation: none; }
1681
+ }
1682
+ `;function Ft(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=At,t.appendChild(r);let n=document.createElement("div");t.appendChild(n);let a={open:!1,status:"idle",tab:"send"},i=null;function s(c){a=c,Ae(ze(f,{state:c}),n)}function l(c){let{selectedReportId:b,...d}=c;return d}function f({state:c}){var w;let b=vt(async h=>{s({...a,status:"submitting"});try{await e.onSubmit(h),s({...a,status:"success"}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,s({...a,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(m){typeof console!="undefined"&&console.warn("[mhosaic] submit:",m),s({...a,status:"error",error:e.strings["form.error"]})}},[]),d=(w=e.getExternalId)==null?void 0:w.call(e),y=e.showFAB&&(e.getExternalId===void 0?!0:!!d),v=!!(e.api&&d);return o(U,{children:[y&&o(Rt,{label:e.strings["fab.label"],onClick:()=>s({...a,open:!0})}),c.open&&o(Lt,{onDismiss:()=>s(l({...a,open:!1,status:"idle"})),closeLabel:e.strings["form.close"],expanded:c.tab==="board",children:[v&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":c.tab==="send",class:`tab-button ${c.tab==="send"?"is-active":""}`,onClick:()=>s(l({...a,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="mine",class:`tab-button ${c.tab==="mine"?"is-active":""}`,onClick:()=>s(l({...a,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="changelog",class:`tab-button ${c.tab==="changelog"?"is-active":""}`,onClick:()=>s(l({...a,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="board",class:`tab-button tab-button--board ${c.tab==="board"?"is-active":""}`,onClick:()=>s(l({...a,tab:"board"})),children:e.strings["tab.board"]})]}),c.tab==="send"&&o(Tt,{strings:e.strings,onSubmit:b,onCancel:()=>s({...a,open:!1,status:"idle"}),status:c.status,...c.error!==void 0&&{errorMessage:c.error}}),c.tab==="mine"&&e.api&&d&&!c.selectedReportId&&o(Bt,{api:e.api,externalId:d,strings:e.strings,onSelect:h=>s({...a,selectedReportId:h.id})}),(c.tab==="mine"||c.tab==="changelog")&&e.api&&d&&c.selectedReportId&&o(ve,{api:e.api,externalId:d,reportId:c.selectedReportId,strings:e.strings,onBack:()=>s(l({...a}))}),c.tab==="changelog"&&e.api&&d&&!c.selectedReportId&&o(St,{api:e.api,externalId:d,strings:e.strings,onSelect:h=>s({...a,selectedReportId:h.id})}),c.tab==="board"&&e.api&&d&&o(kt,{api:e.api,externalId:d,strings:e.strings})]})]})}return s(a),{open(){s({...a,open:!0})},close(){s({...a,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),Ae(null,n),e.host.innerHTML=""},notifyIdentityChanged(){s({...a})}}}function It(e){var v,w,h,m,p;let t=(v=e.env)!=null?v:"prod",r=(w=e.locale)!=null?w:typeof navigator!="undefined"?navigator.language:void 0,n=Ge((h=e.translations)!=null?h:{},r!==void 0?{locale:r}:{}),a=Ve({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(m=e.metadata)!=null?m:{},l=We({apiKey:e.apiKey,endpoint:e.endpoint,...e.fetchImpl!==void 0&&{fetch:e.fetchImpl},...e.beforeSend!==void 0&&{beforeSend:e.beforeSend},getSignedIdentity:()=>!i||!i.userHash||!i.exp||!i.email?null:{userHash:i.userHash,exp:i.exp,email:i.email}}),f=[],c=document.createElement("div");if(c.className="mhosaic-feedback",e.attachTo){let u=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;u==null||u.appendChild(c)}else document.body.appendChild(c);async function b(u){var A,B,K,z,j;let _=u.synthetic?void 0:u.screenshot,S=a.snapshot();if(i){let{userHash:D,exp:G,...oe}=i;S.user=oe}s&&Object.keys(s).length>0&&(S.metadata={...s});let C=_?(A=u.capture_method)!=null?A:"manual":"none",L={description:u.description,feedback_type:(B=u.feedback_type)!=null?B:"bug",severity:(K=u.severity)!=null?K:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:C,technical_context:S};L.widget_version="0.16.0",_&&(L.screenshot=_),u.synthetic&&(L.synthetic=!0),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(L.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let T=L;for(let D of f)T=await D(T);try{let D=await l.submitReport(T);return(z=e.onSubmitSuccess)==null||z.call(e,D),a.clear(),D}catch(D){let G=D instanceof Error?D:new Error(String(D));throw(j=e.onError)==null||j.call(e,G),G}}let d=Ft({host:c,strings:n,showFAB:(p=e.showFAB)!=null?p:!0,onSubmit:async u=>{await b(u)},api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0}),y={show(){d.open()},hide(){d.close()},open(u){d.open()},async submit(u){return b({description:u.description,...u.feedback_type!==void 0&&{feedback_type:u.feedback_type},...u.severity!==void 0&&{severity:u.severity},...u.synthetic!==void 0&&{synthetic:u.synthetic},...u.screenshot!==void 0&&{screenshot:u.screenshot}})},identify(u){i=u,d.notifyIdentityChanged()},setMetadata(u){s={...s,...u}},shutdown(){d.dispose(),a.dispose(),c.remove();let u=window;u.mhosaicFeedback===y&&delete u.mhosaicFeedback},_registerTransformer(u){f.push(u)}};return window.mhosaicFeedback=y,y}return Nt(co);})();
1683
+ //# sourceMappingURL=widget.min.js.map