Weight functions for edge cracks in thin surface layers