@infinilabs/search-results 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,176 @@
1
+ import { default as default_2 } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
3
+
4
+ declare type SearchResultCommon = {
5
+ id: string;
6
+ title: string;
7
+ href?: string;
8
+ target?: string;
9
+ rel?: string;
10
+ };
11
+
12
+ export declare type SearchResultFileType = "pdf" | "doc" | "ppt" | "xls" | "link" | "word" | "text" | "unknown";
13
+
14
+ export declare type SearchResultImageGroupItem = {
15
+ type: "imageGroup";
16
+ id: string;
17
+ title?: string;
18
+ items: Array<SearchResultImageItem | SearchResultMediaItem>;
19
+ columns?: 2 | 3 | 4;
20
+ footerAction?: SearchResultsAction;
21
+ className?: string;
22
+ };
23
+
24
+ export declare type SearchResultImageItem = SearchResultCommon & {
25
+ type: "image";
26
+ imageUrl: string;
27
+ imageAlt?: string;
28
+ subtitle?: string;
29
+ onClick?: () => void;
30
+ };
31
+
32
+ export declare type SearchResultListItem = SearchResultCommon & {
33
+ type: "result";
34
+ description?: string;
35
+ meta?: string[];
36
+ breadcrumbs?: string[];
37
+ author?: string;
38
+ date?: string;
39
+ thumbnailUrl?: string;
40
+ thumbnailAlt?: string;
41
+ fileType?: SearchResultFileType;
42
+ typeIcon?: default_2.ReactNode;
43
+ source?: string;
44
+ leading?: default_2.ReactNode;
45
+ trailing?: default_2.ReactNode;
46
+ onClick?: () => void;
47
+ };
48
+
49
+ export declare type SearchResultMediaItem = SearchResultCommon & {
50
+ type: "media";
51
+ mediaType: "image" | "video";
52
+ thumbnailUrl: string;
53
+ thumbnailAlt?: string;
54
+ matchCountText?: string;
55
+ sourceLabel?: string;
56
+ categoryLabel?: string;
57
+ onClick?: () => void;
58
+ };
59
+
60
+ declare function SearchResults({ sections, items, records, imageGridColumns, className, onItemClick }: SearchResultsProps): JSX.Element;
61
+ export default SearchResults;
62
+
63
+ declare type SearchResultsAction = {
64
+ label: string;
65
+ href?: string;
66
+ target?: string;
67
+ rel?: string;
68
+ onClick?: () => void;
69
+ };
70
+
71
+ export declare type SearchResultsItem = SearchResultListItem | SearchResultImageItem | SearchResultMediaItem | SearchResultImageGroupItem | SearchResultVideoGroupItem;
72
+
73
+ export declare type SearchResultsProps = {
74
+ sections?: SearchResultsSection[];
75
+ items?: SearchResultsItem[];
76
+ records?: SearchResultsRecord[];
77
+ imageGridColumns?: 2 | 3 | 4;
78
+ className?: string;
79
+ onItemClick?: (item: SearchResultsItem) => void;
80
+ };
81
+
82
+ export declare type SearchResultsRecord = {
83
+ source?: {
84
+ type?: string;
85
+ name?: string;
86
+ id?: string;
87
+ };
88
+ category?: string;
89
+ categories?: string[];
90
+ cover?: string;
91
+ title: string;
92
+ summary?: string;
93
+ type?: string;
94
+ lang?: string;
95
+ content?: string;
96
+ icon?: string;
97
+ thumbnail?: string;
98
+ tags?: string[];
99
+ url?: string;
100
+ size?: number;
101
+ owner?: {
102
+ avatar?: string;
103
+ username?: string;
104
+ userid?: string;
105
+ };
106
+ metadata?: {
107
+ last_reviewed?: string;
108
+ file_extension?: string;
109
+ icon_link?: string;
110
+ has_thumbnail?: boolean;
111
+ thumbnail_link?: string;
112
+ image_media_metadata?: {
113
+ width?: number;
114
+ height?: number;
115
+ };
116
+ video_media_metadata?: {
117
+ durationMillis?: string;
118
+ width?: number;
119
+ height?: number;
120
+ };
121
+ } & Record<string, unknown>;
122
+ last_updated_by?: {
123
+ user?: {
124
+ avatar?: string;
125
+ username?: string;
126
+ userid?: string;
127
+ };
128
+ timestamp?: string;
129
+ };
130
+ } & Record<string, unknown>;
131
+
132
+ export declare type SearchResultsSection = {
133
+ type: "section";
134
+ title?: string;
135
+ titleIcon?: default_2.ReactNode;
136
+ titleIconBgColor?: string;
137
+ titleClassName?: string;
138
+ layout: "list";
139
+ items: SearchResultListItem[];
140
+ footerAction?: SearchResultsAction;
141
+ className?: string;
142
+ } | {
143
+ type: "section";
144
+ title?: string;
145
+ titleIcon?: default_2.ReactNode;
146
+ titleIconBgColor?: string;
147
+ titleClassName?: string;
148
+ layout: "imageGrid";
149
+ items: SearchResultImageItem[];
150
+ columns?: 2 | 3 | 4;
151
+ footerAction?: SearchResultsAction;
152
+ className?: string;
153
+ } | {
154
+ type: "section";
155
+ title?: string;
156
+ titleIcon?: default_2.ReactNode;
157
+ titleIconBgColor?: string;
158
+ titleClassName?: string;
159
+ layout: "mediaGrid";
160
+ items: SearchResultMediaItem[];
161
+ columns?: 2 | 3 | 4;
162
+ footerAction?: SearchResultsAction;
163
+ className?: string;
164
+ };
165
+
166
+ export declare type SearchResultVideoGroupItem = {
167
+ type: "videoGroup";
168
+ id: string;
169
+ title?: string;
170
+ items: SearchResultMediaItem[];
171
+ columns?: 2 | 3 | 4;
172
+ footerAction?: SearchResultsAction;
173
+ className?: string;
174
+ };
175
+
176
+ export { }
@@ -0,0 +1,7 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-700:oklch(37.2% .044 257.287);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.aspect-4\\/3{aspect-ratio:4/3}.aspect-video{aspect-ratio:var(--aspect-video)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-\\[90px\\]{height:90px}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[160px\\]{width:160px}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x)var(--tw-translate-y)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[\\#E8E8E8\\]{border-color:#e8e8e8}.border-slate-200{border-color:var(--color-slate-200)}.bg-\\[\\#027FFE\\]{background-color:#027ffe}.bg-\\[\\#666\\]{background-color:#666}.bg-\\[\\#E02E2E\\]{background-color:#e02e2e}.bg-\\[\\#E8E8E8\\]{background-color:#e8e8e8}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab,red,red)){.bg-black\\/55{background-color:color-mix(in oklab,var(--color-black)55%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-white{background-color:var(--color-white)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-12{padding-inline:calc(var(--spacing)*12)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.text-left{text-align:left}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-\\[\\#1A0CAB\\]{color:#1a0cab}.text-\\[\\#007EFF\\]{color:#007eff}.text-\\[\\#333\\]{color:#333}.text-\\[\\#666\\]{color:#666}.text-slate-700{color:var(--color-slate-700)}.text-white{color:var(--color-white)}.no-underline{text-decoration-line:none}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-white\\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\\/30{--tw-ring-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.group-hover\\:underline:is(:where(.group):hover *){text-decoration-line:underline}.group-hover\\:underline-offset-2:is(:where(.group):hover *){text-underline-offset:2px}.hover\\:border-\\[\\#E8E8E8\\]:hover{border-color:#e8e8e8}.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:text-\\[\\#007EFF\\]:hover{color:#007eff}.hover\\:no-underline:hover{text-decoration-line:none}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:underline-offset-2:hover{text-underline-offset:2px}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-slate-300:focus-visible{--tw-ring-color:var(--color-slate-300)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ "use strict";const V=require("react"),m=require("clsx"),p=require("lucide-react");var _={exports:{}},v={};var z;function oe(){if(z)return v;z=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function l(s,a,o){var d=null;if(o!==void 0&&(d=""+o),a.key!==void 0&&(d=""+a.key),"key"in a){o={};for(var x in a)x!=="key"&&(o[x]=a[x])}else o=a;return a=o.ref,{$$typeof:e,type:s,key:d,ref:a!==void 0?a:null,props:o}}return v.Fragment=n,v.jsx=l,v.jsxs=l,v}var N={};var q;function ce(){return q||(q=1,process.env.NODE_ENV!=="production"&&(function(){function e(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===le?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case A:return"Fragment";case Z:return"Profiler";case H:return"StrictMode";case te:return"Suspense";case re:return"SuspenseList";case se:return"Activity"}if(typeof t=="object")switch(typeof t.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case X:return"Portal";case K:return t.displayName||"Context";case Q:return(t._context.displayName||"Context")+".Consumer";case ee:var i=t.render;return t=t.displayName,t||(t=i.displayName||i.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ne:return i=t.displayName||null,i!==null?i:e(t.type)||"Memo";case k:i=t._payload,t=t._init;try{return e(t(i))}catch{}}return null}function n(t){return""+t}function l(t){try{n(t);var i=!1}catch{i=!0}if(i){i=console;var c=i.error,u=typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object";return c.call(i,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",u),n(t)}}function s(t){if(t===A)return"<>";if(typeof t=="object"&&t!==null&&t.$$typeof===k)return"<...>";try{var i=e(t);return i?"<"+i+">":"<...>"}catch{return"<...>"}}function a(){var t=C.A;return t===null?null:t.getOwner()}function o(){return Error("react-stack-top-frame")}function d(t){if(B.call(t,"key")){var i=Object.getOwnPropertyDescriptor(t,"key").get;if(i&&i.isReactWarning)return!1}return t.key!==void 0}function x(t,i){function c(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",i))}c.isReactWarning=!0,Object.defineProperty(t,"key",{get:c,configurable:!0})}function h(){var t=e(this.type);return Y[t]||(Y[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),t=this.props.ref,t!==void 0?t:null}function b(t,i,c,u,E,I){var f=c.ref;return t={$$typeof:$,type:t,key:i,props:c,_owner:u},(f!==void 0?f:null)!==null?Object.defineProperty(t,"ref",{enumerable:!1,get:h}):Object.defineProperty(t,"ref",{enumerable:!1,value:null}),t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(t,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(t,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:E}),Object.defineProperty(t,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:I}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t}function j(t,i,c,u,E,I){var f=i.children;if(f!==void 0)if(u)if(ae(f)){for(u=0;u<f.length;u++)y(f[u]);Object.freeze&&Object.freeze(f)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y(f);if(B.call(i,"key")){f=e(t);var g=Object.keys(i).filter(function(ie){return ie!=="key"});u=0<g.length?"{key: someKey, "+g.join(": ..., ")+": ...}":"{key: someKey}",M[f+u]||(g=0<g.length?"{"+g.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
3
+ let props = %s;
4
+ <%s {...props} />
5
+ React keys must be passed directly to JSX without using spread:
6
+ let props = %s;
7
+ <%s key={someKey} {...props} />`,u,f,g,f),M[f+u]=!0)}if(f=null,c!==void 0&&(l(c),f=""+c),d(i)&&(l(i.key),f=""+i.key),"key"in i){c={};for(var O in i)O!=="key"&&(c[O]=i[O])}else c=i;return f&&x(c,typeof t=="function"?t.displayName||t.name||"Unknown":t),b(t,f,c,a(),E,I)}function y(t){F(t)?t._store&&(t._store.validated=1):typeof t=="object"&&t!==null&&t.$$typeof===k&&(t._payload.status==="fulfilled"?F(t._payload.value)&&t._payload.value._store&&(t._payload.value._store.validated=1):t._store&&(t._store.validated=1))}function F(t){return typeof t=="object"&&t!==null&&t.$$typeof===$}var w=V,$=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),K=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),le=Symbol.for("react.client.reference"),C=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,ae=Array.isArray,S=console.createTask?console.createTask:function(){return null};w={react_stack_bottom_frame:function(t){return t()}};var L,Y={},U=w.react_stack_bottom_frame.bind(w,o)(),D=S(s(o)),M={};N.Fragment=A,N.jsx=function(t,i,c){var u=1e4>C.recentlyCreatedOwnerStacks++;return j(t,i,c,!1,u?Error("react-stack-top-frame"):U,u?S(s(t)):D)},N.jsxs=function(t,i,c){var u=1e4>C.recentlyCreatedOwnerStacks++;return j(t,i,c,!0,u?Error("react-stack-top-frame"):U,u?S(s(t)):D)}})()),N}var G;function ue(){return G||(G=1,process.env.NODE_ENV==="production"?_.exports=oe():_.exports=ce()),_.exports}var r=ue();function fe(e,n){const l=[];for(const s of e){const a=l.length?l[l.length-1]:void 0;if(s.type==="imageGroup"){s.items[0]?.type==="media"?l.push({type:"section",title:s.title,titleIcon:r.jsx(p.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB]",layout:"mediaGrid",items:s.items.filter(d=>d.type==="media"),columns:s.columns??n,footerAction:s.footerAction,className:s.className}):l.push({type:"section",title:s.title,titleIcon:r.jsx(p.Image,{className:"h-4 w-4"}),titleIconBgColor:"#FFAF36",titleClassName:"text-[#1A0CAB]",layout:"imageGrid",items:s.items.filter(d=>d.type==="image"),columns:s.columns??n,footerAction:s.footerAction,className:s.className});continue}if(s.type==="videoGroup"){l.push({type:"section",title:s.title,titleIcon:r.jsx(p.Video,{className:"h-4 w-4"}),titleIconBgColor:"#1784FC",titleClassName:"text-[#1A0CAB]",layout:"mediaGrid",items:s.items,columns:s.columns??n,footerAction:s.footerAction,className:s.className});continue}if(s.type==="result"){if(a?.layout==="list"){a.items.push(s);continue}l.push({type:"section",layout:"list",items:[s]});continue}if(s.type==="media"){if(a?.layout==="mediaGrid"){a.items.push(s);continue}l.push({type:"section",layout:"mediaGrid",...n?{columns:n}:{},items:[s]});continue}if(a?.layout==="imageGrid"){a.items.push(s);continue}l.push({type:"section",layout:"imageGrid",...n?{columns:n}:{},items:[s]})}return l}function de(e){if(!e)return;const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toISOString().slice(0,10)}function me(e){const n=e?.trim().toLowerCase();if(n)return n==="pdf"?"pdf":n==="doc"||n==="docx"||n==="word"?"doc":n==="ppt"||n==="pptx"?"ppt":n==="xls"||n==="xlsx"||n==="excel"?"xls":n==="link"||n==="url"||n==="html"?"link":n==="txt"||n==="text"?"text":"unknown"}function xe(e,n){const l=e.thumbnail??e.cover??e.metadata?.thumbnail_link,s=e.summary??e.content,a=me(e.metadata?.file_extension??e.type),o=e.source?.name,d=e.category??e.categories?.join(" / ")??"Categories",x=[o,d].filter(Boolean),h=e.last_updated_by?.user?.username??e.owner?.username,b=de(e.last_updated_by?.timestamp??e.metadata?.last_reviewed),j=e.metadata?.icon_link??e.icon,y=j?r.jsx("img",{src:j,alt:"",className:"h-5 w-5 rounded-sm object-contain"}):void 0;return{type:"result",id:`${e.source?.id??e.url??e.title}-${n}`,title:e.title,href:e.url,description:s,thumbnailUrl:l,fileType:a,typeIcon:y,breadcrumbs:x.length?x:void 0,author:h,date:b}}function pe(e){return e.map((n,l)=>xe(n,l))}function R(e,n){const l=n==="_blank"?"noreferrer noopener":"";return e?l?[...new Set([...e.split(" "),...l.split(" ")].filter(Boolean))].join(" "):e:l||void 0}function J({href:e,target:n,rel:l,onClick:s,className:a,children:o}){return e?r.jsx("a",{href:e,target:n,rel:R(l,n),className:a,onClick:()=>s?.(),children:o}):r.jsx("button",{type:"button",className:a,onClick:s,children:o})}function he({item:e,onItemClick:n}){return r.jsxs(J,{href:e.href,target:e.target,rel:e.rel,onClick:()=>{e.onClick?.(),n?.(e)},className:m("group w-full rounded-xl bg-white text-left transition","hover:border-slate-300 hover:bg-slate-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300"),children:[r.jsx("div",{className:"overflow-hidden rounded-lg ring-1 ring-slate-200",children:r.jsx("div",{className:"relative aspect-video bg-slate-100",children:r.jsx("img",{src:e.imageUrl,alt:e.imageAlt??e.title,className:"absolute inset-0 h-full w-full object-cover",loading:"lazy"})})}),r.jsxs("div",{className:"mt-2",children:[r.jsx("div",{className:"truncate text-sm font-semibold text-[#333]",children:e.title}),e.subtitle?r.jsx("div",{className:"mt-1 truncate text-sm text-[#666]",children:e.subtitle}):null]})]})}function ge({author:e,date:n}){return!e&&!n?null:r.jsxs("div",{className:"flex-none truncate text-xs",children:[e?r.jsx("span",{className:"",children:e}):null,e&&n?r.jsx("span",{className:"mx-1",children:"·"}):null,n?r.jsx("span",{className:"",children:n}):null]})}function be({breadcrumbs:e}){return e?.length?r.jsx("div",{className:"min-w-0 truncate text-xs",children:e.map((n,l)=>r.jsxs("span",{children:[l>0?r.jsx("span",{className:"mx-1",children:">"}):null,r.jsx("span",{className:"",children:n})]},`${n}-${l}`))}):null}function je({meta:e}){return e?.length?r.jsx("div",{className:"mt-2 flex flex-wrap gap-2 text-xs text-[#333]",children:e.map((n,l)=>r.jsx("span",{className:"inline-flex items-center rounded border border-slate-200 bg-white px-3 py-1",children:n},`${n}-${l}`))}):null}function ve(e){const n=e.trim().toLowerCase();return n?n==="google"?"G":e.trim().slice(0,1).toUpperCase():""}function T({title:e,titleIcon:n,titleIconBgColor:l,source:s,className:a,titleClassName:o}){return!e&&!n&&!s?null:r.jsxs("div",{className:m("mb-2 flex min-w-0 items-center gap-2",a),children:[n?l?r.jsx("span",{className:"inline-flex h-6 w-6 flex-none items-center justify-center rounded-md text-white",style:{backgroundColor:l},children:n}):r.jsx("span",{className:"flex-none",children:n}):null,e?r.jsx("div",{className:m("min-w-0 text-xl font-semibold cursor-pointer hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",o),children:e}):null,s?r.jsx("span",{className:"inline-flex h-6 w-6 flex-none items-center justify-center rounded-md",title:s,children:ve(s)}):null]})}function Ne({href:e,target:n,rel:l,onClick:s,children:a}){return e?r.jsx("a",{href:e,target:n,rel:R(l,n),onClick:()=>s?.(),className:"group flex w-full min-w-0 items-center gap-2",children:a}):s?r.jsx("button",{type:"button",onClick:s,className:"group flex w-full min-w-0 items-center gap-2 text-left",children:a}):r.jsx("div",{className:"flex w-full min-w-0 items-center gap-2",children:a})}function ye(e){switch(e){case"doc":case"word":return"bg-[#027FFE] text-white";case"pdf":return"bg-[#E02E2E] text-white";default:return"bg-slate-100 text-slate-700"}}function we(e){switch(e){case"xls":return r.jsx(p.FileSpreadsheet,{className:"h-5 w-5"});case"ppt":return r.jsx(p.Presentation,{className:"h-5 w-5"});case"pdf":case"doc":case"word":case"text":return r.jsx(p.FileText,{className:"h-5 w-5"});default:return r.jsx(p.File,{className:"h-5 w-5"})}}function W({fileType:e,typeIcon:n}){return n?r.jsx("span",{className:"inline-flex h-6 w-6 items-center justify-center",children:n}):e?r.jsx("span",{className:m("inline-flex h-6 w-6 items-center justify-center rounded-md",ye(e)),children:we(e)}):null}function Ee({item:e,onItemClick:n}){const l=e.typeIcon?r.jsx(W,{typeIcon:e.typeIcon}):e.fileType?r.jsx(W,{fileType:e.fileType}):null;return r.jsxs("div",{className:"w-full py-2",children:[r.jsx("div",{className:"flex min-w-0 items-center gap-2",children:r.jsx(Ne,{href:e.href,target:e.target,rel:e.rel,onClick:()=>{e.onClick?.(),n?.(e)},children:r.jsx(T,{className:"mb-0 w-full",title:e.title,titleIcon:l,source:e.source,titleClassName:"truncate text-[#1A0CAB]"})})}),r.jsxs("div",{className:"mt-2 flex gap-3",children:[e.thumbnailUrl?r.jsx("img",{src:e.thumbnailUrl,alt:e.thumbnailAlt??e.title,className:"h-[90px] w-[160px] flex-none rounded-lg object-cover ring-1 ring-slate-200",loading:"lazy"}):r.jsx("div",{className:"h-[90px] w-[160px] flex-none rounded-lg bg-slate-100 ring-1 ring-slate-200"}),r.jsxs("div",{className:"min-w-0 flex-1 flex flex-col justify-between",children:[e.description?r.jsx("div",{className:"line-clamp-2 text-sm text-[#666]",children:e.description}):null,e.breadcrumbs?.length||e.author||e.date?r.jsxs("div",{className:"mt-2 flex min-w-0 items-center gap-3 text-[#666]",children:[r.jsx(be,{breadcrumbs:e.breadcrumbs}),r.jsx("span",{className:"h-3 w-px flex-none bg-[#666]","aria-hidden":"true"}),r.jsxs("div",{className:"flex flex-none items-center gap-2",children:[r.jsx(ge,{author:e.author,date:e.date}),e.href?r.jsx("a",{href:e.href,target:e.target,rel:R(e.rel,e.target),className:"flex-none text-[#007EFF] hover:text-[#007EFF]",children:r.jsx(p.ExternalLink,{className:"h-3 w-3"})}):null]})]}):r.jsx(je,{meta:e.meta})]})]})]})}function _e({text:e}){return r.jsx("span",{className:"inline-flex items-center rounded-md border border-slate-200 bg-white px-2 py-1 text-xs text-slate-700",children:e})}function Te({item:e,onItemClick:n}){const l=[e.sourceLabel,e.categoryLabel].filter(Boolean);return r.jsxs(J,{href:e.href,target:e.target,rel:e.rel,onClick:()=>{e.onClick?.(),n?.(e)},className:m("group w-full rounded-xl bg-white text-left transition","hover:border-slate-300 hover:bg-slate-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300"),children:[r.jsx("div",{className:"overflow-hidden rounded-lg ring-1 ring-slate-200",children:r.jsxs("div",{className:"relative aspect-4/3 bg-slate-100",children:[r.jsx("img",{src:e.thumbnailUrl,alt:e.thumbnailAlt??e.title,className:"absolute inset-0 h-full w-full object-cover",loading:"lazy"}),e.mediaType==="video"?r.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:r.jsx("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/55 text-white ring-1 ring-white/30",children:r.jsx(p.Play,{className:"h-5 w-5 translate-x-px"})})}):null]})}),r.jsxs("div",{className:"mt-2",children:[r.jsx("div",{className:"truncate text-sm font-medium",children:e.title}),e.matchCountText?r.jsx("div",{className:"mt-1 truncate text-xs text-[#666]",children:e.matchCountText}):null,l.length?r.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:l.map(s=>r.jsx(_e,{text:s},s))}):null]})]})}function Re({action:e,className:n}){const l=m("flex-none inline-flex items-center justify-center rounded-full border border-slate-200 bg-white","h-9 px-12 text-sm font-medium text-slate-700 no-underline transition","hover:border-slate-300 hover:bg-slate-50 hover:no-underline","focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300",n);return e.href?r.jsx("a",{className:l,href:e.href,target:e.target,rel:R(e.rel,e.target),onClick:()=>e.onClick?.(),children:e.label}):r.jsx("button",{className:l,type:"button",onClick:e.onClick,children:e.label})}function P({action:e}){return e?r.jsxs("div",{className:"mt-3 flex w-full items-center",children:[r.jsx("span",{className:"h-px flex-1 bg-[#E8E8E8]","aria-hidden":"true"}),r.jsx(Re,{action:e,className:m("rounded-full border border-[#E8E8E8] bg-white px-4 py-2 text-sm font-medium text-[#333] transition","hover:border-[#E8E8E8] hover:bg-[#F5F5F5]")}),r.jsx("span",{className:"h-px flex-1 bg-[#E8E8E8]","aria-hidden":"true"})]}):null}function Ae(e,n){if(e.layout==="list")return r.jsxs("div",{className:m("space-y-6",e.className),children:[r.jsx(T,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),e.items.map(a=>r.jsx(Ee,{item:a,onItemClick:n},a.id)),r.jsx(P,{action:e.footerAction})]});if(e.layout==="mediaGrid"){const a=e.columns??3,o=a===2?"grid-cols-2":a===4?"grid-cols-4":"grid-cols-3";return r.jsxs("div",{className:m(e.className),children:[r.jsx(T,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),r.jsx("div",{className:m("grid gap-3",o),children:e.items.map(d=>r.jsx(Te,{item:d,onItemClick:n},d.id))}),r.jsx(P,{action:e.footerAction})]})}const l=e.columns??3,s=l===2?"grid-cols-2":l===4?"grid-cols-4":"grid-cols-3";return r.jsxs("div",{className:m(e.className),children:[r.jsx(T,{title:e.title,titleIcon:e.titleIcon,titleIconBgColor:e.titleIconBgColor,titleClassName:e.titleClassName}),r.jsx("div",{className:m("grid gap-3",s),children:e.items.map(a=>r.jsx(he,{item:a,onItemClick:n},a.id))}),r.jsx(P,{action:e.footerAction})]})}function ke({sections:e,items:n,records:l,imageGridColumns:s,className:a,onItemClick:o}){const d=n??(l?.length?pe(l):void 0),x=e??(d?.length?fe(d,s):[]);return r.jsx("div",{className:m("space-y-5",a),children:x.map((h,b)=>r.jsx(V.Fragment,{children:Ae(h,o)},`${h.type}-${b}`))})}module.exports=ke;
@@ -0,0 +1,769 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-700:oklch(37.2% .044 257.287);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.aspect-4\\/3{aspect-ratio:4/3}.aspect-video{aspect-ratio:var(--aspect-video)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-\\[90px\\]{height:90px}.h-full{height:100%}.h-px{height:1px}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[160px\\]{width:160px}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x)var(--tw-translate-y)}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[\\#E8E8E8\\]{border-color:#e8e8e8}.border-slate-200{border-color:var(--color-slate-200)}.bg-\\[\\#027FFE\\]{background-color:#027ffe}.bg-\\[\\#666\\]{background-color:#666}.bg-\\[\\#E02E2E\\]{background-color:#e02e2e}.bg-\\[\\#E8E8E8\\]{background-color:#e8e8e8}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab,red,red)){.bg-black\\/55{background-color:color-mix(in oklab,var(--color-black)55%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-white{background-color:var(--color-white)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-6{padding:calc(var(--spacing)*6)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-12{padding-inline:calc(var(--spacing)*12)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.text-left{text-align:left}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-\\[\\#1A0CAB\\]{color:#1a0cab}.text-\\[\\#007EFF\\]{color:#007eff}.text-\\[\\#333\\]{color:#333}.text-\\[\\#666\\]{color:#666}.text-slate-700{color:var(--color-slate-700)}.text-white{color:var(--color-white)}.no-underline{text-decoration-line:none}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-white\\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\\/30{--tw-ring-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.group-hover\\:underline:is(:where(.group):hover *){text-decoration-line:underline}.group-hover\\:underline-offset-2:is(:where(.group):hover *){text-underline-offset:2px}.hover\\:border-\\[\\#E8E8E8\\]:hover{border-color:#e8e8e8}.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:text-\\[\\#007EFF\\]:hover{color:#007eff}.hover\\:no-underline:hover{text-decoration-line:none}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:underline-offset-2:hover{text-underline-offset:2px}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-slate-300:focus-visible{--tw-ring-color:var(--color-slate-300)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ import q from "react";
3
+ import m from "clsx";
4
+ import { Image as M, Video as oe, File as ce, FileText as ue, Presentation as fe, FileSpreadsheet as de, ExternalLink as me, Play as xe } from "lucide-react";
5
+ var E = { exports: {} }, j = {};
6
+ var z;
7
+ function pe() {
8
+ if (z) return j;
9
+ z = 1;
10
+ var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
11
+ function l(s, a, o) {
12
+ var d = null;
13
+ if (o !== void 0 && (d = "" + o), a.key !== void 0 && (d = "" + a.key), "key" in a) {
14
+ o = {};
15
+ for (var x in a)
16
+ x !== "key" && (o[x] = a[x]);
17
+ } else o = a;
18
+ return a = o.ref, {
19
+ $$typeof: e,
20
+ type: s,
21
+ key: d,
22
+ ref: a !== void 0 ? a : null,
23
+ props: o
24
+ };
25
+ }
26
+ return j.Fragment = n, j.jsx = l, j.jsxs = l, j;
27
+ }
28
+ var v = {};
29
+ var G;
30
+ function he() {
31
+ return G || (G = 1, process.env.NODE_ENV !== "production" && (function() {
32
+ function e(t) {
33
+ if (t == null) return null;
34
+ if (typeof t == "function")
35
+ return t.$$typeof === le ? null : t.displayName || t.name || null;
36
+ if (typeof t == "string") return t;
37
+ switch (t) {
38
+ case R:
39
+ return "Fragment";
40
+ case Z:
41
+ return "Profiler";
42
+ case H:
43
+ return "StrictMode";
44
+ case te:
45
+ return "Suspense";
46
+ case re:
47
+ return "SuspenseList";
48
+ case se:
49
+ return "Activity";
50
+ }
51
+ if (typeof t == "object")
52
+ switch (typeof t.tag == "number" && console.error(
53
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
54
+ ), t.$$typeof) {
55
+ case X:
56
+ return "Portal";
57
+ case K:
58
+ return t.displayName || "Context";
59
+ case Q:
60
+ return (t._context.displayName || "Context") + ".Consumer";
61
+ case ee:
62
+ var i = t.render;
63
+ return t = t.displayName, t || (t = i.displayName || i.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
64
+ case ne:
65
+ return i = t.displayName || null, i !== null ? i : e(t.type) || "Memo";
66
+ case A:
67
+ i = t._payload, t = t._init;
68
+ try {
69
+ return e(t(i));
70
+ } catch {
71
+ }
72
+ }
73
+ return null;
74
+ }
75
+ function n(t) {
76
+ return "" + t;
77
+ }
78
+ function l(t) {
79
+ try {
80
+ n(t);
81
+ var i = !1;
82
+ } catch {
83
+ i = !0;
84
+ }
85
+ if (i) {
86
+ i = console;
87
+ var c = i.error, u = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
88
+ return c.call(
89
+ i,
90
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
91
+ u
92
+ ), n(t);
93
+ }
94
+ }
95
+ function s(t) {
96
+ if (t === R) return "<>";
97
+ if (typeof t == "object" && t !== null && t.$$typeof === A)
98
+ return "<...>";
99
+ try {
100
+ var i = e(t);
101
+ return i ? "<" + i + ">" : "<...>";
102
+ } catch {
103
+ return "<...>";
104
+ }
105
+ }
106
+ function a() {
107
+ var t = k.A;
108
+ return t === null ? null : t.getOwner();
109
+ }
110
+ function o() {
111
+ return Error("react-stack-top-frame");
112
+ }
113
+ function d(t) {
114
+ if ($.call(t, "key")) {
115
+ var i = Object.getOwnPropertyDescriptor(t, "key").get;
116
+ if (i && i.isReactWarning) return !1;
117
+ }
118
+ return t.key !== void 0;
119
+ }
120
+ function x(t, i) {
121
+ function c() {
122
+ B || (B = !0, console.error(
123
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
124
+ i
125
+ ));
126
+ }
127
+ c.isReactWarning = !0, Object.defineProperty(t, "key", {
128
+ get: c,
129
+ configurable: !0
130
+ });
131
+ }
132
+ function p() {
133
+ var t = e(this.type);
134
+ return L[t] || (L[t] = !0, console.error(
135
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
136
+ )), t = this.props.ref, t !== void 0 ? t : null;
137
+ }
138
+ function g(t, i, c, u, w, S) {
139
+ var f = c.ref;
140
+ return t = {
141
+ $$typeof: F,
142
+ type: t,
143
+ key: i,
144
+ props: c,
145
+ _owner: u
146
+ }, (f !== void 0 ? f : null) !== null ? Object.defineProperty(t, "ref", {
147
+ enumerable: !1,
148
+ get: p
149
+ }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
150
+ configurable: !1,
151
+ enumerable: !1,
152
+ writable: !0,
153
+ value: 0
154
+ }), Object.defineProperty(t, "_debugInfo", {
155
+ configurable: !1,
156
+ enumerable: !1,
157
+ writable: !0,
158
+ value: null
159
+ }), Object.defineProperty(t, "_debugStack", {
160
+ configurable: !1,
161
+ enumerable: !1,
162
+ writable: !0,
163
+ value: w
164
+ }), Object.defineProperty(t, "_debugTask", {
165
+ configurable: !1,
166
+ enumerable: !1,
167
+ writable: !0,
168
+ value: S
169
+ }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
170
+ }
171
+ function b(t, i, c, u, w, S) {
172
+ var f = i.children;
173
+ if (f !== void 0)
174
+ if (u)
175
+ if (ae(f)) {
176
+ for (u = 0; u < f.length; u++)
177
+ N(f[u]);
178
+ Object.freeze && Object.freeze(f);
179
+ } else
180
+ console.error(
181
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
182
+ );
183
+ else N(f);
184
+ if ($.call(i, "key")) {
185
+ f = e(t);
186
+ var h = Object.keys(i).filter(function(ie) {
187
+ return ie !== "key";
188
+ });
189
+ u = 0 < h.length ? "{key: someKey, " + h.join(": ..., ") + ": ...}" : "{key: someKey}", D[f + u] || (h = 0 < h.length ? "{" + h.join(": ..., ") + ": ...}" : "{}", console.error(
190
+ `A props object containing a "key" prop is being spread into JSX:
191
+ let props = %s;
192
+ <%s {...props} />
193
+ React keys must be passed directly to JSX without using spread:
194
+ let props = %s;
195
+ <%s key={someKey} {...props} />`,
196
+ u,
197
+ f,
198
+ h,
199
+ f
200
+ ), D[f + u] = !0);
201
+ }
202
+ if (f = null, c !== void 0 && (l(c), f = "" + c), d(i) && (l(i.key), f = "" + i.key), "key" in i) {
203
+ c = {};
204
+ for (var I in i)
205
+ I !== "key" && (c[I] = i[I]);
206
+ } else c = i;
207
+ return f && x(
208
+ c,
209
+ typeof t == "function" ? t.displayName || t.name || "Unknown" : t
210
+ ), g(
211
+ t,
212
+ f,
213
+ c,
214
+ a(),
215
+ w,
216
+ S
217
+ );
218
+ }
219
+ function N(t) {
220
+ P(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === A && (t._payload.status === "fulfilled" ? P(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
221
+ }
222
+ function P(t) {
223
+ return typeof t == "object" && t !== null && t.$$typeof === F;
224
+ }
225
+ var y = q, F = /* @__PURE__ */ Symbol.for("react.transitional.element"), X = /* @__PURE__ */ Symbol.for("react.portal"), R = /* @__PURE__ */ Symbol.for("react.fragment"), H = /* @__PURE__ */ Symbol.for("react.strict_mode"), Z = /* @__PURE__ */ Symbol.for("react.profiler"), Q = /* @__PURE__ */ Symbol.for("react.consumer"), K = /* @__PURE__ */ Symbol.for("react.context"), ee = /* @__PURE__ */ Symbol.for("react.forward_ref"), te = /* @__PURE__ */ Symbol.for("react.suspense"), re = /* @__PURE__ */ Symbol.for("react.suspense_list"), ne = /* @__PURE__ */ Symbol.for("react.memo"), A = /* @__PURE__ */ Symbol.for("react.lazy"), se = /* @__PURE__ */ Symbol.for("react.activity"), le = /* @__PURE__ */ Symbol.for("react.client.reference"), k = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, $ = Object.prototype.hasOwnProperty, ae = Array.isArray, C = console.createTask ? console.createTask : function() {
226
+ return null;
227
+ };
228
+ y = {
229
+ react_stack_bottom_frame: function(t) {
230
+ return t();
231
+ }
232
+ };
233
+ var B, L = {}, Y = y.react_stack_bottom_frame.bind(
234
+ y,
235
+ o
236
+ )(), U = C(s(o)), D = {};
237
+ v.Fragment = R, v.jsx = function(t, i, c) {
238
+ var u = 1e4 > k.recentlyCreatedOwnerStacks++;
239
+ return b(
240
+ t,
241
+ i,
242
+ c,
243
+ !1,
244
+ u ? Error("react-stack-top-frame") : Y,
245
+ u ? C(s(t)) : U
246
+ );
247
+ }, v.jsxs = function(t, i, c) {
248
+ var u = 1e4 > k.recentlyCreatedOwnerStacks++;
249
+ return b(
250
+ t,
251
+ i,
252
+ c,
253
+ !0,
254
+ u ? Error("react-stack-top-frame") : Y,
255
+ u ? C(s(t)) : U
256
+ );
257
+ };
258
+ })()), v;
259
+ }
260
+ var W;
261
+ function ge() {
262
+ return W || (W = 1, process.env.NODE_ENV === "production" ? E.exports = pe() : E.exports = he()), E.exports;
263
+ }
264
+ var r = ge();
265
+ function be(e, n) {
266
+ const l = [];
267
+ for (const s of e) {
268
+ const a = l.length ? l[l.length - 1] : void 0;
269
+ if (s.type === "imageGroup") {
270
+ s.items[0]?.type === "media" ? l.push({
271
+ type: "section",
272
+ title: s.title,
273
+ titleIcon: /* @__PURE__ */ r.jsx(M, { className: "h-4 w-4" }),
274
+ titleIconBgColor: "#FFAF36",
275
+ titleClassName: "text-[#1A0CAB]",
276
+ layout: "mediaGrid",
277
+ items: s.items.filter((d) => d.type === "media"),
278
+ columns: s.columns ?? n,
279
+ footerAction: s.footerAction,
280
+ className: s.className
281
+ }) : l.push({
282
+ type: "section",
283
+ title: s.title,
284
+ titleIcon: /* @__PURE__ */ r.jsx(M, { className: "h-4 w-4" }),
285
+ titleIconBgColor: "#FFAF36",
286
+ titleClassName: "text-[#1A0CAB]",
287
+ layout: "imageGrid",
288
+ items: s.items.filter((d) => d.type === "image"),
289
+ columns: s.columns ?? n,
290
+ footerAction: s.footerAction,
291
+ className: s.className
292
+ });
293
+ continue;
294
+ }
295
+ if (s.type === "videoGroup") {
296
+ l.push({
297
+ type: "section",
298
+ title: s.title,
299
+ titleIcon: /* @__PURE__ */ r.jsx(oe, { className: "h-4 w-4" }),
300
+ titleIconBgColor: "#1784FC",
301
+ titleClassName: "text-[#1A0CAB]",
302
+ layout: "mediaGrid",
303
+ items: s.items,
304
+ columns: s.columns ?? n,
305
+ footerAction: s.footerAction,
306
+ className: s.className
307
+ });
308
+ continue;
309
+ }
310
+ if (s.type === "result") {
311
+ if (a?.layout === "list") {
312
+ a.items.push(s);
313
+ continue;
314
+ }
315
+ l.push({
316
+ type: "section",
317
+ layout: "list",
318
+ items: [s]
319
+ });
320
+ continue;
321
+ }
322
+ if (s.type === "media") {
323
+ if (a?.layout === "mediaGrid") {
324
+ a.items.push(s);
325
+ continue;
326
+ }
327
+ l.push({
328
+ type: "section",
329
+ layout: "mediaGrid",
330
+ ...n ? { columns: n } : {},
331
+ items: [s]
332
+ });
333
+ continue;
334
+ }
335
+ if (a?.layout === "imageGrid") {
336
+ a.items.push(s);
337
+ continue;
338
+ }
339
+ l.push({
340
+ type: "section",
341
+ layout: "imageGrid",
342
+ ...n ? { columns: n } : {},
343
+ items: [s]
344
+ });
345
+ }
346
+ return l;
347
+ }
348
+ function je(e) {
349
+ if (!e) return;
350
+ const n = new Date(e);
351
+ return Number.isNaN(n.getTime()) ? e : n.toISOString().slice(0, 10);
352
+ }
353
+ function ve(e) {
354
+ const n = e?.trim().toLowerCase();
355
+ if (n)
356
+ return n === "pdf" ? "pdf" : n === "doc" || n === "docx" || n === "word" ? "doc" : n === "ppt" || n === "pptx" ? "ppt" : n === "xls" || n === "xlsx" || n === "excel" ? "xls" : n === "link" || n === "url" || n === "html" ? "link" : n === "txt" || n === "text" ? "text" : "unknown";
357
+ }
358
+ function Ne(e, n) {
359
+ const l = e.thumbnail ?? e.cover ?? e.metadata?.thumbnail_link, s = e.summary ?? e.content, a = ve(e.metadata?.file_extension ?? e.type), o = e.source?.name, d = e.category ?? e.categories?.join(" / ") ?? "Categories", x = [o, d].filter(Boolean), p = e.last_updated_by?.user?.username ?? e.owner?.username, g = je(e.last_updated_by?.timestamp ?? e.metadata?.last_reviewed), b = e.metadata?.icon_link ?? e.icon, N = b ? /* @__PURE__ */ r.jsx("img", { src: b, alt: "", className: "h-5 w-5 rounded-sm object-contain" }) : void 0;
360
+ return {
361
+ type: "result",
362
+ id: `${e.source?.id ?? e.url ?? e.title}-${n}`,
363
+ title: e.title,
364
+ href: e.url,
365
+ description: s,
366
+ thumbnailUrl: l,
367
+ fileType: a,
368
+ typeIcon: N,
369
+ breadcrumbs: x.length ? x : void 0,
370
+ author: p,
371
+ date: g
372
+ };
373
+ }
374
+ function ye(e) {
375
+ return e.map((n, l) => Ne(n, l));
376
+ }
377
+ function T(e, n) {
378
+ const l = n === "_blank" ? "noreferrer noopener" : "";
379
+ return e ? l ? [...new Set([...e.split(" "), ...l.split(" ")].filter(Boolean))].join(" ") : e : l || void 0;
380
+ }
381
+ function J({
382
+ href: e,
383
+ target: n,
384
+ rel: l,
385
+ onClick: s,
386
+ className: a,
387
+ children: o
388
+ }) {
389
+ return e ? /* @__PURE__ */ r.jsx(
390
+ "a",
391
+ {
392
+ href: e,
393
+ target: n,
394
+ rel: T(l, n),
395
+ className: a,
396
+ onClick: () => s?.(),
397
+ children: o
398
+ }
399
+ ) : /* @__PURE__ */ r.jsx("button", { type: "button", className: a, onClick: s, children: o });
400
+ }
401
+ function we({
402
+ item: e,
403
+ onItemClick: n
404
+ }) {
405
+ return /* @__PURE__ */ r.jsxs(
406
+ J,
407
+ {
408
+ href: e.href,
409
+ target: e.target,
410
+ rel: e.rel,
411
+ onClick: () => {
412
+ e.onClick?.(), n?.(e);
413
+ },
414
+ className: m(
415
+ "group w-full rounded-xl bg-white text-left transition",
416
+ "hover:border-slate-300 hover:bg-slate-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300"
417
+ ),
418
+ children: [
419
+ /* @__PURE__ */ r.jsx("div", { className: "overflow-hidden rounded-lg ring-1 ring-slate-200", children: /* @__PURE__ */ r.jsx("div", { className: "relative aspect-video bg-slate-100", children: /* @__PURE__ */ r.jsx(
420
+ "img",
421
+ {
422
+ src: e.imageUrl,
423
+ alt: e.imageAlt ?? e.title,
424
+ className: "absolute inset-0 h-full w-full object-cover",
425
+ loading: "lazy"
426
+ }
427
+ ) }) }),
428
+ /* @__PURE__ */ r.jsxs("div", { className: "mt-2", children: [
429
+ /* @__PURE__ */ r.jsx("div", { className: "truncate text-sm font-semibold text-[#333]", children: e.title }),
430
+ e.subtitle ? /* @__PURE__ */ r.jsx("div", { className: "mt-1 truncate text-sm text-[#666]", children: e.subtitle }) : null
431
+ ] })
432
+ ]
433
+ }
434
+ );
435
+ }
436
+ function Ee({ author: e, date: n }) {
437
+ return !e && !n ? null : /* @__PURE__ */ r.jsxs("div", { className: "flex-none truncate text-xs", children: [
438
+ e ? /* @__PURE__ */ r.jsx("span", { className: "", children: e }) : null,
439
+ e && n ? /* @__PURE__ */ r.jsx("span", { className: "mx-1", children: "·" }) : null,
440
+ n ? /* @__PURE__ */ r.jsx("span", { className: "", children: n }) : null
441
+ ] });
442
+ }
443
+ function _e({ breadcrumbs: e }) {
444
+ return e?.length ? /* @__PURE__ */ r.jsx("div", { className: "min-w-0 truncate text-xs", children: e.map((n, l) => /* @__PURE__ */ r.jsxs("span", { children: [
445
+ l > 0 ? /* @__PURE__ */ r.jsx("span", { className: "mx-1", children: ">" }) : null,
446
+ /* @__PURE__ */ r.jsx("span", { className: "", children: n })
447
+ ] }, `${n}-${l}`)) }) : null;
448
+ }
449
+ function Te({ meta: e }) {
450
+ return e?.length ? /* @__PURE__ */ r.jsx("div", { className: "mt-2 flex flex-wrap gap-2 text-xs text-[#333]", children: e.map((n, l) => /* @__PURE__ */ r.jsx(
451
+ "span",
452
+ {
453
+ className: "inline-flex items-center rounded border border-slate-200 bg-white px-3 py-1",
454
+ children: n
455
+ },
456
+ `${n}-${l}`
457
+ )) }) : null;
458
+ }
459
+ function Re(e) {
460
+ const n = e.trim().toLowerCase();
461
+ return n ? n === "google" ? "G" : e.trim().slice(0, 1).toUpperCase() : "";
462
+ }
463
+ function _({
464
+ title: e,
465
+ titleIcon: n,
466
+ titleIconBgColor: l,
467
+ source: s,
468
+ className: a,
469
+ titleClassName: o
470
+ }) {
471
+ return !e && !n && !s ? null : /* @__PURE__ */ r.jsxs("div", { className: m("mb-2 flex min-w-0 items-center gap-2", a), children: [
472
+ n ? l ? /* @__PURE__ */ r.jsx(
473
+ "span",
474
+ {
475
+ className: "inline-flex h-6 w-6 flex-none items-center justify-center rounded-md text-white",
476
+ style: { backgroundColor: l },
477
+ children: n
478
+ }
479
+ ) : /* @__PURE__ */ r.jsx("span", { className: "flex-none", children: n }) : null,
480
+ e ? /* @__PURE__ */ r.jsx(
481
+ "div",
482
+ {
483
+ className: m(
484
+ "min-w-0 text-xl font-semibold cursor-pointer hover:underline hover:underline-offset-2 group-hover:underline group-hover:underline-offset-2",
485
+ o
486
+ ),
487
+ children: e
488
+ }
489
+ ) : null,
490
+ s ? /* @__PURE__ */ r.jsx(
491
+ "span",
492
+ {
493
+ className: "inline-flex h-6 w-6 flex-none items-center justify-center rounded-md",
494
+ title: s,
495
+ children: Re(s)
496
+ }
497
+ ) : null
498
+ ] });
499
+ }
500
+ function Ae({
501
+ href: e,
502
+ target: n,
503
+ rel: l,
504
+ onClick: s,
505
+ children: a
506
+ }) {
507
+ return e ? /* @__PURE__ */ r.jsx(
508
+ "a",
509
+ {
510
+ href: e,
511
+ target: n,
512
+ rel: T(l, n),
513
+ onClick: () => s?.(),
514
+ className: "group flex w-full min-w-0 items-center gap-2",
515
+ children: a
516
+ }
517
+ ) : s ? /* @__PURE__ */ r.jsx(
518
+ "button",
519
+ {
520
+ type: "button",
521
+ onClick: s,
522
+ className: "group flex w-full min-w-0 items-center gap-2 text-left",
523
+ children: a
524
+ }
525
+ ) : /* @__PURE__ */ r.jsx("div", { className: "flex w-full min-w-0 items-center gap-2", children: a });
526
+ }
527
+ function ke(e) {
528
+ switch (e) {
529
+ case "doc":
530
+ case "word":
531
+ return "bg-[#027FFE] text-white";
532
+ case "pdf":
533
+ return "bg-[#E02E2E] text-white";
534
+ default:
535
+ return "bg-slate-100 text-slate-700";
536
+ }
537
+ }
538
+ function Ce(e) {
539
+ switch (e) {
540
+ case "xls":
541
+ return /* @__PURE__ */ r.jsx(de, { className: "h-5 w-5" });
542
+ case "ppt":
543
+ return /* @__PURE__ */ r.jsx(fe, { className: "h-5 w-5" });
544
+ case "pdf":
545
+ case "doc":
546
+ case "word":
547
+ case "text":
548
+ return /* @__PURE__ */ r.jsx(ue, { className: "h-5 w-5" });
549
+ default:
550
+ return /* @__PURE__ */ r.jsx(ce, { className: "h-5 w-5" });
551
+ }
552
+ }
553
+ function V({
554
+ fileType: e,
555
+ typeIcon: n
556
+ }) {
557
+ return n ? /* @__PURE__ */ r.jsx("span", { className: "inline-flex h-6 w-6 items-center justify-center", children: n }) : e ? /* @__PURE__ */ r.jsx(
558
+ "span",
559
+ {
560
+ className: m(
561
+ "inline-flex h-6 w-6 items-center justify-center rounded-md",
562
+ ke(e)
563
+ ),
564
+ children: Ce(e)
565
+ }
566
+ ) : null;
567
+ }
568
+ function Se({
569
+ item: e,
570
+ onItemClick: n
571
+ }) {
572
+ const l = e.typeIcon ? /* @__PURE__ */ r.jsx(V, { typeIcon: e.typeIcon }) : e.fileType ? /* @__PURE__ */ r.jsx(V, { fileType: e.fileType }) : null;
573
+ return /* @__PURE__ */ r.jsxs("div", { className: "w-full py-2", children: [
574
+ /* @__PURE__ */ r.jsx("div", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ r.jsx(
575
+ Ae,
576
+ {
577
+ href: e.href,
578
+ target: e.target,
579
+ rel: e.rel,
580
+ onClick: () => {
581
+ e.onClick?.(), n?.(e);
582
+ },
583
+ children: /* @__PURE__ */ r.jsx(
584
+ _,
585
+ {
586
+ className: "mb-0 w-full",
587
+ title: e.title,
588
+ titleIcon: l,
589
+ source: e.source,
590
+ titleClassName: "truncate text-[#1A0CAB]"
591
+ }
592
+ )
593
+ }
594
+ ) }),
595
+ /* @__PURE__ */ r.jsxs("div", { className: "mt-2 flex gap-3", children: [
596
+ e.thumbnailUrl ? /* @__PURE__ */ r.jsx(
597
+ "img",
598
+ {
599
+ src: e.thumbnailUrl,
600
+ alt: e.thumbnailAlt ?? e.title,
601
+ className: "h-[90px] w-[160px] flex-none rounded-lg object-cover ring-1 ring-slate-200",
602
+ loading: "lazy"
603
+ }
604
+ ) : /* @__PURE__ */ r.jsx("div", { className: "h-[90px] w-[160px] flex-none rounded-lg bg-slate-100 ring-1 ring-slate-200" }),
605
+ /* @__PURE__ */ r.jsxs("div", { className: "min-w-0 flex-1 flex flex-col justify-between", children: [
606
+ e.description ? /* @__PURE__ */ r.jsx("div", { className: "line-clamp-2 text-sm text-[#666]", children: e.description }) : null,
607
+ e.breadcrumbs?.length || e.author || e.date ? /* @__PURE__ */ r.jsxs("div", { className: "mt-2 flex min-w-0 items-center gap-3 text-[#666]", children: [
608
+ /* @__PURE__ */ r.jsx(_e, { breadcrumbs: e.breadcrumbs }),
609
+ /* @__PURE__ */ r.jsx("span", { className: "h-3 w-px flex-none bg-[#666]", "aria-hidden": "true" }),
610
+ /* @__PURE__ */ r.jsxs("div", { className: "flex flex-none items-center gap-2", children: [
611
+ /* @__PURE__ */ r.jsx(Ee, { author: e.author, date: e.date }),
612
+ e.href ? /* @__PURE__ */ r.jsx(
613
+ "a",
614
+ {
615
+ href: e.href,
616
+ target: e.target,
617
+ rel: T(e.rel, e.target),
618
+ className: "flex-none text-[#007EFF] hover:text-[#007EFF]",
619
+ children: /* @__PURE__ */ r.jsx(me, { className: "h-3 w-3" })
620
+ }
621
+ ) : null
622
+ ] })
623
+ ] }) : /* @__PURE__ */ r.jsx(Te, { meta: e.meta })
624
+ ] })
625
+ ] })
626
+ ] });
627
+ }
628
+ function Ie({ text: e }) {
629
+ return /* @__PURE__ */ r.jsx("span", { className: "inline-flex items-center rounded-md border border-slate-200 bg-white px-2 py-1 text-xs text-slate-700", children: e });
630
+ }
631
+ function Oe({
632
+ item: e,
633
+ onItemClick: n
634
+ }) {
635
+ const l = [e.sourceLabel, e.categoryLabel].filter(Boolean);
636
+ return /* @__PURE__ */ r.jsxs(
637
+ J,
638
+ {
639
+ href: e.href,
640
+ target: e.target,
641
+ rel: e.rel,
642
+ onClick: () => {
643
+ e.onClick?.(), n?.(e);
644
+ },
645
+ className: m(
646
+ "group w-full rounded-xl bg-white text-left transition",
647
+ "hover:border-slate-300 hover:bg-slate-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300"
648
+ ),
649
+ children: [
650
+ /* @__PURE__ */ r.jsx("div", { className: "overflow-hidden rounded-lg ring-1 ring-slate-200", children: /* @__PURE__ */ r.jsxs("div", { className: "relative aspect-4/3 bg-slate-100", children: [
651
+ /* @__PURE__ */ r.jsx(
652
+ "img",
653
+ {
654
+ src: e.thumbnailUrl,
655
+ alt: e.thumbnailAlt ?? e.title,
656
+ className: "absolute inset-0 h-full w-full object-cover",
657
+ loading: "lazy"
658
+ }
659
+ ),
660
+ e.mediaType === "video" ? /* @__PURE__ */ r.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ r.jsx("span", { className: "inline-flex h-10 w-10 items-center justify-center rounded-full bg-black/55 text-white ring-1 ring-white/30", children: /* @__PURE__ */ r.jsx(xe, { className: "h-5 w-5 translate-x-px" }) }) }) : null
661
+ ] }) }),
662
+ /* @__PURE__ */ r.jsxs("div", { className: "mt-2", children: [
663
+ /* @__PURE__ */ r.jsx("div", { className: "truncate text-sm font-medium", children: e.title }),
664
+ e.matchCountText ? /* @__PURE__ */ r.jsx("div", { className: "mt-1 truncate text-xs text-[#666]", children: e.matchCountText }) : null,
665
+ l.length ? /* @__PURE__ */ r.jsx("div", { className: "mt-2 flex flex-wrap gap-2", children: l.map((s) => /* @__PURE__ */ r.jsx(Ie, { text: s }, s)) }) : null
666
+ ] })
667
+ ]
668
+ }
669
+ );
670
+ }
671
+ function Pe({
672
+ action: e,
673
+ className: n
674
+ }) {
675
+ const l = m(
676
+ "flex-none inline-flex items-center justify-center rounded-full border border-slate-200 bg-white",
677
+ "h-9 px-12 text-sm font-medium text-slate-700 no-underline transition",
678
+ "hover:border-slate-300 hover:bg-slate-50 hover:no-underline",
679
+ "focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-300",
680
+ n
681
+ );
682
+ return e.href ? /* @__PURE__ */ r.jsx(
683
+ "a",
684
+ {
685
+ className: l,
686
+ href: e.href,
687
+ target: e.target,
688
+ rel: T(e.rel, e.target),
689
+ onClick: () => e.onClick?.(),
690
+ children: e.label
691
+ }
692
+ ) : /* @__PURE__ */ r.jsx("button", { className: l, type: "button", onClick: e.onClick, children: e.label });
693
+ }
694
+ function O({ action: e }) {
695
+ return e ? /* @__PURE__ */ r.jsxs("div", { className: "mt-3 flex w-full items-center", children: [
696
+ /* @__PURE__ */ r.jsx("span", { className: "h-px flex-1 bg-[#E8E8E8]", "aria-hidden": "true" }),
697
+ /* @__PURE__ */ r.jsx(
698
+ Pe,
699
+ {
700
+ action: e,
701
+ className: m(
702
+ "rounded-full border border-[#E8E8E8] bg-white px-4 py-2 text-sm font-medium text-[#333] transition",
703
+ "hover:border-[#E8E8E8] hover:bg-[#F5F5F5]"
704
+ )
705
+ }
706
+ ),
707
+ /* @__PURE__ */ r.jsx("span", { className: "h-px flex-1 bg-[#E8E8E8]", "aria-hidden": "true" })
708
+ ] }) : null;
709
+ }
710
+ function Fe(e, n) {
711
+ if (e.layout === "list")
712
+ return /* @__PURE__ */ r.jsxs("div", { className: m("space-y-6", e.className), children: [
713
+ /* @__PURE__ */ r.jsx(
714
+ _,
715
+ {
716
+ title: e.title,
717
+ titleIcon: e.titleIcon,
718
+ titleIconBgColor: e.titleIconBgColor,
719
+ titleClassName: e.titleClassName
720
+ }
721
+ ),
722
+ e.items.map((a) => /* @__PURE__ */ r.jsx(Se, { item: a, onItemClick: n }, a.id)),
723
+ /* @__PURE__ */ r.jsx(O, { action: e.footerAction })
724
+ ] });
725
+ if (e.layout === "mediaGrid") {
726
+ const a = e.columns ?? 3, o = a === 2 ? "grid-cols-2" : a === 4 ? "grid-cols-4" : "grid-cols-3";
727
+ return /* @__PURE__ */ r.jsxs("div", { className: m(e.className), children: [
728
+ /* @__PURE__ */ r.jsx(
729
+ _,
730
+ {
731
+ title: e.title,
732
+ titleIcon: e.titleIcon,
733
+ titleIconBgColor: e.titleIconBgColor,
734
+ titleClassName: e.titleClassName
735
+ }
736
+ ),
737
+ /* @__PURE__ */ r.jsx("div", { className: m("grid gap-3", o), children: e.items.map((d) => /* @__PURE__ */ r.jsx(Oe, { item: d, onItemClick: n }, d.id)) }),
738
+ /* @__PURE__ */ r.jsx(O, { action: e.footerAction })
739
+ ] });
740
+ }
741
+ const l = e.columns ?? 3, s = l === 2 ? "grid-cols-2" : l === 4 ? "grid-cols-4" : "grid-cols-3";
742
+ return /* @__PURE__ */ r.jsxs("div", { className: m(e.className), children: [
743
+ /* @__PURE__ */ r.jsx(
744
+ _,
745
+ {
746
+ title: e.title,
747
+ titleIcon: e.titleIcon,
748
+ titleIconBgColor: e.titleIconBgColor,
749
+ titleClassName: e.titleClassName
750
+ }
751
+ ),
752
+ /* @__PURE__ */ r.jsx("div", { className: m("grid gap-3", s), children: e.items.map((a) => /* @__PURE__ */ r.jsx(we, { item: a, onItemClick: n }, a.id)) }),
753
+ /* @__PURE__ */ r.jsx(O, { action: e.footerAction })
754
+ ] });
755
+ }
756
+ function Ye({
757
+ sections: e,
758
+ items: n,
759
+ records: l,
760
+ imageGridColumns: s,
761
+ className: a,
762
+ onItemClick: o
763
+ }) {
764
+ const d = n ?? (l?.length ? ye(l) : void 0), x = e ?? (d?.length ? be(d, s) : []);
765
+ return /* @__PURE__ */ r.jsx("div", { className: m("space-y-5", a), children: x.map((p, g) => /* @__PURE__ */ r.jsx(q.Fragment, { children: Fe(p, o) }, `${p.type}-${g}`)) });
766
+ }
767
+ export {
768
+ Ye as default
769
+ };
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@infinilabs/search-results",
3
+ "version": "0.0.1",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "private": false,
8
+ "type": "module",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "main": "dist/search-results.cjs",
13
+ "module": "dist/search-results.js",
14
+ "types": "dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/search-results.js",
19
+ "require": "./dist/search-results.cjs"
20
+ }
21
+ },
22
+ "scripts": {
23
+ "dev": "vite",
24
+ "build": "vite build",
25
+ "typecheck": "tsc -p tsconfig.json --noEmit",
26
+ "lint": "eslint .",
27
+ "preview": "vite preview",
28
+ "prepublishOnly": "vite build"
29
+ },
30
+ "peerDependencies": {
31
+ "react": ">=17",
32
+ "react-dom": ">=17"
33
+ },
34
+ "dependencies": {
35
+ "clsx": "^2.1.1",
36
+ "lucide-react": "^0.461.0"
37
+ },
38
+ "devDependencies": {
39
+ "@eslint/js": "^9.33.0",
40
+ "@types/react": "^19.1.10",
41
+ "@types/react-dom": "^19.1.7",
42
+ "@vitejs/plugin-react": "^5.0.0",
43
+ "autoprefixer": "^10.4.20",
44
+ "eslint": "^9.33.0",
45
+ "eslint-plugin-react-hooks": "^5.2.0",
46
+ "eslint-plugin-react-refresh": "^0.4.20",
47
+ "globals": "^16.3.0",
48
+ "postcss": "^8.5.3",
49
+ "tailwindcss": "^4.0.0",
50
+ "@tailwindcss/postcss": "^4.0.0",
51
+ "typescript": "~5.8.3",
52
+ "typescript-eslint": "^8.39.1",
53
+ "vite": "^7.1.2",
54
+ "vite-plugin-css-injected-by-js": "^3.5.1",
55
+ "vite-plugin-dts": "^3.9.0"
56
+ }
57
+ }