{"version":3,"sources":["node_modules\\react-native-web\\dist\\modules\\createDOMProps\\index.js"],"names":["_AccessibilityUtil","require","_AccessibilityUtil2","_interopRequireDefault","_StyleSheet","_StyleSheet2","_registry","_registry2","obj","__esModule","default","_objectWithoutProperties","keys","target","i","indexOf","Object","prototype","hasOwnProperty","call","emptyObject","styles","create","buttonReset","appearance","backgroundColor","color","font","textAlign","linkReset","textDecorationLine","listReset","listStyle","pointerEventStyles","auto","pointerEvents","none","resolver","style","resolve","createDOMProps","rnProps","resolveStyle","arguments","length","undefined","props","accessibilityLabel","accessibilityLiveRegion","accessible","importantForAccessibility","rnStyle","testID","type","accessibilityComponentType","accessibilityRole","accessibilityTraits","domProps","role","propsToAriaRole","pointerEventStyle","reactNativeStyle","_ref","className","tabIndex","propsToTabIndex","rel","module","exports"],"mappings":"AAAA,GAAIA,oBAAmBC,QAAQ,sBAAR,CAAvB,CAAuD,GAAIC,qBAAoBC,uBAAuBH,kBAAvB,CAAxB;AACvD,GAAII,aAAYH,QAAQ,uBAAR,CAAhB,CAAiD,GAAII,cAAaF,uBAAuBC,WAAvB,CAAjB;AACjD,GAAIE,WAAUL,QAAQ,gCAAR,CAAd,CAAwD,GAAIM,YAAWJ,uBAAuBG,SAAvB,CAAf,CAAiD,QAASH,uBAAT,CAAgCK,GAAhC,CAAoC,CAAC,MAAOA,MAAKA,IAAIC,UAAT,CAAoBD,GAApB,CAAwB,CAACE,QAAQF,GAAT,CAA/B,CAA8C,SAASG,yBAAT,CAAkCH,GAAlC,CAAsCI,IAAtC,CAA2C,CAAC,GAAIC,QAAO,EAAX,CAAc,IAAI,GAAIC,EAAR,GAAaN,IAAb,CAAiB,CAAC,GAAGI,KAAKG,OAAL,CAAaD,CAAb,GAAiB,CAApB,CAAsB,SAAS,GAAG,CAACE,OAAOC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCX,GAArC,CAAyCM,CAAzC,CAAJ,CAAgD,SAASD,OAAOC,CAAP,EAAUN,IAAIM,C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N,SAASM,SAAT,CAAmBN,SAASM,SAAT,CAAmBN,SAASM,SAAT,CAAmB,GAAnB,CAAuBA,SAA1C,CAAoDA,SAAvE;AACC;AACD,GAAGb,4BAA4B,qBAA/B,CAAqD;AACrDO,SAAS,aAAT,EAAwB,IAAxB;AACC;AACD,GAAG,MAAOC,KAAP,GAAc,QAAjB,CAA0B;AAC1BD,SAASC,IAAT,CAAcA,IAAd;AACA,GAAGA,OAAO,QAAV,CAAmB;AACnBD,SAASJ,IAAT,CAAc,QAAd;AACC,CAFD,IAEM,IAAGK,OAAO,MAAP,EAAeD,SAAS5C,MAAT,GAAkB,QAApC,CAA6C;AACnD4C,SAASS,GAAT,CAAa,CAACT,SAASS,GAAT,EAAc,EAAf,EAAmB,sBAAhC;AACC;AACA;AACD,GAAG5B,OAAO,IAAV,CAAe;AACfmB,SAASnB,KAAT,CAAeA,KAAf;AACC;AACD,GAAG,MAAOc,OAAP,GAAgB,QAAnB,CAA4B;AAC5BK,SAAS,aAAT,EAAwBL,MAAxB;AACC;AACD,GAAG,MAAOC,KAAP,GAAc,QAAjB,CAA0B;AAC1BI,SAASJ,IAAT,CAAcA,IAAd;AACC;;AAED,MAAOI,SAAP;AACC,CAhED;;AAkEAU,OAAOC,OAAP,CAAe5B,cAAf","file":"index.js","sourceRoot":"d:/Work/Office/react-native-on-web/cli/tmpl/project","sourcesContent":["var _AccessibilityUtil=require('../AccessibilityUtil');var _AccessibilityUtil2=_interopRequireDefault(_AccessibilityUtil);\nvar _StyleSheet=require('../../apis/StyleSheet');var _StyleSheet2=_interopRequireDefault(_StyleSheet);\nvar _registry=require('../../apis/StyleSheet/registry');var _registry2=_interopRequireDefault(_registry);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _objectWithoutProperties(obj,keys){var target={};for(var i in obj){if(keys.indexOf(i)>=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;}\n\nvar emptyObject={};\n\nvar styles=_StyleSheet2.default.create({\nbuttonReset:{\nappearance:'none',\nbackgroundColor:'transparent',\ncolor:'inherit',\nfont:'inherit',\ntextAlign:'inherit'},\n\nlinkReset:{\nbackgroundColor:'transparent',\ncolor:'inherit',\ntextDecorationLine:'none'},\n\nlistReset:{\nlistStyle:'none'}});\n\n\n\nvar pointerEventStyles=_StyleSheet2.default.create({\nauto:{\npointerEvents:'auto'},\n\n'box-none':{\npointerEvents:'box-none'},\n\n'box-only':{\npointerEvents:'box-only'},\n\nnone:{\npointerEvents:'none'}});\n\n\n\nvar resolver=function resolver(style){return _registry2.default.resolve(style);};\n\nvar createDOMProps=function createDOMProps(rnProps){var resolveStyle=arguments.length>1&&arguments[1]!==undefined?arguments[1]:resolver;\nvar props=rnProps||emptyObject;var\n\naccessibilityLabel=\n\n\n\n\n\n\n\n\n\n\n\n\n\nprops.accessibilityLabel,accessibilityLiveRegion=props.accessibilityLiveRegion,accessible=props.accessible,importantForAccessibility=props.importantForAccessibility,pointerEvents=props.pointerEvents,rnStyle=props.style,testID=props.testID,type=props.type,accessibilityComponentType=props.accessibilityComponentType,accessibilityRole=props.accessibilityRole,accessibilityTraits=props.accessibilityTraits,domProps=_objectWithoutProperties(props,['accessibilityLabel','accessibilityLiveRegion','accessible','importantForAccessibility','pointerEvents','style','testID','type','accessibilityComponentType','accessibilityRole','accessibilityTraits']);\n\nvar role=_AccessibilityUtil2.default.propsToAriaRole(props);\nvar pointerEventStyle=pointerEvents!==undefined&&pointerEventStyles[pointerEvents];\nvar reactNativeStyle=[\nrole==='button'&&styles.buttonReset||\nrole==='link'&&styles.linkReset||\nrole==='list'&&styles.listReset,\nrnStyle,\npointerEventStyle];var _ref=\n\nresolveStyle(reactNativeStyle)||emptyObject,className=_ref.className,style=_ref.style;\n\nif(accessible===true){\ndomProps.tabIndex=_AccessibilityUtil2.default.propsToTabIndex(props);\n}\nif(typeof accessibilityLabel==='string'){\ndomProps['aria-label']=accessibilityLabel;\n}\nif(typeof accessibilityLiveRegion==='string'){\ndomProps['aria-live']=accessibilityLiveRegion==='none'?'off':accessibilityLiveRegion;\n}\nif(typeof className==='string'&&className!==''){\ndomProps.className=domProps.className?domProps.className+' '+className:className;\n}\nif(importantForAccessibility==='no-hide-descendants'){\ndomProps['aria-hidden']=true;\n}\nif(typeof role==='string'){\ndomProps.role=role;\nif(role==='button'){\ndomProps.type='button';\n}else if(role==='link'&&domProps.target==='_blank'){\ndomProps.rel=(domProps.rel||'')+' noopener noreferrer';\n}\n}\nif(style!=null){\ndomProps.style=style;\n}\nif(typeof testID==='string'){\ndomProps['data-testid']=testID;\n}\nif(typeof type==='string'){\ndomProps.type=type;\n}\n\nreturn domProps;\n};\n\nmodule.exports=createDOMProps;"]}