shadow$provide.module$node_modules$pixi_DOT_js$lib$rendering$renderers$gpu$shader$utils$extractStructAndGroups = function(global, require, module, exports) {
  exports.extractStructAndGroups = function(wgsl) {
    const groupPattern = /@group\((\d+)\)/, bindingPattern = /@binding\((\d+)\)/, namePattern = /var(<[^>]+>)? (\w+)/, typePattern = /:\s*([\w<>]+)/, structMemberPattern = /(\w+)\s*:\s*([\w<>]+)/g, structName = /struct\s+(\w+)/, groups = wgsl.match(/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g)?.map(item => ({group:parseInt(item.match(groupPattern)[1], 10), binding:parseInt(item.match(bindingPattern)[1], 10), name:item.match(namePattern)[2], isUniform:"\x3cuniform\x3e" === item.match(namePattern)[1], 
    type:item.match(typePattern)[1]}));
    if (!groups) {
      return {groups:[], structs:[]};
    }
    wgsl = wgsl.match(/struct\s+(\w+)\s*{([^}]+)}/g)?.map(struct => {
      const name = struct.match(structName)[1];
      return (struct = struct.match(structMemberPattern).reduce((acc, member) => {
        const [name2, type] = member.split(":");
        acc[name2.trim()] = type.trim();
        return acc;
      }, {})) ? {name, members:struct} : null;
    }).filter(({name}) => groups.some(group => group.type === name || group.type.includes(`<${name}>`))) ?? [];
    return {groups, structs:wgsl};
  };
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$rendering$renderers$gpu$shader$utils$extractStructAndGroups.js.map
