{"version":3,"file":"Broadcast.Bmo09a80.mjs","names":["useState","BROADCAST_ID","useRef","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/FZBjiDAyqo6FgJAknvGB/Ti5wlGwnK5gQep25FsOb/Search.js","https:/framerusercontent.com/modules/6IGgZERg2dpvrXhRUGkh/gUQdZPIjjr5HetFURKe0/Broadcast.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function BroadcastSearch(props){const[searchQuery,setSearchQuery]=useState(\"\");const BROADCAST_ID=\"3.14px solid transparent\";const uniqueId=useRef(`broadcast-search-${Math.random().toString(36).substring(2,11)}`);useEffect(()=>{// Initial filter\nfilterItems(searchQuery);// Set up an interval to refresh the data\nconst intervalId=setInterval(()=>filterItems(searchQuery),1e3);// Clean up on unmount\nreturn()=>clearInterval(intervalId);},[searchQuery]);const filterItems=query=>{// Find broadcaster elements\nconst broadcasterElements=document.querySelectorAll(`[style*=\"border: ${BROADCAST_ID}\"]`);if(broadcasterElements.length>0){const broadcaster=broadcasterElements[0];const children=Array.from(broadcaster.children);// Tag each element with this filter's search state\nchildren.forEach(child=>{const textContent=child.textContent||child.innerText||\"\";const matchesSearch=!query.trim()||textContent.toLowerCase().includes(query.toLowerCase());// Store matching state as a data attribute\nchild.setAttribute(`data-search-${uniqueId.current}`,matchesSearch?\"match\":\"no-match\");});// Now check all filters to determine visibility\nchildren.forEach(child=>{// Get all filter data attributes on this child\nconst attrs=child.getAttributeNames().filter(name=>name.startsWith(\"data-filter-\")||name.startsWith(\"data-search-\"));// Item is visible only if it matches ALL active filters\nconst shouldShow=attrs.every(attr=>{return child.getAttribute(attr)===\"match\";});child.style.display=shouldShow?\"\":\"none\";});}};const handleSearchChange=e=>{setSearchQuery(e.target.value);};// Create a style element for the placeholder color\nuseEffect(()=>{const styleEl=document.createElement(\"style\");styleEl.innerHTML=`\n            #${uniqueId.current}::placeholder {\n                color: ${props.placeholderColor};\n            }\n        `;document.head.appendChild(styleEl);return()=>{document.head.removeChild(styleEl);};},[props.placeholderColor]);return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\"},children:[/*#__PURE__*/_jsx(\"input\",{id:uniqueId.current,type:\"text\",value:searchQuery,onChange:handleSearchChange,placeholder:props.placeholder,style:{width:\"100%\",height:\"100%\",padding:props.inputPadding,paddingLeft:props.showSearchIcon?\"36px\":props.inputPadding,border:`${props.border.borderWidth}px ${props.border.borderStyle} ${props.border.borderColor}`,borderRadius:props.borderRadius,...props.font,color:props.fontColor,backgroundColor:props.inputBackground,outline:\"none\",boxSizing:\"border-box\"}}),props.showSearchIcon&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:\"10px\",top:\"50%\",transform:\"translateY(-50%)\",pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M21 21L15 15M17 10C17 13.866 13.866 17 10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10Z\",stroke:props.iconColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})})]});}// Default props\nBroadcastSearch.defaultProps={placeholder:\"Search...\",placeholderColor:\"#888888\",showSearchIcon:true,iconColor:\"#888888\",fontColor:\"#000000\",inputBackground:\"white\",inputPadding:\"10px\",borderRadius:\"8px\",border:{borderWidth:1,borderStyle:\"solid\",borderColor:\"#dddddd\"},font:{family:\"Inter\",fontSize:14,fontWeight:400,lineHeight:1.5,letterSpacing:0,textAlign:\"left\"}};// Property controls\naddPropertyControls(BroadcastSearch,{placeholder:{type:ControlType.String,title:\"Placeholder\",defaultValue:\"Search...\"},placeholderColor:{type:ControlType.Color,title:\"Placeholder Color\",defaultValue:\"#888888\"},showSearchIcon:{type:ControlType.Boolean,title:\"Show Icon\",defaultValue:true},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#888888\",hidden(props){return!props.showSearchIcon;}},fontColor:{type:ControlType.Color,title:\"Font Color\",defaultValue:\"#000000\"},inputBackground:{type:ControlType.Color,title:\"Input Background\",defaultValue:\"white\"},inputPadding:{type:ControlType.Padding,title:\"Input Padding\",defaultValue:\"10px\"},border:{type:ControlType.Border,title:\"Border\",defaultValue:{borderWidth:1,borderStyle:\"solid\",borderColor:\"#dddddd\"}},borderRadius:{type:ControlType.BorderRadius,title:\"Border Radius\",defaultValue:\"8px\"},font:{type:ControlType.Font,controls:\"extended\",title:\"Font\",defaultValue:{family:\"Inter\",fontSize:14,fontWeight:400,lineHeight:1.5,letterSpacing:0,textAlign:\"left\"},description:\"v1.0 \\n[via SegmentUI](https://www.segmentUI.com)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BroadcastSearch\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\",\"framerDisableUnlink\":\"*\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Search.map","import{jsx as _jsx}from\"react/jsx-runtime\";// Unique identifier for the broadcaster\nconst BROADCAST_ID=\"3.14px solid transparent\";export function Broadcaster(){return{style:{border:BROADCAST_ID},animate:{scale:1,transition:{duration:.1}},onAnimationComplete(){console.log(\"Starting broadcaster\");// Find our broadcaster element using the transparent border\nconst broadcasterElements=document.querySelectorAll(`[style*=\"border: ${BROADCAST_ID}\"]`);if(broadcasterElements.length>0){const broadcaster=broadcasterElements[0];const children=Array.from(broadcaster.children);console.log(\"Broadcaster found with\",children.length,\"children\");// Broadcast data about this element and its children\nconst broadcastData={timestamp:Date.now(),elementCount:children.length,children:children.map((child,index)=>({index,element:child,width:child.offsetWidth,height:child.offsetHeight}))};// Store the data on window object for other components to access\nif(!window.broadcastedData){window.broadcastedData={};}// Use a unique ID for this broadcaster\nconst broadcasterId=`broadcast-${Date.now()}`;window.broadcastedData[broadcasterId]=broadcastData;console.log(\"Data broadcasted:\",broadcastData);// Clean up any existing interval\nif(window.broadcastInterval){clearInterval(window.broadcastInterval);console.log(\"Cleared existing broadcast interval\");}}}};}// Listener component with click functionality to delete the last item\nexport function BroadcastListener(){return{animate:{scale:1,transition:{duration:.1}},onAnimationComplete(){console.log(\"Broadcast listener activated\");// Find all broadcaster elements\nconst broadcasterElements=document.querySelectorAll(`[style*=\"border: ${BROADCAST_ID}\"]`);console.log(\"Found broadcasters:\",broadcasterElements.length);// Check window object for broadcast data\nif(window.broadcastedData){console.log(\"Received broadcast data:\",window.broadcastedData);}},// Add click handler to delete the last item\nonTap(){console.log(\"Listener clicked - removing last item from broadcast data\");if(window.broadcastedData){const broadcastKeys=Object.keys(window.broadcastedData);if(broadcastKeys.length>0){const lastBroadcastId=broadcastKeys[broadcastKeys.length-1];const broadcastData=window.broadcastedData[lastBroadcastId];// Check if there are children to remove\nif(broadcastData.children&&broadcastData.children.length>0){// Get the last child\nconst lastChild=broadcastData.children.pop();broadcastData.elementCount=broadcastData.children.length;console.log(\"Removed last child from data:\",lastChild);// Actually remove the element from the DOM if we have a reference\nif(lastChild.element&&lastChild.element.parentNode){lastChild.element.parentNode.removeChild(lastChild.element);console.log(\"Removed element from DOM\");}else{console.log(\"Could not find DOM element to remove\");// Fallback: try to find the element by other means\nconst broadcasterElements=document.querySelectorAll(`[style*=\"border: ${BROADCAST_ID}\"]`);if(broadcasterElements.length>0){const broadcaster=broadcasterElements[0];const children=Array.from(broadcaster.children);if(children.length>0){const lastDOMChild=children[children.length-1];lastDOMChild.parentNode?.removeChild(lastDOMChild);console.log(\"Removed last child using DOM search\");}}}console.log(\"Updated broadcast data:\",broadcastData);}else{console.log(\"No children to remove in the broadcast data\");}}else{console.log(\"No broadcast data found to modify\");}}else{console.log(\"No broadcast data available\");}}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withBroadcaster(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...Broadcaster(props)});};}withBroadcaster.displayName=\"Broadcaster\";export function withBroadcastListener(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...BroadcastListener(props)});};}withBroadcastListener.displayName=\"BroadcastListener\";\nexport const __FramerMetadata__ = {\"exports\":{\"BroadcastListener\":{\"type\":\"override\",\"name\":\"BroadcastListener\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBroadcaster\":{\"type\":\"reactHoc\",\"name\":\"withBroadcaster\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBroadcastListener\":{\"type\":\"reactHoc\",\"name\":\"withBroadcastListener\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Broadcaster\":{\"type\":\"override\",\"name\":\"Broadcaster\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Broadcast.map"],"mappings":"uNAKG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,EAAY,GAAgBA,EAAS,GAAG,CAAqD,EAASE,EAAO,oBAAoB,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,UAAU,EAAE,GAAG,GAAG,CAAC,MAAc,CACrP,EAAY,EAAY,CACxB,IAAM,EAAW,gBAAgB,EAAY,EAAY,CAAC,IAAI,CAC9D,UAAU,cAAc,EAAW,EAAG,CAAC,EAAY,CAAC,CAAC,IAAM,EAAY,GAAO,CAC9E,IAAM,EAAoB,SAAS,iBAAiB,8CAAqC,CAAC,GAAG,EAAoB,OAAO,EAAE,CAA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