@uniformdev/context-devtools 14.2.1-alpha.34 → 16.0.1-alpha.164
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/esm/index.js +286 -563
- package/dist/index.d.ts +33 -5
- package/dist/index.js +286 -563
- package/package.json +22 -13
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Ht=Object.create;var $=Object.defineProperty;var Mt=Object.getOwnPropertyDescriptor;var At=Object.getOwnPropertyNames;var Et=Object.getPrototypeOf,Bt=Object.prototype.hasOwnProperty;var Qt=(t,r)=>{for(var n in r)$(t,n,{get:r[n],enumerable:!0})},He=(t,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of At(r))!Bt.call(t,i)&&i!==n&&$(t,i,{get:()=>r[i],enumerable:!(o=Mt(r,i))||o.enumerable});return t};var x=(t,r,n)=>(n=t!=null?Ht(Et(t)):{},He(r||!t||!t.__esModule?$(n,"default",{value:t,enumerable:!0}):n,t)),Ft=t=>He($({},"__esModule",{value:!0}),t);var io={};Qt(io,{ContextDevTools:()=>Re,EmbeddedContextDevTools:()=>Ie,ToggleEmbeddedContextDevTools:()=>no});module.exports=Ft(io);var e=require("@emotion/react"),b=x(require("react"));var S=require("@emotion/react");var K=require("react"),Me=(0,K.createContext)({settings:{},saveSettings:()=>{}}),W=()=>(0,K.useContext)(Me),Ae=({children:t,settings:r,saveSettings:n})=>(0,e.jsx)(Me.Provider,{value:{settings:r,saveSettings:n}},t);var qt=({route:t,children:r,className:n})=>{let{settings:o,saveSettings:i}=W();return(0,e.jsx)("a",{href:"",className:n,onClick:a=>{a.preventDefault(),i({...o,route:t})}},r)},F=qt;var Nt=[{title:"Dimensions",href:"/dimensions",icon:`<svg
|
|
2
2
|
width="24"
|
|
3
3
|
height="24"
|
|
4
4
|
viewBox="0 0 24 24"
|
|
@@ -15,6 +15,9 @@ var Ft=Object.create;var B=Object.defineProperty;var Zt=Object.getOwnPropertyDes
|
|
|
15
15
|
fill="currentColor"
|
|
16
16
|
/>
|
|
17
17
|
</svg>
|
|
18
|
+
`},{title:"What if?",href:"/overrides",icon:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.5123 7.91666L14.5804 8.4343L13.9179 5.96175L11.3371 10.0021L11.3575 10.0143C11.1348 10.3854 10.8997 10.7125 10.6556 11.0003H18.7603L16.9135 9.15347L18.3277 7.73926L22.5703 11.9819L18.3276 16.2245L16.9134 14.8103L18.7235 13.0003H6.65606C6.89995 13.2879 7.13495 13.6148 7.35749 13.9857L7.33713 13.9979L9.9179 18.0382L10.5804 15.5657L12.5123 16.0833L10.9594 21.8789L5.16384 20.326L5.68147 18.3941L8.20425 19.0701C8.20425 19.0701 6.17064 16.0325 5.21659 14.398C4.70173 13.7544 4.17055 13.4257 3.70352 13.2461C3.10532 13.016 2.54358 13.0011 2.06154 13.0003H2V13.0002V11.0003V11.0002L2.02253 11.0002C2.05059 11.0002 2.07985 11.0002 2.11025 11.0003H6V10.9998C6.49549 10.9998 7.07968 10.9939 7.70352 10.7539C8.17055 10.5743 8.70173 10.2456 9.21659 9.60198C10.1706 7.96745 12.2043 4.92988 12.2043 4.92988L9.68147 5.60586L9.16384 3.67401L14.9594 2.12109L16.5123 7.91666Z" fill="white"/>
|
|
20
|
+
</svg>
|
|
18
21
|
`},{title:"Quirks",href:"/quirks",icon:`<svg
|
|
19
22
|
width="24"
|
|
20
23
|
height="24"
|
|
@@ -33,50 +36,84 @@ var Ft=Object.create;var B=Object.defineProperty;var Zt=Object.getOwnPropertyDes
|
|
|
33
36
|
</svg>`},{title:"Settings",href:"/settings",icon:`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
34
37
|
<path d="M19.1469 12.716C19.1986 12.2636 19.201 11.8069 19.1539 11.354L21.7429 9.474C21.8681 9.3822 21.9548 9.24723 21.9862 9.0952C22.0176 8.94316 21.9915 8.78489 21.9129 8.651L19.9939 5.399C19.9182 5.26986 19.7985 5.17231 19.6568 5.1242C19.515 5.07608 19.3606 5.08063 19.2219 5.137L16.3599 6.292C15.9237 5.9578 15.4502 5.67525 14.9489 5.45L14.5739 2.545C14.5547 2.39441 14.4813 2.25598 14.3673 2.15566C14.2534 2.05534 14.1068 1.99999 13.9549 2H10.0859C9.93402 1.99997 9.78728 2.05527 9.67317 2.15558C9.55906 2.25588 9.48539 2.39432 9.46595 2.545L9.09395 5.433C8.63957 5.63249 8.20723 5.87882 7.80395 6.168L5.00895 4.954C4.87173 4.89484 4.71787 4.88672 4.57519 4.9311C4.4325 4.97549 4.3104 5.06945 4.23095 5.196L2.22195 8.398C2.1396 8.52998 2.10934 8.68789 2.13707 8.84096C2.1648 8.99403 2.24854 9.1313 2.37195 9.226L4.86795 11.142C4.83172 11.4266 4.81302 11.7131 4.81195 12C4.81195 12.18 4.82095 12.362 4.83795 12.558L2.26495 14.375C2.13766 14.4647 2.04844 14.5987 2.01478 14.7508C1.98112 14.9028 2.00543 15.0619 2.08295 15.197L3.95695 18.474C4.11095 18.742 4.43695 18.857 4.72595 18.746L7.56095 17.644C8.00795 17.997 8.49195 18.294 9.00795 18.53L9.33795 21.396C9.37495 21.709 9.63795 21.946 9.95195 21.95L13.8169 22H13.8249C14.1349 22 14.3989 21.771 14.4439 21.463L14.8549 18.59C15.3703 18.3674 15.8579 18.0855 16.3079 17.75L19.1279 18.93C19.4129 19.05 19.7419 18.944 19.9029 18.679L21.8669 15.452C21.9477 15.319 21.976 15.1608 21.9464 15.0081C21.9168 14.8554 21.8315 14.7192 21.7069 14.626L19.1469 12.716ZM11.9999 15C10.3459 15 8.99995 13.655 8.99995 12C8.99995 10.346 10.3449 9 11.9999 9C13.6539 9 14.9999 10.345 14.9999 12C14.9999 13.654 13.6539 15 11.9999 15Z" fill="white"/>
|
|
35
38
|
</svg>
|
|
36
|
-
`}],
|
|
39
|
+
`}],Zt=`<svg width="24" height="24" fill="white" viewBox="0 0 122.88 116.67" xmlns="http://www.w3.org/2000/svg">
|
|
40
|
+
<g>
|
|
41
|
+
<path d="M84.55,116.66c2.49,0,4.53-1.99,4.53-4.41V88.08c1.55-13.03,7.27-9.16,14-5.13 c16.27,9.74,27.08-15.88,13.93-23.78c-10.32-6.2-14.79,4.46-22.35,3.36c-2.92-0.43-4.95-3.5-5.59-8.17V36.9 c0-2.43-2.04-4.41-4.53-4.41H63.73c-17.18-2.12-1.93-11.37-1.93-19.98C61.81,5.6,55.38,0,47.45,0c-7.92,0-15.19,5.6-15.19,12.51 c0,8.12,15.78,17.86-1.64,19.98H4.53C2.04,32.49,0,34.47,0,36.9v17.42c1.33,7.43,6.49,9.15,13.1,4.25 c2.23-1.66,5.99-3.59,8.71-3.59c7.09,0,12.85,6.25,12.85,13.96S28.91,84.6,21.81,84.6c-2.53,0-4.89-0.8-6.89-2.19 c0,0.59-12.4-10.85-14.92,3.15v26.71c0,2.43,2.04,4.41,4.53,4.41c13.97,0,27.92,0,41.88-0.01c0.55-2.55-1.24-5.47-2.92-8 c-13.22-19.93,38.21-21.92,24.99,0.62c-0.65,1.11-1.3,2.19-1.8,3.24c-0.63,1.31-1.05,2.91-0.96,4.14L84.55,116.66L84.55,116.66z"></path>
|
|
42
|
+
</g>
|
|
43
|
+
</svg>`,Ee=({...t})=>{var o,i;let r=a=>{var p;let l="active";return!((p=t.settings)!=null&&p.route)&&a==="/dimensions"||t.settings.route===a?l:""},n=Boolean(typeof window!="undefined"&&((i=(o=window.chrome)==null?void 0:o.runtime)==null?void 0:i.id));return(0,e.jsx)("nav",{css:S.css`
|
|
37
44
|
background: var(--brand-secondary-1);
|
|
38
45
|
padding: var(--spacing-base);
|
|
39
46
|
min-width: 200px;
|
|
40
|
-
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
`},(0,e.jsx)("a",{css:S.css`
|
|
50
|
+
flex-grow: 0;
|
|
41
51
|
display: inline-block;
|
|
42
52
|
margin: 0 var(--spacing-base);
|
|
43
|
-
`,href:"/
|
|
53
|
+
`,href:"https://uniform.dev/"},(0,e.jsx)("svg",{css:{display:"block"},width:"120",height:"38",viewBox:"0 0 120 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.jsx)("g",{clipPath:"url(#clip0_41_612)"},(0,e.jsx)("path",{d:"M8.82261 3.73315L0 8.82209V18.9999L8.82261 13.911L17.6474 8.82209L8.82261 3.73315Z",fill:"#83C6E1"}),(0,e.jsx)("path",{d:"M8.82261 24.089V13.9111L0 19.0001V29.1779L8.82261 34.2669L17.6474 29.1779V19.0001L8.82261 24.089Z",fill:"#438FD5"}),(0,e.jsx)("path",{d:"M17.6474 8.82202L8.82263 13.911L17.6474 18.9999V29.1777L26.47 24.0888V13.911L17.6474 8.82202Z",fill:"#F4220B"}),(0,e.jsx)("path",{d:"M64.6069 13.9025H67.8036V25.5528H64.6069V13.9025ZM64.4902 8.5415H67.9181V11.7348H64.4902V8.5415ZM72.5153 10.1025V13.9025H70.3691V16.6272H72.5153V25.5528H75.7119V16.6272H78.2774V13.9025H75.7119V11.2684H78.2774V8.5415H75.2213L72.5153 10.1025ZM83.1059 13.7859L80.3999 15.3469V24.1084L83.1059 25.6694H88.0748L90.7808 24.1084V15.3469L88.0748 13.7859H83.1059ZM87.5842 22.9425H83.5943V16.5106H87.5842V22.9425ZM97.4723 14.8611L95.8103 13.9025H94.2779V25.5528H97.4745V16.6272H101.486V13.9025H99.1344L97.4723 14.8611ZM55.713 13.7859L53.8499 14.8611L51.9847 13.7859H50.7289V25.5528H53.9256V16.5106H57.9133V25.5528H61.1099V15.3469L58.4039 13.7859H55.713ZM44.0353 22.9425H40.0454V13.9025H36.851V24.1084L39.557 25.6694H42.3753L44.0309 24.7129L44.0331 24.7151L44.0353 24.7129V24.7151L45.6887 25.6694H47.2297V13.9025H44.0353V22.9425ZM117.51 13.7859H115.271L113.079 15.0425L110.909 13.7859H108.67L107.015 14.7402L105.359 13.7859H103.818V25.5528H107.015V16.5106H110.421V25.5528H113.615V16.5106H117.022V25.5528H120.216V15.3469L117.51 13.7859Z",fill:"white"})),(0,e.jsx)("defs",null,(0,e.jsx)("clipPath",{id:"clip0_41_612"},(0,e.jsx)("rect",{width:"120",height:"38",fill:"white"}))))),(0,e.jsx)("ul",{css:S.css`
|
|
44
54
|
display: flex;
|
|
45
55
|
flex-flow: column nowrap;
|
|
46
56
|
padding: 0;
|
|
47
57
|
margin: 0;
|
|
48
58
|
list-style-type: none;
|
|
49
|
-
|
|
50
|
-
`},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
`,key:a},(0,t.jsx)("a",{css:R.css`
|
|
59
|
-
align-items: center;
|
|
60
|
-
border-radius: var(--rounded-base);
|
|
61
|
-
display: flex;
|
|
62
|
-
color: var(--white);
|
|
63
|
-
gap: var(--spacing-sm);
|
|
64
|
-
padding: var(--spacing-sm) var(--spacing-base);
|
|
65
|
-
text-decoration: none;
|
|
66
|
-
transition: background-color 0.25s ease-in-out;
|
|
67
|
-
|
|
68
|
-
&:hover,
|
|
69
|
-
&.active {
|
|
70
|
-
background: var(--gray-700);
|
|
59
|
+
flex-grow: 1;
|
|
60
|
+
`},Nt.map((a,l)=>{var m,u,s,d;let p=0;return a.href==="/overrides"&&Object.keys((m=t.settings.scoreOverrides)!=null?m:{}).length>0&&(p=Object.keys((u=t.settings.scoreOverrides)!=null?u:{}).length),a.href==="/quirks"&&Object.keys((s=t.settings.quirkOverrides)!=null?s:{}).length>0&&(p=Object.keys((d=t.settings.quirkOverrides)!=null?d:{}).length),(0,e.jsx)("li",{css:S.css`
|
|
61
|
+
padding: 0;
|
|
62
|
+
margin: 0;
|
|
63
|
+
list-style-type: none;
|
|
64
|
+
|
|
65
|
+
&:last-of-type {
|
|
66
|
+
margin-top: auto;
|
|
71
67
|
}
|
|
72
|
-
`,
|
|
68
|
+
`,key:l},(0,e.jsx)(F,{css:S.css`
|
|
73
69
|
align-items: center;
|
|
70
|
+
border-radius: var(--rounded-base);
|
|
74
71
|
display: flex;
|
|
75
|
-
|
|
72
|
+
color: var(--white);
|
|
73
|
+
gap: var(--spacing-sm);
|
|
74
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
75
|
+
text-decoration: none;
|
|
76
|
+
transition: background-color 0.25s ease-in-out;
|
|
77
|
+
|
|
78
|
+
&:hover,
|
|
79
|
+
&.active {
|
|
80
|
+
background: var(--gray-700);
|
|
81
|
+
}
|
|
82
|
+
`,className:r(a.href),route:a.href},(0,e.jsx)("i",{css:S.css`
|
|
83
|
+
align-items: center;
|
|
84
|
+
display: flex;
|
|
85
|
+
`,dangerouslySetInnerHTML:{__html:a.icon}}),a.title,p?(0,e.jsx)("span",{css:S.css`
|
|
86
|
+
font-size: var(--fs-xxs);
|
|
87
|
+
display: inline-block;
|
|
88
|
+
width: 12px;
|
|
89
|
+
height: 12px;
|
|
90
|
+
border-radius: 6px;
|
|
91
|
+
background-color: var(--red-tooltip);
|
|
92
|
+
text-align: center;
|
|
93
|
+
line-height: 12px;
|
|
94
|
+
`},p):null))})),!n&&(0,e.jsx)("a",{target:"_blank",href:"https://chrome.google.com/webstore/detail/uniform-context/dcmlokofjljnfjcknpmhjocogllfbhkg",css:S.css`
|
|
95
|
+
align-items: center;
|
|
96
|
+
border-radius: var(--rounded-base);
|
|
97
|
+
display: flex;
|
|
98
|
+
font-size: var(--fs-sm);
|
|
99
|
+
color: var(--white);
|
|
100
|
+
gap: var(--spacing-sm);
|
|
101
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
102
|
+
text-decoration: none;
|
|
103
|
+
transition: background-color 0.25s ease-in-out;
|
|
104
|
+
|
|
105
|
+
&:hover,
|
|
106
|
+
&.active {
|
|
107
|
+
background: var(--gray-700);
|
|
108
|
+
}
|
|
109
|
+
`,rel:"noreferrer"},(0,e.jsx)("i",{css:S.css`
|
|
110
|
+
align-items: center;
|
|
111
|
+
display: flex;
|
|
112
|
+
`,dangerouslySetInnerHTML:{__html:Zt}}),"Install Chrome Extension"))};var Be=()=>(0,e.jsx)("article",null,(0,e.jsx)("h1",null,"Something when wrong"),(0,e.jsx)("p",null,"We could not find the page you're looking for."));var ce=x(require("react"));var H=require("@emotion/react"),Y=x(require("react")),Qe=(0,H.css)({willChange:"height"}),zt=H.css`
|
|
76
113
|
border-bottom: 2px solid var(--brand-secondary-1);
|
|
77
|
-
font-size: var(--
|
|
114
|
+
font-size: var(--fs-base);
|
|
78
115
|
margin: 0;
|
|
79
|
-
`,
|
|
116
|
+
`,Ut=H.css`
|
|
80
117
|
align-items: center;
|
|
81
118
|
border: none;
|
|
82
119
|
background: none;
|
|
@@ -84,48 +121,15 @@ var Ft=Object.create;var B=Object.defineProperty;var Zt=Object.getOwnPropertyDes
|
|
|
84
121
|
display: flex;
|
|
85
122
|
width: 100%;
|
|
86
123
|
padding: var(--spacing-sm) 0;
|
|
87
|
-
font-weight: var(--
|
|
124
|
+
font-weight: var(--fw-bold);
|
|
88
125
|
justify-content: space-between;
|
|
89
|
-
`,
|
|
126
|
+
`,_t=H.css`
|
|
90
127
|
align-self: center;
|
|
91
|
-
`,
|
|
128
|
+
`,Gt=H.css`
|
|
92
129
|
transform: rotate(-180deg);
|
|
93
|
-
`,
|
|
130
|
+
`,J=({children:t})=>(0,e.jsx)("div",{css:[Qe]},t),X=({title:t,children:r})=>{let[n,o]=Y.useState(!1),i=t.split(" ").join("-").toLocaleLowerCase();return(0,e.jsx)(Y.Fragment,null,(0,e.jsx)("h3",{css:zt},(0,e.jsx)("button",{"aria-expanded":n,css:Ut,title:t,id:i,"aria-controls":`${i}-section`,onClick:()=>o(a=>!a),type:"button"},t,(0,e.jsx)("i",{css:[_t,n?Gt:void 0]},(0,e.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.jsx)("path",{d:"M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z",fill:"currentColor"}))))),(0,e.jsx)("div",{id:`${i}-section`,css:[Qe,H.css`
|
|
94
131
|
padding: var(--spacing-sm) 0;
|
|
95
|
-
`],role:"region","aria-labelledby":
|
|
96
|
-
align-items: center;
|
|
97
|
-
border: 1px solid transparent;
|
|
98
|
-
cursor: pointer;
|
|
99
|
-
display: inline-flex;
|
|
100
|
-
padding: var(--spacing-sm) var(--spacing-base);
|
|
101
|
-
transition: opacity 0.2s ease-in-out, border-color 0.2s ease-in-out;
|
|
102
|
-
font-size: var(--font-sm);
|
|
103
|
-
&:hover {
|
|
104
|
-
opacity: 0.8;
|
|
105
|
-
}
|
|
106
|
-
`;function Yt(e){let r=k.css`
|
|
107
|
-
color: var(--white);
|
|
108
|
-
`,n=k.css`
|
|
109
|
-
font-weight: var(--font-bold);
|
|
110
|
-
`;switch(e){case"primary":return k.css`
|
|
111
|
-
background: var(--brand-secondary-1);
|
|
112
|
-
${r}
|
|
113
|
-
${n}
|
|
114
|
-
`;case"secondary":return k.css`
|
|
115
|
-
background: var(--brand-secondary-5);
|
|
116
|
-
${r}
|
|
117
|
-
${n}
|
|
118
|
-
`;case"unimportant":return k.css`
|
|
119
|
-
background: var(--brand-secondary-3);
|
|
120
|
-
color: var(--brand-secondary-1);
|
|
121
|
-
${n}
|
|
122
|
-
`;case"ghost":return k.css`
|
|
123
|
-
background: transparent;
|
|
124
|
-
color: var(--brand-secondary-5);
|
|
125
|
-
&:hover {
|
|
126
|
-
border: 1px solid var(--brand-secondary-5);
|
|
127
|
-
}
|
|
128
|
-
`}}var H=({buttonType:e="primary",children:r,className:n,...o})=>(0,t.jsx)(ut.Fragment,null,(0,t.jsx)("button",{type:"button",css:[Xt,Yt(e)],className:n,...o},r));var V=require("@emotion/react"),N=V.css`
|
|
132
|
+
`],role:"region","aria-labelledby":i},n?r:null))};var M=require("@emotion/react"),j=M.css`
|
|
129
133
|
background-color: var(--gray-100);
|
|
130
134
|
padding: var(--spacing-base) var(--spacing-md);
|
|
131
135
|
margin: var(--spacing-base) 0;
|
|
@@ -133,21 +137,21 @@ var Ft=Object.create;var B=Object.defineProperty;var Zt=Object.getOwnPropertyDes
|
|
|
133
137
|
&:first-of-type {
|
|
134
138
|
margin: 0 0 var(--spacing-base);
|
|
135
139
|
}
|
|
136
|
-
`,
|
|
140
|
+
`,Fe=M.css`
|
|
137
141
|
background: var(--gray-100)
|
|
138
142
|
url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%0A%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 2C8.44771 2 8 2.44772 8 3V5C8 5.55228 8.44771 6 9 6C9.55229 6 10 5.55228 10 5V3C10 2.44772 9.55229 2 9 2ZM8 9H16V11C16 13.2091 14.2091 15 12 15C9.79086 15 8 13.2091 8 11V9ZM13 16.917C15.8377 16.441 18 13.973 18 11V7H6V11C6 13.973 8.16229 16.441 11 16.917V22C11 22.5523 11.4477 23 12 23C12.5523 23 13 22.5523 13 22V16.917ZM14 3C14 2.44772 14.4477 2 15 2C15.5523 2 16 2.44772 16 3V5C16 5.55228 15.5523 6 15 6C14.4477 6 14 5.55228 14 5V3Z' fill='%232ecdb4' /%3E%3C/svg%3E")
|
|
139
143
|
no-repeat var(--spacing-sm) var(--spacing-base);
|
|
140
144
|
padding: var(--spacing-base) var(--spacing-xl);
|
|
141
|
-
`,
|
|
145
|
+
`,ee=M.css`
|
|
142
146
|
color: var(--brand-secondary-1);
|
|
143
147
|
margin: 0;
|
|
144
|
-
font-size: var(--
|
|
145
|
-
font-weight: var(--
|
|
146
|
-
`,
|
|
148
|
+
font-size: var(--fs-base);
|
|
149
|
+
font-weight: var(--fw-bold);
|
|
150
|
+
`,te=M.css`
|
|
147
151
|
color: var(--brand-secondary-1);
|
|
148
152
|
margin: var(--spacing-xs) 0 0;
|
|
149
|
-
font-size: var(--
|
|
150
|
-
`,
|
|
153
|
+
font-size: var(--fs-sm);
|
|
154
|
+
`,qe=M.css`
|
|
151
155
|
align-items: center;
|
|
152
156
|
border: none;
|
|
153
157
|
background: transparent
|
|
@@ -167,111 +171,39 @@ var Ft=Object.create;var B=Object.defineProperty;var Zt=Object.getOwnPropertyDes
|
|
|
167
171
|
&:hover {
|
|
168
172
|
opacity: 0.6;
|
|
169
173
|
}
|
|
170
|
-
`,
|
|
174
|
+
`,oe=M.css`
|
|
171
175
|
display: flex;
|
|
172
176
|
margin: var(--spacing-sm) 0 0;
|
|
173
177
|
gap: var(--spacing-base);
|
|
174
|
-
`;var
|
|
175
|
-
align-items: center;
|
|
176
|
-
cursor: pointer;
|
|
177
|
-
display: flex;
|
|
178
|
-
gap: var(--spacing-xs);
|
|
179
|
-
`,ht=M.css`
|
|
180
|
-
color: var(--gray-500);
|
|
181
|
-
font-size: var(--font-sm);
|
|
182
|
-
`,fe=M.css`
|
|
183
|
-
background: var(--gray-600);
|
|
184
|
-
`,vt=M.css`
|
|
185
|
-
display: block;
|
|
186
|
-
background: var(--gray-400);
|
|
187
|
-
border-radius: var(--rounded-full);
|
|
188
|
-
position: relative;
|
|
189
|
-
height: 16px;
|
|
190
|
-
width: 32px;
|
|
191
|
-
&:before {
|
|
192
|
-
border-radius: var(--rounded-full);
|
|
193
|
-
background: var(--white);
|
|
194
|
-
content: '';
|
|
195
|
-
display: block;
|
|
196
|
-
width: 13px;
|
|
197
|
-
height: 13px;
|
|
198
|
-
position: absolute;
|
|
199
|
-
top: 0;
|
|
200
|
-
bottom: 0;
|
|
201
|
-
margin: auto 0;
|
|
202
|
-
transform: translateX(2px);
|
|
203
|
-
transition: transform 0.2s ease-in-out, background-color 0.3s ease-in-out;
|
|
204
|
-
}
|
|
205
|
-
`,yt=M.css`
|
|
206
|
-
overflow: hidden;
|
|
207
|
-
clip: rect(0, 0, 0, 0);
|
|
208
|
-
height: 0;
|
|
209
|
-
width: 0;
|
|
210
|
-
text-indent: -9999px;
|
|
211
|
-
|
|
212
|
-
&:checked ~ :before {
|
|
213
|
-
transform: translateX(17px);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
&:checked ~ span {
|
|
217
|
-
background: var(--brand-secondary-5);
|
|
218
|
-
}
|
|
219
|
-
`;var wt=({label:e,...r})=>(0,t.jsx)("label",{css:bt},(0,t.jsx)("span",{css:ht},e),(0,t.jsx)("input",{type:"checkbox",css:yt,...r}),(0,t.jsx)("span",{css:vt}));var v=require("@emotion/react"),I=({children:e})=>(0,t.jsx)("table",{css:v.css`
|
|
220
|
-
border-collapse: collapse;
|
|
221
|
-
display: table;
|
|
222
|
-
width: 100%;
|
|
223
|
-
font-size: var(--font-sm);
|
|
224
|
-
`},e),Ct=({children:e})=>(0,t.jsx)("thead",{css:v.css`
|
|
225
|
-
background: var(--gray-50);
|
|
226
|
-
text-align: left;
|
|
227
|
-
& tr {
|
|
228
|
-
border-bottom: 1px solid var(--gray-200);
|
|
229
|
-
}
|
|
230
|
-
`},e),E=({children:e})=>(0,t.jsx)("tbody",null,e),z=({border:e,children:r})=>(0,t.jsx)("tr",{css:e?v.css`
|
|
231
|
-
border-bottom: 1px solid var(--gray-200);
|
|
232
|
-
&:where(:last-child) {
|
|
233
|
-
border: none;
|
|
234
|
-
}
|
|
235
|
-
`:void 0},r),ot=({children:e})=>(0,t.jsx)("th",{css:v.css`
|
|
236
|
-
outline: none;
|
|
237
|
-
padding: var(--spacing-sm);
|
|
238
|
-
`},e);function Jt(e){switch(e){case"light":return v.css`
|
|
239
|
-
color: var(--gray-400);
|
|
240
|
-
`;case"dark":return v.css`
|
|
241
|
-
color: var(--brand-secondary-1);
|
|
242
|
-
`}}function jt(e){return v.css`
|
|
243
|
-
text-align: ${e};
|
|
244
|
-
`}var w=({alignment:e="left",border:r,color:n="dark",children:o})=>(0,t.jsx)("td",{css:[v.css`
|
|
245
|
-
padding: var(--spacing-base);
|
|
246
|
-
max-width: 180px;
|
|
247
|
-
overflow-wrap: break-word;
|
|
248
|
-
position: relative;
|
|
249
|
-
`,Jt(n),jt(e),r?v.css`
|
|
250
|
-
border-left: 1px solid var(--gray-200);
|
|
251
|
-
`:void 0]},o);var y=require("@emotion/react"),te=y.keyframes`from {
|
|
178
|
+
`;var q=({title:t,text:r,buttonGroup:n,children:o})=>(0,e.jsx)("div",{css:j},(0,e.jsx)("h2",{css:ee},t),(0,e.jsx)("p",{css:te},r),o,n?(0,e.jsx)("div",{css:oe},n):null);var k=require("@emotion/react"),$t=k.keyframes`from {
|
|
252
179
|
transform: scale(1);
|
|
253
180
|
}
|
|
254
181
|
to {
|
|
255
182
|
transform: scale(1.2);
|
|
256
183
|
}
|
|
257
|
-
`,
|
|
184
|
+
`,h={page:k.css`
|
|
258
185
|
color: var(--brand-secondary-1);
|
|
259
|
-
`,text:
|
|
186
|
+
`,text:k.css`
|
|
260
187
|
margin: var(--spacing-sm) 0;
|
|
261
|
-
`,
|
|
188
|
+
`,reset:k.css`
|
|
189
|
+
margin: 0 var(--spacing-md);
|
|
190
|
+
font-size: var(--fs-sm);
|
|
191
|
+
color: var(--gray-500);
|
|
192
|
+
`,title:k.css`
|
|
262
193
|
margin: 0 0 var(--spacing-sm);
|
|
263
|
-
font-size: var(--
|
|
194
|
+
font-size: var(--fs-md);
|
|
264
195
|
& > small {
|
|
265
196
|
display: block;
|
|
266
|
-
font-size: var(--
|
|
267
|
-
font-weight: var(--
|
|
197
|
+
font-size: var(--fs-xs);
|
|
198
|
+
font-weight: var(--fw-regular);
|
|
268
199
|
margin: var(--spacing-xxs) 0 0;
|
|
269
200
|
}
|
|
270
|
-
`,headingGroup:
|
|
201
|
+
`,headingGroup:k.css`
|
|
271
202
|
align-items: baseline;
|
|
272
203
|
display: flex;
|
|
273
204
|
justify-content: space-between;
|
|
274
|
-
|
|
205
|
+
align-items: center;
|
|
206
|
+
`,divider:k.css`
|
|
275
207
|
background: var(--gray-300);
|
|
276
208
|
display: block;
|
|
277
209
|
width: 1px;
|
|
@@ -279,15 +211,94 @@ to {
|
|
|
279
211
|
position: absolute;
|
|
280
212
|
inset: 0 auto 0 0;
|
|
281
213
|
margin: auto 0;
|
|
282
|
-
`,submitButton:
|
|
214
|
+
`,submitButton:k.css`
|
|
283
215
|
position: absolute;
|
|
284
216
|
right: var(--spacing-base);
|
|
285
217
|
bottom: var(--spacing-base);
|
|
286
|
-
animation: 0.5s 2 alternate ${
|
|
287
|
-
`,
|
|
218
|
+
animation: 0.5s 2 alternate ${$t};
|
|
219
|
+
`,cancelButton:k.css`
|
|
220
|
+
position: absolute;
|
|
221
|
+
left: calc(200px + var(--spacing-base));
|
|
222
|
+
bottom: var(--spacing-base);
|
|
223
|
+
background: white;
|
|
224
|
+
padding: var(--spacing-sm);
|
|
225
|
+
border: 1px solid var(--gray-300);
|
|
226
|
+
`,error:k.css`
|
|
288
227
|
color: var(--brand-secondary-5);
|
|
289
|
-
font-size: var(--
|
|
290
|
-
|
|
228
|
+
font-size: var(--fs-sm);
|
|
229
|
+
`,quirks:k.css`
|
|
230
|
+
.uniform-input-select,
|
|
231
|
+
input {
|
|
232
|
+
padding: var(--spacing-sm);
|
|
233
|
+
}
|
|
234
|
+
`};var L=require("@emotion/react"),re=({children:t})=>(0,e.jsx)("table",{css:L.css`
|
|
235
|
+
border-collapse: collapse;
|
|
236
|
+
display: table;
|
|
237
|
+
width: 100%;
|
|
238
|
+
font-size: var(--fs-sm);
|
|
239
|
+
`},t),Ne=({children:t})=>(0,e.jsx)("thead",{css:L.css`
|
|
240
|
+
background: var(--gray-50);
|
|
241
|
+
text-align: left;
|
|
242
|
+
& tr {
|
|
243
|
+
border-bottom: 1px solid var(--gray-200);
|
|
244
|
+
}
|
|
245
|
+
`},t),ne=({children:t})=>(0,e.jsx)("tbody",null,t),z=({border:t,children:r})=>(0,e.jsx)("tr",{css:t?L.css`
|
|
246
|
+
border-bottom: 1px solid var(--gray-200);
|
|
247
|
+
&:where(:last-child) {
|
|
248
|
+
border: none;
|
|
249
|
+
}
|
|
250
|
+
`:void 0},r),ie=({children:t,width:r})=>(0,e.jsx)("th",{css:L.css`
|
|
251
|
+
outline: none;
|
|
252
|
+
padding: var(--spacing-sm);
|
|
253
|
+
width: ${r!=null?r:"auto"};
|
|
254
|
+
`},t);function Kt(t){switch(t){case"light":return L.css`
|
|
255
|
+
color: var(--gray-400);
|
|
256
|
+
`;case"dark":return L.css`
|
|
257
|
+
color: var(--brand-secondary-1);
|
|
258
|
+
`}}function Wt(t){return L.css`
|
|
259
|
+
text-align: ${t};
|
|
260
|
+
`}var V=({alignment:t="left",border:r,color:n="dark",children:o})=>(0,e.jsx)("td",{css:[L.css`
|
|
261
|
+
padding: var(--spacing-base);
|
|
262
|
+
max-width: 180px;
|
|
263
|
+
overflow-wrap: break-word;
|
|
264
|
+
position: relative;
|
|
265
|
+
`,Kt(n),Wt(t),r?L.css`
|
|
266
|
+
border-left: 1px solid var(--gray-200);
|
|
267
|
+
`:void 0]},o);var se=require("@emotion/react"),Ze=se.css`
|
|
268
|
+
position: relative;
|
|
269
|
+
display: inline-block;
|
|
270
|
+
font-size: var(--fs-base);
|
|
271
|
+
`,ze=se.css`
|
|
272
|
+
display: block;
|
|
273
|
+
text-decoration: line-through;
|
|
274
|
+
`,Ue=se.css`
|
|
275
|
+
position: absolute;
|
|
276
|
+
width: 6px;
|
|
277
|
+
height: 6px;
|
|
278
|
+
right: -10px;
|
|
279
|
+
top: 9px;
|
|
280
|
+
background: var(--red-tooltip);
|
|
281
|
+
border-radius: 3px;
|
|
282
|
+
`;var Ge=require("@emotion/react"),Yt=`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
283
|
+
<path d="M4.2 7.2C4.53137 7.2 4.8 6.93137 4.8 6.6C4.8 6.26863 4.53137 6 4.2 6C3.86863 6 3.6 6.26863 3.6 6.6C3.6 6.93137 3.86863 7.2 4.2 7.2Z" fill="#828282"/>
|
|
284
|
+
<path d="M8.4 6.6C8.4 6.93137 8.13137 7.2 7.8 7.2C7.46863 7.2 7.2 6.93137 7.2 6.6C7.2 6.26863 7.46863 6 7.8 6C8.13137 6 8.4 6.26863 8.4 6.6Z" fill="#828282"/>
|
|
285
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM6 10.8C8.65097 10.8 10.8 8.65097 10.8 6C10.8 5.49824 10.723 5.01447 10.5802 4.55984C10.0795 4.69533 9.55274 4.76763 9.00913 4.76763C6.77526 4.76763 4.82652 3.54683 3.79366 1.73601C2.25282 2.53492 1.2 4.14451 1.2 6C1.2 8.65097 3.34903 10.8 6 10.8Z" fill="#828282"/>
|
|
286
|
+
</svg>`,Jt=`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
287
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.59995 5.05775C4.9254 5.05775 5.99992 3.98325 5.99992 2.65778C5.99992 1.33232 4.9254 0.257812 3.59995 0.257812C2.27448 0.257812 1.19998 1.33232 1.19998 2.65778C1.19998 3.98325 2.27448 5.05775 3.59995 5.05775ZM3.59999 3.85777C4.26272 3.85777 4.79997 3.32052 4.79997 2.65778C4.79997 1.99505 4.26272 1.4578 3.59999 1.4578C2.93725 1.4578 2.4 1.99505 2.4 2.65778C2.4 3.32052 2.93725 3.85777 3.59999 3.85777Z" fill="#828282"/>
|
|
288
|
+
<path d="M5.39993 6.8577C5.73131 6.8577 5.99993 7.12632 5.99993 7.45769V11.0576H7.19991V7.45769C7.19991 6.46356 6.39406 5.65771 5.39993 5.65771H1.79998C0.80588 5.65771 0 6.46356 0 7.45769V11.0576H1.19999V7.45769C1.19999 7.12632 1.46861 6.8577 1.79998 6.8577H5.39993Z" fill="#828282"/>
|
|
289
|
+
<path d="M11.9999 5.05762H8.3999V6.2576H11.9999V5.05762Z" fill="#828282"/>
|
|
290
|
+
<path d="M8.3999 7.45752H11.9999V8.6575H8.3999V7.45752Z" fill="#828282"/>
|
|
291
|
+
<path d="M11.9999 2.65771H8.3999V3.8577H11.9999V2.65771Z" fill="#828282"/>
|
|
292
|
+
</svg>`,_e=`<svg width="15" height="11" viewBox="0 0 15 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
293
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.113 3.12646C8.16729 3.12646 9.02195 3.98113 9.02195 5.03541C9.02195 5.86658 8.49075 6.57368 7.74932 6.83573V10.1259H6.47669V6.83573C5.73526 6.57368 5.20405 5.86658 5.20405 5.03541C5.20405 3.98113 6.05872 3.12646 7.113 3.12646ZM7.113 4.39909C7.46443 4.39909 7.74932 4.68398 7.74932 5.03541C7.74932 5.38684 7.46443 5.67172 7.113 5.67172C6.76158 5.67172 6.47669 5.38684 6.47669 5.03541C6.47669 4.68398 6.76158 4.39909 7.113 4.39909Z" fill="#828282"/>
|
|
294
|
+
<path d="M3.96336 1.88578C3.15733 2.69183 2.65879 3.80537 2.65879 5.03535C2.65879 6.42093 3.29145 7.65875 4.28366 8.47569L5.1895 7.56984C4.42501 6.98876 3.93142 6.06969 3.93142 5.03535C3.93142 4.1568 4.28752 3.36142 4.86325 2.78567L3.96336 1.88578Z" fill="#828282"/>
|
|
295
|
+
<path d="M9.36269 2.7856C9.93846 3.36136 10.2946 4.15676 10.2946 5.03535C10.2946 6.06973 9.80096 6.98882 9.03643 7.5699L9.94228 8.47575C10.9345 7.65881 11.5672 6.42096 11.5672 5.03535C11.5672 3.80533 11.0687 2.69177 10.2626 1.88571L9.36269 2.7856Z" fill="#828282"/>
|
|
296
|
+
<path d="M0.113525 5.03534C0.113525 3.10251 0.896953 1.35266 2.16359 0.0860049L3.06347 0.985892C2.02714 2.02224 1.38616 3.45394 1.38616 5.03534C1.38616 6.61674 2.02714 8.04844 3.06347 9.08479L2.16358 9.98468C0.89695 8.71802 0.113525 6.96817 0.113525 5.03534Z" fill="#828282"/>
|
|
297
|
+
<path d="M12.0624 9.98474C13.329 8.71809 14.1125 6.96821 14.1125 5.03534C14.1125 3.10248 13.329 1.3526 12.0624 0.0859375L11.1625 0.985824C12.1988 2.02218 12.8398 3.4539 12.8398 5.03534C12.8398 6.61678 12.1988 8.0485 11.1625 9.08486L12.0624 9.98474Z" fill="#828282"/>
|
|
298
|
+
</svg>`,$e=({type:t})=>{let r="";switch(t){case"Audience":r=Yt;break;case"Signal":r=_e;break;case"Intent":r=_e;break;case"Enrichment":r=Jt;break}return(0,e.jsx)("i",{css:Ge.css`
|
|
299
|
+
align-items: center;
|
|
300
|
+
display: inline-block;
|
|
301
|
+
`,dangerouslySetInnerHTML:{__html:r}})};var Xt=({dimensionIndex:t,dimensions:r,disableEditOverride:n,onClick:o,preemptiveOverrides:i})=>{var p;let{settings:a}=W(),l=(p=i!=null?i:a.scoreOverrides)!=null?p:{};return(0,e.jsx)(re,null,(0,e.jsx)(ne,null,Object.entries(r).sort(([m],[u])=>m.localeCompare(u)).map(([m,u])=>{var y;let{dim:s,name:d,type:c,category:v}=(y=t[m])!=null?y:{name:m,dim:m,type:void 0,category:void 0},f=l[s];return(0,e.jsx)(z,{key:s},(0,e.jsx)(V,null,f!==void 0?(0,e.jsx)("s",{css:ze},f.initial):null,(0,e.jsx)("b",{css:Ze},u,f!==void 0&&(0,e.jsx)("i",{css:Ue}))),(0,e.jsx)(V,null,(0,e.jsx)("div",{onClick:()=>o==null?void 0:o(s),css:o?{cursor:"pointer"}:void 0},(0,e.jsx)("span",{css:h.divider,role:"presentation"}),(0,e.jsx)("div",null,(0,e.jsx)($e,{type:c})," ",c),(0,e.jsx)("strong",null,v?`${v}:`:""," ",d))),(0,e.jsx)(V,{alignment:"right",color:"light"},f!==void 0&&!n?(0,e.jsx)(F,{route:`/overrides/${s}`},"Edit override"):null))})))},A=Xt;async function ae({actions:t,saveSettings:r,scores:n,settings:o}){var p,m;let i=(p=o.scoreOverrides)!=null?p:{},a={...i},l=[];for(let u of Object.keys(i)){let s=i==null?void 0:i[u];delete a[u],l.push({type:"modscoreS",data:{dimension:u,delta:s.initial-((m=n[u])!=null?m:0)}})}await r({...o,scoreOverrides:a}),await t.rawUpdate(l)}async function Ke({quirk:t,settings:r,saveSettings:n,actions:o}){var l;let i=(l=r.quirkOverrides)==null?void 0:l[t];if(!i)return;let a={...r.quirkOverrides};delete a[t],await n({...r,quirkOverrides:a}),await o.rawUpdate([{type:"setquirk",data:{key:t,value:i.initial}}])}var Ce=require("@uniformdev/design-system"),We=require("@uniformdev/design-system"),Ye=({dimensionIndex:{index:t},state:{scores:r,data:n},actions:o,saveSettings:i,settings:a})=>{let l=ce.useMemo(()=>{let s={};return Object.keys(t).filter(d=>!r[d]).map(d=>{s[t[d].dim]=0}),s},[r,t]),p=Object.keys(r).length,m=p+Object.keys(l).length,u=()=>{o.rawUpdate([{type:"setcontrol",data:!n.controlGroup}])};return(0,e.jsx)(ce.Fragment,null,(0,e.jsx)("article",{css:h.page},(0,e.jsx)("div",{css:h.headingGroup},(0,e.jsx)("h2",{css:h.title},"Dimensions",(0,e.jsx)("small",null,p," active of ",m)),(0,e.jsx)("div",{css:h.reset},(0,e.jsx)(Ce.Button,{buttonType:"ghost",onClick:()=>ae({actions:o,saveSettings:i,scores:r,settings:a}).then(o.forget)},"clear all dimensions")),(0,e.jsx)(We.Switch,{name:"controlGroup",label:"Control Group",onChange:u,checked:n.controlGroup})),p>0?(0,e.jsx)(A,{dimensionIndex:t,dimensions:r}):(0,e.jsx)(q,{title:n.controlGroup?"In control group":"No active dimensions",text:n.controlGroup?"You are part of the personalization control group. While in the control group you do not have dimension scores and will not see personalized content. A/B tests will still run.":"You do not have score in any dimensions yet.",buttonGroup:n.controlGroup?(0,e.jsx)(Ce.Button,{buttonType:"secondary",onClick:u},"Exit control group"):null}),(0,e.jsx)(J,null,(0,e.jsx)(X,{title:`Inactive Dimensions (${Object.keys(l).length})`},(0,e.jsx)(A,{dimensionIndex:t,dimensions:l})))))};var Je=x(require("react"));var Xe=require("@uniformdev/design-system");var we=require("@uniformdev/design-system"),je=({dimensionIndex:{index:t},state:{data:r,scores:n},actions:o,settings:i,saveSettings:a})=>{var d;let l=(d=i.scoreOverrides)!=null?d:{},p=Object.keys(l).length,m=c=>(c==null||c.preventDefault(),a({...i,route:"/overrides/add"})),u=()=>{o.rawUpdate([{type:"setcontrol",data:!r.controlGroup}])},s={};return Object.entries(n).map(([c,v])=>{l[c]!==void 0&&(s[c]=v)}),(0,e.jsx)(Je.Fragment,null,(0,e.jsx)("article",{css:h.page},(0,e.jsx)("div",{css:h.headingGroup},(0,e.jsx)("h2",{css:h.title},"What if?"),(0,e.jsx)("div",{css:h.reset},(0,e.jsx)(we.Button,{buttonType:"ghost",onClick:()=>ae({actions:o,settings:i,saveSettings:a,scores:n})},"delete all overrides")),(0,e.jsx)(Xe.AddButton,{onClick:m})),(0,e.jsx)("p",null,"Override dimension scores to test personalization"),p>0?(0,e.jsx)(A,{dimensionIndex:t,dimensions:s,onClick:c=>a({...i,route:`/overrides/${c}`})}):(0,e.jsx)(q,{title:r.controlGroup?"In control group":"No overrides",text:r.controlGroup?"You are part of the personalization control group. While in the control group you do not have dimension scores and will not see personalized content. A/B tests will still run.":"You do not have any dimension overrides yet.",buttonGroup:r.controlGroup?(0,e.jsx)(we.Button,{buttonType:"secondary",onClick:u},"Exit control group"):null})))};var B=require("formik");var N=x(require("yup"));var I=require("@emotion/react"),et=I.css`
|
|
291
302
|
background: var(--white);
|
|
292
303
|
border: 1px solid var(--gray-500);
|
|
293
304
|
border-radius: var(--rounded-base);
|
|
@@ -298,403 +309,115 @@ to {
|
|
|
298
309
|
cursor: not-allowed;
|
|
299
310
|
color: var(--gray-200);
|
|
300
311
|
}
|
|
301
|
-
`,
|
|
302
|
-
appearance: none;
|
|
303
|
-
background: var(--white) url('./assets/chevon-down.svg') no-repeat 98% 50%;
|
|
304
|
-
border: 1px solid var(--gray-500);
|
|
305
|
-
border-radius: var(--rounded-base);
|
|
306
|
-
color: var(--brand-secondary-1);
|
|
307
|
-
padding: var(--spacing-base);
|
|
308
|
-
&:disabled {
|
|
309
|
-
cursor: not-allowed;
|
|
310
|
-
color: var(--gray-200);
|
|
311
|
-
}
|
|
312
|
-
`,q=x.css`
|
|
312
|
+
`,zo=I.css`
|
|
313
313
|
margin: var(--spacing-base) 0;
|
|
314
|
-
`,
|
|
314
|
+
`,tt=I.css`
|
|
315
315
|
color: var(--brand-secondary-1);
|
|
316
316
|
display: flex;
|
|
317
317
|
flex-direction: column;
|
|
318
318
|
margin: 0 0 var(--spacing-sm);
|
|
319
|
-
`,
|
|
319
|
+
`,ot=I.css`
|
|
320
320
|
color: var(--brand-secondary-1);
|
|
321
321
|
display: block;
|
|
322
|
-
|
|
322
|
+
flex: 1 100%;
|
|
323
|
+
font-weight: var(--fw-bold);
|
|
323
324
|
margin: 0 0 var(--spacing-sm);
|
|
324
|
-
`,
|
|
325
|
+
`,Uo=I.css`
|
|
325
326
|
color: var(--gray-600);
|
|
326
|
-
font-size: var(--
|
|
327
|
-
`,
|
|
327
|
+
font-size: var(--fs-sm);
|
|
328
|
+
`,_o=I.css`
|
|
328
329
|
color: var(--brand-secondary-5);
|
|
329
330
|
display: block;
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
--brand-primary-3: #83c6e1; /* slate blue */
|
|
341
|
-
|
|
342
|
-
/* secondary colours */
|
|
343
|
-
--brand-secondary-1: #1f2b34; /* carbon */
|
|
344
|
-
--brand-secondary-2: #ecf1f1; /* silver */
|
|
345
|
-
--brand-secondary-3: #2ecdb4; /* teal */
|
|
346
|
-
--brand-secondary-4: #f6f1c3; /* yellow */
|
|
347
|
-
--brand-secondary-5: #d9534f; /* brick red */
|
|
348
|
-
--brand-secondary-6: #dbf6f2; /* mint */
|
|
349
|
-
|
|
350
|
-
/* off brand */
|
|
351
|
-
--input-border: rgba(31, 43, 52, 0.5);
|
|
352
|
-
|
|
353
|
-
/* site settings */
|
|
354
|
-
--site-width: 700px;
|
|
355
|
-
--min-height: 450px;
|
|
356
|
-
|
|
357
|
-
--spacing-base: 1.15rem;
|
|
358
|
-
--spacing-xs: calc(var(--spacing-base) - 0.75rem);
|
|
359
|
-
--spacing-sm: calc(var(--spacing-base) - 0.5rem);
|
|
360
|
-
--spacing-md: calc(var(--spacing-base) * 1.5);
|
|
361
|
-
--spacing-lg: calc(var(--spacing-base) * 2);
|
|
362
|
-
--spacing-xl: calc(var(--spacing-base) * 2.5);
|
|
363
|
-
|
|
364
|
-
/* font sizes */
|
|
365
|
-
--font-base: 1rem; /* 16px */
|
|
366
|
-
--font-xxs: calc(var(--font-base) - 0.5rem);
|
|
367
|
-
--font-xs: calc(var(--font-base) - 0.25rem);
|
|
368
|
-
--font-sm: calc(var(--font-base) - 0.125rem); /* 14px */
|
|
369
|
-
--font-md: calc(var(--font-base) * 1.25);
|
|
370
|
-
--font-lg: calc(var(--font-base) * 1.5);
|
|
371
|
-
|
|
372
|
-
/* font-weight */
|
|
373
|
-
--font-regular: 400;
|
|
374
|
-
--font-bold: 700;
|
|
375
|
-
|
|
376
|
-
/* brand shadow styles */
|
|
377
|
-
--shadow-base: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
|
|
378
|
-
|
|
379
|
-
/* rounder corners */
|
|
380
|
-
--rounded-base: 6px;
|
|
381
|
-
--rounded-full: 99999px;
|
|
382
|
-
|
|
383
|
-
/* gray spectrum */
|
|
384
|
-
--white: #fff;
|
|
385
|
-
--gray-50: #f9fafb;
|
|
386
|
-
--gray-100: #f3f4f6;
|
|
387
|
-
--gray-200: #e5e7eb;
|
|
388
|
-
--gray-300: #d1d5db;
|
|
389
|
-
--gray-400: #9ca3af;
|
|
390
|
-
--gray-500: #6b7280;
|
|
391
|
-
--gray-600: #4b5563;
|
|
392
|
-
--gray-700: #374151;
|
|
393
|
-
--gray-800: #1f2937;
|
|
394
|
-
--gray-900: #111827;
|
|
395
|
-
|
|
396
|
-
/* z-indexs */
|
|
397
|
-
--z-10: 10;
|
|
331
|
+
`,rt=I.css`
|
|
332
|
+
flex-direction: row;
|
|
333
|
+
flex-wrap: wrap;
|
|
334
|
+
|
|
335
|
+
input[type='range'] {
|
|
336
|
+
height: 28px;
|
|
337
|
+
-webkit-appearance: none;
|
|
338
|
+
margin: 10px 0;
|
|
339
|
+
width: 100%;
|
|
340
|
+
flex: 1 0 80%;
|
|
398
341
|
}
|
|
399
342
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
Document
|
|
404
|
-
========
|
|
405
|
-
*/
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
Use a better box model (opinionated).
|
|
409
|
-
*/
|
|
410
|
-
|
|
411
|
-
*,
|
|
412
|
-
::before,
|
|
413
|
-
::after {
|
|
414
|
-
box-sizing: border-box;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
Use a more readable tab size (opinionated).
|
|
419
|
-
*/
|
|
420
|
-
|
|
421
|
-
html {
|
|
422
|
-
-moz-tab-size: 4;
|
|
423
|
-
tab-size: 4;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
1. Correct the line height in all browsers.
|
|
428
|
-
2. Prevent adjustments of font size after orientation changes in iOS.
|
|
429
|
-
*/
|
|
430
|
-
|
|
431
|
-
html {
|
|
432
|
-
line-height: 1.15; /* 1 */
|
|
433
|
-
-webkit-text-size-adjust: 100%; /* 2 */
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
/*
|
|
437
|
-
Sections
|
|
438
|
-
========
|
|
439
|
-
*/
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
Remove the margin in all browsers.
|
|
443
|
-
*/
|
|
444
|
-
|
|
445
|
-
body {
|
|
446
|
-
margin: 0;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
|
|
451
|
-
*/
|
|
452
|
-
|
|
453
|
-
body {
|
|
454
|
-
font-family:
|
|
455
|
-
system-ui,
|
|
456
|
-
-apple-system, /* Firefox supports this but not yet system-ui */
|
|
457
|
-
'Segoe UI',
|
|
458
|
-
Roboto,
|
|
459
|
-
Helvetica,
|
|
460
|
-
Arial,
|
|
461
|
-
sans-serif,
|
|
462
|
-
'Apple Color Emoji',
|
|
463
|
-
'Segoe UI Emoji';
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
/*
|
|
467
|
-
Grouping content
|
|
468
|
-
================
|
|
469
|
-
*/
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
1. Add the correct height in Firefox.
|
|
473
|
-
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
|
474
|
-
*/
|
|
475
|
-
|
|
476
|
-
hr {
|
|
477
|
-
height: 0; /* 1 */
|
|
478
|
-
color: inherit; /* 2 */
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
/*
|
|
482
|
-
Text-level semantics
|
|
483
|
-
====================
|
|
484
|
-
*/
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
Add the correct text decoration in Chrome, Edge, and Safari.
|
|
488
|
-
*/
|
|
489
|
-
|
|
490
|
-
abbr[title] {
|
|
491
|
-
text-decoration: underline dotted;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
Add the correct font weight in Edge and Safari.
|
|
496
|
-
*/
|
|
497
|
-
|
|
498
|
-
b,
|
|
499
|
-
strong {
|
|
500
|
-
font-weight: bolder;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
|
|
505
|
-
2. Correct the odd 'em' font sizing in all browsers.
|
|
506
|
-
*/
|
|
507
|
-
|
|
508
|
-
code,
|
|
509
|
-
kbd,
|
|
510
|
-
samp,
|
|
511
|
-
pre {
|
|
512
|
-
font-family:
|
|
513
|
-
ui-monospace,
|
|
514
|
-
SFMono-Regular,
|
|
515
|
-
Consolas,
|
|
516
|
-
'Liberation Mono',
|
|
517
|
-
Menlo,
|
|
518
|
-
monospace; /* 1 */
|
|
519
|
-
font-size: 1em; /* 2 */
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
Add the correct font size in all browsers.
|
|
524
|
-
*/
|
|
525
|
-
|
|
526
|
-
small {
|
|
527
|
-
font-size: 80%;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
|
|
532
|
-
*/
|
|
533
|
-
|
|
534
|
-
sub,
|
|
535
|
-
sup {
|
|
536
|
-
font-size: 75%;
|
|
537
|
-
line-height: 0;
|
|
538
|
-
position: relative;
|
|
539
|
-
vertical-align: baseline;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
sub {
|
|
543
|
-
bottom: -0.25em;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
sup {
|
|
547
|
-
top: -0.5em;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
/*
|
|
551
|
-
Tabular data
|
|
552
|
-
============
|
|
553
|
-
*/
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
|
|
557
|
-
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
|
|
558
|
-
*/
|
|
559
|
-
|
|
560
|
-
table {
|
|
561
|
-
text-indent: 0; /* 1 */
|
|
562
|
-
border-color: inherit; /* 2 */
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
/*
|
|
566
|
-
Forms
|
|
567
|
-
=====
|
|
568
|
-
*/
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
1. Change the font styles in all browsers.
|
|
572
|
-
2. Remove the margin in Firefox and Safari.
|
|
573
|
-
*/
|
|
574
|
-
|
|
575
|
-
button,
|
|
576
|
-
input,
|
|
577
|
-
optgroup,
|
|
578
|
-
select,
|
|
579
|
-
textarea {
|
|
580
|
-
font-family: inherit; /* 1 */
|
|
581
|
-
font-size: 100%; /* 1 */
|
|
582
|
-
line-height: 1.15; /* 1 */
|
|
583
|
-
margin: 0; /* 2 */
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
Remove the inheritance of text transform in Edge and Firefox.
|
|
588
|
-
1. Remove the inheritance of text transform in Firefox.
|
|
589
|
-
*/
|
|
590
|
-
|
|
591
|
-
button,
|
|
592
|
-
select { /* 1 */
|
|
593
|
-
text-transform: none;
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
Correct the inability to style clickable types in iOS and Safari.
|
|
598
|
-
*/
|
|
599
|
-
|
|
600
|
-
button,
|
|
601
|
-
[type='button'],
|
|
602
|
-
[type='reset'],
|
|
603
|
-
[type='submit'] {
|
|
604
|
-
-webkit-appearance: button;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
Remove the inner border and padding in Firefox.
|
|
609
|
-
*/
|
|
610
|
-
|
|
611
|
-
::-moz-focus-inner {
|
|
612
|
-
border-style: none;
|
|
613
|
-
padding: 0;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
/**
|
|
617
|
-
Restore the focus styles unset by the previous rule.
|
|
618
|
-
*/
|
|
619
|
-
|
|
620
|
-
:-moz-focusring {
|
|
621
|
-
outline: 1px dotted ButtonText;
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
Remove the additional ':invalid' styles in Firefox.
|
|
626
|
-
See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737
|
|
627
|
-
*/
|
|
628
|
-
|
|
629
|
-
:-moz-ui-invalid {
|
|
630
|
-
box-shadow: none;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
/**
|
|
634
|
-
Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.
|
|
635
|
-
*/
|
|
636
|
-
|
|
637
|
-
legend {
|
|
638
|
-
padding: 0;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
/**
|
|
642
|
-
Add the correct vertical alignment in Chrome and Firefox.
|
|
643
|
-
*/
|
|
644
|
-
|
|
645
|
-
progress {
|
|
646
|
-
vertical-align: baseline;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
/**
|
|
650
|
-
Correct the cursor style of increment and decrement buttons in Safari.
|
|
651
|
-
*/
|
|
652
|
-
|
|
653
|
-
::-webkit-inner-spin-button,
|
|
654
|
-
::-webkit-outer-spin-button {
|
|
655
|
-
height: auto;
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
1. Correct the odd appearance in Chrome and Safari.
|
|
660
|
-
2. Correct the outline style in Safari.
|
|
661
|
-
*/
|
|
662
|
-
|
|
663
|
-
[type='search'] {
|
|
664
|
-
-webkit-appearance: textfield; /* 1 */
|
|
665
|
-
outline-offset: -2px; /* 2 */
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
Remove the inner padding in Chrome and Safari on macOS.
|
|
670
|
-
*/
|
|
343
|
+
input[type='range']:focus {
|
|
344
|
+
outline: none;
|
|
345
|
+
}
|
|
671
346
|
|
|
672
|
-
::-webkit-
|
|
673
|
-
|
|
674
|
-
|
|
347
|
+
input[type='range']::-webkit-slider-runnable-track {
|
|
348
|
+
width: 100%;
|
|
349
|
+
height: 6px;
|
|
350
|
+
cursor: pointer;
|
|
351
|
+
animate: 0.2s;
|
|
352
|
+
box-shadow: 0 0 0 #000000;
|
|
353
|
+
background: #2ecdb4;
|
|
354
|
+
border-radius: 0;
|
|
355
|
+
border: 0 solid #000000;
|
|
356
|
+
}
|
|
675
357
|
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
358
|
+
input[type='range']::-moz-range-track {
|
|
359
|
+
width: 100%;
|
|
360
|
+
height: 6px;
|
|
361
|
+
cursor: pointer;
|
|
362
|
+
animate: 0.2s;
|
|
363
|
+
box-shadow: 0 0 0 #000000;
|
|
364
|
+
background: #2ecdb4;
|
|
365
|
+
border-radius: 0;
|
|
366
|
+
border: 0 solid #000000;
|
|
367
|
+
}
|
|
680
368
|
|
|
681
|
-
::-webkit-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
369
|
+
input[type='range']::-webkit-slider-thumb {
|
|
370
|
+
box-shadow: 1px 1px 2px #000000;
|
|
371
|
+
border: 1px solid #000000;
|
|
372
|
+
height: 20px;
|
|
373
|
+
width: 20px;
|
|
374
|
+
border-radius: 20px;
|
|
375
|
+
background: #ffffff;
|
|
376
|
+
cursor: pointer;
|
|
377
|
+
-webkit-appearance: none;
|
|
378
|
+
margin-top: -7.5px;
|
|
379
|
+
}
|
|
380
|
+
input[type='range']::-moz-range-thumb {
|
|
381
|
+
box-shadow: 1px 1px 2px #000000;
|
|
382
|
+
border: 1px solid #000000;
|
|
383
|
+
height: 20px;
|
|
384
|
+
width: 20px;
|
|
385
|
+
border-radius: 20px;
|
|
386
|
+
background: #ffffff;
|
|
387
|
+
cursor: pointer;
|
|
388
|
+
-webkit-appearance: none;
|
|
389
|
+
margin-top: -7.5px;
|
|
390
|
+
}
|
|
391
|
+
input[type='range']:focus::-webkit-slider-runnable-track {
|
|
392
|
+
background: #2ecdb4;
|
|
393
|
+
}
|
|
685
394
|
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
395
|
+
.value-display {
|
|
396
|
+
flex: 1 0 20%;
|
|
397
|
+
padding: 10px;
|
|
398
|
+
}
|
|
399
|
+
`;var de=require("@uniformdev/design-system"),nt=({field:t,form:r,meta:n,...o})=>{var u,s;let{label:i,caption:a,min:l=0,max:p=100,step:m}=o;return(0,e.jsx)("div",null,(0,e.jsx)("label",{css:[tt,rt]},(0,e.jsx)("span",{css:ot},i),(0,e.jsx)("input",{type:"range",min:l,max:p,step:m,...t,value:(u=t.value)!=null?u:0}),(0,e.jsx)("span",{className:"value-display"},(s=t.value)!=null?s:0)),a?(0,e.jsx)(de.Caption,null,a):null,r.touched[t.name]&&r.errors[t.name]?(0,e.jsx)(de.ErrorMessage,{message:r.errors[t.name]}):null)};var it=require("@emotion/react"),E=({children:t,...r})=>(0,e.jsx)("fieldset",{css:it.css`
|
|
400
|
+
border: none;
|
|
401
|
+
padding: 0;
|
|
402
|
+
& legend {
|
|
403
|
+
margin-bottom: var(--spacing-base);
|
|
404
|
+
}
|
|
405
|
+
`,...r},t);var st=require("@emotion/react"),U=({children:t})=>(0,e.jsx)("legend",{css:st.css`
|
|
406
|
+
font-size: var(--fs-md);
|
|
407
|
+
font-weight: var(--fw-bold);
|
|
408
|
+
border-bottom: 1px solid var(--gray-400);
|
|
409
|
+
width: 100%;
|
|
410
|
+
`},t);var le=require("@uniformdev/context");function at({manifest:t,visitor:r,override:n}){let o=new le.Context({manifest:t,transitionStore:new ke({initialData:r})}),i={...o.scores};o.storage.updateData([n]);let l={...{...o.scores}};return Object.entries(l).forEach(([p,m])=>{i[p]===m&&delete l[p]}),l}var ke=class extends le.TransitionDataStore{async handleDelete(){}async handleUpdateData(){}};function _({scores:t,scoreOverrides:r}){let n=[];return r?(Object.entries(r).forEach(([o,i])=>{var p;let a=(p=t[o])!=null?p:0;if(a===i.override)return;let l=i.override-a;n.push({type:"modscoreS",data:{dimension:o,delta:l}})}),n):[]}function pe({quirks:t,quirkOverrides:r}){let n={};if(!!r)return Object.entries(r).forEach(([o,i])=>{t[o]!==i.override&&(n[o]=i.override)}),Object.keys(n).length>0?n:void 0}var dt=require("@uniformdev/design-system");var Te=t=>({field:r,form:n,meta:o,...i})=>(0,e.jsx)(t,{...i,...r,errorMessage:n.errors[r.name]});var me=require("@uniformdev/design-system"),ue=Te(me.Input),ct=Te(me.InputSelect);var jt=N.object({dimension:N.string(),score:N.number()}),De=({settings:t,saveSettings:r,state:n,actions:o,dimensionIndex:{index:i}})=>{var m,u;let a=t.route?[...t.route.matchAll(/overrides\/(?!.*add)(\w+)?/g)]:[],l=a[0]?a[0][1]:"";if(!((m=n.manifest.project.pz)!=null&&m.sig))return(0,e.jsx)("p",null,"Error, manifest is broken or there is no signal to override.");let p=Object.entries(i).filter(([,s])=>s.type!=="Audience"&&s.type!=="Intent").map(([s,d])=>{let c=d.type?`${d.type}: `:"",v=d.category?`${d.category} - `:"",f=`${c}${v}${d.name}`;return{value:s,label:f}});return p.unshift({value:"",label:"Choose dimension to override"}),(0,e.jsx)(B.Formik,{initialValues:{dimension:l,score:(u=n.scores[l])!=null?u:0},validate:s=>{let d={};return(s.score===n.scores[s.dimension]||s.score===0&&!n.scores[l])&&(d.score="You have to modify current score value"),d},validationSchema:jt,enableReinitialize:!0,validateOnChange:!1,validateOnBlur:!1,onSubmit:async s=>{var y,C,w,D,Z,Pe;let d=(C=(y=i[s.dimension])==null?void 0:y.cap)!=null?C:0,c=Math.min(s.score,d),v={...t,scoreOverrides:{...t.scoreOverrides,[s.dimension]:{initial:(Pe=(Z=(D=(w=t.scoreOverrides)==null?void 0:w[s.dimension])==null?void 0:D.initial)!=null?Z:n.scores[s.dimension])!=null?Pe:0,override:c}},route:"/overrides"};await r(v);let f=_({scores:n.scores,scoreOverrides:v.scoreOverrides});o.rawUpdate(f)}},({isSubmitting:s,values:d})=>{var C;let c=at({manifest:n.manifest,visitor:n.data,override:{type:"modscore",data:{dimension:d.dimension,delta:d.score-((C=n.scores[d.dimension])!=null?C:0)}}}),v=Object.entries(n.scores).reduce((w,[D,Z])=>(w[D]={initial:Z,override:Z},w),{}),f={max:100,step:50};i[d.dimension]&&(f.max=i[d.dimension].cap,f.step=i[d.dimension].str);let y=d.score&&Object.keys(c).length>0;return(0,e.jsx)(B.Form,{css:h.page},(0,e.jsx)("h1",{css:h.title},"Override Dimension"),(0,e.jsx)(B.Field,{component:ct,label:"Dimension",id:"dimension",name:"dimension",options:p,disabled:s}),(0,e.jsx)("p",{css:h.text},(0,e.jsx)("small",null,"Audiences and Intents are aggregated from other dimension scores and cannot be overridden directly.")),d.dimension?(0,e.jsx)(B.Field,{component:nt,name:"score",label:"Score",disabled:s,caption:`Range: 0 - ${f.max} in increments of ${f.step}`}):null,(0,e.jsx)(E,{disabled:s,css:{marginBottom:"2rem"}},y?(0,e.jsx)(J,null,(0,e.jsx)(X,{title:`Impacted Dimensions (${Object.keys(c).length})`},(0,e.jsx)(A,{preemptiveOverrides:v,dimensionIndex:i,dimensions:c,disableEditOverride:!0}))):null,(0,e.jsx)(dt.Button,{type:"submit",css:h.submitButton,disabled:s},"Save"),(0,e.jsx)(F,{route:"/overrides",css:h.cancelButton},"Cancel")))})};var pt=require("react");var ge=require("react"),ve=require("@uniformdev/design-system");var eo=({name:t,value:r,submit:n})=>{let[o,i]=(0,ge.useState)(r!=null?r:"");return(0,ge.useEffect)(()=>{i(r!=null?r:"")},[r]),(0,e.jsx)("div",{css:{display:"flex",gap:"var(--spacing-sm)"}},(0,e.jsx)(ve.Input,{type:"text",css:[et],name:t,value:o,onChange:p=>{i(p.target.value)}}),(0,e.jsx)(ve.Button,{buttonType:"primary",disabled:o===r,size:"sm",onClick:()=>n(t,o!=null?o:"")},"Save"))},lt=eo;var G=require("@uniformdev/design-system"),mt=({...t})=>{let{state:{data:{quirks:r}},quirksIndex:{index:n},settings:o,saveSettings:i,actions:a}=t,[l,p]=(0,pt.useState)(""),m;l&&(m=n[l]);let u=async(s,d)=>{var f,y,C;p("");let c={...o,quirkOverrides:{...o.quirkOverrides,[s]:{initial:(C=(y=(f=o.quirkOverrides)==null?void 0:f[s])==null?void 0:y.initial)!=null?C:r[s],override:d}}};await i(c);let v=pe({quirks:r,quirkOverrides:c.quirkOverrides});await a.update({quirks:v})};return(0,e.jsx)(b.Fragment,null,(0,e.jsx)("article",{css:[h.page,h.quirks]},(0,e.jsx)("h1",{css:h.title},"Quirks"),(0,e.jsx)("p",{css:h.text},"Keys defined in Uniform and their current, programmatically defined values for this visit."),Object.keys(n).length?(0,e.jsx)(re,null,(0,e.jsx)(Ne,null,(0,e.jsx)(z,null,(0,e.jsx)(ie,{width:"30%"},"Key"),(0,e.jsx)(ie,{width:"50%"},"Value"),(0,e.jsx)(ie,{width:"20%"},""))),(0,e.jsx)(ne,null,Object.values(n).map(({name:s,value:d,id:c})=>{var y,C,w;let v=(C=(y=o.quirkOverrides)==null?void 0:y[s])==null?void 0:C.initial,f=[];return m&&m.options&&(f=m.options.map(D=>({value:D.value,label:D.name}))),(0,e.jsx)(z,{key:c,border:"bottom"},(0,e.jsx)(V,null,(0,e.jsx)("strong",null,s)),(0,e.jsx)(V,null,l!==c?(0,e.jsx)("div",{onClick:()=>{p(c)}},v?(0,e.jsx)("div",null,(0,e.jsx)("s",null,v)):null,d):null,l===c&&m&&(0,e.jsx)(b.Fragment,null,m.options?(0,e.jsx)(G.InputSelect,{showLabel:!1,label:`Change ${s}`,defaultOption:`Change ${s}`,name:c,onChange:D=>u(D.target.name,D.target.value),options:f}):(0,e.jsx)(lt,{name:c,value:d,submit:u}))),(0,e.jsx)(V,null,l?null:(w=o.quirkOverrides)!=null&&w[c]?(0,e.jsx)(G.Button,{buttonType:"ghost",onClick:()=>{Ke({quirk:c,settings:o,saveSettings:i,actions:a})}},(0,e.jsx)("small",null,"Clear Override")):(0,e.jsx)(G.Button,{buttonType:"ghost",onClick:()=>{p(c)}},(0,e.jsx)("small",null,"Override"))))}))):(0,e.jsx)(q,{title:"No quirks configured",text:"There are currently no quirks setup. Try to connect to Uniform API to load additional information about Quirks and Quirks without defined value."})))};var ut=require("@uniformdev/design-system"),Se=require("@uniformdev/design-system"),gt=({settings:t,saveSettings:r,actions:n,state:{data:o}})=>(0,e.jsx)("article",{css:[h.page,{display:"flex",flexDirection:"column",gap:"var(--spacing-base)"}]},(0,e.jsx)("h1",{css:h.title},"Settings"),(0,e.jsx)(E,null,(0,e.jsx)(U,null,"Data Connection"),(0,e.jsx)(ut.Button,{buttonType:"tertiary",onClick:()=>{r({...t,route:"/connect"})}},"Manage Connection to Uniform")),(0,e.jsx)(E,null,(0,e.jsx)(U,null,"Storage Consent"),(0,e.jsx)(Se.Switch,{label:"Store visitor data",id:"consent-mode",name:"consentMode",checked:o.consent,onChange:i=>{n.rawUpdate([{type:"consent",data:i.currentTarget.checked}]),r({...t,consentMode:i.currentTarget.checked})}}),(0,e.jsx)("p",null,(0,e.jsx)("small",null,"Enabling storage consent allows storing behavior in this browser for personalization across sessions. Only affects this browser. Personalization works with this disabled, but dimension scores are lost on refresh."))),(0,e.jsx)(E,null,(0,e.jsx)(U,null,"Logging"),(0,e.jsx)(Se.Switch,{label:"Write Uniform Context diagnostic logs to browser console",id:"logging",name:"logging",checked:t.logLevel==="debug",onChange:i=>r({...t,logLevel:i.currentTarget.checked?"debug":"none"})})));var Le=require("@uniformdev/design-system");var Oe=({settings:t,saveSettings:r})=>{let n=()=>{r({...t,route:"/connect"})},o=()=>{r({...t,ignoreApiKeyPrompt:!0})},i=t.route==="/connect",a=!(t!=null&&t.apiKey);return!t.ignoreApiKeyPrompt&&a&&!i?(0,e.jsx)("div",{css:[j,Fe]},(0,e.jsx)("h2",{css:ee},"Connect to a Uniform Project"),(0,e.jsx)("p",{css:te},"This allows reading human-readable labels for the dimensions."),(0,e.jsx)("div",{css:oe},(0,e.jsx)(Le.Button,{buttonType:"secondary",onClick:n},"Connect this site"),(0,e.jsx)(Le.Button,{buttonType:"ghost",onClick:o},"Skip for now")),(0,e.jsx)("button",{type:"button",css:qe,title:"close",onClick:o},(0,e.jsx)("span",{hidden:!0},"Close"))):null};var Q=require("@uniformdev/context/api"),vt=require("react-use"),ft=x(require("react"));function ht({apiHost:t,apiKey:r,projectId:n},o){let{loading:i,error:a,value:l}=(0,vt.useAsync)(async()=>{if(!r||!n)return p;let u=(await new Q.DimensionClient({projectId:n,apiKey:r,apiHost:t||void 0}).get()).dimensions,s={};return u.map(d=>{var c,v,f,y;if(s[d.dim]={...(0,Q.computeDimensionDefinitionDisplayData)(d),cap:d.cap,str:10},s[d.dim].type==="Enrichment"){let C=d.dim.split("_")[0];s[d.dim].cap=(y=(f=(v=(c=o==null?void 0:o.project.pz)==null?void 0:c.enr)==null?void 0:v[C])==null?void 0:f.cap)!=null?y:100}}),s},[t,r,n]),p=ft.useMemo(()=>{var u,s,d,c;let m={};return o&&(Object.entries((s=(u=o==null?void 0:o.project.pz)==null?void 0:u.sig)!=null?s:{}).map(([v,f])=>{let y=(0,Q.computeDimensionDisplayData)(v,o);y&&(m[v]={...f,...y})}),Object.entries((c=(d=o==null?void 0:o.project.pz)==null?void 0:d.enr)!=null?c:{}).map(([v,f])=>{var w;let y=(0,Q.computeDimensionDisplayData)(v,o),C={cap:(w=f.cap)!=null?w:100,str:10};y&&(m[v]={...y,cap:C.cap,str:C.str})}),l&&Object.entries(l).map(([v,f])=>{m[v]={...m[v],...f}})),m},[o,l]);return{loading:i,error:a,index:p}}var bt=require("react"),yt=require("@uniformdev/context/api"),Ct=require("react-use");function wt({apiHost:t,apiKey:r,projectId:n},o){let{loading:i,error:a,value:l}=(0,Ct.useAsync)(async()=>{if(!r||!n)return{};let u=await new yt.QuirkClient({projectId:n,apiKey:r,apiHost:t||void 0}).get(),s={};return u.quirks.map(d=>{s[d.id]={...d,value:o[d.id]}}),s},[t,r,n]),p=(0,bt.useMemo)(()=>{let m={};return Object.entries(o).map(([u,s])=>m[u]={value:s,id:u,name:u}),l&&Object.entries(l).map(([u,s])=>m[u]={...s,value:o[u]}),m},[o,l]);return{loading:i,error:a,index:p}}var xe=require("@emotion/react"),Ot=require("@uniformdev/design-system");function fe(){return(0,e.jsx)("style",null,`
|
|
411
|
+
:root {
|
|
412
|
+
--site-width: 700px;
|
|
690
413
|
|
|
691
|
-
/*
|
|
692
|
-
|
|
693
|
-
|
|
414
|
+
/* Red CTA */
|
|
415
|
+
--red-button: rgb(217 83 79);
|
|
416
|
+
--red-tooltip: #D9534F;
|
|
694
417
|
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
418
|
+
--min-height: 450px;
|
|
419
|
+
}
|
|
420
|
+
`)}var he=require("react"),kt=require("react-use");var Tt=()=>{let[t,r]=(0,he.useState)(!1),n=(0,kt.useMountedState)();return(0,he.useEffect)(()=>{setTimeout(()=>{n()&&r(!0)},1e3)},[n]),t?(0,e.jsx)("article",{css:h.page},(0,e.jsx)("h1",null,"Loading..."),(0,e.jsx)("p",null,"Connecting to Uniform API for complete data.")):null};var Dt=require("@uniformdev/context"),be=require("@uniformdev/context/api"),P=require("formik"),T=x(require("react")),O=require("@uniformdev/design-system");function St(t){let[r,n]=T.useState(t.currentData?"c":"qc"),[o,i]=T.useState(void 0),[a,l]=T.useState(void 0),p=T.useCallback(async s=>{let d=new be.ManifestClient(s);i(void 0);try{let c=await d.get({preview:!0});return l({manifest:c,target:s}),c}catch(c){if(c instanceof be.ApiClientError){c.statusCode===403?i("API key is valid but does not have Context > Read Drafts permission, or the API key does not have permissions to the project, or the project does not exist."):i(c.errorMessage);return}if("message"in c){c.message==="Failed to fetch"?i("A network error occurred. Ensure the API host is valid."):i(c.message);return}i(JSON.stringify(c,null,2));return}},[]);T.useEffect(()=>{!t.currentData||p(t.currentData)},[p,t.currentData]);let m=async s=>{await p(s)&&(n("c"),await t.onConnect(s))},u=()=>{confirm("Disconnect from Uniform? Make sure to save your API key if you want to reconnect.")&&(n("qc"),l(void 0),i(void 0),t.onConnect(null))};return(0,e.jsx)("div",null,o?(0,e.jsx)(O.ErrorMessage,{message:o}):null,r==="qc"||r==="mc"?(0,e.jsx)(to,{...t,state:r,setState:n,onConnect:m}):(0,e.jsx)("div",null,a?(0,e.jsx)(T.Fragment,null,(0,e.jsx)("p",null,"Connected to"," ",(0,e.jsx)("a",{href:`${a==null?void 0:a.target.apiHost}/projects/${a==null?void 0:a.target.projectId}`,target:"_blank",rel:"noopener noreferrer",css:{textDecoration:"underline"}},(0,e.jsx)("strong",null,a==null?void 0:a.manifest.project.name))," ",(0,e.jsx)("small",null,"(",a==null?void 0:a.manifest.project.id,")")),(0,e.jsx)(O.Button,{buttonType:"secondary",type:"button",onClick:u},"Disconnect")):null))}function to({setState:t,state:r,currentData:n,onConnect:o}){var i,a,l;return(0,e.jsx)("div",null,(0,e.jsx)(P.Formik,{initialValues:{apiHost:(i=n==null?void 0:n.apiHost)!=null?i:"https://uniform.dev",apiKey:(a=n==null?void 0:n.apiKey)!=null?a:"",projectId:(l=n==null?void 0:n.projectId)!=null?l:"",qc:""},onSubmit:o},({setFieldValue:p,setFieldError:m,errors:{qc:u},isSubmitting:s})=>(0,e.jsx)(P.Form,null,(0,e.jsx)("fieldset",{css:{display:"flex",flexDirection:"column",gap:"var(--spacing-base)"}},r==="qc"?(0,e.jsx)(T.Fragment,null,(0,e.jsx)("div",null,(0,e.jsx)(O.Input,{placeholder:"Paste Quick Connect Code Here",caption:"Copy the Quick Connect code after creating an API key in Uniform.",errorMessage:u,onChange:d=>{try{let c=(0,Dt.parseQuickConnect)(d.currentTarget.value);p("apiHost",c.apiHost),p("apiKey",c.apiKey),p("projectId",c.projectId)}catch(c){m("qc",c.message)}}})),(0,e.jsx)("section",{css:{display:"flex",gap:"var(--spacing-sm)"}},(0,e.jsx)(O.Button,{type:"submit",buttonType:"primary",disabled:s},s?"Verifying...":"Connect"),(0,e.jsx)(O.Button,{type:"button",buttonType:"ghost",onClick:()=>t("mc"),disabled:s},"Connect Manually"))):(0,e.jsx)(T.Fragment,null,(0,e.jsx)("div",null,(0,e.jsx)(P.Field,{component:ue,label:"API Key",name:"apiKey",caption:"Generate an API key in your Uniform team settings."})),(0,e.jsx)("div",null,(0,e.jsx)(P.Field,{component:ue,label:"Project ID",name:"projectId",caption:"Available to copy after generating an API key"})),(0,e.jsx)("div",null,(0,e.jsx)(P.Field,{component:ue,label:"API Host",name:"apiHost",caption:"Use a non-standard Uniform API endpoint. Most people will not not need this option."})),(0,e.jsx)("section",{css:{display:"flex",gap:"var(--spacing-sm)"}},(0,e.jsx)(O.Button,{type:"submit",buttonType:"primary",disabled:s},s?"Verifying...":"Connect"),(0,e.jsx)(O.Button,{type:"button",buttonType:"ghost",onClick:()=>t("qc"),disabled:s},"Use Quick Connect")))))))}var Lt=({settings:t,saveSettings:r})=>{let n=t.apiKey&&t.projectId?{apiKey:t.apiKey,projectId:t.projectId,apiHost:t.apiHost}:void 0;return(0,e.jsx)("article",{css:h.page},(0,e.jsx)("h1",{css:h.title},"Connect to a Uniform Project"),(0,e.jsx)("p",{css:h.text},(0,e.jsx)("small",null,"Adding an API key and project ID enables human-readable dimension labels to be shown. You must have access to the Uniform project to do this.")),(0,e.jsx)(St,{onConnect:async o=>{o?await r({...t,apiKey:o.apiKey,projectId:o.projectId,apiHost:o.apiHost}):await r({...t,apiKey:void 0,projectId:void 0,apiHost:void 0})},currentData:n}))};var oo=xe.css`
|
|
698
421
|
background: var(--white);
|
|
699
422
|
padding: var(--spacing-base);
|
|
700
423
|
overflow-y: auto;
|
|
@@ -723,23 +446,16 @@ summary {
|
|
|
723
446
|
&::-webkit-scrollbar-thumb:hover {
|
|
724
447
|
background: var(--gray-500);
|
|
725
448
|
}
|
|
726
|
-
`;function
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
box-shadow: var(--shadow-base);
|
|
737
|
-
position: fixed;
|
|
738
|
-
bottom: 82px;
|
|
739
|
-
right: var(--spacing-base);
|
|
740
|
-
z-index: var(--z-10);
|
|
741
|
-
max-width: var(--site-width);
|
|
742
|
-
`]},(0,t.jsx)(pt,{...e}),(0,t.jsx)("main",{css:oe},(0,t.jsx)(at,{...e}),a())))}var et=require("@uniformdev/context"),D=T(require("react"));function st({context:e,initialSettings:r}){let n=e!=null?e:typeof window!="undefined"?window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__:void 0,o=n!=null?n:new et.Context({manifest:{project:{}}}),[a,i]=D.useState({data:o.storage.data,manifest:o.manifest.data,scores:o.scores,personalizations:[],tests:[]}),[m,f]=D.useState(r!=null?r:{});D.useEffect(()=>{var p;let l=(0,et.createDebugConsoleLogDrain)((p=m.logLevel)!=null?p:"none");return o.events.on("log",l),()=>{o.events.off("log",l)}},[m,o]),D.useEffect(()=>{let l=()=>{i(h=>({...h,scores:o.scores,data:o.storage.data,manifest:o.manifest.data}))},p=h=>{!h.changed||i(g=>({...g,personalizations:[...g.personalizations,h]}))},b=h=>{!h.variantAssigned||i(g=>({...g,tests:[...g.tests,h]}))};return o.events.on("personalizationResult",p),o.events.on("testResult",b),o.storage.events.on("*",l),()=>{o.storage.events.off("*",l),o.events.off("personalizationResult",p),o.events.off("testResult",b)}},[o,m]);let c=D.useMemo(()=>({update:p=>o.update(p),forget:()=>o.forget(!1),rawUpdate:p=>o.storage.updateData(p)}),[o]);return n?(0,t.jsx)(it,{state:a,actions:c,settings:m,saveSettings:f}):(0,t.jsx)("p",null,"Unable to find Uniform Context. Ensure the devtools plugin is activated.")}var Bt=T(require("react"));var It=require("@emotion/react"),re=It.css`
|
|
449
|
+
`;function Re(t){let r=ht(t.settings,t.state.manifest),n=wt(t.settings,t.state.data.quirks),o={...t,dimensionIndex:r,quirksIndex:n},i=()=>{var a;if(r.loading||n.loading)return(0,e.jsx)(Tt,null);if(t.settings.route&&t.settings.route.match(/overrides\/\w+/))return(0,e.jsx)(De,{...o});switch((a=t.settings)==null?void 0:a.route){case void 0:case"/":case"/dimensions":return(0,e.jsx)(Ye,{...o});case"/overrides":return(0,e.jsx)(je,{...o});case"/overrides/add":return(0,e.jsx)(De,{...o});case"/quirks":return(0,e.jsx)(mt,{...o});case"/settings":return(0,e.jsx)(gt,{...o});case"/connect":return(0,e.jsx)(Lt,{...o});default:return(0,e.jsx)(Be,null)}};return(0,e.jsx)(Ae,{settings:t.settings,saveSettings:t.saveSettings},(0,e.jsx)(Ot.Theme,null),(0,e.jsx)(fe,null),(0,e.jsx)("div",{css:xe.css`
|
|
450
|
+
display: grid;
|
|
451
|
+
grid-template-columns: 200px auto;
|
|
452
|
+
font-weight: var(--fs-base);
|
|
453
|
+
font-size: var(--base-font-size);
|
|
454
|
+
font-family: var(--base-font-family);
|
|
455
|
+
line-height: var(--base-line-height);
|
|
456
|
+
height: var(--min-height);
|
|
457
|
+
min-width: var(--site-width);
|
|
458
|
+
`},(0,e.jsx)(Ee,{...t}),(0,e.jsx)("main",{css:oo},(0,e.jsx)(Oe,{...t}),i())))}var ye=require("@uniformdev/context"),R=x(require("react"));var Ve="embeddedUniformDevToolsSettings";function Ie({context:t,initialSettings:r}){let n=t!=null?t:typeof window!="undefined"?window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__:void 0,o=n!=null?n:new ye.Context({manifest:{project:{}}}),[i,a]=R.useState({data:o.storage.data,manifest:o.manifest.data,scores:o.scores,personalizations:[],tests:[]}),[l,p]=R.useState(r!=null?r:{});R.useEffect(()=>{var d;let s=(0,ye.createDebugConsoleLogDrain)((d=l.logLevel)!=null?d:"none");return o.events.on("log",s),()=>{o.events.off("log",s)}},[l,o]),R.useEffect(()=>{let s=()=>{let v=window.localStorage.getItem(Ve)||"{}",f=JSON.parse(v),y=pe({quirks:o.storage.data.quirks,quirkOverrides:f.quirkOverrides});y&&(console.log("Applying overridden quirks:",y),o.update({quirks:y}));let C=_({scores:o.scores,scoreOverrides:f.scoreOverrides});C.length&&(console.log("Applying overridden scores:",C),o.storage.updateData(C)),a(w=>({...w,scores:o.scores,data:o.storage.data,manifest:o.manifest.data}))},d=v=>{!v.changed||a(f=>({...f,personalizations:[...f.personalizations,v]}))},c=v=>{!v.variantAssigned||a(f=>({...f,tests:[...f.tests,v]}))};return o.events.on("personalizationResult",d),o.events.on("testResult",c),o.storage.events.on("*",s),()=>{o.storage.events.off("*",s),o.events.off("personalizationResult",d),o.events.off("testResult",c)}},[o]),R.useEffect(()=>{if(window.localStorage){let s=window.localStorage.getItem(Ve);if(s)try{let d=JSON.parse(s),c={...r,...d};p(c);let v=_({scores:i.scores,scoreOverrides:c.scoreOverrides});m.rawUpdate(v)}catch(d){window.localStorage.removeItem(Ve),console.error("Failed to parse settings from localStorage: ",d.message)}}},[]);let{actions:m,saveSettings:u}=R.useMemo(()=>({actions:{update:c=>o.update(c),forget:()=>o.forget(!1),rawUpdate:c=>o.storage.updateData(c)},saveSettings:async c=>{p(c),window.localStorage&&window.localStorage.setItem("embeddedUniformDevToolsSettings",JSON.stringify(c))}}),[o]);return n?(0,e.jsx)(Re,{state:i,actions:m,settings:l,saveSettings:u}):(0,e.jsx)("p",null,"Unable to find Uniform Context. Ensure the devtools plugin is activated.")}var Vt=require("@emotion/react"),It=x(require("react"));var Pt=require("@uniformdev/design-system");var xt=require("@emotion/react"),ro=xt.css`
|
|
743
459
|
align-items: center;
|
|
744
460
|
border-radius: var(--rounded-full);
|
|
745
461
|
background: var(--brand-secondary-5);
|
|
@@ -765,4 +481,11 @@ summary {
|
|
|
765
481
|
max-width: 100%;
|
|
766
482
|
height: auto;
|
|
767
483
|
}
|
|
768
|
-
`,
|
|
484
|
+
`,Rt=({...t})=>(0,e.jsx)("button",{type:"button",css:ro,...t},(0,e.jsx)("span",{hidden:!0},"Uniform devtools"),(0,e.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.jsx)("path",{d:"M13.325 3.05011L8.66741 20.4323L10.5993 20.9499L15.2568 3.56775L13.325 3.05011Z",fill:"currentColor"}),(0,e.jsx)("path",{d:"M7.61197 18.3608L8.97136 16.9124L8.97086 16.8933L3.87657 12.1121L8.66699 7.00798L7.20868 5.63928L1.04956 12.2017L7.61197 18.3608Z",fill:"currentColor"}),(0,e.jsx)("path",{d:"M16.388 18.3608L15.0286 16.9124L15.0291 16.8933L20.1234 12.1121L15.333 7.00798L16.7913 5.63928L22.9504 12.2017L16.388 18.3608Z",fill:"currentColor"})));function no(t){var i;let[r,n]=It.useState(!1);return((i=t.context)!=null?i:typeof window!="undefined"?window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__:void 0)?(0,e.jsx)("div",null,(0,e.jsx)(Pt.Theme,null),(0,e.jsx)(fe,null),(0,e.jsx)(Rt,{onClick:()=>n(a=>!a)}),r?(0,e.jsx)("div",{css:Vt.css`
|
|
485
|
+
box-shadow: var(--shadow-base);
|
|
486
|
+
position: fixed;
|
|
487
|
+
bottom: 82px;
|
|
488
|
+
right: var(--spacing-base);
|
|
489
|
+
z-index: var(--z-10);
|
|
490
|
+
max-width: var(--site-width);
|
|
491
|
+
`},(0,e.jsx)(Ie,{...t})):null):(0,e.jsx)("p",null,"Unable to find Uniform Context. Ensure the devtools plugin is activated.")}0&&(module.exports={ContextDevTools,EmbeddedContextDevTools,ToggleEmbeddedContextDevTools});
|