4import { TABLE_NAME } from "./updateTable";
5
6export default async function(req: Request): Promise<Response> {
7 // body contains:
8 // - title (string)
7}
8
9export default function AssertionViewer({ assertions }: AssertionViewerProps) {
10 const [expandedAssertions, setExpandedAssertions] = useState<Set<string>>(new Set());
11
33});
34
35function extractTableData(html: string) {
36 // Remove all the complex ChatGPT styling and extract clean table data
37 let cleanHtml = html
11}
12
13export default function SamlDecoder({ onDecode, loading, error, samlResponse }: SamlDecoderProps) {
14 const [url, setUrl] = useState('');
15 const [certificate, setCertificate] = useState('');
16- **Readable Table Format**: Applies consistent, professional styling
17- **Mobile Responsive**: Tables scroll horizontally on smaller screens
18- **Copy Functionality**: Export cleaned HTML for use elsewhere
19- **Real-time Processing**: Instant conversion of pasted HTML
20
160 const processedTable = document.getElementById('processedTable');
161
162 function showMessage(message, type = 'error') {
163 messages.innerHTML = `<div class="${type}">${message}</div>`;
164 setTimeout(() => {
167 }
168
169 function showLoading(show) {
170 loading.classList.toggle('show', show);
171 }
228
229 // Auto-resize textarea
230 htmlInput.addEventListener('input', function() {
231 this.style.height = 'auto';
232 this.style.height = Math.min(this.scrollHeight, 300) + 'px';
4import type { SamlResponse } from '../../shared/types.ts';
5
6export default function App() {
7 const [samlResponse, setSamlResponse] = useState<SamlResponse | null>(null);
8 const [loading, setLoading] = useState(false);
1// Shared utility functions for SAML processing
2
3/**
4 * Extract SAML response from URL parameters
5 */
6export function extractSamlFromUrl(url: string): string | null {
7 try {
8 const urlObj = new URL(url);
17 * Decode base64 string
18 */
19export function decodeBase64(encoded: string): string {
20 try {
21 // Handle URL-safe base64
32 * Format XML string with indentation
33 */
34export function formatXml(xml: string): string {
35 try {
36 const parser = new DOMParser();
50 * Get text content from XML element
51 */
52export function getElementText(element: Element | null): string {
53 return element?.textContent?.trim() || '';
54}
57 * Get attribute value from XML element
58 */
59export function getElementAttribute(element: Element | null, attributeName: string): string | undefined {
60 return element?.getAttribute(attributeName) || undefined;
61}
64 * Convert XML NodeList to Array
65 */
66export function nodeListToArray(nodeList: NodeListOf<Element>): Element[] {
67 return Array.from(nodeList);
68}
28โโโ shared/
29โ โโโ types.ts # Shared TypeScript types
30โ โโโ utils.ts # Shared utility functions
31โโโ README.md
32```
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2
3export function ValTownLogo () {
4 return (
5 <svg
A helper function to build a file's email
Simple functional CSS library for Val Town
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.