{
  "version": 3,
  "sources": ["../../src/app/ai/agents/evals2/scenarios/images/helpers.ts"],
  "sourcesContent": ["import { assert } from \"@framerjs/shared\"\nimport type { VekterEngine } from \"document/VekterEngine.ts\"\nimport type { CollectionItemNode } from \"document/models/CanvasTree/index.ts\"\nimport { isCollectionItemNode } from \"document/models/CanvasTree/nodes/utils/nodeCheck.ts\"\nimport { ControlType } from \"library/index.ts\"\nimport { getNode, getFrame } from \"../helpers.ts\"\n\nexport function getCollectionItem(engine: VekterEngine, itemId: string): CollectionItemNode {\n\tconst node = getNode(engine, itemId)\n\tassert(isCollectionItemNode(node), `Expected fixture node '${itemId}' to be a collection item.`)\n\treturn node\n}\n\nexport function getNormalizedCmsImageAltText(engine: VekterEngine, itemId: string, imageFieldId: string): string {\n\tconst controlProp = getCollectionItem(engine, itemId).getControlProp(imageFieldId)\n\tassert(controlProp?.type === ControlType.Image, `Expected '${itemId}' to have an image field.`)\n\treturn controlProp.alt?.toLowerCase() ?? \"\"\n}\n\nexport function getNormalizedRegularImageAltText(engine: VekterEngine, id: string): string {\n\treturn getFrame(engine, id).altAttribute?.toLowerCase() ?? \"\"\n}\n\nexport function getKeywordMatchCount(altText: string, keywords: readonly string[]): number {\n\treturn keywords.filter(keyword => altText.includes(keyword.toLowerCase())).length\n}\n"],
  "mappings": ";;;;;;;;;;;;AAOO,SAAS,kBAAkB,QAAsB,QAAoC;AAC3F,QAAM,OAAO,QAAQ,QAAQ,MAAM;AACnC,SAAO,qBAAqB,IAAI,GAAG,0BAA0B,MAAM,4BAA4B;AAC/F,SAAO;AACR;AAEO,SAAS,6BAA6B,QAAsB,QAAgB,cAA8B;AAChH,QAAM,cAAc,kBAAkB,QAAQ,MAAM,EAAE,eAAe,YAAY;AACjF,SAAO,aAAa,8BAA4B,aAAa,MAAM,2BAA2B;AAC9F,SAAO,YAAY,KAAK,YAAY,KAAK;AAC1C;AAEO,SAAS,iCAAiC,QAAsB,IAAoB;AAC1F,SAAO,SAAS,QAAQ,EAAE,EAAE,cAAc,YAAY,KAAK;AAC5D;AAEO,SAAS,qBAAqB,SAAiB,UAAqC;AAC1F,SAAO,SAAS,OAAO,aAAW,QAAQ,SAAS,QAAQ,YAAY,CAAC,CAAC,EAAE;AAC5E;",
  "names": []
}
