@mhosaic/feedback 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-2I7RGRYD.mjs → chunk-6OAG72JW.mjs} +3 -3
- package/dist/embed.min.js +43 -22
- package/dist/embed.min.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/qa-meter.mjs +67 -25
- package/dist/qa-meter.mjs.map +1 -1
- package/dist/react.mjs +1 -1
- package/dist/widget.min.js +44 -23
- package/dist/widget.min.js.map +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-2I7RGRYD.mjs.map → chunk-6OAG72JW.mjs.map} +0 -0
package/dist/widget.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var MhosaicFeedback=(()=>{var _e=Object.defineProperty;var Ir=Object.getOwnPropertyDescriptor;var $r=Object.getOwnPropertyNames;var Dr=Object.prototype.hasOwnProperty;var Kr=(e,t,r)=>t in e?_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var j=(e,t)=>()=>(e&&(t=e(e=0)),t);var st=(e,t)=>{for(var r in t)_e(e,r,{get:t[r],enumerable:!0})},Hr=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $r(t))!Dr.call(e,n)&&n!==r&&_e(e,n,{get:()=>t[n],enumerable:!(a=Ir(t,n))||a.enumerable});return e};var Nr=e=>Hr(_e({},"__esModule",{value:!0}),e);var Ne=(e,t,r)=>Kr(e,typeof t!="symbol"?t+"":t,r);function te(e,t){for(var r in t)e[r]=t[r];return e}function Ve(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function y(e,t,r){var a,n,i,s={};for(i in t)i=="key"?a=t[i]:i=="ref"?n=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Ee.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 ke(e,s,a,n,null)}function ke(e,t,r,a,n){var i={type:e,props:t,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n==null?++xt:n,__i:-1,__u:0};return n==null&&F.vnode!=null&&F.vnode(i),i}function U(e){return e.children}function Se(e,t){this.props=e,this.context=t}function ce(e,t){if(t==null)return e.__?ce(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"?ce(e):null}function oo(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=te({},t);i.__v=t.__v+1,F.vnode&&F.vnode(i),Ge(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?ce(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,Et(a,i,n),t.__e=t.__=null,i.__e!=r&&Ct(i)}}function Ct(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}),Ct(e)}function vt(e){(!e.__d&&(e.__d=!0)&&re.push(e)&&!qe.__r++||ht!=F.debounceRendering)&&((ht=F.debounceRendering)||wt)(qe)}function qe(){try{for(var e,t=1;re.length;)re.length>t&&re.sort(kt),e=re.shift(),t=re.length,oo(e)}finally{re.length=qe.__r=0}}function Rt(e,t,r,a,n,i,s,l,u,c,b){var d,h,g,S,k,v,f,m=a&&a.__k||Re,p=t.length;for(u=ao(r,t,m,u,p),d=0;d<p;d++)(g=r.__k[d])!=null&&(h=g.__i!=-1&&m[g.__i]||Ce,g.__i=d,v=Ge(e,g,h,n,i,s,l,u,c,b),S=g.__e,g.ref&&h.ref!=g.ref&&(h.ref&&Ye(h.ref,null,g),b.push(g.ref,g.__c||S,g)),k==null&&S!=null&&(k=S),(f=!!(4&g.__u))||h.__k===g.__k?(u=qt(g,u,e,f),f&&h.__e&&(h.__e=null)):typeof g.type=="function"&&v!==void 0?u=v:S&&(u=S.nextSibling),g.__u&=-7);return r.__e=k,u}function ao(e,t,r,a,n){var i,s,l,u,c,b=r.length,d=b,h=0;for(e.__k=new Array(n),i=0;i<n;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]=ke(null,s,null,null,null):Te(s)?s=e.__k[i]=ke(U,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=ke(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,u=i+h,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=no(s,r,u,d))!=-1&&(d--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(n>b?h--:n<b&&h++),typeof s.type!="function"&&(s.__u|=4)):c!=u&&(c==u-1?h--:c==u+1?h++:(c>u?h--:h++,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==a&&(a=ce(l)),Pt(l,l));return a}function qt(e,t,r,a){var n,i;if(typeof e.type=="function"){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=qt(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=ce(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function no(e,t,r,a){var n,i,s,l=e.key,u=e.type,c=t[r],b=c!=null&&(2&c.__u)==0;if(c===null&&l==null||b&&l==c.key&&u==c.type)return r;if(a>(b?1:0)){for(n=r-1,i=r+1;n>=0||i<t.length;)if((c=t[s=n>=0?n--:i++])!=null&&(2&c.__u)==0&&l==c.key&&u==c.type)return s}return-1}function yt(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||ro.test(t)?r:r+"px"}function xe(e,t,r,a,n){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof a=="string"&&(e.style.cssText=a=""),a)for(t in a)r&&t in r||yt(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||yt(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(St,"$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?a?r[fe]=a[fe]:(r[fe]=Ue,e.addEventListener(t,i?We:Oe,i)):e.removeEventListener(t,i?We:Oe,i);else{if(n=="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 _t(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[we]==null)t[we]=Ue++;else if(t[we]<r[fe])return;return r(F.event?F.event(t):t)}}}function Ge(e,t,r,a,n,i,s,l,u,c){var b,d,h,g,S,k,v,f,m,p,x,E,P,w,A,T=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),i=[l=t.__e=r.__e]),(b=F.__b)&&b(t);e:if(typeof T=="function")try{if(f=t.props,m=T.prototype&&T.prototype.render,p=(b=T.contextType)&&a[b.__c],x=b?p?p.props.value:b.__:a,r.__c?v=(d=t.__c=r.__c).__=d.__E:(m?t.__c=d=new T(f,x):(t.__c=d=new Se(f,x),d.constructor=T,d.render=so),p&&p.sub(d),d.state||(d.state={}),d.__n=a,h=d.__d=!0,d.__h=[],d._sb=[]),m&&d.__s==null&&(d.__s=d.state),m&&T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=te({},d.__s)),te(d.__s,T.getDerivedStateFromProps(f,d.__s))),g=d.props,S=d.state,d.__v=t,h)m&&T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),m&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(m&&T.getDerivedStateFromProps==null&&f!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(f,x),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(f,d.__s,x)===!1){t.__v!=r.__v&&(d.props=f,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(M){M&&(M.__=t)}),Re.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(f,d.__s,x),m&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,S,k)})}if(d.context=x,d.props=f,d.__P=e,d.__e=!1,E=F.__r,P=0,m)d.state=d.__s,d.__d=!1,E&&E(t),b=d.render(d.props,d.state,d.context),Re.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,E&&E(t),b=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++P<25);d.state=d.__s,d.getChildContext!=null&&(a=te(te({},a),d.getChildContext())),m&&!h&&d.getSnapshotBeforeUpdate!=null&&(k=d.getSnapshotBeforeUpdate(g,S)),w=b!=null&&b.type===U&&b.key==null?Tt(b.props.children):b,l=Rt(e,Te(w)?w:[w],t,r,a,n,i,s,l,u,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(M){if(t.__v=null,u||i!=null)if(M.then){for(t.__u|=u?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--;)Ve(i[A]);je(t)}else t.__e=r.__e,t.__k=r.__k,M.then||je(t);F.__e(M,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=io(r.__e,t,r,a,n,i,s,u,c);return(b=F.diffed)&&b(t),128&t.__u?void 0:l}function je(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(je))}function Et(e,t,r){for(var a=0;a<r.length;a++)Ye(r[a],r[++a],r[++a]);F.__c&&F.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){F.__e(i,n.__v)}})}function Tt(e){return typeof e!="object"||e==null||e.__b>0?e:Te(e)?e.map(Tt):te({},e)}function io(e,t,r,a,n,i,s,l,u){var c,b,d,h,g,S,k,v=r.props||Ce,f=t.props,m=t.type;if(m=="svg"?n="http://www.w3.org/2000/svg":m=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((g=i[c])&&"setAttribute"in g==!!m&&(m?g.localName==m:g.nodeType==3)){e=g,i[c]=null;break}}if(e==null){if(m==null)return document.createTextNode(f);e=document.createElementNS(n,m,f.is&&f),l&&(F.__m&&F.__m(t,i),l=!1),i=null}if(m==null)v===f||l&&e.data==f||(e.data=f);else{if(i=i&&Ee.call(e.childNodes),!l&&i!=null)for(v={},c=0;c<e.attributes.length;c++)v[(g=e.attributes[c]).name]=g.value;for(c in v)g=v[c],c=="dangerouslySetInnerHTML"?d=g:c=="children"||c in f||c=="value"&&"defaultValue"in f||c=="checked"&&"defaultChecked"in f||xe(e,c,null,g,n);for(c in f)g=f[c],c=="children"?h=g:c=="dangerouslySetInnerHTML"?b=g:c=="value"?S=g:c=="checked"?k=g:l&&typeof g!="function"||v[c]===g||xe(e,c,g,v[c],n);if(b)l||d&&(b.__html==d.__html||b.__html==e.innerHTML)||(e.innerHTML=b.__html),t.__k=[];else if(d&&(e.innerHTML=""),Rt(t.type=="template"?e.content:e,Te(h)?h:[h],t,r,a,m=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&ce(r,0),l,u),i!=null)for(c=i.length;c--;)Ve(i[c]);l||(c="value",m=="progress"&&S==null?e.removeAttribute("value"):S!=null&&(S!==e[c]||m=="progress"&&!S||m=="option"&&S!=v[c])&&xe(e,c,S,v[c],n),c="checked",k!=null&&k!=e[c]&&xe(e,c,k,v[c],n))}return e}function Ye(e,t,r){try{if(typeof e=="function"){var a=typeof e.__u=="function";a&&e.__u(),a&&t==null||(e.__u=e(t))}else e.current=t}catch(n){F.__e(n,r)}}function Pt(e,t,r){var a,n;if(F.unmount&&F.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||Ye(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){F.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&Pt(a[n],t,r||typeof e.type!="function");r||Ve(e.__e),e.__c=e.__=e.__e=void 0}function so(e,t,r){return this.constructor(e,r)}function de(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),F.__&&F.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Ge(t,e=(!a&&r||t).__k=y(U,null,[e]),n||Ce,Ce,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Ee.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),Et(i,e,s)}var Ee,F,xt,eo,re,ht,wt,kt,Qe,we,fe,St,Ue,Oe,We,to,Ce,Re,ro,Te,Z=j(()=>{"use strict";Ce={},Re=[],ro=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Te=Array.isArray;Ee=Re.slice,F={__e:function(e,t,r,a){for(var n,i,s;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,a||{}),s=n.__d),s)return n.__E=n}catch(l){e=l}throw e}},xt=0,eo=function(e){return e!=null&&e.constructor===void 0},Se.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=te({},this.state),typeof e=="function"&&(e=e(te({},r),this.props)),e&&te(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),vt(this))},Se.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),vt(this))},Se.prototype.render=U,re=[],wt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,kt=function(e,t){return e.__v.__b-t.__v.__b},qe.__r=0,Qe=Math.random().toString(8),we="__d"+Qe,fe="__a"+Qe,St=/(PointerCapture)$|Capture$/i,Ue=0,Oe=_t(!1),We=_t(!0),to=0});function Me(e,t){H.__h&&H.__h(D,e,me||t),me=0;var r=D.__H||(D.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function q(e){return me=1,lo(Kt,e)}function lo(e,t,r){var a=Me(pe++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):Kt(void 0,t),function(l){var u=a.__N?a.__N[0]:a.__[0],c=a.t(u,l);u!==c&&(a.__N=[c,a.__[1]],a.__c.setState({}))}],a.__c=D,!D.__f)){var n=function(l,u,c){if(!a.__c.__H)return!0;var b=a.__c.__H.__.filter(function(h){return h.__c});if(b.every(function(h){return!h.__N}))return!i||i.call(this,l,u,c);var d=a.__c.props!==l;return b.some(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(d=!0)}}),i&&i.call(this,l,u,c)||d};D.__f=!0;var i=D.shouldComponentUpdate,s=D.componentWillUpdate;D.componentWillUpdate=function(l,u,c){if(this.__e){var b=i;i=void 0,n(l,u,c),i=b}s&&s.call(this,l,u,c)},D.shouldComponentUpdate=n}return a.__N||a.__}function $(e,t){var r=Me(pe++,3);!H.__s&&et(r.__H,t)&&(r.__=e,r.u=t,D.__H.__h.push(r))}function Ze(e,t){var r=Me(pe++,4);!H.__s&&et(r.__H,t)&&(r.__=e,r.u=t,D.__h.push(r))}function N(e){return me=5,X(function(){return{current:e}},[])}function X(e,t){var r=Me(pe++,7);return et(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function ne(e,t){return me=8,X(function(){return e},t)}function co(){for(var e;e=Dt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Pe),t.__h.some(Je),t.__h=[]}catch(r){t.__h=[],H.__e(r,e.__v)}}}function po(e){var t,r=function(){clearTimeout(a),$t&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);$t&&(t=requestAnimationFrame(r))}function Pe(e){var t=D,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),D=t}function Je(e){var t=D;e.__c=e.__(),D=t}function et(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function Kt(e,t){return typeof t=="function"?t(e):t}var pe,D,Xe,Mt,me,Dt,H,At,zt,Lt,Bt,Ft,It,$t,V=j(()=>{"use strict";Z();me=0,Dt=[],H=F,At=H.__b,zt=H.__r,Lt=H.diffed,Bt=H.__c,Ft=H.unmount,It=H.__;H.__b=function(e){D=null,At&&At(e)},H.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),It&&It(e,t)},H.__r=function(e){zt&&zt(e),pe=0;var t=(D=e.__c).__H;t&&(Xe===D?(t.__h=[],D.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Pe),t.__h.some(Je),t.__h=[],pe=0)),Xe=D},H.diffed=function(e){Lt&&Lt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Dt.push(t)!==1&&Mt===H.requestAnimationFrame||((Mt=H.requestAnimationFrame)||po)(co)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Xe=D=null},H.__c=function(e,t){t.some(function(r){try{r.__h.some(Pe),r.__h=r.__h.filter(function(a){return!a.__||Je(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],H.__e(a,r.__v)}}),Bt&&Bt(e,t)},H.unmount=function(e){Ft&&Ft(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Pe(a)}catch(n){t=n}}),r.__H=void 0,t&&H.__e(t,r.__v))};$t=typeof requestAnimationFrame=="function"});function sr(e){return e==="en"?pa:da}var da,pa,lr=j(()=>{"use strict";da={"pastille.label":"Suivi des tests","pastille.loading":"Chargement\u2026","pastille.unavailable":"Statuts indisponibles","pastille.unknownPage":"Page inconnue","pastille.unknownPageHint":"Cette route n\u2019est pas encore au plan du site des tests.","panel.freshness":"Statuts g\xE9n\xE9r\xE9s le {date} \xB7 version {version} \xB7 env {env}","panel.noScenarios":"Aucun sc\xE9nario li\xE9 \xE0 cette page.","panel.openSitemap":"Voir le plan du site","panel.sitemapLink":"Plan du site","panel.scenarioCountOne":"{count} sc\xE9nario","panel.scenarioCountMany":"{count} sc\xE9narios","panel.laneAutomated":"Automatis\xE9","panel.laneDev":"D\xE9v","panel.laneClient":"Client","lane.notTested":"Non test\xE9","lane.validatedBy":"Valid\xE9 par {by}","lane.rejectedBy":"Rejet\xE9 par {by}","lane.stale":"Valid\xE9 en v{version}, version actuelle v{current}","lane.clientPending":"Non test\xE9 \u2014 plateforme requise","lane.bot":"Automatis\xE9 (bot)","lane.code":"D\xE9veloppeur (code)","lane.human":"Humain","laneState.ok":"\xC0 jour","laneState.issue":"Probl\xE8me","laneState.none":"Non fait / p\xE9rim\xE9","color.green":"Valid\xE9","color.yellow":"En attente","color.red":"En \xE9chec","color.gray":"Non couvert","automated.passing":"R\xE9ussi","automated.failing":"En \xE9chec","automated.flaky":"Instable","automated.neverRun":"Jamais ex\xE9cut\xE9","source.testgen":"g\xE9n\xE9r\xE9","source.testgenHint":"Sc\xE9nario g\xE9n\xE9r\xE9 automatiquement (testgen)","suite.cases":"{count} cas","case.covered":"auto","case.manual":"manuel","case.blocked":"bloqu\xE9","case.openQuestion":"question produit","grounding.verified":"attendu v\xE9rifi\xE9","grounding.confirmLive":"\xE0 confirmer en live","grounding.productQuestion":"d\xE9cision produit","modal.title":"Plan du site \u2014 suivi des tests","modal.close":"Fermer","modal.tabPages":"Pages","modal.tabScenarios":"Sc\xE9narios","modal.youAreHere":"vous \xEAtes ici","modal.search":"Filtrer les sc\xE9narios\u2026","modal.noMatch":"Aucun sc\xE9nario ne correspond au filtre.","modal.traversed":"Travers\xE9es","modal.appliesTo":"{count} pages","modal.kpiPagesCovered":"Pages avec \u2265 1 sc\xE9nario","modal.kpiScenariosPassing":"Sc\xE9narios passants","panel.noTests":"Aucun test ne couvre encore cette page.","panel.unknownPage":"Page inconnue du registre QA."},pa={"pastille.label":"Test tracking","pastille.loading":"Loading\u2026","pastille.unavailable":"Statuses unavailable","pastille.unknownPage":"Unknown page","pastille.unknownPageHint":"This route isn\u2019t in the test sitemap yet.","panel.freshness":"Statuses generated on {date} \xB7 version {version} \xB7 env {env}","panel.noScenarios":"No scenario linked to this page.","panel.openSitemap":"View sitemap","panel.sitemapLink":"Sitemap","panel.scenarioCountOne":"{count} scenario","panel.scenarioCountMany":"{count} scenarios","panel.laneAutomated":"Automated","panel.laneDev":"Dev","panel.laneClient":"Client","lane.notTested":"Not tested","lane.validatedBy":"Validated by {by}","lane.rejectedBy":"Rejected by {by}","lane.stale":"Validated in v{version}, current version v{current}","lane.clientPending":"Not tested \u2014 platform required","lane.bot":"Automated (bot)","lane.code":"Developer (code)","lane.human":"Human","laneState.ok":"Up to date","laneState.issue":"Issue","laneState.none":"Not done / stale","color.green":"Validated","color.yellow":"Pending","color.red":"Failing","color.gray":"Not covered","automated.passing":"Passing","automated.failing":"Failing","automated.flaky":"Flaky","automated.neverRun":"Never run","source.testgen":"generated","source.testgenHint":"Auto-generated scenario (testgen)","suite.cases":"{count} cases","case.covered":"auto","case.manual":"manual","case.blocked":"blocked","case.openQuestion":"product question","grounding.verified":"expected verified","grounding.confirmLive":"confirm live","grounding.productQuestion":"product decision","modal.title":"Sitemap \u2014 test tracking","modal.close":"Close","modal.tabPages":"Pages","modal.tabScenarios":"Scenarios","modal.youAreHere":"you are here","modal.search":"Filter scenarios\u2026","modal.noMatch":"No scenario matches the filter.","modal.traversed":"Traversed","modal.appliesTo":"{count} pages","modal.kpiPagesCovered":"Pages with \u2265 1 scenario","modal.kpiScenariosPassing":"Passing scenarios","panel.noTests":"No tests cover this page yet.","panel.unknownPage":"Page unknown to the QA registry."}});function rt(e){if(!e)return"/";let t=e.startsWith("/")?e:`/${e}`;return t=t.replace(/\/{2,}/g,"/"),t.length>1&&(t=t.replace(/\/+$/,"")),t.length>0?t:"/"}function ua(e,t){let r=t.length;for(;r>0;){let a=t[r-1];if(a!==void 0&&a.startsWith(":")&&a.endsWith("?"))r--;else break}return e.length<r||e.length>t.length?!1:e.every((a,n)=>{let i=t[n];return i!==void 0&&(i.startsWith(":")||i===a)})}function dr(e,t){let r=cr(rt(e)),a=null,n=-1;for(let i of t){let s=cr(i);if(!ua(r,s))continue;let u=s.filter(c=>!c.startsWith(":")).length*100+s.length;u>n&&(a=i,n=u)}return a}var cr,ot=j(()=>{"use strict";cr=e=>e.split("/").filter(Boolean)});var pr,ur=j(()=>{"use strict";pr=`
|
|
1
|
+
"use strict";var MhosaicFeedback=(()=>{var _e=Object.defineProperty;var Ir=Object.getOwnPropertyDescriptor;var $r=Object.getOwnPropertyNames;var Dr=Object.prototype.hasOwnProperty;var Hr=(e,t,r)=>t in e?_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var j=(e,t)=>()=>(e&&(t=e(e=0)),t);var st=(e,t)=>{for(var r in t)_e(e,r,{get:t[r],enumerable:!0})},Kr=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $r(t))!Dr.call(e,n)&&n!==r&&_e(e,n,{get:()=>t[n],enumerable:!(a=Ir(t,n))||a.enumerable});return e};var Nr=e=>Kr(_e({},"__esModule",{value:!0}),e);var Ne=(e,t,r)=>Hr(e,typeof t!="symbol"?t+"":t,r);function te(e,t){for(var r in t)e[r]=t[r];return e}function Ve(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function y(e,t,r){var a,n,i,s={};for(i in t)i=="key"?a=t[i]:i=="ref"?n=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Ee.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 ke(e,s,a,n,null)}function ke(e,t,r,a,n){var i={type:e,props:t,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n==null?++xt:n,__i:-1,__u:0};return n==null&&I.vnode!=null&&I.vnode(i),i}function U(e){return e.children}function Se(e,t){this.props=e,this.context=t}function ce(e,t){if(t==null)return e.__?ce(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"?ce(e):null}function oo(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=te({},t);i.__v=t.__v+1,I.vnode&&I.vnode(i),Ge(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?ce(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,Et(a,i,n),t.__e=t.__=null,i.__e!=r&&Ct(i)}}function Ct(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}),Ct(e)}function vt(e){(!e.__d&&(e.__d=!0)&&oe.push(e)&&!qe.__r++||ht!=I.debounceRendering)&&((ht=I.debounceRendering)||wt)(qe)}function qe(){try{for(var e,t=1;oe.length;)oe.length>t&&oe.sort(kt),e=oe.shift(),t=oe.length,oo(e)}finally{oe.length=qe.__r=0}}function Rt(e,t,r,a,n,i,s,l,u,c,b){var d,g,h,S,k,v,f,m=a&&a.__k||Re,p=t.length;for(u=ao(r,t,m,u,p),d=0;d<p;d++)(h=r.__k[d])!=null&&(g=h.__i!=-1&&m[h.__i]||Ce,h.__i=d,v=Ge(e,h,g,n,i,s,l,u,c,b),S=h.__e,h.ref&&g.ref!=h.ref&&(g.ref&&Ye(g.ref,null,h),b.push(h.ref,h.__c||S,h)),k==null&&S!=null&&(k=S),(f=!!(4&h.__u))||g.__k===h.__k?(u=qt(h,u,e,f),f&&g.__e&&(g.__e=null)):typeof h.type=="function"&&v!==void 0?u=v:S&&(u=S.nextSibling),h.__u&=-7);return r.__e=k,u}function ao(e,t,r,a,n){var i,s,l,u,c,b=r.length,d=b,g=0;for(e.__k=new Array(n),i=0;i<n;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]=ke(null,s,null,null,null):Te(s)?s=e.__k[i]=ke(U,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=ke(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,u=i+g,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=no(s,r,u,d))!=-1&&(d--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(n>b?g--:n<b&&g++),typeof s.type!="function"&&(s.__u|=4)):c!=u&&(c==u-1?g--:c==u+1?g++:(c>u?g--:g++,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==a&&(a=ce(l)),Pt(l,l));return a}function qt(e,t,r,a){var n,i;if(typeof e.type=="function"){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=qt(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=ce(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function no(e,t,r,a){var n,i,s,l=e.key,u=e.type,c=t[r],b=c!=null&&(2&c.__u)==0;if(c===null&&l==null||b&&l==c.key&&u==c.type)return r;if(a>(b?1:0)){for(n=r-1,i=r+1;n>=0||i<t.length;)if((c=t[s=n>=0?n--:i++])!=null&&(2&c.__u)==0&&l==c.key&&u==c.type)return s}return-1}function yt(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||ro.test(t)?r:r+"px"}function xe(e,t,r,a,n){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof a=="string"&&(e.style.cssText=a=""),a)for(t in a)r&&t in r||yt(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||yt(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(St,"$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?a?r[fe]=a[fe]:(r[fe]=Ue,e.addEventListener(t,i?We:Oe,i)):e.removeEventListener(t,i?We:Oe,i);else{if(n=="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 _t(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[we]==null)t[we]=Ue++;else if(t[we]<r[fe])return;return r(I.event?I.event(t):t)}}}function Ge(e,t,r,a,n,i,s,l,u,c){var b,d,g,h,S,k,v,f,m,p,x,E,T,w,F,P=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),i=[l=t.__e=r.__e]),(b=I.__b)&&b(t);e:if(typeof P=="function")try{if(f=t.props,m=P.prototype&&P.prototype.render,p=(b=P.contextType)&&a[b.__c],x=b?p?p.props.value:b.__:a,r.__c?v=(d=t.__c=r.__c).__=d.__E:(m?t.__c=d=new P(f,x):(t.__c=d=new Se(f,x),d.constructor=P,d.render=so),p&&p.sub(d),d.state||(d.state={}),d.__n=a,g=d.__d=!0,d.__h=[],d._sb=[]),m&&d.__s==null&&(d.__s=d.state),m&&P.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=te({},d.__s)),te(d.__s,P.getDerivedStateFromProps(f,d.__s))),h=d.props,S=d.state,d.__v=t,g)m&&P.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),m&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(m&&P.getDerivedStateFromProps==null&&f!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(f,x),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(f,d.__s,x)===!1){t.__v!=r.__v&&(d.props=f,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(L){L&&(L.__=t)}),Re.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(f,d.__s,x),m&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,S,k)})}if(d.context=x,d.props=f,d.__P=e,d.__e=!1,E=I.__r,T=0,m)d.state=d.__s,d.__d=!1,E&&E(t),b=d.render(d.props,d.state,d.context),Re.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,E&&E(t),b=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++T<25);d.state=d.__s,d.getChildContext!=null&&(a=te(te({},a),d.getChildContext())),m&&!g&&d.getSnapshotBeforeUpdate!=null&&(k=d.getSnapshotBeforeUpdate(h,S)),w=b!=null&&b.type===U&&b.key==null?Tt(b.props.children):b,l=Rt(e,Te(w)?w:[w],t,r,a,n,i,s,l,u,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(L){if(t.__v=null,u||i!=null)if(L.then){for(t.__u|=u?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(F=i.length;F--;)Ve(i[F]);je(t)}else t.__e=r.__e,t.__k=r.__k,L.then||je(t);I.__e(L,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=io(r.__e,t,r,a,n,i,s,u,c);return(b=I.diffed)&&b(t),128&t.__u?void 0:l}function je(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(je))}function Et(e,t,r){for(var a=0;a<r.length;a++)Ye(r[a],r[++a],r[++a]);I.__c&&I.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){I.__e(i,n.__v)}})}function Tt(e){return typeof e!="object"||e==null||e.__b>0?e:Te(e)?e.map(Tt):te({},e)}function io(e,t,r,a,n,i,s,l,u){var c,b,d,g,h,S,k,v=r.props||Ce,f=t.props,m=t.type;if(m=="svg"?n="http://www.w3.org/2000/svg":m=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((h=i[c])&&"setAttribute"in h==!!m&&(m?h.localName==m:h.nodeType==3)){e=h,i[c]=null;break}}if(e==null){if(m==null)return document.createTextNode(f);e=document.createElementNS(n,m,f.is&&f),l&&(I.__m&&I.__m(t,i),l=!1),i=null}if(m==null)v===f||l&&e.data==f||(e.data=f);else{if(i=i&&Ee.call(e.childNodes),!l&&i!=null)for(v={},c=0;c<e.attributes.length;c++)v[(h=e.attributes[c]).name]=h.value;for(c in v)h=v[c],c=="dangerouslySetInnerHTML"?d=h:c=="children"||c in f||c=="value"&&"defaultValue"in f||c=="checked"&&"defaultChecked"in f||xe(e,c,null,h,n);for(c in f)h=f[c],c=="children"?g=h:c=="dangerouslySetInnerHTML"?b=h:c=="value"?S=h:c=="checked"?k=h:l&&typeof h!="function"||v[c]===h||xe(e,c,h,v[c],n);if(b)l||d&&(b.__html==d.__html||b.__html==e.innerHTML)||(e.innerHTML=b.__html),t.__k=[];else if(d&&(e.innerHTML=""),Rt(t.type=="template"?e.content:e,Te(g)?g:[g],t,r,a,m=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&ce(r,0),l,u),i!=null)for(c=i.length;c--;)Ve(i[c]);l||(c="value",m=="progress"&&S==null?e.removeAttribute("value"):S!=null&&(S!==e[c]||m=="progress"&&!S||m=="option"&&S!=v[c])&&xe(e,c,S,v[c],n),c="checked",k!=null&&k!=e[c]&&xe(e,c,k,v[c],n))}return e}function Ye(e,t,r){try{if(typeof e=="function"){var a=typeof e.__u=="function";a&&e.__u(),a&&t==null||(e.__u=e(t))}else e.current=t}catch(n){I.__e(n,r)}}function Pt(e,t,r){var a,n;if(I.unmount&&I.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||Ye(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){I.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&Pt(a[n],t,r||typeof e.type!="function");r||Ve(e.__e),e.__c=e.__=e.__e=void 0}function so(e,t,r){return this.constructor(e,r)}function de(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),I.__&&I.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Ge(t,e=(!a&&r||t).__k=y(U,null,[e]),n||Ce,Ce,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Ee.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),Et(i,e,s)}var Ee,I,xt,eo,oe,ht,wt,kt,Qe,we,fe,St,Ue,Oe,We,to,Ce,Re,ro,Te,Z=j(()=>{"use strict";Ce={},Re=[],ro=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Te=Array.isArray;Ee=Re.slice,I={__e:function(e,t,r,a){for(var n,i,s;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,a||{}),s=n.__d),s)return n.__E=n}catch(l){e=l}throw e}},xt=0,eo=function(e){return e!=null&&e.constructor===void 0},Se.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=te({},this.state),typeof e=="function"&&(e=e(te({},r),this.props)),e&&te(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),vt(this))},Se.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),vt(this))},Se.prototype.render=U,oe=[],wt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,kt=function(e,t){return e.__v.__b-t.__v.__b},qe.__r=0,Qe=Math.random().toString(8),we="__d"+Qe,fe="__a"+Qe,St=/(PointerCapture)$|Capture$/i,Ue=0,Oe=_t(!1),We=_t(!0),to=0});function Me(e,t){K.__h&&K.__h(H,e,me||t),me=0;var r=H.__H||(H.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function q(e){return me=1,lo(Ht,e)}function lo(e,t,r){var a=Me(pe++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):Ht(void 0,t),function(l){var u=a.__N?a.__N[0]:a.__[0],c=a.t(u,l);u!==c&&(a.__N=[c,a.__[1]],a.__c.setState({}))}],a.__c=H,!H.__f)){var n=function(l,u,c){if(!a.__c.__H)return!0;var b=a.__c.__H.__.filter(function(g){return g.__c});if(b.every(function(g){return!g.__N}))return!i||i.call(this,l,u,c);var d=a.__c.props!==l;return b.some(function(g){if(g.__N){var h=g.__[0];g.__=g.__N,g.__N=void 0,h!==g.__[0]&&(d=!0)}}),i&&i.call(this,l,u,c)||d};H.__f=!0;var i=H.shouldComponentUpdate,s=H.componentWillUpdate;H.componentWillUpdate=function(l,u,c){if(this.__e){var b=i;i=void 0,n(l,u,c),i=b}s&&s.call(this,l,u,c)},H.shouldComponentUpdate=n}return a.__N||a.__}function $(e,t){var r=Me(pe++,3);!K.__s&&et(r.__H,t)&&(r.__=e,r.u=t,H.__H.__h.push(r))}function Ze(e,t){var r=Me(pe++,4);!K.__s&&et(r.__H,t)&&(r.__=e,r.u=t,H.__h.push(r))}function Q(e){return me=5,Y(function(){return{current:e}},[])}function Y(e,t){var r=Me(pe++,7);return et(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function ie(e,t){return me=8,Y(function(){return e},t)}function co(){for(var e;e=Dt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Pe),t.__h.some(Je),t.__h=[]}catch(r){t.__h=[],K.__e(r,e.__v)}}}function po(e){var t,r=function(){clearTimeout(a),$t&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);$t&&(t=requestAnimationFrame(r))}function Pe(e){var t=H,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),H=t}function Je(e){var t=H;e.__c=e.__(),H=t}function et(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function Ht(e,t){return typeof t=="function"?t(e):t}var pe,H,Xe,Mt,me,Dt,K,At,zt,Lt,Bt,Ft,It,$t,V=j(()=>{"use strict";Z();me=0,Dt=[],K=I,At=K.__b,zt=K.__r,Lt=K.diffed,Bt=K.__c,Ft=K.unmount,It=K.__;K.__b=function(e){H=null,At&&At(e)},K.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),It&&It(e,t)},K.__r=function(e){zt&&zt(e),pe=0;var t=(H=e.__c).__H;t&&(Xe===H?(t.__h=[],H.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Pe),t.__h.some(Je),t.__h=[],pe=0)),Xe=H},K.diffed=function(e){Lt&&Lt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Dt.push(t)!==1&&Mt===K.requestAnimationFrame||((Mt=K.requestAnimationFrame)||po)(co)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Xe=H=null},K.__c=function(e,t){t.some(function(r){try{r.__h.some(Pe),r.__h=r.__h.filter(function(a){return!a.__||Je(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],K.__e(a,r.__v)}}),Bt&&Bt(e,t)},K.unmount=function(e){Ft&&Ft(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Pe(a)}catch(n){t=n}}),r.__H=void 0,t&&K.__e(t,r.__v))};$t=typeof requestAnimationFrame=="function"});function sr(e){return e==="en"?pa:da}var da,pa,lr=j(()=>{"use strict";da={"pastille.label":"Suivi des tests","pastille.loading":"Chargement\u2026","pastille.unavailable":"Statuts indisponibles","pastille.unknownPage":"Page inconnue","pastille.unknownPageHint":"Cette route n\u2019est pas encore au plan du site des tests.","panel.freshness":"Statuts g\xE9n\xE9r\xE9s le {date} \xB7 version {version} \xB7 env {env}","panel.noScenarios":"Aucun sc\xE9nario li\xE9 \xE0 cette page.","panel.openSitemap":"Voir le plan du site","panel.sitemapLink":"Plan du site","panel.scenarioCountOne":"{count} sc\xE9nario","panel.scenarioCountMany":"{count} sc\xE9narios","panel.laneAutomated":"Automatis\xE9","panel.laneDev":"D\xE9v","panel.laneClient":"Client","lane.notTested":"Non test\xE9","lane.validatedBy":"Valid\xE9 par {by}","lane.rejectedBy":"Rejet\xE9 par {by}","lane.stale":"Valid\xE9 en v{version}, version actuelle v{current}","lane.clientPending":"Non test\xE9 \u2014 plateforme requise","lane.bot":"Automatis\xE9 (bot)","lane.code":"D\xE9veloppeur (code)","lane.human":"Humain","laneState.ok":"\xC0 jour","laneState.issue":"Probl\xE8me","laneState.none":"Non fait / p\xE9rim\xE9","color.green":"Valid\xE9","color.yellow":"En attente","color.red":"En \xE9chec","color.gray":"Non couvert","automated.passing":"R\xE9ussi","automated.failing":"En \xE9chec","automated.flaky":"Instable","automated.neverRun":"Jamais ex\xE9cut\xE9","source.testgen":"g\xE9n\xE9r\xE9","source.testgenHint":"Sc\xE9nario g\xE9n\xE9r\xE9 automatiquement (testgen)","suite.cases":"{count} cas","case.covered":"auto","case.manual":"manuel","case.blocked":"bloqu\xE9","case.openQuestion":"question produit","grounding.verified":"attendu v\xE9rifi\xE9","grounding.confirmLive":"\xE0 confirmer en live","grounding.productQuestion":"d\xE9cision produit","modal.title":"Plan du site \u2014 suivi des tests","modal.close":"Fermer","modal.tabPages":"Pages","modal.tabScenarios":"Sc\xE9narios","modal.youAreHere":"vous \xEAtes ici","modal.search":"Filtrer les sc\xE9narios\u2026","modal.noMatch":"Aucun sc\xE9nario ne correspond au filtre.","modal.traversed":"Travers\xE9es","modal.appliesTo":"{count} pages","modal.kpiPagesCovered":"Pages avec \u2265 1 sc\xE9nario","modal.kpiScenariosPassing":"Sc\xE9narios passants","panel.noTests":"Aucun test ne couvre encore cette page.","panel.unknownPage":"Page inconnue du registre QA."},pa={"pastille.label":"Test tracking","pastille.loading":"Loading\u2026","pastille.unavailable":"Statuses unavailable","pastille.unknownPage":"Unknown page","pastille.unknownPageHint":"This route isn\u2019t in the test sitemap yet.","panel.freshness":"Statuses generated on {date} \xB7 version {version} \xB7 env {env}","panel.noScenarios":"No scenario linked to this page.","panel.openSitemap":"View sitemap","panel.sitemapLink":"Sitemap","panel.scenarioCountOne":"{count} scenario","panel.scenarioCountMany":"{count} scenarios","panel.laneAutomated":"Automated","panel.laneDev":"Dev","panel.laneClient":"Client","lane.notTested":"Not tested","lane.validatedBy":"Validated by {by}","lane.rejectedBy":"Rejected by {by}","lane.stale":"Validated in v{version}, current version v{current}","lane.clientPending":"Not tested \u2014 platform required","lane.bot":"Automated (bot)","lane.code":"Developer (code)","lane.human":"Human","laneState.ok":"Up to date","laneState.issue":"Issue","laneState.none":"Not done / stale","color.green":"Validated","color.yellow":"Pending","color.red":"Failing","color.gray":"Not covered","automated.passing":"Passing","automated.failing":"Failing","automated.flaky":"Flaky","automated.neverRun":"Never run","source.testgen":"generated","source.testgenHint":"Auto-generated scenario (testgen)","suite.cases":"{count} cases","case.covered":"auto","case.manual":"manual","case.blocked":"blocked","case.openQuestion":"product question","grounding.verified":"expected verified","grounding.confirmLive":"confirm live","grounding.productQuestion":"product decision","modal.title":"Sitemap \u2014 test tracking","modal.close":"Close","modal.tabPages":"Pages","modal.tabScenarios":"Scenarios","modal.youAreHere":"you are here","modal.search":"Filter scenarios\u2026","modal.noMatch":"No scenario matches the filter.","modal.traversed":"Traversed","modal.appliesTo":"{count} pages","modal.kpiPagesCovered":"Pages with \u2265 1 scenario","modal.kpiScenariosPassing":"Passing scenarios","panel.noTests":"No tests cover this page yet.","panel.unknownPage":"Page unknown to the QA registry."}});function rt(e){if(!e)return"/";let t=e.startsWith("/")?e:`/${e}`;return t=t.replace(/\/{2,}/g,"/"),t.length>1&&(t=t.replace(/\/+$/,"")),t.length>0?t:"/"}function ua(e,t){let r=t.length;for(;r>0;){let a=t[r-1];if(a!==void 0&&a.startsWith(":")&&a.endsWith("?"))r--;else break}return e.length<r||e.length>t.length?!1:e.every((a,n)=>{let i=t[n];return i!==void 0&&(i.startsWith(":")||i===a)})}function dr(e,t){let r=cr(rt(e)),a=null,n=-1;for(let i of t){let s=cr(i);if(!ua(r,s))continue;let u=s.filter(c=>!c.startsWith(":")).length*100+s.length;u>n&&(a=i,n=u)}return a}var cr,ot=j(()=>{"use strict";cr=e=>e.split("/").filter(Boolean)});var pr,ur=j(()=>{"use strict";pr=`
|
|
2
2
|
:host {
|
|
3
3
|
--mqa-z-index: 2147483639;
|
|
4
4
|
--mqa-z-panel: 2147483638;
|
|
@@ -56,13 +56,25 @@
|
|
|
56
56
|
|
|
57
57
|
/* \u2500\u2500 Pastille (FAB circle) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
/* The wrap is the fixed, bottom-right anchor for the whole pastille cluster.
|
|
60
|
+
It MUST be a positioning context: the hover panel .qa-panel is
|
|
61
|
+
position:absolute and is a SIBLING of the pastille, so without a positioned
|
|
62
|
+
wrap it would anchor to :host (fixed, no offsets \u2014 i.e. the top-left of the
|
|
63
|
+
screen) instead of sitting above the FAB. The --mqa-right/--mqa-bottom knobs
|
|
64
|
+
(set on the host, inherited here) keep driving the on-screen position. The
|
|
65
|
+
fixed sitemap modal inside the wrap anchors to the viewport regardless, so
|
|
66
|
+
it's unaffected. */
|
|
67
|
+
.qa-pastille-wrap {
|
|
60
68
|
position: fixed;
|
|
61
69
|
right: var(--mqa-right, 1.5rem);
|
|
62
70
|
bottom: var(--mqa-bottom, 1.5rem);
|
|
63
71
|
z-index: var(--mqa-z-index);
|
|
64
72
|
}
|
|
65
73
|
|
|
74
|
+
.qa-pastille {
|
|
75
|
+
position: relative;
|
|
76
|
+
}
|
|
77
|
+
|
|
66
78
|
.qa-pastille__dot {
|
|
67
79
|
width: 48px;
|
|
68
80
|
height: 48px;
|
|
@@ -73,7 +85,9 @@
|
|
|
73
85
|
cursor: pointer;
|
|
74
86
|
box-shadow: var(--mqa-shadow);
|
|
75
87
|
color: rgba(0, 0, 0, 0.5);
|
|
76
|
-
animation
|
|
88
|
+
/* No idle animation \u2014 the pastille stays static until interacted with, like
|
|
89
|
+
the feedback FAB. (Previously pulsed on a perpetual keyframe loop.) Only
|
|
90
|
+
the hover transition below animates. */
|
|
77
91
|
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
78
92
|
border: none;
|
|
79
93
|
}
|
|
@@ -92,13 +106,6 @@
|
|
|
92
106
|
:host([data-mqa-size="sm"]) .qa-pastille__dot { width: 24px; height: 24px; }
|
|
93
107
|
:host([data-mqa-size="sm"]) .qa-pastille__ecg { width: 15px; height: 8px; }
|
|
94
108
|
|
|
95
|
-
.qa-pastille__panel {
|
|
96
|
-
position: absolute;
|
|
97
|
-
bottom: calc(100% + 0.5rem);
|
|
98
|
-
right: 0;
|
|
99
|
-
z-index: var(--mqa-z-panel);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
109
|
/* Color overrides: on colored backgrounds the ECG trace needs a dark stroke. */
|
|
103
110
|
.qa-pastille__dot.qa--green,
|
|
104
111
|
.qa-pastille__dot.qa--yellow,
|
|
@@ -111,13 +118,6 @@
|
|
|
111
118
|
color: rgba(0, 0, 0, 0.45);
|
|
112
119
|
}
|
|
113
120
|
|
|
114
|
-
@keyframes qa-heartbeat {
|
|
115
|
-
0%, 100% { transform: scale(1); }
|
|
116
|
-
8% { transform: scale(1.1); }
|
|
117
|
-
16% { transform: scale(1); }
|
|
118
|
-
24% { transform: scale(1.06); }
|
|
119
|
-
}
|
|
120
|
-
|
|
121
121
|
.qa-fade-enter-active,
|
|
122
122
|
.qa-fade-leave-active {
|
|
123
123
|
transition: opacity 0.15s ease, transform 0.15s ease;
|
|
@@ -129,11 +129,32 @@
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
@media (prefers-reduced-motion: reduce) {
|
|
132
|
-
.qa-pastille__dot {
|
|
132
|
+
.qa-pastille__dot { transition: none; }
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
/* \u2500\u2500 Test panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
136
136
|
|
|
137
|
+
/* The hover panel anchors above the pastille inside the fixed
|
|
138
|
+
.qa-pastille-wrap. The ANCHOR (not the panel) is what's taken out of flow:
|
|
139
|
+
it MUST be absolute so the wrap shrink-wraps to the pastille dot \u2014 an in-flow
|
|
140
|
+
panel would stretch the wrap to 340px and either push the dot aside or (on a
|
|
141
|
+
tall, scrolled host page) drive a scrollbar-reflow feedback loop that makes
|
|
142
|
+
the FAB jump. (The donor's positioning lived on an orphaned
|
|
143
|
+
.qa-pastille__panel selector that matched nothing after the Vue\u2192Preact port
|
|
144
|
+
renamed the root to .qa-panel.)
|
|
145
|
+
|
|
146
|
+
The anchor's padding-bottom renders the 0.5rem visual gap between the dot
|
|
147
|
+
and the panel AS PART of the hover region, so sweeping the cursor from the
|
|
148
|
+
dot up onto the panel never crosses dead space \u2192 never fires the wrap's
|
|
149
|
+
mouseleave \u2192 no flicker. (Paired with a small close-delay in mount.tsx.) */
|
|
150
|
+
.qa-panel-anchor {
|
|
151
|
+
position: absolute;
|
|
152
|
+
bottom: 100%;
|
|
153
|
+
right: 0;
|
|
154
|
+
padding-bottom: 0.5rem;
|
|
155
|
+
z-index: var(--mqa-z-panel);
|
|
156
|
+
}
|
|
157
|
+
|
|
137
158
|
.qa-panel {
|
|
138
159
|
background: var(--mqa-bg);
|
|
139
160
|
border-radius: var(--mqa-radius);
|
|
@@ -592,12 +613,12 @@
|
|
|
592
613
|
background: var(--mqa-surface);
|
|
593
614
|
border-radius: 4px;
|
|
594
615
|
}
|
|
595
|
-
`});function ge(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function oe(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function Be(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function Fe(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("fr-CA",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}function Ie(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var be,fr,mr,br,gr,$e=j(()=>{"use strict";be={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},fr={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},mr={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},br={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},gr={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function hr({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[fr[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return y("div",{class:"qa-pastille"},y("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${be[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},y("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},y("polyline",{points:"1,6 7,6 9,2 12,10 15,4 17,6 23,6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"}))))}var vr=j(()=>{"use strict";Z();$e()});function he({dev:e,bot:t,human:r,strings:a}){return y("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},y("span",{class:`qa-lanes__icon qa-lane ${at[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},y("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},y("path",{d:"M8 7l-5 5 5 5M16 7l5 5-5 5",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"}))),y("span",{class:`qa-lanes__icon qa-lane ${at[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},y("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},y("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),y("path",{d:"M12 4.5v4"}),y("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),y("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),y("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),y("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),y("span",{class:`qa-lanes__icon qa-lane ${at[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},y("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},y("circle",{cx:"12",cy:"8",r:"3.6"}),y("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var at,nt=j(()=>{"use strict";Z();at={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function fa(e){return{dev:oe(e.dev),bot:ge(e.automated),human:oe(e.client)}}function ma(e){var a,n,i;let t=new Map;for(let s of e){let l=(n=(a=s.group)==null?void 0:a.key)!=null?n:"\xB7",u=(i=t.get(l))!=null?i:[];u.push(s),t.set(l,u)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var u,c,b;let l=t.get(s);return{key:s,label:(b=(c=(u=l[0])==null?void 0:u.group)==null?void 0:c.label)!=null?b:"",scenarios:l}})}function yr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function _r({scenario:e,strings:t}){let r=fa(e),a=e.automated.provenance;return y("li",{class:"qa-row","data-testid":"qa-scenario-row"},y("span",{class:"qa-row__title"},e.priority?y("span",{class:`qa-tag ${mr[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,y("span",{class:"qa-row__name"},e.title),e.source==="testgen"?y("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?y("span",{class:"qa-tag"},t[br[e.caseStatus]]):null,e.grounding?y("span",{class:"qa-tag"},t[gr[e.grounding]]):null,a?y("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),y(he,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function xr({page:e,state:t,meta:r,strings:a}){var c;let[n,i]=q(new Set),s=b=>{i(d=>{let h=new Set(d);return h.has(b)?h.delete(b):h.add(b),h})},l=yr(a["panel.freshness"],{date:Fe(r.generated_at),version:Ie(r.app_version),env:r.environment}),u;if(t==="no-tests")u=y("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")u=y("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let b=(c=e==null?void 0:e.scenarios)!=null?c:[],d=b.some(h=>h.group);if(b.length===0)u=y("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!d)u=y("ul",{class:"qa-panel__list"},b.map(h=>y(_r,{key:h.id,scenario:h,strings:a})));else{let h=ma(b);u=y("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},h.map(g=>{let S=n.has(g.key),k={dev:Be(g.scenarios.map(v=>oe(v.dev))),bot:Be(g.scenarios.map(v=>ge(v.automated))),human:Be(g.scenarios.map(v=>oe(v.client)))};return y("li",{key:g.key,class:"qa-suite","data-testid":"qa-panel-group"},y("button",{type:"button",class:"qa-suite__head","aria-expanded":S,"data-testid":"qa-suite-group",onClick:()=>s(g.key)},y("span",{class:`qa-suite__chev ${S?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),y("span",{class:"qa-suite__key"},g.key),y("span",{class:"qa-suite__label"},g.label),y("span",{class:"qa-suite__count"},yr(a["suite.cases"],{count:g.scenarios.length})),y(he,{dev:k.dev,bot:k.bot,human:k.human,strings:a})),S?y("ul",{class:"qa-suite__list"},g.scenarios.map(v=>y(_r,{key:v.id,scenario:v,strings:a}))):null)}))}}return y("section",{class:"qa-panel","data-testid":"qa-panel"},u,y("footer",{class:"qa-panel__foot"},y("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var wr=j(()=>{"use strict";Z();V();nt();$e()});function ba(e){var n;let t=new Map;for(let i of e){let s=(n=t.get(i.parent_id))!=null?n:[];s.push(i),t.set(i.parent_id,s)}for(let i of t.values())i.sort((s,l)=>s.order-l.order);let r=[],a=(i,s)=>{var l,u;for(let c of(l=t.get(i))!=null?l:[]){let b=(u=t.get(c.id))!=null?u:[];r.push({node:c,depth:s,hasChildren:b.length>0}),b.length>0&&a(c.id,s+1)}};return a(null,0),r}function ga(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let u=(a=l.external_key)!=null?a:l.id,c=(n=t.get(u))!=null?n:{scenario:l,primaries:new Set,traversed:new Set};for(let b of(i=l.pages)!=null?i:[])(b.role==="primary"?c.primaries:c.traversed).add(b.pattern);t.set(u,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var b,d,h,g;let u=(d=(b=s.scenario.group)==null?void 0:b.key)!=null?d:"~",c=(g=(h=l.scenario.group)==null?void 0:h.key)!=null?g:"~";return u!==c?u.localeCompare(c):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function kr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function Sr(e){return`${Math.round(e)}%`}function Cr({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=q("pages"),[s,l]=q("");$(()=>{let v=f=>{f.key==="Escape"&&a()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[a]);let u=t?rt(t):null,c=X(()=>ba(e.sitemap),[e]),b=X(()=>ga(e),[e]),d=X(()=>{let v=new Map;for(let f of e.sitemap)v.set(f.path_pattern,f.title);return v},[e]),h=v=>{var f;return(f=d.get(v))!=null?f:v},g=s.trim().toLowerCase(),S=g?b.filter(v=>{var f,m;return v.scenario.title.toLowerCase().includes(g)||((m=(f=v.scenario.group)==null?void 0:f.label)!=null?m:"").toLowerCase().includes(g)}):b,k=kr(r["panel.freshness"],{date:Fe(e.generated_at),version:Ie(e.app_version),env:e.environment});return y("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:v=>{v.target===v.currentTarget&&a()}},y("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},y("header",{class:"qa-modal__head"},y("h3",null,r["modal.title"]),y("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),y("div",{class:"qa-modal__freshness"},k),y("div",{class:"qa-kpi","data-testid":"qa-kpi"},y("div",{class:"qa-kpi__item"},y("span",{class:"qa-kpi__value"},Sr(e.metric.pages_with_scenarios_pct)),y("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),y("div",{class:"qa-kpi__item"},y("span",{class:"qa-kpi__value"},Sr(e.metric.scenarios_passing_pct)),y("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),y("nav",{class:"qa-tabs"},y("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),y("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),y("div",{class:"qa-modal__body"},n==="pages"?y("ul",{class:"qa-tree"},c.map(v=>{let f=u!==null&&v.node.path_pattern===u;return y("li",{key:v.node.id,class:`qa-tree__row ${f?"qa-tree__row--here":""}`,"data-testid":f?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+v.depth*1.1}rem`}},y("span",{class:`qa-dot ${be[v.node.color]}`,"aria-hidden":"true"}),y("span",{class:`qa-tree__title ${v.node.structural?"qa-tree__title--structural":""}`},v.node.title||v.node.path_pattern),f?y("span",{class:"qa-tree__here"},` ${v.node.path_pattern} `):null,f?y("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,y("span",{class:"qa-tree__count"},String(v.node.counts.scenarios)))})):y("div",{class:"qa-scenarios"},y("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:v=>l(v.target.value)}),S.length===0?y("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):y("ul",{class:"qa-scenarios__list"},S.map(v=>{var x,E;let f=v.scenario,m={dev:oe(f.dev),bot:ge(f.automated),human:oe(f.client)},p=[...v.traversed].map(h);return y("li",{key:(x=f.external_key)!=null?x:f.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},y("div",{class:"qa-scenarios__line"},y("span",{class:`qa-dot ${be[f.color]}`,"aria-hidden":"true"}),(E=f.group)!=null&&E.key?y("span",{class:"qa-suitekey"},f.group.key):null,y("span",{class:"qa-scenarios__title"},f.title),f.source==="testgen"?y("span",{class:"qa-tag"},r["source.testgen"]):null,y(he,{dev:m.dev,bot:m.bot,human:m.human,strings:r})),y("div",{class:"qa-scenarios__pages"},v.primaries.size?y("span",{class:"qa-scenarios__primary"},kr(r["modal.appliesTo"],{count:v.primaries.size})):null,p.length?y("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${p.join(", ")}`):null))}))))))}var Rr=j(()=>{"use strict";Z();V();nt();ot();$e()});function ha(){if(De++,Ke)return;Ke=!0,ve=history.pushState,ye=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(it))};history.pushState=function(...r){let a=ve.apply(this,r);return e(),a},history.replaceState=function(...r){let a=ye.apply(this,r);return e(),a}}function va(){De>0&&De--,!(De>0||!Ke)&&(Ke=!1,ve&&(history.pushState=ve),ye&&(history.replaceState=ye),ve=null,ye=null)}function qr(e){return typeof e=="object"&&e!==null&&e.format===ya}function Tr(){Er||(Er=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function xa(e){let t=new Set;for(let r of e.pages)r.page&&t.add(r.page.path_pattern);for(let r of e.sitemap)t.add(r.path_pattern);return[...t]}function ka(e,t){if(!e||!t)return wa;let r=e.pages.find(n=>n.page&&n.page.path_pattern===t);return r&&r.page?{state:"known",color:r.color,pattern:t,page:r}:e.sitemap.some(n=>n.path_pattern===t)?{state:"no-tests",color:"gray",pattern:t,page:null}:{state:"unknown-page",color:"gray",pattern:t,page:null}}function Pr(e){var p,x,E,P;let{source:t}=e,r=sr((p=e.locale)!=null?p:"fr"),a=typeof t=="object"?t:null;if(a&&!qr(a))return Tr(),_a;let n=a,i=!1,s=null;function l(){if(n||i)return;i=!0,s=(typeof t=="function"?t():typeof t=="string"?fetch(t).then(A=>A.json()):Promise.resolve(t)).then(A=>{qr(A)?(n=A,h()):Tr()}).catch(()=>{})}let u=document.createElement("div");u.setAttribute("data-mqa-host",""),u.setAttribute("data-mqa-size",(x=e.size)!=null?x:"md"),((E=e.position)==null?void 0:E.right)!==void 0&&u.style.setProperty("--mqa-right",`${e.position.right}px`),((P=e.position)==null?void 0:P.bottom)!==void 0&&u.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(u);let c=u.attachShadow({mode:"open"}),b=document.createElement("style");b.textContent=pr,c.appendChild(b);let d=document.createElement("div");c.appendChild(d);let h=()=>{};function g(){return e.getCurrentPage?e.getCurrentPage():n?dr(window.location.pathname,xa(n)):null}function S(){let[w,A]=q(0),T=ne(()=>A(Q=>Q+1),[]);h=T;let M=ka(n,g()),K=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},O=ne(()=>{l()},[]),W=ne(()=>{l(),k=!0,T()},[]),z=ne(()=>{k=!1,T()},[]);return $(()=>{let Q=()=>T();return window.addEventListener("popstate",Q),window.addEventListener(it,Q),()=>{window.removeEventListener("popstate",Q),window.removeEventListener(it,Q)}},[]),y("div",{class:"qa-pastille-wrap",onMouseLeave:()=>{v=!1,T()}},v?y(xr,{page:M.page,state:M.state,meta:K,strings:r}):null,y(hr,{color:M.color,state:M.state,strings:r,onHover:()=>{v=!0,O(),T()},onOpenModal:W}),k&&n?y(Cr,{artifact:n,currentPattern:M.pattern,strings:r,onClose:z}):null)}let k=!1,v=!1;function f(){de(y(S,{}),d)}f(),ha();let m=!1;return{open(){m||(l(),k=!0,h())},close(){m||(k=!1,h())},dispose(){m||(m=!0,de(null,d),u.remove(),va())}}}var it,Ke,De,ve,ye,ya,Er,_a,wa,Mr=j(()=>{"use strict";Z();V();lr();ot();ur();vr();wr();Rr();it="mqa:locationchange",Ke=!1,De=0,ve=null,ye=null;ya=1;Er=!1;_a={open(){},close(){},dispose(){}};wa={state:"unknown-page",color:"gray",pattern:null,page:null}});var Ar={};st(Ar,{createQaMeter:()=>Sa});function Sa(e){return Pr(e)}var zr=j(()=>{"use strict";Mr()});var Pa={};st(Pa,{createFeedback:()=>Ta});var Qr=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function Or(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 lt(e){var k,v;let t=((k=e.endpoint)!=null?k:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');Or(t);let r=(v=e.fetch)!=null?v:globalThis.fetch;async function a(f){var w,A,T;let m=f;if(e.beforeSend&&(m=await e.beforeSend(f)),m===!1)throw new Error("Submission cancelled by beforeSend");let p=new FormData;for(let M of Qr)p.append(M,String(m[M]));p.append("technical_context",JSON.stringify(m.technical_context)),m.screenshot&&p.append("screenshot",m.screenshot,"screenshot.png"),m.synthetic&&p.append("synthetic","true"),(w=m.user)!=null&&w.id&&p.append("user",JSON.stringify(m.user)),m.widget_version&&p.append("widget_version",m.widget_version);let x={Authorization:`Bearer ${e.apiKey}`};m.synthetic&&(x["X-Mhosaic-Capture-Source"]="error-tracking");let E=(A=e.getSignedIdentity)==null?void 0:A.call(e);E&&E.userHash&&E.exp&&((T=m.user)!=null&&T.id)&&(x["X-Mhosaic-User"]=String(m.user.id),x["X-Mhosaic-User-Hmac"]=E.userHash,x["X-Mhosaic-User-Exp"]=String(E.exp),E.email&&(x["X-Mhosaic-User-Email"]=E.email));let P=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:x,body:p});if(!P.ok){let M=await P.text().catch(()=>"");throw new Error(`Feedback submit failed: ${P.status} ${M}`)}return P.json()}function n(f){var x;let m={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":f},p=(x=e.getSignedIdentity)==null?void 0:x.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(f){let m=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(f)});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(f){let m=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(f)});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(f,m){let p=await r(`${t}/api/feedback/v1/reports/widget/${f}/`,{method:"GET",headers:n(m)});if(!p.ok){let x=await p.text().catch(()=>"");throw new Error(`getReport failed: ${p.status} ${x}`)}return p.json()}async function u(f,m,p,x){let E=await r(`${t}/api/feedback/v1/reports/widget/${f}/comments/`,{method:"POST",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({body:p,...x!==void 0&&{client_nonce:x}})});if(!E.ok){let P=await E.text().catch(()=>"");throw new Error(`addComment failed: ${E.status} ${P}`)}return E.json()}async function c(f,m){let p=await r(`${t}/api/feedback/v1/reports/widget/${f}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!p.ok){let x=await p.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${p.status} ${x}`)}return p.json()}async function b(f,m){let p=await r(`${t}/api/feedback/v1/reports/widget/${f}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!p.ok){let x=await p.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${p.status} ${x}`)}return p.json()}function d(f){var x,E,P;if(!f)return"";let m=new URLSearchParams;(x=f.status)==null||x.forEach(w=>m.append("status",w)),(E=f.type)==null||E.forEach(w=>m.append("type",w)),(P=f.severity)==null||P.forEach(w=>m.append("severity",w)),f.q&&m.set("q",f.q),f.mine&&m.set("mine","1"),f.ordering&&m.set("ordering",f.ordering),f.page&&f.page>1&&m.set("page",String(f.page));let p=m.toString();return p?`?${p}`:""}async function h(f,m){let p=await r(`${t}/api/feedback/v1/reports/widget/board/${d(m)}`,{method:"GET",headers:n(f)});if(p.status===404)return{count:0,next:null,previous:null,results:[]};if(!p.ok){let x=await p.text().catch(()=>"");throw new Error(`listBoard failed: ${p.status} ${x}`)}return p.json()}async function g(f,m){let p=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${d(m)}`,{method:"GET",headers:n(f)});if(p.status===404)return{total:0,by_status:{},resolution_rate:0,scope:"mine"};if(!p.ok){let x=await p.text().catch(()=>"");throw new Error(`fetchBoardKpis failed: ${p.status} ${x}`)}return p.json()}async function S(f,m){let p=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(f),"Content-Type":"application/json"},body:JSON.stringify({external_id:f,...m?{email:m}:{}})});if(!p.ok)throw new Error(`checkVisibility failed: ${p.status}`);return!!(await p.json()).show}return{submitReport:a,checkVisibility:S,listMine:i,listChangelog:s,getReport:l,addComment:u,closeAsResolved:c,reopenUnresolved:b,listBoard:h,fetchBoardKpis:g}}var Wr=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,jr=[/^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 Ur(e){return jr.some(t=>t.test(e))}function ae(e){try{let t=/^https?:\/\//i.test(e),r=e.startsWith("/");if(!t&&!r)return e;let a=typeof window!="undefined"?window.location.origin:"http://localhost",n=new URL(e,a),i=new URLSearchParams;return n.searchParams.forEach((s,l)=>{Wr.test(l)||Ur(s)?i.set(l,"[redacted]"):i.set(l,s)}),n.search=i.toString(),n.hash=n.hash?"#[redacted]":"",n.toString()}catch(t){return e}}var Vr=[/\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 Y(e){let t=e;for(let r of Vr)t=t.replace(r,"[redacted-token]");return t}function ct(){var l;let e=navigator,t=(l=e.connection)==null?void 0:l.effectiveType,r=e.deviceMemory,a=document.referrer||void 0,n=a!==void 0?ae(a):void 0,i=ae(window.location.pathname+window.location.search),s;try{let u=new URL(i,window.location.origin);s=u.pathname+u.search}catch(u){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,...n!==void 0&&{referrer:n},title:Y(document.title||"").slice(0,200),pathname:s}}function Gr(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 dt(e){let t=["log","info","warn","error","debug"],r={};for(let a of t){let n=console[a];typeof n=="function"&&(r[a]=n,console[a]=function(...s){try{let l=s.map(Gr).join(" "),u=Y(l).slice(0,2e3),c={level:a,message:u,ts:Date.now()};if(a==="error"){let b=new Error().stack;b&&(c.stack=b.split(`
|
|
616
|
+
`});function ge(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function ae(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function Be(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function Fe(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("fr-CA",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}function Ie(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var be,fr,mr,br,gr,$e=j(()=>{"use strict";be={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},fr={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},mr={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},br={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},gr={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function hr({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[fr[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return y("div",{class:"qa-pastille"},y("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${be[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},y("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},y("polyline",{points:"1,6 7,6 9,2 12,10 15,4 17,6 23,6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"}))))}var vr=j(()=>{"use strict";Z();$e()});function he({dev:e,bot:t,human:r,strings:a}){return y("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},y("span",{class:`qa-lanes__icon qa-lane ${at[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},y("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},y("path",{d:"M8 7l-5 5 5 5M16 7l5 5-5 5",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"}))),y("span",{class:`qa-lanes__icon qa-lane ${at[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},y("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},y("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),y("path",{d:"M12 4.5v4"}),y("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),y("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),y("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),y("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),y("span",{class:`qa-lanes__icon qa-lane ${at[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},y("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},y("circle",{cx:"12",cy:"8",r:"3.6"}),y("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var at,nt=j(()=>{"use strict";Z();at={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function fa(e){return{dev:ae(e.dev),bot:ge(e.automated),human:ae(e.client)}}function ma(e){var a,n,i;let t=new Map;for(let s of e){let l=(n=(a=s.group)==null?void 0:a.key)!=null?n:"\xB7",u=(i=t.get(l))!=null?i:[];u.push(s),t.set(l,u)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var u,c,b;let l=t.get(s);return{key:s,label:(b=(c=(u=l[0])==null?void 0:u.group)==null?void 0:c.label)!=null?b:"",scenarios:l}})}function yr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function _r({scenario:e,strings:t}){let r=fa(e),a=e.automated.provenance;return y("li",{class:"qa-row","data-testid":"qa-scenario-row"},y("span",{class:"qa-row__title"},e.priority?y("span",{class:`qa-tag ${mr[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,y("span",{class:"qa-row__name"},e.title),e.source==="testgen"?y("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?y("span",{class:"qa-tag"},t[br[e.caseStatus]]):null,e.grounding?y("span",{class:"qa-tag"},t[gr[e.grounding]]):null,a?y("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),y(he,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function xr({page:e,state:t,meta:r,strings:a}){var c;let[n,i]=q(new Set),s=b=>{i(d=>{let g=new Set(d);return g.has(b)?g.delete(b):g.add(b),g})},l=yr(a["panel.freshness"],{date:Fe(r.generated_at),version:Ie(r.app_version),env:r.environment}),u;if(t==="no-tests")u=y("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")u=y("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let b=(c=e==null?void 0:e.scenarios)!=null?c:[],d=b.some(g=>g.group);if(b.length===0)u=y("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!d)u=y("ul",{class:"qa-panel__list"},b.map(g=>y(_r,{key:g.id,scenario:g,strings:a})));else{let g=ma(b);u=y("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},g.map(h=>{let S=n.has(h.key),k={dev:Be(h.scenarios.map(v=>ae(v.dev))),bot:Be(h.scenarios.map(v=>ge(v.automated))),human:Be(h.scenarios.map(v=>ae(v.client)))};return y("li",{key:h.key,class:"qa-suite","data-testid":"qa-panel-group"},y("button",{type:"button",class:"qa-suite__head","aria-expanded":S,"data-testid":"qa-suite-group",onClick:()=>s(h.key)},y("span",{class:`qa-suite__chev ${S?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),y("span",{class:"qa-suite__key"},h.key),y("span",{class:"qa-suite__label"},h.label),y("span",{class:"qa-suite__count"},yr(a["suite.cases"],{count:h.scenarios.length})),y(he,{dev:k.dev,bot:k.bot,human:k.human,strings:a})),S?y("ul",{class:"qa-suite__list"},h.scenarios.map(v=>y(_r,{key:v.id,scenario:v,strings:a}))):null)}))}}return y("section",{class:"qa-panel","data-testid":"qa-panel"},u,y("footer",{class:"qa-panel__foot"},y("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var wr=j(()=>{"use strict";Z();V();nt();$e()});function ba(e){var n;let t=new Map;for(let i of e){let s=(n=t.get(i.parent_id))!=null?n:[];s.push(i),t.set(i.parent_id,s)}for(let i of t.values())i.sort((s,l)=>s.order-l.order);let r=[],a=(i,s)=>{var l,u;for(let c of(l=t.get(i))!=null?l:[]){let b=(u=t.get(c.id))!=null?u:[];r.push({node:c,depth:s,hasChildren:b.length>0}),b.length>0&&a(c.id,s+1)}};return a(null,0),r}function ga(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let u=(a=l.external_key)!=null?a:l.id,c=(n=t.get(u))!=null?n:{scenario:l,primaries:new Set,traversed:new Set};for(let b of(i=l.pages)!=null?i:[])(b.role==="primary"?c.primaries:c.traversed).add(b.pattern);t.set(u,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var b,d,g,h;let u=(d=(b=s.scenario.group)==null?void 0:b.key)!=null?d:"~",c=(h=(g=l.scenario.group)==null?void 0:g.key)!=null?h:"~";return u!==c?u.localeCompare(c):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function kr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function Sr(e){return`${Math.round(e)}%`}function Cr({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=q("pages"),[s,l]=q("");$(()=>{let v=f=>{f.key==="Escape"&&a()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[a]);let u=t?rt(t):null,c=Y(()=>ba(e.sitemap),[e]),b=Y(()=>ga(e),[e]),d=Y(()=>{let v=new Map;for(let f of e.sitemap)v.set(f.path_pattern,f.title);return v},[e]),g=v=>{var f;return(f=d.get(v))!=null?f:v},h=s.trim().toLowerCase(),S=h?b.filter(v=>{var f,m;return v.scenario.title.toLowerCase().includes(h)||((m=(f=v.scenario.group)==null?void 0:f.label)!=null?m:"").toLowerCase().includes(h)}):b,k=kr(r["panel.freshness"],{date:Fe(e.generated_at),version:Ie(e.app_version),env:e.environment});return y("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:v=>{v.target===v.currentTarget&&a()}},y("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},y("header",{class:"qa-modal__head"},y("h3",null,r["modal.title"]),y("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),y("div",{class:"qa-modal__freshness"},k),y("div",{class:"qa-kpi","data-testid":"qa-kpi"},y("div",{class:"qa-kpi__item"},y("span",{class:"qa-kpi__value"},Sr(e.metric.pages_with_scenarios_pct)),y("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),y("div",{class:"qa-kpi__item"},y("span",{class:"qa-kpi__value"},Sr(e.metric.scenarios_passing_pct)),y("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),y("nav",{class:"qa-tabs"},y("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),y("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),y("div",{class:"qa-modal__body"},n==="pages"?y("ul",{class:"qa-tree"},c.map(v=>{let f=u!==null&&v.node.path_pattern===u;return y("li",{key:v.node.id,class:`qa-tree__row ${f?"qa-tree__row--here":""}`,"data-testid":f?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+v.depth*1.1}rem`}},y("span",{class:`qa-dot ${be[v.node.color]}`,"aria-hidden":"true"}),y("span",{class:`qa-tree__title ${v.node.structural?"qa-tree__title--structural":""}`},v.node.title||v.node.path_pattern),f?y("span",{class:"qa-tree__here"},` ${v.node.path_pattern} `):null,f?y("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,y("span",{class:"qa-tree__count"},String(v.node.counts.scenarios)))})):y("div",{class:"qa-scenarios"},y("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:v=>l(v.target.value)}),S.length===0?y("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):y("ul",{class:"qa-scenarios__list"},S.map(v=>{var x,E;let f=v.scenario,m={dev:ae(f.dev),bot:ge(f.automated),human:ae(f.client)},p=[...v.traversed].map(g);return y("li",{key:(x=f.external_key)!=null?x:f.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},y("div",{class:"qa-scenarios__line"},y("span",{class:`qa-dot ${be[f.color]}`,"aria-hidden":"true"}),(E=f.group)!=null&&E.key?y("span",{class:"qa-suitekey"},f.group.key):null,y("span",{class:"qa-scenarios__title"},f.title),f.source==="testgen"?y("span",{class:"qa-tag"},r["source.testgen"]):null,y(he,{dev:m.dev,bot:m.bot,human:m.human,strings:r})),y("div",{class:"qa-scenarios__pages"},v.primaries.size?y("span",{class:"qa-scenarios__primary"},kr(r["modal.appliesTo"],{count:v.primaries.size})):null,p.length?y("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${p.join(", ")}`):null))}))))))}var Rr=j(()=>{"use strict";Z();V();nt();ot();$e()});function ha(){if(De++,He)return;He=!0,ve=history.pushState,ye=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(it))};history.pushState=function(...r){let a=ve.apply(this,r);return e(),a},history.replaceState=function(...r){let a=ye.apply(this,r);return e(),a}}function va(){De>0&&De--,!(De>0||!He)&&(He=!1,ve&&(history.pushState=ve),ye&&(history.replaceState=ye),ve=null,ye=null)}function qr(e){return typeof e=="object"&&e!==null&&e.format===ya}function Tr(){Er||(Er=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function xa(e){let t=new Set;for(let r of e.pages)r.page&&t.add(r.page.path_pattern);for(let r of e.sitemap)t.add(r.path_pattern);return[...t]}function ka(e,t){if(!e||!t)return wa;let r=e.pages.find(n=>n.page&&n.page.path_pattern===t);return r&&r.page?{state:"known",color:r.color,pattern:t,page:r}:e.sitemap.some(n=>n.path_pattern===t)?{state:"no-tests",color:"gray",pattern:t,page:null}:{state:"unknown-page",color:"gray",pattern:t,page:null}}function Pr(e){var w,F,P,L;let{source:t}=e,r=sr((w=e.locale)!=null?w:"fr"),a=typeof t=="object"?t:null;if(a&&!qr(a))return Tr(),_a;let n=a,i=!1,s=null;function l(){if(n||i)return;i=!0,s=(typeof t=="function"?t():typeof t=="string"?fetch(t).then(N=>N.json()):Promise.resolve(t)).then(N=>{qr(N)?(n=N,g()):Tr()}).catch(()=>{})}let u=document.createElement("div");u.setAttribute("data-mqa-host",""),u.setAttribute("data-mqa-size",(F=e.size)!=null?F:"md"),((P=e.position)==null?void 0:P.right)!==void 0&&u.style.setProperty("--mqa-right",`${e.position.right}px`),((L=e.position)==null?void 0:L.bottom)!==void 0&&u.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(u);let c=u.attachShadow({mode:"open"}),b=document.createElement("style");b.textContent=pr,c.appendChild(b);let d=document.createElement("div");c.appendChild(d);let g=()=>{};function h(){return e.getCurrentPage?e.getCurrentPage():n?dr(window.location.pathname,xa(n)):null}function S(){let[D,N]=q(0),O=ie(()=>N(B=>B+1),[]);g=O;let M=ka(n,h()),X=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},W=ie(()=>{l()},[]),re=ie(()=>{l(),k=!0,O()},[]),C=ie(()=>{k=!1,O()},[]);return $(()=>{let B=()=>O();return window.addEventListener("popstate",B),window.addEventListener(it,B),()=>{window.removeEventListener("popstate",B),window.removeEventListener(it,B)}},[]),y("div",{class:"qa-pastille-wrap",onMouseEnter:p,onMouseLeave:x},v?y("div",{class:"qa-panel-anchor"},y(xr,{page:M.page,state:M.state,meta:X,strings:r})):null,y(hr,{color:M.color,state:M.state,strings:r,onHover:()=>{p(),v=!0,W(),O()},onOpenModal:re}),k&&n?y(Cr,{artifact:n,currentPattern:M.pattern,strings:r,onClose:C}):null)}let k=!1,v=!1,f=null,m=140;function p(){f!==null&&(clearTimeout(f),f=null)}function x(){p(),f=setTimeout(()=>{f=null,!T&&(v=!1,g())},m)}function E(){de(y(S,{}),d)}E(),ha();let T=!1;return{open(){T||(l(),k=!0,g())},close(){T||(k=!1,g())},dispose(){T||(T=!0,p(),de(null,d),u.remove(),va())}}}var it,He,De,ve,ye,ya,Er,_a,wa,Mr=j(()=>{"use strict";Z();V();lr();ot();ur();vr();wr();Rr();it="mqa:locationchange",He=!1,De=0,ve=null,ye=null;ya=1;Er=!1;_a={open(){},close(){},dispose(){}};wa={state:"unknown-page",color:"gray",pattern:null,page:null}});var Ar={};st(Ar,{createQaMeter:()=>Sa});function Sa(e){return Pr(e)}var zr=j(()=>{"use strict";Mr()});var Pa={};st(Pa,{createFeedback:()=>Ta});var Qr=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function Or(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 lt(e){var k,v;let t=((k=e.endpoint)!=null?k:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');Or(t);let r=(v=e.fetch)!=null?v:globalThis.fetch;async function a(f){var w,F,P;let m=f;if(e.beforeSend&&(m=await e.beforeSend(f)),m===!1)throw new Error("Submission cancelled by beforeSend");let p=new FormData;for(let L of Qr)p.append(L,String(m[L]));p.append("technical_context",JSON.stringify(m.technical_context)),m.screenshot&&p.append("screenshot",m.screenshot,"screenshot.png"),m.synthetic&&p.append("synthetic","true"),(w=m.user)!=null&&w.id&&p.append("user",JSON.stringify(m.user)),m.widget_version&&p.append("widget_version",m.widget_version);let x={Authorization:`Bearer ${e.apiKey}`};m.synthetic&&(x["X-Mhosaic-Capture-Source"]="error-tracking");let E=(F=e.getSignedIdentity)==null?void 0:F.call(e);E&&E.userHash&&E.exp&&((P=m.user)!=null&&P.id)&&(x["X-Mhosaic-User"]=String(m.user.id),x["X-Mhosaic-User-Hmac"]=E.userHash,x["X-Mhosaic-User-Exp"]=String(E.exp),E.email&&(x["X-Mhosaic-User-Email"]=E.email));let T=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:x,body:p});if(!T.ok){let L=await T.text().catch(()=>"");throw new Error(`Feedback submit failed: ${T.status} ${L}`)}return T.json()}function n(f){var x;let m={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":f},p=(x=e.getSignedIdentity)==null?void 0:x.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(f){let m=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(f)});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(f){let m=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(f)});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(f,m){let p=await r(`${t}/api/feedback/v1/reports/widget/${f}/`,{method:"GET",headers:n(m)});if(!p.ok){let x=await p.text().catch(()=>"");throw new Error(`getReport failed: ${p.status} ${x}`)}return p.json()}async function u(f,m,p,x){let E=await r(`${t}/api/feedback/v1/reports/widget/${f}/comments/`,{method:"POST",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({body:p,...x!==void 0&&{client_nonce:x}})});if(!E.ok){let T=await E.text().catch(()=>"");throw new Error(`addComment failed: ${E.status} ${T}`)}return E.json()}async function c(f,m){let p=await r(`${t}/api/feedback/v1/reports/widget/${f}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!p.ok){let x=await p.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${p.status} ${x}`)}return p.json()}async function b(f,m){let p=await r(`${t}/api/feedback/v1/reports/widget/${f}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!p.ok){let x=await p.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${p.status} ${x}`)}return p.json()}function d(f){var x,E,T;if(!f)return"";let m=new URLSearchParams;(x=f.status)==null||x.forEach(w=>m.append("status",w)),(E=f.type)==null||E.forEach(w=>m.append("type",w)),(T=f.severity)==null||T.forEach(w=>m.append("severity",w)),f.q&&m.set("q",f.q),f.mine&&m.set("mine","1"),f.ordering&&m.set("ordering",f.ordering),f.page&&f.page>1&&m.set("page",String(f.page));let p=m.toString();return p?`?${p}`:""}async function g(f,m){let p=await r(`${t}/api/feedback/v1/reports/widget/board/${d(m)}`,{method:"GET",headers:n(f)});if(p.status===404)return{count:0,next:null,previous:null,results:[]};if(!p.ok){let x=await p.text().catch(()=>"");throw new Error(`listBoard failed: ${p.status} ${x}`)}return p.json()}async function h(f,m){let p=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${d(m)}`,{method:"GET",headers:n(f)});if(p.status===404)return{total:0,by_status:{},resolution_rate:0,scope:"mine"};if(!p.ok){let x=await p.text().catch(()=>"");throw new Error(`fetchBoardKpis failed: ${p.status} ${x}`)}return p.json()}async function S(f,m){let p=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(f),"Content-Type":"application/json"},body:JSON.stringify({external_id:f,...m?{email:m}:{}})});if(!p.ok)throw new Error(`checkVisibility failed: ${p.status}`);return!!(await p.json()).show}return{submitReport:a,checkVisibility:S,listMine:i,listChangelog:s,getReport:l,addComment:u,closeAsResolved:c,reopenUnresolved:b,listBoard:g,fetchBoardKpis:h}}var Wr=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,jr=[/^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 Ur(e){return jr.some(t=>t.test(e))}function ne(e){try{let t=/^https?:\/\//i.test(e),r=e.startsWith("/");if(!t&&!r)return e;let a=typeof window!="undefined"?window.location.origin:"http://localhost",n=new URL(e,a),i=new URLSearchParams;return n.searchParams.forEach((s,l)=>{Wr.test(l)||Ur(s)?i.set(l,"[redacted]"):i.set(l,s)}),n.search=i.toString(),n.hash=n.hash?"#[redacted]":"",n.toString()}catch(t){return e}}var Vr=[/\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 G(e){let t=e;for(let r of Vr)t=t.replace(r,"[redacted-token]");return t}function ct(){var l;let e=navigator,t=(l=e.connection)==null?void 0:l.effectiveType,r=e.deviceMemory,a=document.referrer||void 0,n=a!==void 0?ne(a):void 0,i=ne(window.location.pathname+window.location.search),s;try{let u=new URL(i,window.location.origin);s=u.pathname+u.search}catch(u){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,...n!==void 0&&{referrer:n},title:G(document.title||"").slice(0,200),pathname:s}}function Gr(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 dt(e){let t=["log","info","warn","error","debug"],r={};for(let a of t){let n=console[a];typeof n=="function"&&(r[a]=n,console[a]=function(...s){try{let l=s.map(Gr).join(" "),u=G(l).slice(0,2e3),c={level:a,message:u,ts:Date.now()};if(a==="error"){let b=new Error().stack;b&&(c.stack=b.split(`
|
|
596
617
|
`).slice(2,8).join(`
|
|
597
|
-
`))}e.push(c)}catch(l){}n.apply(console,s)})}return()=>{for(let[a,n]of Object.entries(r))console[a]=n}}function pt(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(n,i){let s=performance.now(),l=typeof n=="string"?n:n instanceof URL?n.toString():n.url,u=((i==null?void 0:i.method)||(n instanceof Request?n.method:"GET")).toUpperCase();try{let c=await r(n,i);return e.push({url:t(l),method:u,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:u,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:Y(b)}),c}},()=>{window.fetch=r}}function ut(e,t){if(typeof window=="undefined"||typeof window.XMLHttpRequest!="function")return()=>{};let r=window.XMLHttpRequest,a=r.prototype.open,n=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()},a.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){}}),n.call(this,s!=null?s:null)},()=>{r.prototype.open=a,r.prototype.send=n}}function ft(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?Y(n):void 0;e.push({message:Y(a.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=a=>{let n=a.reason,i=n instanceof Error?n.message:typeof n=="string"?n:(()=>{try{return JSON.stringify(n)}catch(u){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?Y(s):void 0;e.push({message:Y(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 mt(e=1e3){let t=[],r=[],a=null;if(typeof PerformanceObserver!="undefined")try{a=new PerformanceObserver(n=>{for(let i of n.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:ae(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),a.observe({entryTypes:["longtask","resource"]})}catch(n){}return{snapshot(){let n=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=n?{type:n.type,duration:n.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){a==null||a.disconnect()}}}var le=class{constructor(t){Ne(this,"max",t);Ne(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 bt(e={}){var g;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(g=e.sanitizeUrl)!=null?g:ae,i=new le(t),s=new le(r),l=new le(a),u=dt(i),c=pt(s,n),b=ut(s,n),d=ft(l),h=mt();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:ct(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){u(),c(),b(),d(),h.dispose()}}}var Yr={"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.sort":"Sort","board.sort.recent":"Newest first","board.sort.oldest":"Oldest first","board.sort.updated":"Recently active","board.sort.severity":"Severity","board.sort.status":"Status","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.","board.retry":"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.reopen_cta":"Still not fixed","detail.reopen_busy":"Reopening\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.reopen_failed":"Couldn\u2019t reopen the report. 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"},Xr={"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.sort":"Trier","board.sort.recent":"Plus r\xE9cents","board.sort.oldest":"Plus anciens","board.sort.updated":"Activit\xE9 r\xE9cente","board.sort.severity":"S\xE9v\xE9rit\xE9","board.sort.status":"Statut","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.","board.retry":"R\xE9essayer","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.reopen_cta":"Toujours pas r\xE9gl\xE9","detail.reopen_busy":"R\xE9ouverture\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.reopen_failed":"Impossible de rouvrir le rapport. 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"},Jr={fr:Xr};function Zr(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=Jr[t])!=null?r:null}function gt(e,t={}){var a;let r=(a=Zr(t.locale))!=null?a:{};return{...Yr,...r,...e}}Z();V();V();var Ht="mhosaic.boardView.";function Nt(e){try{let t=localStorage.getItem(Ht+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function Qt(e,t){try{localStorage.setItem(Ht+e,JSON.stringify(t))}catch(r){}}V();Z();Z();var uo=0;function o(e,t,r,a,n,i){t||(t={});var s,l,u=t;if("ref"in u)for(l in u={},t)l=="ref"?s=t[l]:u[l]=t[l];var c={type:e,props:u,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--uo,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)u[l]===void 0&&(u[l]=s[l]);return F.vnode&&F.vnode(c),c}function Ot({comment:e,strings:t}){let r=e.is_mine,a=!r&&e.author_source==="mcp",n=!r&&e.author_source==="system",i=a?"mcp":n?"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:fo(e.created_at)})]})}function fo(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var mo=["image/png","image/jpeg","image/webp"];function Wt(e){return mo.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function ue(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),a=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-a)}`}function tt(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 bo=3e4;function Ae({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal"}){var K,O,W;let[l,u]=q(null),[c,b]=q(null),[d,h]=q(""),[g,S]=q(!1),[k,v]=q(!1),[f,m]=q(!1),p=N(!0),x=async()=>{try{let z=await e.getReport(r,t);if(!p.current)return;u(z),b(null)}catch(z){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",z),!p.current)return;b("load_failed")}};$(()=>{p.current=!0,x();let z=setInterval(()=>{x()},bo);return()=>{p.current=!1,clearInterval(z)}},[r,t]);let E=async()=>{if(!(!d.trim()||g)){S(!0);try{let z=`${r}:${Date.now()}`,Q=await e.addComment(r,t,d.trim(),z);if(!p.current)return;h(""),u(G=>G&&{...G,comments:go(G.comments,Q)}),x()}catch(z){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",z),!p.current)return;b(a["detail.send_failed"])}finally{p.current&&S(!1)}}},P=async()=>{if(!(k||f)){v(!0);try{let z=await e.closeAsResolved(r,t);if(!p.current)return;u(z)}catch(z){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",z),!p.current)return;b(a["detail.close_failed"])}finally{p.current&&v(!1)}}},w=async()=>{if(!(k||f)){m(!0);try{let z=await e.reopenUnresolved(r,t);if(!p.current)return;u(z)}catch(z){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",z),!p.current)return;b(a["detail.reopen_failed"])}finally{p.current&&m(!1)}}};if(!l&&!c)return o("div",{class:"mine-loading",children:a["mine.loading"]});if(!l)return o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:a["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:a["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]});let A=(K=l.is_mine)!=null?K:i,T=A&&l.status==="awaiting_validation",M=A;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:n,children:["\u2190 ",a["detail.back"]]}),o("span",{class:`pill pill-status pill-status--${l.status}`,children:(O=a[`status.${l.status}`])!=null?O: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:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),o("span",{class:`pill pill-status pill-status--${l.status}`,children:(W=a[`status.${l.status}`])!=null?W:l.status})]}),o("div",{class:"report-detail-body",children:[o(ho,{detail:l,strings:a}),o("p",{class:"report-detail-description",children:l.description}),l.screenshot_url&&(()=>{let z=tt(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:a["detail.thread"]}),l.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:l.comments.map(z=>o("li",{children:o(Ot,{comment:z,strings:a})}))}),l.status_history&&l.status_history.length>0&&o(Ro,{rows:l.status_history,strings:a}),l.technical_context&&o(_o,{ctx:l.technical_context,strings:a}),M?o("div",{class:"report-compose",children:[o("textarea",{value:d,placeholder:a["detail.compose_placeholder"],onInput:z=>h(z.target.value),disabled:g}),o("div",{class:"report-compose-actions",children:[T&&o("button",{type:"button",class:"btn",onClick:P,disabled:k||f,children:k?a["detail.close_busy"]:a["detail.close_cta"]}),T&&o("button",{type:"button",class:"btn btn--ghost",onClick:w,disabled:k||f,children:f?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:E,disabled:!d.trim()||g,children:g?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),c&&o("div",{class:"error",children:c})]})]})}function go(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function ho({detail:e,strings:t}){var n;let r=`detail.context.capture.${e.capture_method}`,a=(n=t[r])!=null?n: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:a})]}),o("div",{class:"report-detail-context-line",children:[o("span",{class:"report-detail-context-label",children:t["detail.context.submitted_at"]}),o("span",{children:jt(e.created_at)})]}),e.page_url&&(()=>{let i=tt(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:ue(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:ue(e.page_url,64)})]})})()]})}function jt(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var vo=20,yo=15;function _o({ctx:e,strings:t}){var c,b,d;let r=(c=e.errors)!=null?c:[],a=((b=e.consoleLogs)!=null?b:[]).slice(-vo),n=((d=e.networkRequests)!=null?d:[]).slice(-yo),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,u=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:u}),o("div",{class:"tech-body",children:[i&&o(xo,{device:i,strings:t}),r.length>0&&o(wo,{errors:r,strings:t}),a.length>0&&o(ko,{logs:a,strings:t}),n.length>0&&o(So,{rows:n,strings:t})]})]})}function xo({device:e,strings:t}){let r=[];if(e!=null&&e.viewport){let a=e.viewport.dpr?` @${e.viewport.dpr}x`:"";r.push({label:t["detail.tech.device.viewport"],value:`${e.viewport.w}\xD7${e.viewport.h}${a}`})}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(a=>o(U,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function wo({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:Co(r.stack)})]}))})]})}function ko({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 So({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 a=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${a?" 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:ue(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Co(e){let t=e.split(`
|
|
618
|
+
`))}e.push(c)}catch(l){}n.apply(console,s)})}return()=>{for(let[a,n]of Object.entries(r))console[a]=n}}function pt(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(n,i){let s=performance.now(),l=typeof n=="string"?n:n instanceof URL?n.toString():n.url,u=((i==null?void 0:i.method)||(n instanceof Request?n.method:"GET")).toUpperCase();try{let c=await r(n,i);return e.push({url:t(l),method:u,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:u,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:G(b)}),c}},()=>{window.fetch=r}}function ut(e,t){if(typeof window=="undefined"||typeof window.XMLHttpRequest!="function")return()=>{};let r=window.XMLHttpRequest,a=r.prototype.open,n=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()},a.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){}}),n.call(this,s!=null?s:null)},()=>{r.prototype.open=a,r.prototype.send=n}}function ft(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?G(n):void 0;e.push({message:G(a.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=a=>{let n=a.reason,i=n instanceof Error?n.message:typeof n=="string"?n:(()=>{try{return JSON.stringify(n)}catch(u){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?G(s):void 0;e.push({message:G(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 mt(e=1e3){let t=[],r=[],a=null;if(typeof PerformanceObserver!="undefined")try{a=new PerformanceObserver(n=>{for(let i of n.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:ne(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),a.observe({entryTypes:["longtask","resource"]})}catch(n){}return{snapshot(){let n=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=n?{type:n.type,duration:n.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){a==null||a.disconnect()}}}var le=class{constructor(t){Ne(this,"max",t);Ne(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 bt(e={}){var h;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(h=e.sanitizeUrl)!=null?h:ne,i=new le(t),s=new le(r),l=new le(a),u=dt(i),c=pt(s,n),b=ut(s,n),d=ft(l),g=mt();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:ct(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){u(),c(),b(),d(),g.dispose()}}}var Yr={"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.sort":"Sort","board.sort.recent":"Newest first","board.sort.oldest":"Oldest first","board.sort.updated":"Recently active","board.sort.severity":"Severity","board.sort.status":"Status","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.","board.retry":"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.reopen_cta":"Still not fixed","detail.reopen_busy":"Reopening\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.reopen_failed":"Couldn\u2019t reopen the report. 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"},Xr={"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.sort":"Trier","board.sort.recent":"Plus r\xE9cents","board.sort.oldest":"Plus anciens","board.sort.updated":"Activit\xE9 r\xE9cente","board.sort.severity":"S\xE9v\xE9rit\xE9","board.sort.status":"Statut","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.","board.retry":"R\xE9essayer","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.reopen_cta":"Toujours pas r\xE9gl\xE9","detail.reopen_busy":"R\xE9ouverture\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.reopen_failed":"Impossible de rouvrir le rapport. 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"},Jr={fr:Xr};function Zr(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=Jr[t])!=null?r:null}function gt(e,t={}){var a;let r=(a=Zr(t.locale))!=null?a:{};return{...Yr,...r,...e}}Z();V();V();var Kt="mhosaic.boardView.";function Nt(e){try{let t=localStorage.getItem(Kt+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function Qt(e,t){try{localStorage.setItem(Kt+e,JSON.stringify(t))}catch(r){}}V();Z();Z();var uo=0;function o(e,t,r,a,n,i){t||(t={});var s,l,u=t;if("ref"in u)for(l in u={},t)l=="ref"?s=t[l]:u[l]=t[l];var c={type:e,props:u,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--uo,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)u[l]===void 0&&(u[l]=s[l]);return I.vnode&&I.vnode(c),c}function Ot({comment:e,strings:t}){let r=e.is_mine,a=!r&&e.author_source==="mcp",n=!r&&e.author_source==="system",i=a?"mcp":n?"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:fo(e.created_at)})]})}function fo(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var mo=["image/png","image/jpeg","image/webp"];function Wt(e){return mo.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function ue(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),a=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-a)}`}function tt(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 bo=3e4;function Ae({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal"}){var D,N,O;let[l,u]=q(null),[c,b]=q(null),[d,g]=q(""),[h,S]=q(!1),[k,v]=q(!1),[f,m]=q(!1),p=Q(!0),x=async()=>{try{let M=await e.getReport(r,t);if(!p.current)return;u(M),b(null)}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",M),!p.current)return;b("load_failed")}};$(()=>{p.current=!0,x();let M=setInterval(()=>{x()},bo);return()=>{p.current=!1,clearInterval(M)}},[r,t]);let E=async()=>{if(!(!d.trim()||h)){S(!0);try{let M=`${r}:${Date.now()}`,X=await e.addComment(r,t,d.trim(),M);if(!p.current)return;g(""),u(W=>W&&{...W,comments:go(W.comments,X)}),x()}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",M),!p.current)return;b(a["detail.send_failed"])}finally{p.current&&S(!1)}}},T=async()=>{if(!(k||f)){v(!0);try{let M=await e.closeAsResolved(r,t);if(!p.current)return;u(M)}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",M),!p.current)return;b(a["detail.close_failed"])}finally{p.current&&v(!1)}}},w=async()=>{if(!(k||f)){m(!0);try{let M=await e.reopenUnresolved(r,t);if(!p.current)return;u(M)}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",M),!p.current)return;b(a["detail.reopen_failed"])}finally{p.current&&m(!1)}}};if(!l&&!c)return o("div",{class:"mine-loading",children:a["mine.loading"]});if(!l)return o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:a["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:a["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]});let F=(D=l.is_mine)!=null?D:i,P=F&&l.status==="awaiting_validation",L=F;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:n,children:["\u2190 ",a["detail.back"]]}),o("span",{class:`pill pill-status pill-status--${l.status}`,children:(N=a[`status.${l.status}`])!=null?N: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:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),o("span",{class:`pill pill-status pill-status--${l.status}`,children:(O=a[`status.${l.status}`])!=null?O:l.status})]}),o("div",{class:"report-detail-body",children:[o(ho,{detail:l,strings:a}),o("p",{class:"report-detail-description",children:l.description}),l.screenshot_url&&(()=>{let M=tt(l.screenshot_url);return M?o("a",{class:"report-detail-screenshot",href:M,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:a["detail.thread"]}),l.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:l.comments.map(M=>o("li",{children:o(Ot,{comment:M,strings:a})}))}),l.status_history&&l.status_history.length>0&&o(Ro,{rows:l.status_history,strings:a}),l.technical_context&&o(_o,{ctx:l.technical_context,strings:a}),L?o("div",{class:"report-compose",children:[o("textarea",{value:d,placeholder:a["detail.compose_placeholder"],onInput:M=>g(M.target.value),disabled:h}),o("div",{class:"report-compose-actions",children:[P&&o("button",{type:"button",class:"btn",onClick:T,disabled:k||f,children:k?a["detail.close_busy"]:a["detail.close_cta"]}),P&&o("button",{type:"button",class:"btn btn--ghost",onClick:w,disabled:k||f,children:f?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:E,disabled:!d.trim()||h,children:h?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),c&&o("div",{class:"error",children:c})]})]})}function go(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function ho({detail:e,strings:t}){var n;let r=`detail.context.capture.${e.capture_method}`,a=(n=t[r])!=null?n: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:a})]}),o("div",{class:"report-detail-context-line",children:[o("span",{class:"report-detail-context-label",children:t["detail.context.submitted_at"]}),o("span",{children:jt(e.created_at)})]}),e.page_url&&(()=>{let i=tt(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:ue(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:ue(e.page_url,64)})]})})()]})}function jt(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var vo=20,yo=15;function _o({ctx:e,strings:t}){var c,b,d;let r=(c=e.errors)!=null?c:[],a=((b=e.consoleLogs)!=null?b:[]).slice(-vo),n=((d=e.networkRequests)!=null?d:[]).slice(-yo),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,u=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:u}),o("div",{class:"tech-body",children:[i&&o(xo,{device:i,strings:t}),r.length>0&&o(wo,{errors:r,strings:t}),a.length>0&&o(ko,{logs:a,strings:t}),n.length>0&&o(So,{rows:n,strings:t})]})]})}function xo({device:e,strings:t}){let r=[];if(e!=null&&e.viewport){let a=e.viewport.dpr?` @${e.viewport.dpr}x`:"";r.push({label:t["detail.tech.device.viewport"],value:`${e.viewport.w}\xD7${e.viewport.h}${a}`})}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(a=>o(U,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function wo({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:Co(r.stack)})]}))})]})}function ko({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 So({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 a=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${a?" 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:ue(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Co(e){let t=e.split(`
|
|
598
619
|
`);return t.length<=12?e:t.slice(0,12).join(`
|
|
599
620
|
`)+`
|
|
600
|
-
\u2026`}function Ro({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 a=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,n=(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:jt(r.created_at)}),o("span",{class:"status-history-transition",children:[o("span",{class:`pill pill-status pill-status--${r.from_status}`,children:a}),o("span",{class:"status-history-arrow","aria-hidden":"true",children:"\u2192"}),o("span",{class:`pill pill-status pill-status--${r.to_status}`,children:n})]}),o("span",{class:`status-history-source status-history-source--${r.changed_by_source}`,children:t[i]})]})})})]})}var qo=3e4,Eo=["recent","oldest","updated","severity","status"],To=["new","in_progress","awaiting_validation","closed","rejected"],Po=["bug","feature","question","praise","typo"],Mo=["blocker","high","medium","low"];function Vt({api:e,externalId:t,strings:r}){let[a,n]=q(()=>Nt(t));$(()=>{Qt(t,a)},[t,Ut(a)]);let[i,s]=q(null),[l,u]=q(null),[c,b]=q(!0),[d,h]=q(null),[g,S]=q(null),[k,v]=q(0),[f,m]=q(0),p=X(()=>{var P,w,A,T,M,K;return((w=(P=a.status)==null?void 0:P.length)!=null?w:0)+((T=(A=a.type)==null?void 0:A.length)!=null?T:0)+((K=(M=a.severity)==null?void 0:M.length)!=null?K:0)+(a.q?1:0)+(a.mine?1:0)},[a]);$(()=>{let P=!1,w=null,A=async()=>{try{let[T,M]=await Promise.all([e.listBoard(t,a),e.fetchBoardKpis(t,a)]);if(P)return;s(T),u(M),h(null)}catch(T){if(P)return;h(T instanceof Error?T.message:String(T))}finally{P||b(!1),P||(w=setTimeout(A,qo))}};return b(!0),A(),()=>{P=!0,w&&clearTimeout(w)}},[e,t,Ut(a),f]);let x=X(()=>{var P;return!g||!i?null:(P=i.results.find(w=>w.id===g))!=null?P:null},[g,i]),E=P=>{S(P.id),v(w=>w+1)};return o("div",{class:"board-view",children:[o(Ao,{strings:r,kpis:l}),o(Lo,{filters:a,onChange:n,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",role:"alert",children:[o("span",{children:r["board.list.error"]}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{h(null),b(!0),m(P=>P+1)},children:r["board.retry"]})]}),!d&&c&&!i&&o($o,{}),!d&&i&&i.results.length===0&&!c&&o(Io,{strings:r}),!d&&i&&i.results.length>0&&o(Bo,{rows:i.results,selectedId:g,onPick:E,strings:r,total:i.count})]}),o("div",{class:`board-detail-wrap ${x?"has-selection":""}`,children:x?o(Ae,{api:e,externalId:t,reportId:x.id,strings:r,onBack:()=>S(null),canModerate:x.is_mine,variant:"board"},k):o("div",{class:"board-detail-empty",children:[o(No,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Ao({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(zo,{kpis:t,strings:e})]})}function zo({kpis:e,strings:t}){var a,n,i,s,l,u;let r=[{key:"new",label:t["board.kpi.new"],value:String((n=(a=e==null?void 0:e.by_status)==null?void 0:a.new)!=null?n: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((u=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?u: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 Lo({filters:e,onChange:t,activeCount:r,strings:a}){var d,h,g,S,k,v,f,m;let n=p=>{if(p===""){let{status:x,...E}=e;t(E)}else t({...e,status:[p]})},i=p=>{if(p===""){let{type:x,...E}=e;t(E)}else t({...e,type:[p]})},s=p=>{if(p===""){let{severity:x,...E}=e;t(E)}else t({...e,severity:[p]})},l=p=>t({...e,ordering:p}),u=p=>t({...e,q:p}),c=()=>{if(e.mine){let{mine:p,...x}=e;t(x)}else t({...e,mine:!0})},b=()=>t({});return o("div",{class:"board-filters",children:[o("select",{class:"board-filter-select","aria-label":a["board.sort"],value:(d=e.ordering)!=null?d:"recent",onChange:p=>l(p.target.value),children:Eo.map(p=>o("option",{value:p,children:a[`board.sort.${p}`]},p))}),o("select",{class:"board-filter-select","aria-label":a["board.filter.status"],value:(g=(h=e.status)==null?void 0:h[0])!=null?g:"",onChange:p=>n(p.target.value),children:[o("option",{value:"",children:a["board.filter.status"]}),To.map(p=>{var x;return o("option",{value:p,children:(x=a[`board.kpi.${p}`])!=null?x:p},p)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.type"],value:(k=(S=e.type)==null?void 0:S[0])!=null?k:"",onChange:p=>i(p.target.value),children:[o("option",{value:"",children:a["board.filter.type"]}),Po.map(p=>{var x;return o("option",{value:p,children:(x=a[`type.${p}`])!=null?x:p},p)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.severity"],value:(f=(v=e.severity)==null?void 0:v[0])!=null?f:"",onChange:p=>s(p.target.value),children:[o("option",{value:"",children:a["board.filter.severity"]}),Mo.map(p=>{var x;return o("option",{value:p,children:(x=a[`severity.${p}`])!=null?x:p},p)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:a["board.filter.search.placeholder"],value:(m=e.q)!=null?m:"",onInput:p=>u(p.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:c}),o("span",{children:a["board.filter.mine"]})]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:b,children:[o(Ko,{}),a["board.filter.clear"]]})]})}function Bo({rows:e,selectedId:t,onPick:r,strings:a,total:n}){return o(U,{children:[o("div",{class:"board-list-count",children:a["board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(n))}),o("ul",{class:"board-list",role:"list",children:e.map(i=>o(Fo,{row:i,selected:i.id===t,onPick:r,strings:a},i.id))})]})}function Fo({row:e,selected:t,onPick:r,strings:a}){var i,s;let n=e.is_mine?a["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=a[`status.${e.status}`])!=null?i:e.status}),o("span",{class:`badge severity-${e.severity}`,children:(s=a[`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:n}),e.comment_count>0&&o("span",{class:"board-row-comments",children:[o(Do,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Qo(e.created_at)})]})]})})}function Io({strings:e}){return o("div",{class:"board-empty",children:[o(Ho,{}),o("h3",{children:e["board.list.empty.title"]}),o("p",{children:e["board.list.empty.description"]})]})}function $o(){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 Do(){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 Ko(){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 Ho(){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 No(){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 Ut(e){var t,r,a,n,i;return JSON.stringify({s:(t=e.status)==null?void 0:t.slice().sort(),t:(r=e.type)==null?void 0:r.slice().sort(),sv:(a=e.severity)==null?void 0:a.slice().sort(),q:(n=e.q)!=null?n:"",m:!!e.mine,o:(i=e.ordering)!=null?i:""})}function Qo(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Math.max(0,Date.now()-t),a=Math.floor(r/6e4);if(a<1)return"just now";if(a<60)return`${a}m`;let n=Math.floor(a/60);if(n<24)return`${n}h`;let i=Math.floor(n/24);return i<7?`${i}d`:`${Math.floor(i/7)}w`}V();function Oo(e){return`pill pill-status pill-status--${e}`}function Wo(e){return`pill pill-severity pill-severity--${e}`}function jo(){return"pill pill-type"}function Uo(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 a=Math.round(r/60);if(a<60)return`${a}m`;let n=Math.round(a/60);return n<48?`${n}h`:`${Math.round(n/24)}d`}function Vo(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function ze({row:e,strings:t,onClick:r}){var n;let a=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:Oo(e.status),children:(n=t[`status.${e.status}`])!=null?n:e.status}),o("span",{class:jo(),children:t[`type.${e.feedback_type}`]}),o("span",{class:Wo(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:a}),o("div",{class:"mine-row-meta",children:[o("span",{children:Uo(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",Vo(e.comment_count,t)]})]})]})}var Go=3e4;function Yo(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 Xo(e){let t=new Map;for(let r of e){let a=Yo(r.resolved_at);if(!a)continue;let n=t.get(a);n?n.push(r):t.set(a,[r])}return Array.from(t.entries()).sort(([r],[a])=>r<a?1:-1).map(([r,a])=>({weekKey:r,label:Jo(r),rows:a}))}function Jo(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Gt({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=q(null),[s,l]=q(null),[u,c]=q(!1),b=N(!0),d=async()=>{c(!0),l(null);try{let k=await e.listChangelog(t);if(!b.current)return;i(k)}catch(k){if(typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",k),!b.current)return;l(r["mine.error"])}finally{b.current&&c(!1)}};$(()=>{b.current=!0,d();let k=setInterval(()=>{d()},Go);return()=>{b.current=!1,clearInterval(k)}},[t]);let h=X(()=>n?Xo(n):[],[n]),g=n===null&&!s,S=n!==null&&n.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:u,children:u?r["mine.loading"]:r["mine.refresh"]})]}),g&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),S&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),h.length>0&&o("div",{class:"changelog-groups",children:h.map(k=>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}",k.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[k.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(k.rows.length))})]}),o("ul",{class:"mine-rows",children:k.rows.map(v=>o("li",{children:o(ze,{row:v,strings:r,onClick:()=>a(v)})}))})]},k.weekKey))})]})}function Zo(){return o("svg",{width:"20",height:"20",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 Yt({label:e,onClick:t}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:o(Zo,{})})}V();V();var Xt=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],ea=.35;function Jt(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")ta(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 a=1;a<t.points.length;a++)e.lineTo(t.points[a].x,t.points[a].y);e.stroke()}else if(t.kind==="text"){e.font=`bold ${t.fontSize}px -apple-system, BlinkMacSystemFont, sans-serif`,e.textBaseline="top";let a=e.measureText(t.text),n=4,i=a.width+n*2,s=t.fontSize+n*2;e.fillStyle="rgba(0, 0, 0, 0.6)",e.fillRect(t.x-n,t.y-n,i,s),e.fillStyle=t.color,e.fillText(t.text,t.x,t.y)}else t.kind==="highlight"?(e.globalAlpha=ea,e.fillRect(Le(t.x,t.w),Le(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&ra(e,t,r);e.restore()}function Le(e,t){return t<0?e+t:e}function ta(e,t,r,a,n){let s=Math.atan2(n-r,a-t);e.beginPath(),e.moveTo(t,r),e.lineTo(a,n),e.stroke(),e.beginPath(),e.moveTo(a,n),e.lineTo(a-14*Math.cos(s-Math.PI/6),n-14*Math.sin(s-Math.PI/6)),e.lineTo(a-14*Math.cos(s+Math.PI/6),n-14*Math.sin(s+Math.PI/6)),e.closePath(),e.fill()}function ra(e,t,r){if(!r)return;let a=Le(t.x,t.w),n=Le(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 u=n;u<n+s;u+=l)for(let c=a;c<a+i;c+=l){let b=Math.min(l,a+i-c),d=Math.min(l,n+s-u);e.drawImage(r,c,u,b,d,c,u,b,d)}e.imageSmoothingEnabled=!1;for(let u=n;u<n+s;u+=l)for(let c=a;c<a+i;c+=l){let b=Math.min(l,a+i-c),d=Math.min(l,n+s-u);e.drawImage(r,c,u,1,1,c,u,b,d)}e.imageSmoothingEnabled=!0}var ee={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 Zt({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=N(null),i=N(null),s=N(null),[l,u]=q("rectangle"),[c,b]=q(Xt[0]),[d,h]=q([]),[g,S]=q([]),[k,v]=q([]),f=N(!1),[m,p]=q(null),[x,E]=q(!1),[P,w]=q(!1),A=N(1);function T(_){h(R=>(S(L=>[...L,R]),[...R,_])),v([])}function M(){h(_=>(S(R=>[...R,_]),[])),v([])}function K(){S(_=>{if(_.length===0)return _;let R=_[_.length-1];return h(L=>(v(B=>[L,...B]),R)),_.slice(0,-1)})}function O(){v(_=>{if(_.length===0)return _;let R=_[0];return h(L=>(S(B=>[...B,L]),R)),_.slice(1)})}Ze(()=>{let _=R=>{R.key==="Escape"&&(R.stopPropagation(),a())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[a]),$(()=>{let _=R=>{if(!(R.metaKey||R.ctrlKey))return;let B=R.key.toLowerCase();B==="z"?(R.preventDefault(),R.stopPropagation(),R.shiftKey?O():K()):B==="y"&&(R.preventDefault(),R.stopPropagation(),O())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[g,k,d]),$(()=>{let _=URL.createObjectURL(e),R=new Image;return R.onload=()=>{s.current=R,E(!0)},R.src=_,()=>URL.revokeObjectURL(_)},[e]),Ze(()=>{if(!x||!n.current||!s.current||!i.current)return;let _=s.current,L=i.current.clientWidth-16,B=window.innerHeight*.65,J=Math.min(L/_.width,B/_.height,1);A.current=J;let se=n.current;se.width=_.width,se.height=_.height,se.style.width=`${_.width*J}px`,se.style.height=`${_.height*J}px`,W()},[x]),$(()=>{W()},[d,m]);function W(){let _=n.current,R=s.current;if(!_||!R)return;let L=_.getContext("2d");if(L){L.clearRect(0,0,_.width,_.height),L.drawImage(R,0,0);for(let B of d)Jt(L,B,R);m&&Jt(L,m,R)}}function z(_){let L=n.current.getBoundingClientRect();return{x:(_.clientX-L.left)/A.current,y:(_.clientY-L.top)/A.current}}let Q=_=>{if(!x)return;let{x:R,y:L}=z(_),B=n.current.width,J=Math.max(3,Math.round(B/400)),se=Math.max(8,Math.round(B/80));if(l==="text"){let He=window.prompt(t["annotator.text_prompt"]);He&&He.trim()&&T({kind:"text",x:R,y:L,text:He.trim(),color:c,fontSize:Math.max(16,Math.round(B/50)),lineWidth:1});return}f.current=!0,l==="rectangle"?p({kind:"rectangle",x:R,y:L,w:0,h:0,color:c,lineWidth:J}):l==="arrow"?p({kind:"arrow",x1:R,y1:L,x2:R,y2:L,color:c,lineWidth:J}):l==="freehand"?p({kind:"freehand",points:[{x:R,y:L}],color:c,lineWidth:J}):l==="highlight"?p({kind:"highlight",x:R,y:L,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&p({kind:"blur",x:R,y:L,w:0,h:0,color:"#000000",lineWidth:0,tile:se})},G=_=>{if(!f.current)return;let{x:R,y:L}=z(_);p(B=>B&&(B.kind==="rectangle"||B.kind==="highlight"||B.kind==="blur"?{...B,w:R-B.x,h:L-B.y}:B.kind==="arrow"?{...B,x2:R,y2:L}:B.kind==="freehand"?{...B,points:[...B.points,{x:R,y:L}]}:B))},ie=()=>{p(_=>(f.current&&_&&((_.kind==="rectangle"||_.kind==="highlight"||_.kind==="blur")&&Math.abs(_.w)<4&&Math.abs(_.h)<4||_.kind==="arrow"&&Math.hypot(_.x2-_.x1,_.y2-_.y1)<4||_.kind==="freehand"&&_.points.length<3||T(_)),null)),f.current=!1},C=async()=>{let _=n.current;if(_){w(!0);try{let R=await new Promise(L=>_.toBlob(L,"image/png",.92));R&&r(R)}finally{w(!1)}}},I=[{id:"rectangle",icon:ee.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:ee.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:ee.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:ee.text,label:t["annotator.tool.text"]},{id:"highlight",icon:ee.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:ee.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:_=>{_.target===_.currentTarget&&a()},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:a,children:ee.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:I.map(_=>o("button",{type:"button",onClick:()=>u(_.id),title:_.label,"aria-label":_.label,"aria-pressed":l===_.id,class:`annotator-tool ${l===_.id?"is-active":""}`,children:_.icon},_.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Xt.map(_=>o("button",{type:"button",onClick:()=>b(_),"aria-label":_,"aria-pressed":c===_,class:`annotator-color ${c===_?"is-active":""}`,style:{backgroundColor:_}},_)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:_=>b(_.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:K,disabled:g.length===0,title:t["annotator.undo"],children:[ee.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:O,disabled:k.length===0,title:t["annotator.redo"],children:[ee.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:M,disabled:d.length===0,children:[ee.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:x?o("canvas",{ref:n,onMouseDown:Q,onMouseMove:G,onMouseUp:ie,onMouseLeave:ie,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:a,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:C,disabled:P||!x,children:P?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var oa=["bug","feature","question","praise","typo"],aa=["blocker","high","medium","low"];function er({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n}){let[i,s]=q(""),[l,u]=q("bug"),[c,b]=q("medium"),[d,h]=q(""),[g,S]=q(null),[k,v]=q(null),[f,m]=q(!1),[p,x]=q(!1),E=N(null),P=N(null),w=a==="submitting",A=w?e["form.submitting"]:e["form.submit"],T=typeof window!="undefined"?window.location.href:"";$(()=>()=>{k&&URL.revokeObjectURL(k)},[k]);let M=C=>{if(h(""),C instanceof File){let I=Wt(C);if(I){h(I.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(I.maxMb)));return}}k&&URL.revokeObjectURL(k),S(C),v(URL.createObjectURL(C))},K=()=>{k&&URL.revokeObjectURL(k),v(null),S(null),h(""),E.current&&(E.current.value="")},O=C=>{var _;let I=(_=C.target.files)==null?void 0:_[0];I&&M(I)},W=C=>{C.preventDefault(),C.stopPropagation(),m(!0)},z=C=>{C.preventDefault(),C.stopPropagation(),C.currentTarget===C.target&&m(!1)},Q=C=>{var _,R;C.preventDefault(),C.stopPropagation(),m(!1);let I=(R=(_=C.dataTransfer)==null?void 0:_.files)==null?void 0:R[0];I&&M(I)};$(()=>{let C=P.current;if(!C)return;let I=_=>{var L;let R=(L=_.clipboardData)==null?void 0:L.items;if(R){for(let B of Array.from(R))if(B.kind==="file"&&B.type.startsWith("image/")){let J=B.getAsFile();if(J){_.preventDefault(),M(J);return}}}};return C.addEventListener("paste",I),()=>C.removeEventListener("paste",I)},[k]);let G=C=>{k&&URL.revokeObjectURL(k),S(C),v(URL.createObjectURL(C)),x(!1)};return o("form",{onSubmit:C=>{if(C.preventDefault(),!i.trim()){h(e["form.description.required"]);return}h("");let I={description:i.trim(),feedback_type:l,severity:c};g&&(I.screenshot=g,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:C=>s(C.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:C=>u(C.target.value),children:oa.map(C=>o("option",{value:C,children:e[`type.${C}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:c,onChange:C=>b(C.target.value),children:aa.map(C=>o("option",{value:C,children:e[`severity.${C}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:E,type:"file",accept:"image/png,image/jpeg,image/webp",class:"mfb-sr-only",onChange:O,"aria-hidden":"true",tabIndex:-1}),k?o("div",{class:"screenshot-preview",children:[o("img",{src:k,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>x(!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:K,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:P,class:`screenshot-dropzone ${f?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var C;return(C=E.current)==null?void 0:C.click()},onKeyDown:C=>{var I;(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),(I=E.current)==null||I.click())},onDragOver:W,onDragLeave:z,onDrop:Q,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"]})]})]}),T&&o("div",{class:"page-context",title:T,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:ue(T,90)})]}),d&&o("div",{class:"error",children:d}),a==="error"&&n&&o("div",{class:"error",children:n}),a==="success"&&o("div",{class:"success",children:e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:w,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:w,children:A})]}),p&&g&&o(Zt,{imageBlob:g,strings:e,onCancel:()=>x(!1),onSave:G})]})}V();function na(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 ia(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var sa={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function tr(e,t){return t==="all"?e:e.filter(r=>sa[r.status]===t)}function rr({rows:e,filter:t,onFilter:r,strings:a}){let n=na(e),i=ia(n),s=[{key:"new",label:a["kpi.new"],value:String(n.new)},{key:"in_progress",label:a["kpi.in_progress"],value:String(n.in_progress)},{key:"awaiting_validation",label:a["kpi.awaiting_validation"],value:String(n.awaiting_validation)},{key:"resolved",label:a["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(l=>{let u=t===l.key,c=u?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${u?" is-active":""}`,onClick:()=>r(c),"aria-pressed":u,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var la=3e4;function or({api:e,externalId:t,strings:r,onSelect:a}){var m;let[n,i]=q(null),[s,l]=q(null),[u,c]=q(!1),[b,d]=q("all"),h=N(!0),g=async()=>{c(!0),l(null);try{let p=await e.listMine(t);if(!h.current)return;i(p)}catch(p){if(typeof console!="undefined"&&console.warn("[mhosaic] listMine:",p),!h.current)return;l(r["mine.error"])}finally{h.current&&c(!1)}};$(()=>{h.current=!0,g();let p=setInterval(()=>{g()},la);return()=>{h.current=!1,clearInterval(p)}},[t]);let S=n!==null&&n.length===0,k=n===null&&!s,v=n?tr(n,b):null,f=!!n&&n.length>0&&((m=v==null?void 0:v.length)!=null?m: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:()=>{g()},disabled:u,children:u?r["mine.loading"]:r["mine.refresh"]})]}),n&&n.length>0&&o(rr,{rows:n,filter:b,onFilter:d,strings:r}),k&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),S&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),f&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),v&&v.length>0&&o("ul",{class:"mine-rows",children:v.map(p=>o("li",{children:o(ze,{row:p,strings:r,onClick:()=>a(p)})}))})]})}V();function ar({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=N(null),i=N(null);return $(()=>{var u;i.current=document.activeElement;let s=c=>{var d;if(c.key!=="Escape")return;let b=(d=n.current)==null?void 0:d.getRootNode();b instanceof ShadowRoot&&b.querySelector(".annotator-backdrop")||(c.stopPropagation(),e())};window.addEventListener("keydown",s);let l=(u=n.current)==null?void 0:u.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 ${a?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e()},children:o("div",{ref:n,class:`modal ${a?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:e,children:"\xD7"}),t]})})}var nr=`
|
|
621
|
+
\u2026`}function Ro({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 a=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,n=(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:jt(r.created_at)}),o("span",{class:"status-history-transition",children:[o("span",{class:`pill pill-status pill-status--${r.from_status}`,children:a}),o("span",{class:"status-history-arrow","aria-hidden":"true",children:"\u2192"}),o("span",{class:`pill pill-status pill-status--${r.to_status}`,children:n})]}),o("span",{class:`status-history-source status-history-source--${r.changed_by_source}`,children:t[i]})]})})})]})}var qo=3e4,Eo=["recent","oldest","updated","severity","status"],To=["new","in_progress","awaiting_validation","closed","rejected"],Po=["bug","feature","question","praise","typo"],Mo=["blocker","high","medium","low"];function Vt({api:e,externalId:t,strings:r}){let[a,n]=q(()=>Nt(t));$(()=>{Qt(t,a)},[t,Ut(a)]);let[i,s]=q(null),[l,u]=q(null),[c,b]=q(!0),[d,g]=q(null),[h,S]=q(null),[k,v]=q(0),[f,m]=q(0),p=Y(()=>{var T,w,F,P,L,D;return((w=(T=a.status)==null?void 0:T.length)!=null?w:0)+((P=(F=a.type)==null?void 0:F.length)!=null?P:0)+((D=(L=a.severity)==null?void 0:L.length)!=null?D:0)+(a.q?1:0)+(a.mine?1:0)},[a]);$(()=>{let T=!1,w=null,F=async()=>{try{let[P,L]=await Promise.all([e.listBoard(t,a),e.fetchBoardKpis(t,a)]);if(T)return;s(P),u(L),g(null)}catch(P){if(T)return;g(P instanceof Error?P.message:String(P))}finally{T||b(!1),T||(w=setTimeout(F,qo))}};return b(!0),F(),()=>{T=!0,w&&clearTimeout(w)}},[e,t,Ut(a),f]);let x=Y(()=>{var T;return!h||!i?null:(T=i.results.find(w=>w.id===h))!=null?T:null},[h,i]),E=T=>{S(T.id),v(w=>w+1)};return o("div",{class:"board-view",children:[o(Ao,{strings:r,kpis:l}),o(Lo,{filters:a,onChange:n,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",role:"alert",children:[o("span",{children:r["board.list.error"]}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{g(null),b(!0),m(T=>T+1)},children:r["board.retry"]})]}),!d&&c&&!i&&o($o,{}),!d&&i&&i.results.length===0&&!c&&o(Io,{strings:r}),!d&&i&&i.results.length>0&&o(Bo,{rows:i.results,selectedId:h,onPick:E,strings:r,total:i.count})]}),o("div",{class:`board-detail-wrap ${x?"has-selection":""}`,children:x?o(Ae,{api:e,externalId:t,reportId:x.id,strings:r,onBack:()=>S(null),canModerate:x.is_mine,variant:"board"},k):o("div",{class:"board-detail-empty",children:[o(No,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Ao({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(zo,{kpis:t,strings:e})]})}function zo({kpis:e,strings:t}){var a,n,i,s,l,u;let r=[{key:"new",label:t["board.kpi.new"],value:String((n=(a=e==null?void 0:e.by_status)==null?void 0:a.new)!=null?n: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((u=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?u: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 Lo({filters:e,onChange:t,activeCount:r,strings:a}){var d,g,h,S,k,v,f,m;let n=p=>{if(p===""){let{status:x,...E}=e;t(E)}else t({...e,status:[p]})},i=p=>{if(p===""){let{type:x,...E}=e;t(E)}else t({...e,type:[p]})},s=p=>{if(p===""){let{severity:x,...E}=e;t(E)}else t({...e,severity:[p]})},l=p=>t({...e,ordering:p}),u=p=>t({...e,q:p}),c=()=>{if(e.mine){let{mine:p,...x}=e;t(x)}else t({...e,mine:!0})},b=()=>t({});return o("div",{class:"board-filters",children:[o("select",{class:"board-filter-select","aria-label":a["board.sort"],value:(d=e.ordering)!=null?d:"recent",onChange:p=>l(p.target.value),children:Eo.map(p=>o("option",{value:p,children:a[`board.sort.${p}`]},p))}),o("select",{class:"board-filter-select","aria-label":a["board.filter.status"],value:(h=(g=e.status)==null?void 0:g[0])!=null?h:"",onChange:p=>n(p.target.value),children:[o("option",{value:"",children:a["board.filter.status"]}),To.map(p=>{var x;return o("option",{value:p,children:(x=a[`board.kpi.${p}`])!=null?x:p},p)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.type"],value:(k=(S=e.type)==null?void 0:S[0])!=null?k:"",onChange:p=>i(p.target.value),children:[o("option",{value:"",children:a["board.filter.type"]}),Po.map(p=>{var x;return o("option",{value:p,children:(x=a[`type.${p}`])!=null?x:p},p)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.severity"],value:(f=(v=e.severity)==null?void 0:v[0])!=null?f:"",onChange:p=>s(p.target.value),children:[o("option",{value:"",children:a["board.filter.severity"]}),Mo.map(p=>{var x;return o("option",{value:p,children:(x=a[`severity.${p}`])!=null?x:p},p)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:a["board.filter.search.placeholder"],value:(m=e.q)!=null?m:"",onInput:p=>u(p.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:c}),o("span",{children:a["board.filter.mine"]})]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:b,children:[o(Ho,{}),a["board.filter.clear"]]})]})}function Bo({rows:e,selectedId:t,onPick:r,strings:a,total:n}){return o(U,{children:[o("div",{class:"board-list-count",children:a["board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(n))}),o("ul",{class:"board-list",role:"list",children:e.map(i=>o(Fo,{row:i,selected:i.id===t,onPick:r,strings:a},i.id))})]})}function Fo({row:e,selected:t,onPick:r,strings:a}){var i,s;let n=e.is_mine?a["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=a[`status.${e.status}`])!=null?i:e.status}),o("span",{class:`badge severity-${e.severity}`,children:(s=a[`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:n}),e.comment_count>0&&o("span",{class:"board-row-comments",children:[o(Do,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Qo(e.created_at)})]})]})})}function Io({strings:e}){return o("div",{class:"board-empty",children:[o(Ko,{}),o("h3",{children:e["board.list.empty.title"]}),o("p",{children:e["board.list.empty.description"]})]})}function $o(){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 Do(){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 Ho(){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 Ko(){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 No(){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 Ut(e){var t,r,a,n,i;return JSON.stringify({s:(t=e.status)==null?void 0:t.slice().sort(),t:(r=e.type)==null?void 0:r.slice().sort(),sv:(a=e.severity)==null?void 0:a.slice().sort(),q:(n=e.q)!=null?n:"",m:!!e.mine,o:(i=e.ordering)!=null?i:""})}function Qo(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Math.max(0,Date.now()-t),a=Math.floor(r/6e4);if(a<1)return"just now";if(a<60)return`${a}m`;let n=Math.floor(a/60);if(n<24)return`${n}h`;let i=Math.floor(n/24);return i<7?`${i}d`:`${Math.floor(i/7)}w`}V();function Oo(e){return`pill pill-status pill-status--${e}`}function Wo(e){return`pill pill-severity pill-severity--${e}`}function jo(){return"pill pill-type"}function Uo(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 a=Math.round(r/60);if(a<60)return`${a}m`;let n=Math.round(a/60);return n<48?`${n}h`:`${Math.round(n/24)}d`}function Vo(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function ze({row:e,strings:t,onClick:r}){var n;let a=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:Oo(e.status),children:(n=t[`status.${e.status}`])!=null?n:e.status}),o("span",{class:jo(),children:t[`type.${e.feedback_type}`]}),o("span",{class:Wo(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:a}),o("div",{class:"mine-row-meta",children:[o("span",{children:Uo(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",Vo(e.comment_count,t)]})]})]})}var Go=3e4;function Yo(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 Xo(e){let t=new Map;for(let r of e){let a=Yo(r.resolved_at);if(!a)continue;let n=t.get(a);n?n.push(r):t.set(a,[r])}return Array.from(t.entries()).sort(([r],[a])=>r<a?1:-1).map(([r,a])=>({weekKey:r,label:Jo(r),rows:a}))}function Jo(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Gt({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=q(null),[s,l]=q(null),[u,c]=q(!1),b=Q(!0),d=async()=>{c(!0),l(null);try{let k=await e.listChangelog(t);if(!b.current)return;i(k)}catch(k){if(typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",k),!b.current)return;l(r["mine.error"])}finally{b.current&&c(!1)}};$(()=>{b.current=!0,d();let k=setInterval(()=>{d()},Go);return()=>{b.current=!1,clearInterval(k)}},[t]);let g=Y(()=>n?Xo(n):[],[n]),h=n===null&&!s,S=n!==null&&n.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:u,children:u?r["mine.loading"]:r["mine.refresh"]})]}),h&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),S&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),g.length>0&&o("div",{class:"changelog-groups",children:g.map(k=>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}",k.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[k.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(k.rows.length))})]}),o("ul",{class:"mine-rows",children:k.rows.map(v=>o("li",{children:o(ze,{row:v,strings:r,onClick:()=>a(v)})}))})]},k.weekKey))})]})}function Zo(){return o("svg",{width:"20",height:"20",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 Yt({label:e,onClick:t}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:o(Zo,{})})}V();V();var Xt=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],ea=.35;function Jt(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")ta(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 a=1;a<t.points.length;a++)e.lineTo(t.points[a].x,t.points[a].y);e.stroke()}else if(t.kind==="text"){e.font=`bold ${t.fontSize}px -apple-system, BlinkMacSystemFont, sans-serif`,e.textBaseline="top";let a=e.measureText(t.text),n=4,i=a.width+n*2,s=t.fontSize+n*2;e.fillStyle="rgba(0, 0, 0, 0.6)",e.fillRect(t.x-n,t.y-n,i,s),e.fillStyle=t.color,e.fillText(t.text,t.x,t.y)}else t.kind==="highlight"?(e.globalAlpha=ea,e.fillRect(Le(t.x,t.w),Le(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&ra(e,t,r);e.restore()}function Le(e,t){return t<0?e+t:e}function ta(e,t,r,a,n){let s=Math.atan2(n-r,a-t);e.beginPath(),e.moveTo(t,r),e.lineTo(a,n),e.stroke(),e.beginPath(),e.moveTo(a,n),e.lineTo(a-14*Math.cos(s-Math.PI/6),n-14*Math.sin(s-Math.PI/6)),e.lineTo(a-14*Math.cos(s+Math.PI/6),n-14*Math.sin(s+Math.PI/6)),e.closePath(),e.fill()}function ra(e,t,r){if(!r)return;let a=Le(t.x,t.w),n=Le(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 u=n;u<n+s;u+=l)for(let c=a;c<a+i;c+=l){let b=Math.min(l,a+i-c),d=Math.min(l,n+s-u);e.drawImage(r,c,u,b,d,c,u,b,d)}e.imageSmoothingEnabled=!1;for(let u=n;u<n+s;u+=l)for(let c=a;c<a+i;c+=l){let b=Math.min(l,a+i-c),d=Math.min(l,n+s-u);e.drawImage(r,c,u,1,1,c,u,b,d)}e.imageSmoothingEnabled=!0}var ee={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 Zt({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=Q(null),i=Q(null),s=Q(null),[l,u]=q("rectangle"),[c,b]=q(Xt[0]),[d,g]=q([]),[h,S]=q([]),[k,v]=q([]),f=Q(!1),[m,p]=q(null),[x,E]=q(!1),[T,w]=q(!1),F=Q(1);function P(_){g(R=>(S(A=>[...A,R]),[...R,_])),v([])}function L(){g(_=>(S(R=>[...R,_]),[])),v([])}function D(){S(_=>{if(_.length===0)return _;let R=_[_.length-1];return g(A=>(v(z=>[A,...z]),R)),_.slice(0,-1)})}function N(){v(_=>{if(_.length===0)return _;let R=_[0];return g(A=>(S(z=>[...z,A]),R)),_.slice(1)})}Ze(()=>{let _=R=>{R.key==="Escape"&&(R.stopPropagation(),a())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[a]),$(()=>{let _=R=>{if(!(R.metaKey||R.ctrlKey))return;let z=R.key.toLowerCase();z==="z"?(R.preventDefault(),R.stopPropagation(),R.shiftKey?N():D()):z==="y"&&(R.preventDefault(),R.stopPropagation(),N())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[h,k,d]),$(()=>{let _=URL.createObjectURL(e),R=new Image;return R.onload=()=>{s.current=R,E(!0)},R.src=_,()=>URL.revokeObjectURL(_)},[e]),Ze(()=>{if(!x||!n.current||!s.current||!i.current)return;let _=s.current,A=i.current.clientWidth-16,z=window.innerHeight*.65,J=Math.min(A/_.width,z/_.height,1);F.current=J;let se=n.current;se.width=_.width,se.height=_.height,se.style.width=`${_.width*J}px`,se.style.height=`${_.height*J}px`,O()},[x]),$(()=>{O()},[d,m]);function O(){let _=n.current,R=s.current;if(!_||!R)return;let A=_.getContext("2d");if(A){A.clearRect(0,0,_.width,_.height),A.drawImage(R,0,0);for(let z of d)Jt(A,z,R);m&&Jt(A,m,R)}}function M(_){let A=n.current.getBoundingClientRect();return{x:(_.clientX-A.left)/F.current,y:(_.clientY-A.top)/F.current}}let X=_=>{if(!x)return;let{x:R,y:A}=M(_),z=n.current.width,J=Math.max(3,Math.round(z/400)),se=Math.max(8,Math.round(z/80));if(l==="text"){let Ke=window.prompt(t["annotator.text_prompt"]);Ke&&Ke.trim()&&P({kind:"text",x:R,y:A,text:Ke.trim(),color:c,fontSize:Math.max(16,Math.round(z/50)),lineWidth:1});return}f.current=!0,l==="rectangle"?p({kind:"rectangle",x:R,y:A,w:0,h:0,color:c,lineWidth:J}):l==="arrow"?p({kind:"arrow",x1:R,y1:A,x2:R,y2:A,color:c,lineWidth:J}):l==="freehand"?p({kind:"freehand",points:[{x:R,y:A}],color:c,lineWidth:J}):l==="highlight"?p({kind:"highlight",x:R,y:A,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&p({kind:"blur",x:R,y:A,w:0,h:0,color:"#000000",lineWidth:0,tile:se})},W=_=>{if(!f.current)return;let{x:R,y:A}=M(_);p(z=>z&&(z.kind==="rectangle"||z.kind==="highlight"||z.kind==="blur"?{...z,w:R-z.x,h:A-z.y}:z.kind==="arrow"?{...z,x2:R,y2:A}:z.kind==="freehand"?{...z,points:[...z.points,{x:R,y:A}]}:z))},re=()=>{p(_=>(f.current&&_&&((_.kind==="rectangle"||_.kind==="highlight"||_.kind==="blur")&&Math.abs(_.w)<4&&Math.abs(_.h)<4||_.kind==="arrow"&&Math.hypot(_.x2-_.x1,_.y2-_.y1)<4||_.kind==="freehand"&&_.points.length<3||P(_)),null)),f.current=!1},C=async()=>{let _=n.current;if(_){w(!0);try{let R=await new Promise(A=>_.toBlob(A,"image/png",.92));R&&r(R)}finally{w(!1)}}},B=[{id:"rectangle",icon:ee.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:ee.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:ee.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:ee.text,label:t["annotator.tool.text"]},{id:"highlight",icon:ee.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:ee.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:_=>{_.target===_.currentTarget&&a()},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:a,children:ee.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:B.map(_=>o("button",{type:"button",onClick:()=>u(_.id),title:_.label,"aria-label":_.label,"aria-pressed":l===_.id,class:`annotator-tool ${l===_.id?"is-active":""}`,children:_.icon},_.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Xt.map(_=>o("button",{type:"button",onClick:()=>b(_),"aria-label":_,"aria-pressed":c===_,class:`annotator-color ${c===_?"is-active":""}`,style:{backgroundColor:_}},_)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:_=>b(_.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:D,disabled:h.length===0,title:t["annotator.undo"],children:[ee.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:N,disabled:k.length===0,title:t["annotator.redo"],children:[ee.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:L,disabled:d.length===0,children:[ee.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:x?o("canvas",{ref:n,onMouseDown:X,onMouseMove:W,onMouseUp:re,onMouseLeave:re,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:a,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:C,disabled:T||!x,children:T?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var oa=["bug","feature","question","praise","typo"],aa=["blocker","high","medium","low"];function er({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n}){let[i,s]=q(""),[l,u]=q("bug"),[c,b]=q("medium"),[d,g]=q(""),[h,S]=q(null),[k,v]=q(null),[f,m]=q(!1),[p,x]=q(!1),E=Q(null),T=Q(null),w=a==="submitting",F=w?e["form.submitting"]:e["form.submit"],P=typeof window!="undefined"?window.location.href:"";$(()=>()=>{k&&URL.revokeObjectURL(k)},[k]);let L=C=>{if(g(""),C instanceof File){let B=Wt(C);if(B){g(B.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(B.maxMb)));return}}k&&URL.revokeObjectURL(k),S(C),v(URL.createObjectURL(C))},D=()=>{k&&URL.revokeObjectURL(k),v(null),S(null),g(""),E.current&&(E.current.value="")},N=C=>{var _;let B=(_=C.target.files)==null?void 0:_[0];B&&L(B)},O=C=>{C.preventDefault(),C.stopPropagation(),m(!0)},M=C=>{C.preventDefault(),C.stopPropagation(),C.currentTarget===C.target&&m(!1)},X=C=>{var _,R;C.preventDefault(),C.stopPropagation(),m(!1);let B=(R=(_=C.dataTransfer)==null?void 0:_.files)==null?void 0:R[0];B&&L(B)};$(()=>{let C=T.current;if(!C)return;let B=_=>{var A;let R=(A=_.clipboardData)==null?void 0:A.items;if(R){for(let z of Array.from(R))if(z.kind==="file"&&z.type.startsWith("image/")){let J=z.getAsFile();if(J){_.preventDefault(),L(J);return}}}};return C.addEventListener("paste",B),()=>C.removeEventListener("paste",B)},[k]);let W=C=>{k&&URL.revokeObjectURL(k),S(C),v(URL.createObjectURL(C)),x(!1)};return o("form",{onSubmit:C=>{if(C.preventDefault(),!i.trim()){g(e["form.description.required"]);return}g("");let B={description:i.trim(),feedback_type:l,severity:c};h&&(B.screenshot=h,B.capture_method="manual"),t(B)},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:C=>s(C.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:C=>u(C.target.value),children:oa.map(C=>o("option",{value:C,children:e[`type.${C}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:c,onChange:C=>b(C.target.value),children:aa.map(C=>o("option",{value:C,children:e[`severity.${C}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:E,type:"file",accept:"image/png,image/jpeg,image/webp",class:"mfb-sr-only",onChange:N,"aria-hidden":"true",tabIndex:-1}),k?o("div",{class:"screenshot-preview",children:[o("img",{src:k,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>x(!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:D,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:T,class:`screenshot-dropzone ${f?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var C;return(C=E.current)==null?void 0:C.click()},onKeyDown:C=>{var B;(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),(B=E.current)==null||B.click())},onDragOver:O,onDragLeave:M,onDrop:X,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"]})]})]}),P&&o("div",{class:"page-context",title:P,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:ue(P,90)})]}),d&&o("div",{class:"error",children:d}),a==="error"&&n&&o("div",{class:"error",children:n}),a==="success"&&o("div",{class:"success",children:e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:w,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:w,children:F})]}),p&&h&&o(Zt,{imageBlob:h,strings:e,onCancel:()=>x(!1),onSave:W})]})}V();function na(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 ia(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var sa={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function tr(e,t){return t==="all"?e:e.filter(r=>sa[r.status]===t)}function rr({rows:e,filter:t,onFilter:r,strings:a}){let n=na(e),i=ia(n),s=[{key:"new",label:a["kpi.new"],value:String(n.new)},{key:"in_progress",label:a["kpi.in_progress"],value:String(n.in_progress)},{key:"awaiting_validation",label:a["kpi.awaiting_validation"],value:String(n.awaiting_validation)},{key:"resolved",label:a["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(l=>{let u=t===l.key,c=u?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${u?" is-active":""}`,onClick:()=>r(c),"aria-pressed":u,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var la=3e4;function or({api:e,externalId:t,strings:r,onSelect:a}){var m;let[n,i]=q(null),[s,l]=q(null),[u,c]=q(!1),[b,d]=q("all"),g=Q(!0),h=async()=>{c(!0),l(null);try{let p=await e.listMine(t);if(!g.current)return;i(p)}catch(p){if(typeof console!="undefined"&&console.warn("[mhosaic] listMine:",p),!g.current)return;l(r["mine.error"])}finally{g.current&&c(!1)}};$(()=>{g.current=!0,h();let p=setInterval(()=>{h()},la);return()=>{g.current=!1,clearInterval(p)}},[t]);let S=n!==null&&n.length===0,k=n===null&&!s,v=n?tr(n,b):null,f=!!n&&n.length>0&&((m=v==null?void 0:v.length)!=null?m: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:()=>{h()},disabled:u,children:u?r["mine.loading"]:r["mine.refresh"]})]}),n&&n.length>0&&o(rr,{rows:n,filter:b,onFilter:d,strings:r}),k&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),S&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),f&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),v&&v.length>0&&o("ul",{class:"mine-rows",children:v.map(p=>o("li",{children:o(ze,{row:p,strings:r,onClick:()=>a(p)})}))})]})}V();function ar({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=Q(null),i=Q(null);return $(()=>{var u;i.current=document.activeElement;let s=c=>{var d;if(c.key!=="Escape")return;let b=(d=n.current)==null?void 0:d.getRootNode();b instanceof ShadowRoot&&b.querySelector(".annotator-backdrop")||(c.stopPropagation(),e())};window.addEventListener("keydown",s);let l=(u=n.current)==null?void 0:u.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 ${a?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e()},children:o("div",{ref:n,class:`modal ${a?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:e,children:"\xD7"}),t]})})}var nr=`
|
|
601
622
|
:host {
|
|
602
623
|
--mfb-accent: #3b82f6;
|
|
603
624
|
--mfb-accent-contrast: #ffffff;
|
|
@@ -2284,7 +2305,7 @@
|
|
|
2284
2305
|
@media (prefers-reduced-motion: reduce) {
|
|
2285
2306
|
.skeleton-line { animation: none; }
|
|
2286
2307
|
}
|
|
2287
|
-
`;function ca(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function ir(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=nr,t.appendChild(r);let a=document.createElement("div");t.appendChild(a);let n={open:!1,status:"idle",tab:"send"},i=null;function s(c){n=c,de(y(u,{state:c}),a)}function l(c){let{selectedReportId:b,...d}=c;return d}function u({state:c}){var v;let b=
|
|
2308
|
+
`;function ca(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function ir(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=nr,t.appendChild(r);let a=document.createElement("div");t.appendChild(a);let n={open:!1,status:"idle",tab:"send"},i=null;function s(c){n=c,de(y(u,{state:c}),a)}function l(c){let{selectedReportId:b,...d}=c;return d}function u({state:c}){var v;let b=ie(async f=>{s({...n,status:"submitting"});try{await e.onSubmit(f),s({...n,status:"success"}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,s({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(m){typeof console!="undefined"&&console.warn("[mhosaic] submit:",m),s({...n,status:"error",error:e.strings["form.error"]})}},[]),d=(v=e.getExternalId)==null?void 0:v.call(e),[g,h]=q(!e.requiresVisibilityCheck);$(()=>{if(!e.requiresVisibilityCheck){h(!0);return}if(!d||!e.checkVisibility){h(!1);return}let f=!1;return e.checkVisibility(d).then(m=>{f||h(m)}).catch(()=>{f||h(!1)}),()=>{f=!0}},[d]);let S=ca(e,d,g),k=!!(e.api&&d);return o(U,{children:[S&&o(Yt,{label:e.strings["fab.label"],onClick:()=>s({...n,open:!0})}),c.open&&o(ar,{onDismiss:()=>s(l({...n,open:!1,status:"idle"})),closeLabel:e.strings["form.close"],expanded:c.tab==="board",children:[k&&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({...n,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({...n,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({...n,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({...n,tab:"board"})),children:e.strings["tab.board"]})]}),c.tab==="send"&&o(er,{strings:e.strings,onSubmit:b,onCancel:()=>s({...n,open:!1,status:"idle"}),status:c.status,...c.error!==void 0&&{errorMessage:c.error}}),c.tab==="mine"&&e.api&&d&&!c.selectedReportId&&o(or,{api:e.api,externalId:d,strings:e.strings,onSelect:f=>s({...n,selectedReportId:f.id})}),(c.tab==="mine"||c.tab==="changelog")&&e.api&&d&&c.selectedReportId&&o(Ae,{api:e.api,externalId:d,reportId:c.selectedReportId,strings:e.strings,onBack:()=>s(l({...n}))}),c.tab==="changelog"&&e.api&&d&&!c.selectedReportId&&o(Gt,{api:e.api,externalId:d,strings:e.strings,onSelect:f=>s({...n,selectedReportId:f.id})}),c.tab==="board"&&e.api&&d&&o(Vt,{api:e.api,externalId:d,strings:e.strings})]})]})}return s(n),{open(){s({...n,open:!0})},close(){s({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),de(null,a),e.host.innerHTML=""},notifyIdentityChanged(){s({...n})}}}function Ca(){return{right:24+24/2,bottom:84}}function Lr(e){var k,v,f,m,p,x,E,T;let t=(k=e.env)!=null?k:"prod",r=(v=e.locale)!=null?v:typeof navigator!="undefined"?navigator.language:void 0,a=gt((f=e.translations)!=null?f:{},r!==void 0?{locale:r}:{}),n=bt({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(m=e.metadata)!=null?m:{},l=lt({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}}),u=[],c=document.createElement("div");if(c.className="mhosaic-feedback",e.attachTo){let w=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;w==null||w.appendChild(c)}else document.body.appendChild(c);async function b(w){var O,M,X,W,re;let F=w.synthetic?void 0:w.screenshot,P=n.snapshot();if(i){let{userHash:C,exp:B,..._}=i;P.user=_}s&&Object.keys(s).length>0&&(P.metadata={...s});let L=F?(O=w.capture_method)!=null?O:"manual":"none",D={description:w.description,feedback_type:(M=w.feedback_type)!=null?M:"bug",severity:(X=w.severity)!=null?X:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:L,technical_context:P};D.widget_version="0.22.0",F&&(D.screenshot=F),w.synthetic&&(D.synthetic=!0),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(D.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let N=D;for(let C of u)N=await C(N);try{let C=await l.submitReport(N);return(W=e.onSubmitSuccess)==null||W.call(e,C),n.clear(),C}catch(C){let B=C instanceof Error?C:new Error(String(C));throw(re=e.onError)==null||re.call(e,B),B}}let d=ir({host:c,strings:a,showFAB:(p=e.showFAB)!=null?p:!0,onSubmit:async w=>{await b(w)},api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(x=e.requiresVisibilityCheck)!=null?x:!1,checkVisibility:w=>l.checkVisibility(w,i==null?void 0:i.email)}),g,h=!1;if((E=e.qaMeter)!=null&&E.source){let w=e.qaMeter,F=(T=w.locale)!=null?T:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(zr(),Ar)).then(({createQaMeter:P})=>{var L,D;h||(g=P({source:w.source,size:(L=w.size)!=null?L:"sm",position:(D=w.position)!=null?D:Ca(),locale:F,...w.getCurrentPage&&{getCurrentPage:w.getCurrentPage}}))})}let S={show(){d.open()},hide(){d.close()},open(w){d.open()},async submit(w){return b({description:w.description,...w.feedback_type!==void 0&&{feedback_type:w.feedback_type},...w.severity!==void 0&&{severity:w.severity},...w.synthetic!==void 0&&{synthetic:w.synthetic},...w.screenshot!==void 0&&{screenshot:w.screenshot}})},identify(w){i=w,d.notifyIdentityChanged()},setMetadata(w){s={...s,...w}},shutdown(){h=!0,g==null||g.dispose(),d.dispose(),n.dispose(),c.remove();let w=window;w.mhosaicFeedback===S&&delete w.mhosaicFeedback},_registerTransformer(w){u.push(w)}};return window.mhosaicFeedback=S,S}var Ra={enabled:!0,perFingerprintCooldownMs:3e5,sampleRate:1,maxDescriptionLen:200,globalRatePerMinute:30,maxDistinctFingerprints:200};function Br(e){var t;if(e instanceof Error)return{name:e.name||"Error",message:String((t=e.message)!=null?t:""),...e.stack&&{stack:String(e.stack)}};if(typeof e=="string")return{name:"Error",message:e};if(e&&typeof e=="object"){let r=e;return{name:typeof r.name=="string"&&r.name||"Error",message:typeof r.message=="string"&&r.message||(()=>{try{return JSON.stringify(e)}catch(a){return String(e)}})(),...typeof r.stack=="string"&&{stack:r.stack}}}return{name:"Error",message:String(e)}}function qa(e,t){var n;let r=((n=e.stack)!=null?n:"").split(`
|
|
2288
2309
|
`).slice(0,4).join(`
|
|
2289
|
-
`),a=e.message.slice(0,30);return`${e.name}:${a}|${t}|${r}`}function Ea(e,t){return e.length<=t?e:e.slice(0,Math.max(0,t-1))+"\u2026"}function Fr(e,t={}){let r={...Ra,...t};if(!r.enabled||typeof window=="undefined")return e;let a=e;if(a._errorTrackingArmed)return e;a._errorTrackingArmed=!0;let n=new Set,i=new Map,s=[];function l(h
|
|
2310
|
+
`),a=e.message.slice(0,30);return`${e.name}:${a}|${t}|${r}`}function Ea(e,t){return e.length<=t?e:e.slice(0,Math.max(0,t-1))+"\u2026"}function Fr(e,t={}){let r={...Ra,...t};if(!r.enabled||typeof window=="undefined")return e;let a=e;if(a._errorTrackingArmed)return e;a._errorTrackingArmed=!0;let n=new Set,i=new Map,s=[];function l(g,h){if(r.globalRatePerMinute>0){let f=h-6e4;for(;s.length>0&&s[0]<f;)s.shift();if(s.length>=r.globalRatePerMinute)return!1}if(r.maxDistinctFingerprints>0&&!i.has(g)&&i.size>=r.maxDistinctFingerprints)return!1;if(r.perFingerprintCooldownMs<=0)return s.push(h),!0;let S=i.get(g);if(S!==void 0&&h-S<r.perFingerprintCooldownMs)return!1;let k=256,v=192;if(i.size>k){let f=h-r.perFingerprintCooldownMs*2;for(let[m,p]of i)p<f&&i.delete(m);if(i.size>k){let m=i.size-v,p=0;for(let x of i.keys()){if(p>=m)break;i.delete(x),p++}}}return s.push(h),!0}async function u(g){if(r.sampleRate<1&&Math.random()>=r.sampleRate)return;let h=qa(g,window.location.pathname);if(n.has(h))return;let S=Date.now();if(!l(h,S))return;i.set(h,S);let k=Ea(g.message?`${g.name}: ${g.message}`:g.name,r.maxDescriptionLen);n.add(h);try{await a.submit({description:k,feedback_type:"bug",severity:"high",synthetic:!0})}catch(v){}finally{n.delete(h)}}function c(g){var S;let h=(S=g.error)!=null?S:{name:"Error",message:g.message,stack:`at ${g.filename}:${g.lineno}:${g.colno}`};u(Br(h))}function b(g){u(Br(g.reason))}window.addEventListener("error",c),window.addEventListener("unhandledrejection",b);let d=a.shutdown.bind(a);return a.shutdown=()=>{window.removeEventListener("error",c),window.removeEventListener("unhandledrejection",b),i.clear(),d()},e}function Ta(e){let{errorTracking:t,...r}=e,a=Lr(r);return t!==!1&&Fr(a,typeof t=="object"?t:void 0),a}return Nr(Pa);})();
|
|
2290
2311
|
//# sourceMappingURL=widget.min.js.map
|